Linea API
Introduction
Linea is a new Layer 2 network built to scale Ethereum by offering faster and more cost-efficient transactions while maintaining Ethereum’s security and decentralization. Linea is compatible with Ethereum's EVM, which allows developers to easily migrate or extend their decentralized applications (dApps) to the Linea network. It supports ERC-20 swaps and other DeFi-related actions, making it a viable option for various decentralized applications.
Supported Networks
The Web3 Data API is available for the following Linea networks:
- Linea Mainnet
- Linea Sepolia Testnet
Network Details
Network | Chain ID | EVM Chain |
---|---|---|
Linea Mainnet | 0xe708 (59144) | EvmChain.LINEA |
Linea Sepolia Testnet | 0xe705 (59141) | EvmChain.LINEA_SEPOLIA |
Supported APIs
The following APIs are supported for Linea:
Wallet API
The Wallet API enables you to interact with wallet data on the Linea blockchain.
- Get Wallet History on Linea
- Get Wallet Token Balances on Linea
- Get Wallet Token Approvals on Linea
- Get Wallet NFT Balances on Linea
- Get Wallet DeFi Positions on Linea
- Get Wallet Net-worth on Linea
- Get Wallet PnL on Linea
- Get Wallet Details on Linea
- Get Wallet Domains on Linea
NFT API
The NFT API allows you to interact with NFT-related data on Linea. You can:
- Get NFTs on Linea
- Get NFT Metadata on Linea
- Get NFT Transfers on Linea
- Get NFT Collections on Linea
- Get NFT Owners on Linea
- Get NFT Prices on Linea
- Get NFT Trades on Linea
- Get NFT Stats on Linea
- Get NFT Traits and Rarity on Linea
Token API
The Token API provides methods for interacting with ERC-20 tokens on Linea. Choose from the following actions:
- Get Token Metadata on Linea
- Get Token Price on Linea
- Get Token Balances on Linea
- Get Token Approvals on Linea
- Get Token Transfers on Linea
- Get Token Top Traders on Linea
- Get Token Pairs & Liquidity on Linea
- Get Token Stats on Linea
- Get Token Owners on Linea
DeFi API
The DeFi API enables interaction with decentralized finance positions and data on Linea:
Entity API
The Entity API allows you to interact with various entities on Linea, such as exchanges or other organizations:
Price API
Retrieve price data for tokens and NFTs on Linea using the Price API:
Blockchain API
The Blockchain API gives access to blockchain-level data such as blocks, transactions, and logs:
- Get Blocks on Linea
- Get Transactions on Linea
- Get Logs on Linea
- Get Stats on Linea
- Get Latest Block Number on Linea
Unlock the Power of Linea with Moralis
Curious about how you can leverage the full potential of Linea? Check out our Linea page to see how Moralis can help you build faster and smarter. With features like easy access to on-chain data, token balances, and NFT management, Moralis simplifies Linea development for all kinds of dapps.
Discover more about what you can build on Linea with Moralis:
Learn more on our Linea page