← all AgentPay tools

token_market_data

Get market cap, 24h volume, ATH, and price change for any token. Note: does NOT return pool depth or slippage — for pre-trade liquidity estimates, use a dedicated orderbook tool..

Free data x402 protocol no API key · no wallet

When agents use this

You need 24h trading volume, market cap, or all-time high for a token pair on decentralized exchanges.

Parameters

nametyperequireddescription
token_astringyesFirst token symbol
token_bstringyesSecond token symbol, e.g. USDC

Returns

volume_24h_usd, market_cap_usd, price_usd, ath_usd, price_change_24h_pct

Example response

{
  "token_a": "ETH",
  "token_b": "USDC",
  "price_usd": 2071.45,
  "volume_24h_usd": 312847293.0,
  "volume_change_24h_pct": -8.3,
  "market_cap_usd": 249800000000.0,
  "ath_usd": 4878.26,
  "price_change_24h_pct": -3.91,
  "source": "coingecko"
}

Call it — HTTP (x402)

curl -X POST https://agentpay.tools/tools/token_market_data/call \
  -H 'Content-Type: application/json' \
  -d '{"parameters": {"token_a": "First token symbol", "token_b": "Second token symbol, e.g. USDC"}, "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_market_data", {"token_a": "First token symbol", "token_b": "Second token symbol, e.g. USDC"})
print(r.data)                    # + r.cost, r.tx, r.network — full receipt

Call it — MCP

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