Docs
Version 0 (v0)
Token Prices

Token Prices v0 API

Prices API gives you a realtime prices of the tokens on the Klaytn mainnet in US dollars.

How do we "price" tokens?

Most pricing APIs or oracles use a ratio of tokens reserved in a single DEX, assuming the price on that DEX is the same as the price on the market. However, this may not always be true, depending on the liquidity pools' state.

Swapscanner has integrated with every DEX and its liquidities. Our pricing algorithm utilizes this data to compute every token's fair and accurate mid-price.

Endpoint

https://api.swapscanner.io/v0/tokens/prices

Response

The response is a JSON object with key-values represented as follows:

  • key - token address
  • value - number price in US dollars

Keys are sorted lexicographically.

Example

{
  "0x0000000000000000000000000000000000000000": 0.19715361394261466,
  "0x8888888888885b073f3c81258c27e83db228d5f3": 1.553748690198703,
  ...
}