Use when an agent needs a token's USD price without a third-party price feed
Use when an agent needs a token's USD price without a third-party price feed. Input: tokens (up to 10, base:0x… or sol:<mint>). Output: per token priceUsd, confidence, the pool used (Uniswap v3 / Aerodrome on Base, Orca Whirlpool on Solana; fee tier, depth in USD), path (direct USDC or via WETH/SOL), warnings; no price below $1,000 depth. Spot, not TWAP. Example: ?tokens=base:0x940181a94A35A4569E4529A3CDfB74e38FD98631
Paid test badge: not yet. The checks above are free: we call the tool without paying and read the payment request it sends back. The Verified badge needs paid calls whose answers match the promised output, and nobody can buy a badge.
Endpoint
GET https://1gateway.dev/v1/onchain/prices
| Category | Market data |
|---|---|
| Provider host | 1gateway.dev |
| Networks | eip155:137, eip155:143, eip155:42161, eip155:8453, solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp |
| Payment schemes | exact |
| Self-reported calls, 30 days | 2 from 1 payers (the provider's figure, not ours) |
Our checks, last 30 days
We never call tools that send, buy, move money or file anything, not even without paying.
Example input (from the provider)
{
"method": "GET",
"queryParams": {
"tokens": "base:0x940181a94A35A4569E4529A3CDfB74e38FD98631"
},
"type": "http"
}
Promised output schema (from the provider)
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"properties": {
"input": {
"additionalProperties": false,
"properties": {
"method": {
"enum": [
"GET"
],
"type": "string"
},
"queryParams": {
"additionalProperties": false,
"properties": {
"tokens": {
"description": "Comma-separated chain:address list, max 10 (base:0x\u2026 ERC-20, sol:<mint> base58), or tickers BTC, ET\u2026",
"pattern": "^(?:(?:base|sol|solana):[0-9A-Za-z]{32,44}|[A-Za-z]{2,6})(?:,(?:(?:base|sol|solana):[0-9A-Za-z]{32,44}|[A-Za-z]{2,6})){0,9}$",
"type": "string"
}
},
"required": [
"tokens"
],
"type": "object"
},
"type": {
"const": "http",
"type": "string"
}
},
"required": [
"type",
"method"
],
"type": "object"
},
"output": {
"properties": {
"example": {
"additionalProperties": true,
"properties": {
"asOf": {
"additionalProperties": true,
"properties": {
"at": {
"type": "string"
},
"baseBlock": {
"type": "integer"
},
"solanaSlot": {
"type": "integer"
}
},
"type": "object"
},
"method": {
"additionalProperties": true,
"properties": {
"depthUsd": {
"type": "string"
},
"dexes": {
"additionalProperties": true,
"type": "object"
},
"floorUsd": {
"type": "integer"
},
"lowConfidenceBelowUsd": {
"type": "integer"
}
},
"type": "object"
},
"notes": {
"items": {
"type": "string"
},
"type": "array"
},
"prices": {
"items": {
"additionalProperties": true,
"type": "object"
},
"type": "array"
},
"rpc": {
"additionalProperties": true,
"properties": {
"kind": {
"type": "string"
},
"source": {
"type": "string"
}
},
"type": "object"
}
},
"required": [
"prices",
"asOf",
"method",
"notes",
"rpc"
],
"type": "object"
},
"type": {
"type": "string"
}
},
"required": [
"type"
],
"type": "object"
}
},
"required": [
"input"
],
"type": "object"
}