Returns JSON with the USD price of a token on Base computed on-chain from its deepest Uniswap v3 pool against USDC or WETH, with pool, fee tier and depth.
Use when you need a crypto token price or market data for a Base token, quoted from on-chain liquidity.
Do not use when the token only trades off Base or on other DEXs (Aerodrome is not read), or you need history or OHLC.
Price: 0.003 USDC per call (x402, eip155:8453). Typical response time: 1200 ms (p95).
POST https://x402-gateway.blackwoodstate8.workers.dev/v1/token-price. A request without payment gets 402 Payment Required with the
PAYMENT-REQUIRED header; any x402 client signs an EIP-3009 authorization and retries with
PAYMENT-SIGNATURE (or X-PAYMENT). Invalid input is answered with 400 and not charged.
curl -i -X POST https://x402-gateway.blackwoodstate8.workers.dev/v1/token-price -H 'content-type: application/json' -d '{"token":"WETH"}'
| Pay to | 0xdDEb48945fB81089DB5cA2fD254f2CC71f49B1DD |
|---|---|
| Asset | 0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913 (USDC) |
| Amount | 3000 atomic units (0.003 USDC) |
| Authorization window | 60 s |
Streamable HTTP at https://x402-gateway.blackwoodstate8.workers.dev/mcp, tool token-price_v1. Payment goes in
_meta["x402/payment"]; without it the tool returns the payment requirements.
| Field | Type | Meaning |
|---|---|---|
token | string | Token on Base: contract address (0x...) or a symbol like WETH, cbBTC, AERO, DEGEN, VIRTUAL |
Example:
{
"token": "WETH"
}
Real example:
{
"token": "0x4200000000000000000000000000000000000006",
"symbol": "WETH",
"decimals": 18,
"priceUsd": 2421.2474,
"quote": "USDC",
"pool": "0x6c561B446416E1A00E8E93E221854d6eA4171372",
"feeTier": 3000,
"depthUsd": 56610101,
"blockNumber": 52713897,
"source": "Uniswap v3 on Base (on-chain)"
}
{
"type": "object",
"properties": {
"token": {
"type": "string"
},
"symbol": {
"type": [
"string",
"null"
]
},
"decimals": {
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991
},
"priceUsd": {
"type": "number"
},
"quote": {
"type": "string",
"enum": [
"USDC",
"WETH"
]
},
"pool": {
"type": [
"string",
"null"
]
},
"feeTier": {
"anyOf": [
{
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991
},
{
"type": "null"
}
]
},
"depthUsd": {
"type": [
"number",
"null"
]
},
"blockNumber": {
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991
},
"source": {
"type": "string"
}
},
"required": [
"token",
"symbol",
"decimals",
"priceUsd",
"quote",
"pool",
"feeTier",
"depthUsd",
"blockNumber",
"source"
],
"additionalProperties": false
}Free schema and example: GET https://x402-gateway.blackwoodstate8.workers.dev/v1/token-price.
OpenAPI 3.1 · llms.txt · All services