On this page
Before you can broadcast a transaction, you need a fistful of numbers: the current fees, how much gas the operation will burn, the chain you're on, and where this transaction sits in your account's ordering. Getting any one of them wrong means a rejected or stuck transaction. CryptoAPI's transaction-meta endpoint hands you all of them in a single call.
One call, everything you need to build a tx
curl "https://api.cryptoapi.so/api/blockchain/transaction-meta?network=ethereum&address=0xYourAddress" \
-H "key: YOUR_API_KEY"This is a GET request, and like every /api/* endpoint it requires authentication. The network parameter accepts ethereum, bnb, or tron. The address is optional, but you'll almost always pass it — that's what makes the nonce and balance fields meaningful for your sender.
A realistic response:
{
"success": true,
"data": {
"feeData": {
"maxFeePerGas": "32000000000",
"maxPriorityFeePerGas": "1500000000",
"gasPrice": "30000000000"
},
"gasLimit": {
"transfer": "21000",
"erc20Transfer": "65000",
"contractCall": "120000"
},
"chainId": "1",
"nonce": 42,
"balance": "1840000000000000000"
}
}What each field is for
- **
feeData** — the price side of the equation. On EIP-1559 chains (Ethereum, BNB) you build withmaxFeePerGas(the ceiling you'll pay per unit of gas) andmaxPriorityFeePerGas(the tip to the validator).gasPriceis the legacy single-value field, handy for non-1559 transactions or as a fallback. Values are returned in wei as strings, so you never lose precision. - **
gasLimit** — the quantity side. A plain native transfer istransfer(21000 on EVM chains), an ERC-20/BEP-20 token move iserc20Transfer, and anything touching contract logic iscontractCall. Pick the one that matches what you're sending. - **
chainId** — replay protection. Signing with the right chain ID (1for Ethereum mainnet,56for BNB Smart Chain) ensures a transaction valid on one network can't be replayed on another. - **
nonce** — ordering. Every account has a strictly incrementing counter; this is the next value to use. Skip it or reuse it and the network drops or stalls your transaction. - **
balance** — the sender's native balance in the smallest unit (wei for ETH/BNB, sun for TRX). Use it to sanity-check that value plus fees won't overdraw the account before you sign.
How it feeds the send flow
CryptoAPI is non-custodial: it never holds or sees your private key, and it does not sign for you. The canonical flow is three steps:
- Call
transaction-metato fetch fees, gas, chainId and nonce. - Build and sign the transaction client-side using those values.
- Broadcast the already-signed raw transaction with
POST /api/wallet/send:
curl -X POST "https://api.cryptoapi.so/api/wallet/send" \
-H "key: YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"rawTx": "0x02f86b0182...", "network": "ethereum"}'{
"success": true,
"data": {
"txid": "0x9f3c...e21a"
}
}Because the meta values come from the live chain, fetch them fresh right before signing — fees and nonces move fast.
Get started
Every /api/* call needs an API key (pass it as a key header) or an Authorization: Bearer <JWT>. Grab a key from your dashboard and explore the full reference at https://api.cryptoapi.so/api/doc. The payload is chain-specific. Bitcoin includes fee rates and, for an address, UTXOs.