Interacting with the Ethereum blockchain has become a cornerstone of modern Web3 development. Whether you're building a decentralized application (dApp), creating a wallet interface, or analyzing NFT market trends, accessing real-time blockchain data is essential. This is where ETH API comes in — a powerful toolset that simplifies how developers retrieve tokens, transactions, metadata, NFTs, and price information from Ethereum.
What Is ETH API?
ETH API, short for Ethereum Application Programming Interface, is a collection of protocols, methods, and rules designed to streamline interactions with the Ethereum blockchain. It enables developers to seamlessly integrate on-chain data and Web3 functionalities into their decentralized applications without needing to build complex infrastructure from scratch.
One of the biggest challenges in Web3 development is establishing reliable communication with blockchain networks. Doing so manually requires significant technical expertise, time, and resources. ETH API eliminates this hurdle by offering pre-built endpoints that allow instant access to critical blockchain data.
With ETH API, you can:
- Retrieve wallet balances (native and ERC-20 tokens)
- Fetch NFT holdings and metadata
- Monitor real-time transactions
- Track token prices
- Set up event streams via webhooks
By leveraging these capabilities, developers can focus more on innovation and less on backend complexity — accelerating dApp development while maintaining high performance and scalability.
👉 Discover how easy it is to integrate real-time Ethereum data into your app.
Core Features of ETH API
Wallet API: Access Wallet Data Instantly
The Wallet API is ideal for developers looking to integrate wallet functionality into their dApps or build full-featured Web3 wallets. It supports over 500 million addresses across all major EVM-compatible blockchain networks.
Using just a few lines of code, you can retrieve:
- Native cryptocurrency balance (e.g., ETH)
- ERC-20 token balances
- NFT holdings
- Transaction history
- Dollar-denominated net worth
Here are three key endpoints:
getNativeBalance() – Get Native Token Balance
const response = await Moralis.EvmApi.balance.getNativeBalance({
"chain": "0x1",
"address": "0xDC24316b9AE028F1497c275EB9192a3Ea0f67022"
});This returns the ETH balance of any given wallet address on the Ethereum mainnet.
getWalletTokenBalances() – Fetch ERC-20 Token Balances
const response = await Moralis.EvmApi.token.getWalletTokenBalances({
"chain": "0x1",
"address": "0x1f9090aaE28b8a3dCeaDf281B0F12828e676c326"
});This endpoint retrieves all ERC-20 tokens held by a specific wallet, including token symbols, amounts, and contract addresses.
getWalletNFTs() – List All NFTs in a Wallet
const response = await Moralis.EvmApi.nft.getWalletNFTs({
"chain": "0x1",
"address": "0xff3879b8a363aed92a6eaba8f61f1a96a9ec3c1e"
});Retrieve a complete list of NFTs owned by a wallet, including collection names, token IDs, and metadata links.
NFT API: Unlock NFT Data at Scale
The NFT API is the go-to solution for fetching NFT-related data across major blockchain networks. It supports over 3 million NFT collections — from newly minted drops to iconic ones like CryptoPunks and Pudgy Penguins.
With this API, you can:
- Retrieve NFT metadata (image, traits, description)
- Track NFT transfers and ownership history
- Find the lowest listed price for any NFT collection
Key Endpoints:
getNFTMetadata() – Get NFT Metadata
const response = await Moralis.EvmApi.nft.getNFTMetadata({
"chain": "0x1",
"address": "0xb47e3cd837dDF8e4c57F05d70Ab865de6e193BBB",
"tokenId": "1"
});Fetch detailed metadata for a specific NFT, including image URL, attributes, and rarity scores.
getWalletNFTTransfers() – Track NFT Transfer History
const response = await Moralis.EvmApi.nft.getWalletNFTTransfers({
"chain": "0x1",
"address": "0x1f9090aaE28b8a3dCeaDf281B0F12828e676c326"
});Monitor all incoming and outgoing NFT transfers for a given wallet.
getNFTLowestPrice() – Find the Best NFT Listing Price
const response = await Moralis.EvmApi.nft.getNFTLowestPrice({
"chain": "0x1",
"address": "0xBC4CA0EdA7647A8aB7C2061c2E118A18a936f13D"
});Identify the lowest current sale price for any NFT collection across supported marketplaces.
👉 Start pulling live NFT and token data in minutes.
Streams API: Real-Time Blockchain Event Monitoring
The Streams API allows developers to set up real-time data pipelines using webhooks. Instead of constantly polling the blockchain, you can receive instant notifications whenever specific events occur — such as transactions, smart contract interactions, or NFT transfers.
Supporting over 44 million addresses across major chains, this tool is perfect for:
- Building real-time dashboards
- Triggering automated actions in dApps
- Detecting suspicious activity
How to Set Up a Stream in 3 Steps:
- Configure the Stream: Choose the blockchain network, define the event type (e.g., incoming ETH transfer), and specify your webhook URL.
- Create the Stream: Generate a test webhook to verify functionality.
- Add Watch Addresses: Input the wallet or contract addresses you want to monitor.
Once configured, your backend will receive instant HTTP POST requests every time a monitored event occurs — enabling true real-time responsiveness.
Step-by-Step Guide: Fetch On-Chain Data Using ETH API
Now that you understand the core components, let’s walk through how to use ETH API in practice.
Prerequisites
Before starting, ensure you have:
- Node.js v14 or later
- npm or Yarn package manager
We’ll use JavaScript in this tutorial, but ETH API also supports Python, TypeScript, and more.
Step 1: Get Your Moralis API Key
To access ETH API endpoints, you need an API key from Moralis:
- Sign up at Moralis.io
- Go to your dashboard
- Click “Settings” > “API Keys”
- Copy your key
Save this key securely — you’ll use it to initialize the SDK.
Step 2: Write the Script
Initialize a new project:
npm install moralis @moralisweb3/common-evm-utilsCreate an index.js file:
const Moralis = require("moralis").default;
const { EvmChain } = require("@moralisweb3/common-evm-utils");
const runApp = async () => {
await Moralis.start({
apiKey: "YOUR_API_KEY_HERE",
});
const address = '0x26fcbd3afebbe28d0a8684f790c48368d21665b5';
const chain = EvmChain.ETHEREUM;
const response = await Moralis.EvmApi.balance.getNativeBalance({
address,
chain,
});
console.log(response.toJSON());
};
runApp();Replace YOUR_API_KEY_HERE with your actual key.
Step 3: Run the Code
Execute the script:
node index.jsYou’ll see output like:
{
"balance": "50930089151337467803762"
}This value is in wei — convert it to ETH by dividing by (10^{18}).
Frequently Asked Questions (FAQ)
Q: Is ETH API free to use?
A: Many providers offer free tiers with rate-limited access. Paid plans provide higher throughput and advanced features like real-time streams.
Q: Can I use ETH API for non-Ethereum EVM chains?
A: Yes! Most ETH APIs support Binance Smart Chain, Polygon, Avalanche, and other EVM-compatible networks.
Q: Do I need to run my own node?
A: No — ETH API abstracts away node management, giving you instant access without infrastructure overhead.
Q: How secure is my API key?
A: Never expose your API key in frontend code. Use backend servers or environment variables to protect sensitive credentials.
Q: Can I track token prices with ETH API?
A: Yes — many APIs include price endpoints that return USD values for tokens and NFTs using aggregated market data.
Q: What programming languages are supported?
A: JavaScript/Node.js, Python, TypeScript, and REST clients in any language can integrate with ETH API.
👉 See what’s possible when you connect your app to Ethereum’s live data stream.