Tokens and Chains
Get a list of supported tokens, optionally filtered by chain ID.
interface TokensParams {
chainId?: string;
}
//Example implementation
const tokens = await getTokens();// to fetch all tokens from all chains
const tokens = await getTokens("1");// to fetch all tokens from chain 1
//Example response
{
"status": "success",
"data":{
"1":[
{
"networkType": "evm",
"address": "0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee",
"chainId": "1",
"blockchain": "Ethereum",
"decimals": 18,
"name": "Ethereum",
"symbol": "ETH",
"image": "https://assets.coingecko.com/coins/images/279/standard/ethereum.png?1595348880",
"lastPrice": 2703.62,
"isEnabled": true,
"isFlagged": false,
"isNative": true,
"isPopular": true
},
//other coins on chain 1
]
}
}getChains()
Get a list of supported blockchain networks.
Last updated
Was this helpful?