82trust / 100

Price Coingecko

by CoinGecko spot price in Onchain & crypto

x402 APIPassing, checked 2 h ago

Live spot price for up to 25 coins by CoinGecko id, one row per id in the order asked: prices[] of {id, price, change24h, lastUpdated}. Identify coins by their CoinGecko ID slug (bitcoin, ethereum, solana, usd-coin, ...), as an array or a comma-separated string; for ticker symbols (BTC, ETH) plus volume and market cap use crypto-price. Defaults to USD; pass vsCurrency to denominate in EUR, JPY, ETH, BTC, etc. change24h is filled only when include24hChange is true.

POST https://agent402.tools/api/price-coingecko

Last 30 days

All checks passedSome failedAll failedNot checked
Uptime
100%
Response time
185 ms typical, 185 ms slowest 5%
Last check
2 h ago
Next check
any minute now

How to call it

# See the payment challenge (nothing is charged)
curl -i -X POST "https://agent402.tools/api/price-coingecko" \
  -H "content-type: application/json" \
  -d '{"ids":["bitcoin","ethereum"]}'
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%2Fagent402.tools%2Fapi%2Fprice-coingecko
const res = await pay("https://agent402.tools/api/price-coingecko", {
  method: "POST",
  headers: { "content-type": "application/json" },
  body: JSON.stringify({"ids":["bitcoin","ethereum"]}),
});
console.log(await res.json());

Example input

{
  "ids": [
    "bitcoin",
    "ethereum"
  ]
}

Example output

{
  "count": 2,
  "prices": [
    {
      "change24h": null,
      "id": "bitcoin",
      "lastUpdated": "2026-09-24T14:50:20.000Z",
      "price": 67000.12
    },
    {
      "change24h": null,
      "id": "ethereum",
      "lastUpdated": "2026-09-24T14:50:20.000Z",
      "price": 3500.05
    }
  ],
  "vsCurrency": "usd"
}

Security scan

  • No findings. We scan names, descriptions and tool definitions for hidden instructions and other prompt-injection patterns.

Recent checks

WhenResultHTTPTimePrice
2 h agoPassed402185 ms$0.001
7 h agoPassed402185 ms$0.001