$ man token-price
/token-price(1)
PRICE / CALL
$0.02
USDC · base mainnet · scheme: exact
METHOD
POST
CLUSTER
edgemarketCATEGORY
utilities
STATUS
● live
NAME
token-price — crypto token price api / coingecko wrapper
SYNOPSIS
POST https://x402.org/v1/token-price
Content-Type: application/json
X-PAYMENT: <signed-transferWithAuthorization>
{ ... }↳ first call →
402 Payment Required. Sign USDCtransferWithAuthorization, retry with theX-PAYMENT header.DESCRIPTION
Crypto token price API / CoinGecko wrapper. Lookup by id (bitcoin), symbol (BTC), or contract address (with chain). USD + native currency, 24h/7d change, market cap, volume, supply, ATH, ATL.
INPUT — request schema
| property | type | description | req? |
|---|---|---|---|
| query | string | CoinGecko id ('bitcoin'), symbol ('BTC'), or 0x address. | required |
| vs_currency | string | Default 'usd'. | optional |
| chain | string | For address queries: ethereum, base, arbitrum-one, polygon-pos, etc. | optional |
OUTPUT — response shape
| field | type | description |
|---|---|---|
| query | string | Original lookup string sent in (token id, symbol, or contract address). |
| resolution | string | How the query was resolved — by id, symbol, or contract address lookup. |
| coin_id | string | CoinGecko canonical coin id (e.g. "bitcoin", "ethereum"). |
| name | string | Full token name (e.g. "Bitcoin", "USD Coin"). |
| symbol | string | Ticker symbol (e.g. "BTC", "USDC"). |
| image | string | URL to the token's logo image on CoinGecko. |
| market_cap_rank | number | Token's rank by market cap across all tracked coins (1 = largest). |
| vs_currency | string | Quote currency for price fields (typically "usd"). |
| price | number | Current price of the token in the quote currency. |
| price_change_24h_pct | number | Percentage price change over the last 24 hours. |
| price_change_7d_pct | number | Percentage price change over the last 7 days. |
| market_cap | number | Current market capitalization in the quote currency. |
| total_volume | number | 24-hour trading volume across tracked exchanges in the quote currency. |
| circulating_supply | number | Number of tokens currently circulating in the market. |
| total_supply | number | Total tokens that exist (minted minus burned), or null if unknown. |
| max_supply | number | Hard cap on tokens that can ever exist, or null if uncapped. |
| ath | object | All-time high price with value, date, and percent change from ATH. |
| atl | object | All-time low price with value, date, and percent change from ATL. |
| last_updated | string | ISO 8601 timestamp of when CoinGecko last refreshed this data. |
| source | string | Upstream data provider (e.g. "coingecko"). |
EXAMPLES — two ways to call
EXAMPLE 1 · curl
curl -X POST https://x402.org/v1/token-price \
-H 'Content-Type: application/json' \
-d '{ }'first response =
402 Payment Required with payment requirements; sign + retry with X-PAYMENT.EXAMPLE 2 · mcp
# install once claude mcp add x402 --command "npx x402-deployer-mcp" # then ask Claude Code: # "use the token-price tool to ..."
MCP server handles payment automatically — your coding agent just calls the tool by name.
METADATA
- tags
- cryptopricecoingeckotokenweb3
- methods
- POST
- cluster
- edgemarket
- price
- $0.02 USDC per call
ADJACENT — other endpoints in edgemarket
| endpoint | description | price |
|---|---|---|
| defi-llama-protocol | DefiLlama protocol lookup — TVL, chain breakdown, current TVL, 24h/7d/30d changes, audits, parent protocol, categories. | $0.02 |
| gas-now-base | Gas oracle / EIP-1559 fee estimator. | $0.02 |
| gas-price | Gas price API / EIP-1559 fee estimator / Base + Ethereum + Optimism + Arbitrum gas tracker / pre-tx cost estimator. | $0.02 |
| tx-receipt-decode | EVM transaction receipt decoder / log decoder / event log reader / Etherscan tx debug / receipt parser / Basescan tx explainer / tenderly… | $0.02 |
| tx-simulate-swap | Tx simulate swap / pre-trade quote / DEX swap simulator / 1inch + LlamaSwap quote / would-it-succeed check. | $0.02 |
| bridge-rates | Cross-chain bridge rate aggregator. | $0.03 |
| dao-proposal-monitor | Snapshot.org DAO proposal monitor. | $0.03 |
| ens-resolve | ENS resolver / Ethereum Name Service lookup. | $0.03 |
SEE ALSO