81trust / 100
Token Price 0x0b3e328455c4059eeb9e3f84b5543f74e24e7e1b,0x22af33fe49fd1fa80c7149773dde5890d3c76f3b,0xc0634090f2fe6c6d75e6
by CoinGecko in Onchain & crypto
x402 APIPassing, checked 1 h ago
Query onchain DEX token price & market data based on the provided token contract addresses on a network.
GET https://pro-api.coingecko.com/api/v3/x402/onchain/simple/networks/base/token_price/0x0b3e328455c4059eeb9e3f84b5543f74e24e7e1b,0x22af33fe49fd1fa80c7149773dde5890d3c76f3b,0xc0634090f2fe6c6d75e61be2b949464abb498973
Last 30 days
All checks passedSome failedAll failedNot checked
- Uptime
- 100%
- Response time
- 161 ms typical, 161 ms slowest 5%
- Last check
- 1 h ago
- Next check
- any minute now
How to call it
# See the payment challenge (nothing is charged)
curl -i -X GET "https://pro-api.coingecko.com/api/v3/x402/onchain/simple/networks/base/token_price/0x0b3e328455c4059eeb9e3f84b5543f74e24e7e1b,0x22af33fe49fd1fa80c7149773dde5890d3c76f3b,0xc0634090f2fe6c6d75e61be2b949464abb498973?include_24hr_price_change=true&include_24hr_vol=true&include_inactive_source=true&include_market_cap=true&include_total_reserve_in_usd=true&mcap_fdv_fallback=true"import { wrapFetchWithPayment } from "@x402/fetch";
import { x402Client } from "@x402/core/client";
import { ExactEvmScheme } from "@x402/evm/exact/client";
import { privateKeyToAccount } from "viem/accounts";
const client = new x402Client().register(
"eip155:8453",
new ExactEvmScheme(privateKeyToAccount(process.env.AGENT_KEY)),
);
const pay = wrapFetchWithPayment(fetch, client);
// Not sure it's safe to pay? Preflight it first for $0.005:
// GET https://toolvet.app/api/v1/check?url=https%3A%2F%2Fpro-api.coingecko.com%2Fapi%2Fv3%2Fx402%2Fonchain%2Fsimple%2Fnetworks%2Fbase%2Ftoken_price%2F0x0b3e328455c4059eeb9e3f84b5543f74e24e7e1b%2C0x22af33fe49fd1fa80c7149773dde5890d3c76f3b%2C0xc0634090f2fe6c6d75e61be2b949464abb498973
const res = await pay("https://pro-api.coingecko.com/api/v3/x402/onchain/simple/networks/base/token_price/0x0b3e328455c4059eeb9e3f84b5543f74e24e7e1b,0x22af33fe49fd1fa80c7149773dde5890d3c76f3b,0xc0634090f2fe6c6d75e61be2b949464abb498973?include_24hr_price_change=true&include_24hr_vol=true&include_inactive_source=true&include_market_cap=true&include_total_reserve_in_usd=true&mcap_fdv_fallback=true");
console.log(await res.json());Example input
{
"include_24hr_price_change": true,
"include_24hr_vol": true,
"include_inactive_source": true,
"include_market_cap": true,
"include_total_reserve_in_usd": true,
"mcap_fdv_fallback": true
}Example output
{
"data": {
"attributes": {
"h24_price_change_percentage": {
"0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2": "3.3870290336"
},
"h24_volume_usd": {
"0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2": "965988358.733808"
},
"last_trade_timestamp": {
"0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2": 1711356300
},
"market_cap_usd": {
"0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2": "6692452895.779648"
},
"token_prices": {
"0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2": "2289.33"
},
"total_reserve_in_usd": {
"0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2": "1576179559.94669772339136684208"
}
},
"id": "1ba898f0-eda2-4291-9491-9a5b323f66ef",
"type": "simple_token_price"
}
}Security scan
- No findings. We scan names, descriptions and tool definitions for hidden instructions and other prompt-injection patterns.
Recent checks
| When | Result | HTTP | Time | Price |
|---|---|---|---|---|
| 1 h ago | Passed | 402 | 161 ms | $0.01 |
| 6 h ago | Passed | 402 | 226 ms | $0.01 |