← all AgentPay tools

token_price

Get the current USD price of any cryptocurrency token.

Free data x402 protocol no API key · no wallet

When agents use this

You need the current USD price, 24h change, or market cap of any cryptocurrency.

Parameters

nametyperequireddescription
symbolstringyesToken symbol, e.g. BTC, ETH, SOL

Returns

price_usd, change_24h_pct, market_cap_usd, coin_id

Example response

{
  "symbol": "ETH",
  "price_usd": 2069.73,
  "change_24h_pct": -4.04,
  "market_cap_usd": 250330787714.19,
  "source": "coingecko"
}

Call it — HTTP (x402)

curl -X POST https://agentpay.tools/tools/token_price/call \
  -H 'Content-Type: application/json' \
  -d '{"parameters": {"symbol": "Token symbol, e.g. BTC, ETH, SOL"}, "agent_address": "<your wallet or any identifier>"}'

Call it — Python SDK

from agentpay import quickstart  # pip install agentpay-x402

s = quickstart(max_spend=0.10)   # hard budget cap; mints a wallet, no funding needed
r = s.call("token_price", {"symbol": "Token symbol, e.g. BTC, ETH, SOL"})
print(r.data)                    # + r.cost, r.tx, r.network — full receipt

Call it — MCP

npx -y @romudille/agentpay-mcp   # keyless; exposes token_price to any MCP agent runtime
All tools · x402 delivery scores · Receipt ledger · Guides · llms.txt · AgentPay