Skip to Content

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

FieldScopeRequiredCurrent contract
market_kindall Market API routesyesdex for current public DEX reads; cex remains route-dependent and unsupported where docs say so
chainDEX Market API routesyesUse one current public EVM chain such as ethereum, bnbchain, base, arbitrum, optimism, polygon
addressasset-profile, price-snapshot, ohlcv-windowyes for DEXFull canonical 20-byte EVM token contract address on current public EVM chains
pair_addressmarket-profilepreferredPrimary DEX market lookup key when present
addressmarket-profilesecondaryToken-level secondary lookup input only when pair_address is unavailable
intervalohlcv-windowyesCandle interval string consumed by the current market backend
limitohlcv-windownoOptional positive integer count

Market API validation rules

  • Market API routes accept full 0x... contract addresses only.
  • Zero-address forms such as 0x0000000000000000000000000000000000000000 and shorthand forms such as 0x0 are rejected.
  • market-profile treats pair_address as the primary lookup key whenever it is present.
  • market-profile does not promise alias mapping between token, pair, and pool identifiers.
  • Invalid Market API requests return structured HTTP errors with machine-readable error.code plus trace_id and request_id.

Raw RPC HTTP contract

FieldScopeRequiredCurrent contract
jsonrpcall raw RPC HTTP callsyesMust be 2.0
idall raw RPC HTTP callsyesCaller-supplied request identifier
methodall raw RPC HTTP callsyesOne supported raw RPC method
paramsall raw RPC HTTP callsnoDefaults to [] when omitted
request body arrayraw RPC HTTPoptionalStandard 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

MethodBoundaryCurrent contract
eth_getLogsexplicit fromBlock to toBlock spanMaximum 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_id and request_id.
  • Raw RPC HTTP preserves JSON-RPC error objects and exposes request correlation through headers such as X-Trace-ID and X-Request-ID.
  • WebSocket handshake failures return structured JSON error bodies plus X-Trace-ID and X-Request-ID headers on the HTTP rejection.
Last updated on