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:
| Network | Id |
|---|---|
| Ethereum | 1 |
| Optimism | 10 |
| Binance Smart Chain(BSC) | 56 |
| Ethereum Classic | 61 |
| Polygon | 137 |
| Polygon zkEVM | 1101 |
| Base | 8453 |
| Arbitrum | 42161 |
| Avalanche | 43114 |
| Tron | 728126428 |
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
| Field | Type | Description |
|---|---|---|
| address | string | Address of the token. |
| id | string | CoinGecko id. |
| name | string | Token name. |
| symbol | string | Token symbol. |
| fdv | number | Fully Diluted Valuation of the token. |
| price | number | Price of the token in USD. |
| priceChange24h | number | Price change of the token in the last 24 hours in USD. |
| priceChangePercent24h | number | Price change of the token in the last 24 hours in percents. |
| img | string | URL to token image. |
| source | string | Source which provided the price. |
| updatedAt | number | UNIX 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
| Field | Type | Description |
|---|---|---|
| address | string | Address of the token. |
| id | string | CoinGecko id. |
| name | string | Token name. |
| symbol | string | Token symbol. |
| fdv | number | Fully Diluted Valuation of the token. |
| price | number | Price of the token in USD. |
| priceChange24h | number | Price change of the token in the last 24 hours in USD. |
| priceChangePercent24h | number | Price change of the token in the last 24 hours in percents. |
| img | string | URL to token image. |
| source | string | Source which provided the price. |
| updatedAt | number | UNIX 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
| Field | Type | Description |
|---|---|---|
| prices | array | Array of arrays with 2 values. The first number - UNIX time. The second - price at that time. |
| market_caps | array | Array of arrays with 2 values. The first number - UNIX time. The second - market cap at that time. |
| total_volumes | array | Array 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