x402AgentTools

🪙Crypto Price (Live)

Live cryptocurrency prices from CoinGecko's public API: current price in USD/EUR/GBP/JPY plus 24-hour change for any coin by id or common ticker (btc, eth, sol…). Cached 60 seconds.

Worked examples

BTC & ETH in USD

GET /api/v1/crypto/price?ids=bitcoin%2Cethereum&vs=usd

Result: bitcoin: 83663 USD (+0.77%) · ethereum: 2534.94 USD (+1.06%)

By ticker: sol

GET /api/v1/crypto/price?ids=sol&vs=usd

Result: solana: 111.18 USD (+0.77%)

Stablecoins in EUR

GET /api/v1/crypto/price?ids=usd-coin%2Ctether%2Cdai&vs=eur

Result: usd-coin: 0.892878 EUR (+0.06%) · tether: 0.892392 EUR (+0.05%) · dai: 0.893184 EUR (+0.06%)

Machine API (x402)

$0.005 / call

This tool is also a JSON API for AI agents. Requests without payment receive 402 Payment Required plus instructions; agents pay USDC on Base via the x402 protocol — no accounts, no API keys.

GET /api/v1/crypto/price?ids=bitcoin%2Cethereum&vs=usd HTTP/1.1
Host: localhost:3000

→ 402 (payment required, instructions in headers)
→ 200 (after X-PAYMENT header; JSON body below)

{
  "tool": "crypto/price",
  "input": {"ids":"bitcoin,ethereum","vs":"usd"},
  "result": { "value": 83663, "answer": "bitcoin: 83663 USD (+0.77%) · ethereum: 2534.94 USD (+1.06%)" }
}

Agent docs: /llms.txt · OpenAPI spec · integration guide

About this tool

Live spot prices for any CoinGecko-listed token, by id or common ticker, in USD/EUR/GBP/JPY with 24-hour change. Results are cached for 60 seconds — fresh enough for agents, gentle on rate limits.

Frequently asked questions

Which ids can I use?

Any CoinGecko coin id (bitcoin, ethereum, chainlink…) or one of ~20 common tickers (btc, eth, sol, link, usdc…) which are mapped automatically.

How current is 'live'?

CoinGecko aggregates exchange feeds in real time; this endpoint caches responses for 60 seconds to stay inside the free tier.

Popular conversions & variations

Related tools