Aggregator API's
You can optionally use our API's to integrate Kanalabs with your application
SWAGGER LINK - https://ag.kanalabs.io/swagger
TOKEN LIST API
you can use our token list api which also have current market price
LINK - https://ag.kanalabs.io/tokens
Example code :
const response = await axios.get('https://ag.kanalabs.io/tokens', {
params: {
chain: KanaChainID.aptos,
},
headers: {
'Content-Type': 'application/json',
'X-API-KEY': '//* YOUR API KEY *//',
},
});
NOTE: KanaChainID.aptos is enum of chains that maintained by kanalabs
enum KanaChainID {
'solana' = 1,
'aptos' = 2,
'polygon' = 3,
'bsc' = 4,
'sui' = 5,
'ethereum' = 6,
'base' = 7,
'zkSync' = 9,
'Avalanche' = 10,
'Arbitrum' = 11,
}
you can also pass an array of tokens if u want to get token details specifical
const tokens = ['0x1::aptos_coin::AptosCoin'] // u can add more tokens
const response = await axios.get('https://ag.kanalabs.io/tokens', {
params: {
chain: KanaChainID.aptos,
tokens: JSON.stringify(tokens), // pls note here , u need to stringify the array
},
headers: {
'Content-Type': 'application/json',
'X-API-KEY': '//* YOUR API KEY *//',
},
});
Last updated