Endpoints
chainId is decimal; ETH mainnet is /1. A hex form is normalized to decimal by the proxy.
The examples below use the production endpoint; drop the path when talking to a node directly.
Request headers
First request: eth_call
Read totalSupply() of the USDT contract; the function selector is 0x18160ddd:
eth_call are, in order, the call object, the block parameter, and the optional stateOverride and blockOverrides. The call object has the same fields as Ethereum’s eth_call: from, to, data / input, value, gas, gasPrice, and so on.
Batch requests
A request body that is an array is processed as a JSON-RPC batch, returning several results in one round trip:contractMultiCall below is a better fit than a batch of eth_call: it guarantees that all calls see the same state.
Choosing the block: blockCtx
Methods in the DeBank namespace have no prefix and declare their block context with a blockCtx object. Read a balance at a historical height:
Omitting
blockCtx means latest. See Block context and routing for the semantics.
Calling several contracts at once: contractMultiCall
Runs a set of read-only calls on one state and returns each call’s result plus the block that state belongs to:
requests, blockCtx, blockOverrides, stateOverride, fastFail, useParallel, disableCache. Optional parameters are positional; use null for the ones you skip.
A per-call
code of 0 means success; on revert it is -39000 and err carries the decoded revert reason. The request as a whole returns a JSON-RPC level error only when parameter or block resolution fails.
eth_multiCall is the eth namespace version of the same capability: its block parameter uses the standard form, its response fields are camelCase (fromCache, gasUsed, blockNum), and its per-call revert code is -40014. Do not share one parser between the two.Estimating gas: estimateGas
The method name has no eth_ prefix. Estimate a USDT transfer:
blockCtx, the third an optional blockOverrides.
Simulating a transaction sequence: simulateTransactions
Executes a set of transactions in order, each seeing the state changes of the previous one, and returns the call traces and events of each:
results[i] in the response contains traces, events, code, err, and gas_used; stats names the block the simulation was based on.
Tracing one call: pre_traceCall
Returns an instruction-level struct log without needing the write node’s debug API:
eth_call. The batch version is pre_traceMany.
Handling errors
JSON-RPC level errors appear in the response’serror field:
See the RPC reference for the full error code table.
Next steps
RPC reference
All methods, parameters, and return structures.
Block context and routing
The semantics of
Equals / Contains and the proxy’s routing rules.