81trust / 100

Token Price 0x4200000000000000000000000000000000000006,0xacfe6019ed1a7dc6f7b508c02d1b04ec88cc21bf,0xa4a2e2ca3fbfe21aed83

by CoinGecko in Onchain & crypto

x402 APIPassing, checked 10 min 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/0x4200000000000000000000000000000000000006,0xacfe6019ed1a7dc6f7b508c02d1b04ec88cc21bf,0xa4a2e2ca3fbfe21aed83471d28b6f65a233c6e00,0x0086cff0c1e5d17b19f5bcd4c8840a5b4251d959,0x5f980dcfc4c0fa3911554cf5ab288ed0eb13dba3,0x16332535e2c27da578bc2e82beb09ce9d3c8eb07,0xc0634090f2fe6c6d75e61be2b949464abb498973,0x9f86db9fc6f7c9408e8fda3ff8ce4e78ac7a6b07,0x940181a94a35a4569e4529a3cdfb74e38fd98631,0x6b2504a03ca4d43d0d73776f6ad46dab2f2a4cfd,0xde61878b0b21ce395266c44d4d548d1c72a3eb07,0x7b0ee9dcb5c1d4d7cd630c652959951936512ba3

Last 30 days

All checks passedSome failedAll failedNot checked
Uptime
100%
Response time
156 ms typical, 156 ms slowest 5%
Last check
10 min ago
Next check
in 17 min

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/0x4200000000000000000000000000000000000006,0xacfe6019ed1a7dc6f7b508c02d1b04ec88cc21bf,0xa4a2e2ca3fbfe21aed83471d28b6f65a233c6e00,0x0086cff0c1e5d17b19f5bcd4c8840a5b4251d959,0x5f980dcfc4c0fa3911554cf5ab288ed0eb13dba3,0x16332535e2c27da578bc2e82beb09ce9d3c8eb07,0xc0634090f2fe6c6d75e61be2b949464abb498973,0x9f86db9fc6f7c9408e8fda3ff8ce4e78ac7a6b07,0x940181a94a35a4569e4529a3cdfb74e38fd98631,0x6b2504a03ca4d43d0d73776f6ad46dab2f2a4cfd,0xde61878b0b21ce395266c44d4d548d1c72a3eb07,0x7b0ee9dcb5c1d4d7cd630c652959951936512ba3?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%2F0x4200000000000000000000000000000000000006%2C0xacfe6019ed1a7dc6f7b508c02d1b04ec88cc21bf%2C0xa4a2e2ca3fbfe21aed83471d28b6f65a233c6e00%2C0x0086cff0c1e5d17b19f5bcd4c8840a5b4251d959%2C0x5f980dcfc4c0fa3911554cf5ab288ed0eb13dba3%2C0x16332535e2c27da578bc2e82beb09ce9d3c8eb07%2C0xc0634090f2fe6c6d75e61be2b949464abb498973%2C0x9f86db9fc6f7c9408e8fda3ff8ce4e78ac7a6b07%2C0x940181a94a35a4569e4529a3cdfb74e38fd98631%2C0x6b2504a03ca4d43d0d73776f6ad46dab2f2a4cfd%2C0xde61878b0b21ce395266c44d4d548d1c72a3eb07%2C0x7b0ee9dcb5c1d4d7cd630c652959951936512ba3
const res = await pay("https://pro-api.coingecko.com/api/v3/x402/onchain/simple/networks/base/token_price/0x4200000000000000000000000000000000000006,0xacfe6019ed1a7dc6f7b508c02d1b04ec88cc21bf,0xa4a2e2ca3fbfe21aed83471d28b6f65a233c6e00,0x0086cff0c1e5d17b19f5bcd4c8840a5b4251d959,0x5f980dcfc4c0fa3911554cf5ab288ed0eb13dba3,0x16332535e2c27da578bc2e82beb09ce9d3c8eb07,0xc0634090f2fe6c6d75e61be2b949464abb498973,0x9f86db9fc6f7c9408e8fda3ff8ce4e78ac7a6b07,0x940181a94a35a4569e4529a3cdfb74e38fd98631,0x6b2504a03ca4d43d0d73776f6ad46dab2f2a4cfd,0xde61878b0b21ce395266c44d4d548d1c72a3eb07,0x7b0ee9dcb5c1d4d7cd630c652959951936512ba3?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

WhenResultHTTPTimePrice
10 min agoPassed402159 ms$0.01
5 h agoPassed402156 ms$0.01