Base URL: https://api.megapilled.com — No authentication required. Rate limits apply per IP.
Returns token balances for a wallet address.
curl https://api.megapilled.com/wallet/0xcb6ad83a90da0887a3560ebc13887532fcde7d23
200 OK{
"status": "success",
"data": {
"tokens": [
{
"token_standard": "ERC20",
"token_name": "USDT0",
"token_symbol": "USDT0",
"token_decimals": 6,
"contract_address": "0xb8ce59fc...",
"balance": "8323741.535991"
},
{
"token_standard": "ERC721",
"token_name": "Uniswap V3 Positions NFT-V1",
"token_symbol": "UNI-V3-POS",
"token_decimals": null,
"contract_address": "0x2b781c57...",
"balance": "3"
}
]
}
}
| Field | Type | Description |
|---|---|---|
token_standard | string | "ERC20", "ERC721", or "ERC1155" |
token_name | string | Token name |
token_symbol | string or null | Token symbol |
token_decimals | number or null | Decimal places (null for ERC721/1155) |
contract_address | string | Token contract address |
balance | string | Decimal-adjusted for ERC20. Raw count for ERC721/1155 |
token_id | string | ERC-1155 only. Omitted for ERC-20/721 |
Returns the top holders of a token, sorted by balance descending.
curl https://api.megapilled.com/holders/0xb8ce59fc3717ada4c02eadf9682a9e934f625ebb
200 OK{
"status": "success",
"data": {
"token_metadata": {
"contract_address": "0xb8ce59fc...",
"token_standard": "ERC20",
"token_name": "USDT0",
"token_symbol": "USDT0",
"token_decimals": 6
},
"total_holders": 6062,
"holders": [
{
"address": "0x6c8e5d46...",
"balance": "11476592.834513"
}
]
}
}
| Field | Type | Description |
|---|---|---|
address | string | Wallet address |
balance | string | Decimal-adjusted for ERC20. Raw count for ERC721/1155 |
token_id | string | ERC-1155 only. Omitted for ERC-20/721 |
total_holders is the count of unique holder addressesErrors return a JSON object with an error field describing what went wrong:
{ "error": "description" }
| Status | Meaning |
|---|---|
| 404 | Endpoint or resource not found |
| 429 | Too many requests |
| 503 | Service temporarily unavailable |