CoinGecko On-Chain Token Prices API
Get on-chain token prices by network and addresses via REST or OpenAny MCP—with pay-per-use pricing and no subscription. Powered by CoinGecko, configure supported query parameters and filters, and retrieve structured data including <address> for token price tables, and metric displays, ready for production pipelines and AI agent automation using a single OpenAny API key.
- Selected price
- $0 / callPublished pricing
- Sellers / APIs
- 1 / 1
- Requests · 30d
- 0Selected implementation · last 30 days
- Success rate · 30d
- —No requests in this period
CoinGecko On-Chain Token Prices API
Prepare your request, then continue with your agent.
Selected price
$0 / call
- Provider
- API
- Pricing
On this page
Overview
CoinGecko On-Chain Token Prices API
Supply an on-chain network ID and the addresses path segment. data.attributes contains address-keyed price and optional metric maps. Keep each address with its value and distinguish reported market capitalization from an enabled FDV fallback.
Quick Facts
| Fact | Value |
|---|---|
| Access | OpenAny REST |
| Authentication | OpenAny API key in the Authorization header |
| Core inputs | path: network, addresses; query: include_market_cap, mcap_fdv_fallback, include_24hr_vol, include_24hr_price_change, include_total_reserve_in_usd, include_inactive_source |
| Selected implementation | coingecko · CoinGecko — Token Price by Token Addresses |
| Billing | See the pricing area for the selected implementation and request options |
What You Can Build
- Token price tables: Match address-keyed values to the requested token identities.
- Metric displays: Show optional values with their units and fallback context.
Documented Response Fields
| Field | Meaning |
|---|---|
data.attributes.token_prices.<address> |
Reported token price in USD for an address |
data.attributes.market_cap_usd.<address> |
Reported market capitalization or enabled FDV fallback |
data.attributes.h24_volume_usd.<address> |
Reported 24-hour volume in USD when included |
data.attributes.total_reserve_in_usd.<address> |
Reported reserve value in USD when included |
data.attributes.last_trade_timestamp.<address> |
Reported most recent trade timestamp when supplied |
Quick Start
- Set OPENANY_API_KEY to your OpenAny API key.
- Review the selected implementation and pricing, then adapt the request below to your target.
- Check the HTTP response and business result before reading optional fields.
curl --request GET --get \
https://api.openany.si/v1/agent-apis/coingecko/api/v3/onchain/simple/networks/eth/token_price/0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2 \
-H "Authorization: Bearer ${OPENANY_API_KEY}" \
-H 'Content-Type: application/json'
Request and Response Examples
The response is an official documentation reference that may contain historical values or optional sections. The calling template is independent; match returned resource identifiers, timestamps and requested options before using the data.
Published CoinGecko On-Chain Token Prices API implementation contract.
Pricing and Billing
The pricing area reflects the selected API implementation. Review its billing unit and any request-dependent rules before calling; a source service's public availability does not determine OpenAny billing.
Frequently Asked Questions
Related APIs
Playground
Run sends a real API request. Charges follow the published API contract.
Sellers
| Seller | Pricing | Requests · 30d | Performance | Access |
|---|---|---|---|---|
CoinGeckoCurrent CoinGecko — Token Price by Token Addresses · GET · View API reference | $0 / call | 0 | —successP50— |
- Unit price
- $0
Statistics use persisted gateway logs from the last 30 days up to now, including today.
Success rate = successful requests / all requests;
P50 = median latency of successful requests.
Prices reflect the published API contract. Contract revision: 4. Price update time: not supplied.
Total $0
API
- Method
- GET
- Endpoint
https://api.openany.si/v1/agent-apis/coingecko/api/v3/onchain/simple/networks/{network}/token_price/{addresses}- Content type
- application/json
- Authentication
Authorization: Bearer $OPENANY_API_KEY
Input parameters
Fields in this listing; additional options and input encoding can vary by provider.
| Parameter | Location | Type | Required | Description |
|---|---|---|---|---|
network | URL path parameterspath | string | Yes | Network ID. *refers to [`/onchain/networks`](/reference/networks-list). |
addresses | URL path parameterspath | string | Yes | Token contract address, comma-separated if more than one token contract address. |
include_market_cap | URL query parametersquery | boolean | No | Include market capitalization. Default: `false` |
mcap_fdv_fallback | URL query parametersquery | boolean | No | Return FDV if market cap is not available. Default: `false` |
include_24hr_vol | URL query parametersquery | boolean | No | Include 24hr volume. Default: `false` |
include_24hr_price_change | URL query parametersquery | boolean | No | Include 24hr price change. Default: `false` |
include_total_reserve_in_usd | URL query parametersquery | boolean | No | Include total reserve in USD. Default: `false` |
include_inactive_source | URL query parametersquery | boolean | No | Include token price data from inactive pools using the most recent swap. Default: `false` |
Required markers inside a nested object or variant apply when that object or variant is used.
Response structure
dataobjectattributesobjecth24_price_change_percentageobject0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2string
h24_volume_usdobject0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2string
last_trade_timestampobject0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2string
market_cap_usdobject0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2string
token_pricesobject0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2string
total_reserve_in_usdobject0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2string
idstringtypestring
Agent integration
Copy the resource contract without sharing an API key.
Error handling
| Status | Next step |
|---|---|
400 | Check the offering and request fields. |
401 / 403 | Verify your credentials and access permissions. |
402 | Inspect the selected access mode and returned payment requirements. |
429 | Respect the returned rate limit and retry guidance. |
5xx | Inspect the error and usage record before retrying a paid operation. |
Examples
Official example · Official response / contract request
Example from the provider's documentation. Field values in your results will differ.
Prepare your environment
Use a terminal with cURL installed.
Use an OpenAny API key with shared-balance access. Confirm availability and price before running; a call may charge your balance.
Set the key in your terminal using the hidden prompt below. Keep its value out of source files and logs.
Terminal · macOS / Linuxprintf 'OpenAny API key: ' read -r -s OPENANY_API_KEY export OPENANY_API_KEY printf '\n'Run the request
Paste the complete command below into your terminal.
Values to replace before running 8
Review these request fields before running. Keep the published provider and request method unchanged.
network- Network ID. *refers to [`/onchain/networks`](/reference/networks-list).
addresses- Token contract address, comma-separated if more than one token contract address.
include_market_cap- Include market capitalization. Default: `false`
mcap_fdv_fallback- Return FDV if market cap is not available. Default: `false`
include_24hr_vol- Include 24hr volume. Default: `false`
include_24hr_price_change- Include 24hr price change. Default: `false`
include_total_reserve_in_usd- Include total reserve in USD. Default: `false`
include_inactive_source- Include token price data from inactive pools using the most recent swap. Default: `false`
Terminal · cURLcurl \ 'https://api.openany.si/v1/agent-apis/coingecko/api/v3/onchain/simple/networks/eth/token_price/0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2' \ -X GET \ -H "Authorization: Bearer $OPENANY_API_KEY" \ -H 'Content-Type: application/json'Check the response
Sample response · Documented HTTP 200
Sample response{ "data": { "attributes": { "h24_price_change_percentage": { "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2": "-1.8867250098940773" }, "h24_volume_usd": { "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2": "313441016.145429" }, "last_trade_timestamp": { "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2": "1779882383" }, "market_cap_usd": { "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2": "4706652516.682727" }, "token_prices": { "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2": "2084.57379936447" }, "total_reserve_in_usd": { "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2": "1015673598.896450024556193850116628967" } }, "id": "49dd0b90-d99d-48b6-8fe2-03e826fbcef2", "type": "simple_token_price" } }