Parameter contracts
Use this page as the single reference for parameter semantics across the current public Market API and hosted raw RPC HTTP routes.
Market API contract
| Field | Scope | Required | Current contract |
|---|---|---|---|
market_kind | all Market API routes | yes | dex for current public DEX reads; cex remains route-dependent and unsupported where docs say so |
chain | DEX Market API routes | yes | Use one current public EVM chain such as ethereum, bnbchain, base, arbitrum, optimism, polygon |
address | asset-profile, price-snapshot, ohlcv-window | yes for DEX | Full canonical 20-byte EVM token contract address on current public EVM chains |
pair_address | market-profile | preferred | Primary DEX market lookup key when present |
address | market-profile | secondary | Token-level secondary lookup input only when pair_address is unavailable |
interval | ohlcv-window | yes | Candle interval string consumed by the current market backend |
limit | ohlcv-window | no | Optional positive integer count |
Market API validation rules
- Market API routes accept full
0x...contract addresses only. - Zero-address forms such as
0x0000000000000000000000000000000000000000and shorthand forms such as0x0are rejected. market-profiletreatspair_addressas the primary lookup key whenever it is present.market-profiledoes not promise alias mapping between token, pair, and pool identifiers.- Invalid Market API requests return structured HTTP errors with machine-readable
error.codeplustrace_idandrequest_id.
Raw RPC HTTP contract
| Field | Scope | Required | Current contract |
|---|---|---|---|
jsonrpc | all raw RPC HTTP calls | yes | Must be 2.0 |
id | all raw RPC HTTP calls | yes | Caller-supplied request identifier |
method | all raw RPC HTTP calls | yes | One supported raw RPC method |
params | all raw RPC HTTP calls | no | Defaults to [] when omitted |
| request body array | raw RPC HTTP | optional | Standard batch JSON-RPC array is supported on the same HTTP route |
Raw RPC compatibility boundaries
- Raw RPC HTTP preserves JSON-RPC-compatible response bodies for both success and error flows.
- Path-style auth remains available on
POST /v1/{chain}/{api_key}for clients that cannot send headers. - Batch JSON-RPC arrays are supported for raw RPC HTTP and return a response array with mixed success/error entries allowed.
- Current websocket routes are not widened into websocket batch semantics by this contract.
Raw RPC route-level guardrails
| Method | Boundary | Current contract |
|---|---|---|
eth_getLogs | explicit fromBlock to toBlock span | Maximum 10000 blocks on current hosted raw RPC HTTP routes |
For eth_getLogs, requests above that range return a standard JSON-RPC error
before upstream forwarding:
{
"jsonrpc": "2.0",
"id": 21,
"error": {
"code": -32012,
"message": "eth_getLogs query exceeds max block range 10000"
}
}Failure diagnostics
- Market HTTP failures return structured HTTP errors with
trace_idandrequest_id. - Raw RPC HTTP preserves JSON-RPC error objects and exposes request correlation
through headers such as
X-Trace-IDandX-Request-ID. - WebSocket handshake failures return structured JSON error bodies plus
X-Trace-IDandX-Request-IDheaders on the HTTP rejection.
Related pages
Last updated on