Skip to main content

Price

About

Price API is used to get the information about everything related to currency prices.

Routes

GET /price?network_ids={evm_chain_ids}

Get all available token prices on specified networks. evm_chain_ids is a comma separated list of numeric EVM chain ids. Supported chain ids are:

NetworkId
Ethereum1
Optimism10
Binance Smart Chain(BSC)56
Ethereum Classic61
Polygon137
Polygon zkEVM1101
Base8453
Arbitrum42161
Avalanche43114
Tron728126428

Returns a record where evm_chain_ids are keys and values are records with token addresses as keys and price data as values.

Example:

{
"10": {
"0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee": {
"address": "0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee",
"id": "ethereum",
"name": "Ethereum",
"symbol": "eth",
"fdv": 529584470973,
"price": 4390.22,
"priceChange24h": 104.41,
"priceChangePercent24h": 2.43629,
"img": "https://coin-images.coingecko.com/coins/images/279/large/ethereum.png?1696501628",
"source": "coingecko",
"updatedAt": 1759396830618
}
}
}

Price data fields

FieldTypeDescription
addressstringAddress of the token.
idstringCoinGecko id.
namestringToken name.
symbolstringToken symbol.
fdvnumberFully Diluted Valuation of the token.
pricenumberPrice of the token in USD.
priceChange24hnumberPrice change of the token in the last 24 hours in USD.
priceChangePercent24hnumberPrice change of the token in the last 24 hours in percents.
imgstringURL to token image.
sourcestringSource which provided the price.
updatedAtnumberUNIX time when the price was updated.

GET /price/coin?coin_ids={coin_ids}

Get token prices by their ids. coin_ids is a comma separated list of token ids. Ids are currently taken from CoinGecko.

Returns a record where coin_ids are keys and price data as values.

Example:

{
"ethereum": {
"id": "ethereum",
"name": "Ethereum",
"symbol": "eth",
"fdv": 529590945514,
"price": 4389.82,
"priceChange24h": 86.9,
"priceChangePercent24h": 2.01953,
"img": "https://coin-images.coingecko.com/coins/images/279/large/ethereum.png?1696501628",
"source": "coingecko",
"updatedAt": 1759397832805
}
}

Price data fields

FieldTypeDescription
addressstringAddress of the token.
idstringCoinGecko id.
namestringToken name.
symbolstringToken symbol.
fdvnumberFully Diluted Valuation of the token.
pricenumberPrice of the token in USD.
priceChange24hnumberPrice change of the token in the last 24 hours in USD.
priceChangePercent24hnumberPrice change of the token in the last 24 hours in percents.
imgstringURL to token image.
sourcestringSource which provided the price.
updatedAtnumberUNIX time when the price was updated.

GET /price/market_chart?coin_ids={coin_ids}&days={days}

Get token data for constructing market chart for given period. coin_ids is a comma separated list of token ids. days is one of the acceptable values: 1, 7, 30, 365.

Returns a record where coin_ids are keys and market data as values.

Example:

{
"ethereum": {
"prices": [[1759310454274, 4290.626385464167]],
"market_caps": [[1759310454274, 518132701546.26416]],
"total_volumes": [[1759310454274, 39416743263.64745]]
}
}

Market data fields

FieldTypeDescription
pricesarrayArray of arrays with 2 values. The first number - UNIX time. The second - price at that time.
market_capsarrayArray of arrays with 2 values. The first number - UNIX time. The second - market cap at that time.
total_volumesarrayArray of arrays with 2 values. The first number - UNIX time. The second - total volume at that time.

GET /price/coin/details/{platform}/{contract?}

Proxy endpoint to get all the data about the token from CoinGecko. platform is one of the supported by CoinGecko platforms. contract is an optional address of the token, if absent, native currency data is returned.

Request example:

 curl "http://localhost:8080/price/coin/details/ethereum/0x6b175474e89094c44da98b954eedeac495271d0f"

To get information about the response format, check out this CoinGecko documentation page for tokens and this for native currencies