How to get token information?

Is there any way to fetch ICRC token informations such as price(usd, icp), total volume, total supply?
I am using Rust.

@infu can you help? Is there an on-chain API of ICPCoins that could be used?

1 Like

There are some on-chain APIs.

  1. Query Pools
    https://uvevg-iyaaa-aaaak-ac27q-cai.raw.ic0.app/pairs

  2. Query single pool total Volume USD
    https://uvevg-iyaaa-aaaak-ac27q-cai.raw.ic0.app/totalVolumeUSD?poolId={pool_id}&limit={limit_days}
    i.e: https://uvevg-iyaaa-aaaak-ac27q-cai.raw.ic0.app/totalVolumeUSD?poolId=2obmq-
    pqaaa-aaaag-qcesa-cai&limit=30

  3. Query single pool TVL
    https://uvevg-iyaaa-aaaak-ac27q-cai.raw.ic0.app/pool_tvl?poolId={pool_id}&limit={limit_days}
    i.e: https://uvevg-iyaaa-aaaak-ac27q-cai.raw.ic0.app/pool_tvl?poolId=2obmq-
    pqaaa-aaaag-qcesa-cai&limit=30

  4. Query token TVL
    https://uvevg-iyaaa-aaaak-ac27q-cai.raw.ic0.app/token_tvl?tokenId={token_id}&limit={limit_days}
    i.e: https://uvevg-iyaaa-aaaak-ac27q-cai.raw.ic0.app/token_tvl?tokenId=fkhzl-saaaa-aaaan-qd26a-cai&limit=30

  5. Query pools TVL
    https://uvevg-iyaaa-aaaak-ac27q-cai.raw.ic0.app/pools_tvl?limit={limit_days}
    i.e: https://uvevg-iyaaa-aaaak-ac27q-cai.raw.ic0.app/pools_tvl?limit=1

But I don’t know is there any APIs to get coin price and total supply amount.

1 Like

You can use Neutrinomic DeFi Aggregator to get most.
Playground here https://jglts-daaaa-aaaai-qnpma-cai.ic0.app/824.48cb1ced41475a23a5f9b6d82ac7cb0fd86197f71d055b763a951ad1

let can = await ic("u45jl-liaaa-aaaam-abppa-cai")
let data =  await can.get_latest_wallet_tokens()

It’s made for wallets, you get info for 7day chart, prices, total supply. The volume is for the last 24 hours.

2 Likes