Docs

HyperCore JSON-RPC API

JSON-RPC 2.0 API for querying HyperCore fill data. Retrieve batch blocks and latest block numbers for the trades stream.

Dwellir provides a JSON-RPC 2.0 HTTP endpoint for querying HyperCore fill data. The API serves trade fill blocks with wire-level compatibility, so existing client code works unmodified.

Endpoint

Text
POST https://api-hyperliquid-mainnet-jsonrpc.n.dwellir.com/<API-KEY>/hypercore

All requests use standard JSON-RPC 2.0 over HTTP with Content-Type: application/json.

This is the HyperCore JSON-RPC endpoint for Dwellir's indexed trade-fill stream. It is separate from the HyperCore Info endpoint, which accepts {"type": "..."} request bodies at https://api-hyperliquid-mainnet-info.n.dwellir.com/<API-KEY>/info.

Quick Test

Bash
curl -X POST 'https://api-hyperliquid-mainnet-jsonrpc.n.dwellir.com/YOUR_API_KEY/hypercore' \
  -H 'Content-Type: application/json' \
  -d '{
    "jsonrpc": "2.0",
    "method": "hl_getLatestBlockNumber",
    "params": { "stream": "trades" },
    "id": 1
  }'

Available Methods

MethodDescription
hl_getBatchBlocksReturn fill blocks in a [from, to] range for a given stream
hl_getLatestBlockNumberReturn the highest block number for a given stream

Only the methods above are implemented on this endpoint. Calls to hl_getBlockByNumber return JSON-RPC -32601 (method not found). To read one recent block, call hl_getBatchBlocks with the same from and to block number.

hl_getBatchBlocks

Retrieve a batch of fill blocks for a specified range. Each block contains trade events with timestamps and fill details.

Ideal for:

  • Backfilling historical trade data
  • Batch processing fill events
  • Building trade analytics pipelines

View hl_getBatchBlocks Documentation →

hl_getLatestBlockNumber

Get the highest block number currently available for a stream. Use this to determine the current head before fetching batch blocks.

Ideal for:

  • Discovering the latest available data
  • Polling for new blocks
  • Synchronization and catch-up logic

View hl_getLatestBlockNumber Documentation →

Supported Streams

Currently only the trades stream is implemented. The upstream API also defines streams for orders, book updates, TWAP, events, and writer actions; these may be added in the future.

Error Codes

Standard JSON-RPC 2.0 error codes are used:

CodeMeaning
-32700Parse error
-32600Invalid request
-32601Method not found
-32602Invalid params
-32603Internal error
-32002Requested block range is not available yet
-32003Requested block range has been pruned

Constraints

  • No batches — Array-wrapped requests are rejected (-32600)
  • No notifications — An id field (string or number) is required
  • Body limit — 8 KiB max request body
  • Timeouts — Each request gets a 30 s context deadline
  • Recent data only — Use hl_getLatestBlockNumber first, then request a recent range slightly behind the head with hl_getBatchBlocks; older ranges can be pruned, and the newest block can briefly be unavailable to batch reads

Query HyperCore fill data with Dwellir's JSON-RPC API. Get your API key →