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
POST https://api-hyperliquid-mainnet-jsonrpc.n.dwellir.com/<API-KEY>/hypercoreAll 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
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
| Method | Description |
|---|---|
| hl_getBatchBlocks | Return fill blocks in a [from, to] range for a given stream |
| hl_getLatestBlockNumber | Return 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:
| Code | Meaning |
|---|---|
| -32700 | Parse error |
| -32600 | Invalid request |
| -32601 | Method not found |
| -32602 | Invalid params |
| -32603 | Internal error |
| -32002 | Requested block range is not available yet |
| -32003 | Requested block range has been pruned |
Constraints
- No batches — Array-wrapped requests are rejected (
-32600) - No notifications — An
idfield (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_getLatestBlockNumberfirst, then request a recent range slightly behind the head withhl_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 →
webData2
Get the Hyperliquid `webData2` envelope for a user. This response can be sparse and is best treated as a lightweight, web-client-oriented payload rather than a guaranteed full dashboard snapshot.
hl_getBatchBlocks - Get Batch Fill Blocks
Retrieve a batch of fill blocks for a given stream and block range via the HyperCore JSON-RPC API.