Skip to main content

hl_getBatchBlocks JSON-RPC Method

Retrieves a batch of blocks from a specified Hyperliquid stream within a block range.

Updated on
Sep 17, 2026
Access to /hypercore JSON-RPC methods requires a Build plan or higher. View pricing to upgrade. For complete stream type definitions and filtering options, see the datasets documentation.

The height field is missing on older replica_cmds blocks

The top-level height field was added to Hyperliquid's raw replica_cmds data on 2026-07-25, starting at block 1085381001. Blocks produced before that change are still returned in full, with abci_block and resps, but the response object has no height key, so the payload itself does not tell you which block you received. Track the block number from your own request when you query that range. This applies only to the replica_cmds stream. Every other stream returns block_number on every block.

Parameters

stream
string
REQUIRED

The stream type to query (trades, orders, events, book, twap, writer_actions, replica_cmds). The replica_cmds stream returns the raw HyperCore block, which has a different response shape than the other streams.

from
integer
REQUIRED

Starting block number (inclusive)

to
integer
REQUIRED

Ending block number (inclusive)

Returns

The shape of each entry in blocks depends on the stream you request. The trades, orders, book, twap, events, and writer_actions streams all return the same processed block object. The replica_cmds stream returns raw HyperCore blocks instead, which are documented in the blocks dataset.

result
object

Result payload containing the requested blocks

Returned for the trades, orders, book, twap, events, and writer_actions streams.

blocks
array

Array of block objects within the specified range

block_number
integer

Block number on the Hyperliquid chain

block_time
string

Block timestamp in ISO 8601 format

local_time
string

Local server timestamp in ISO 8601 format

events
array

List of events in this block; each event is a 2-item tuple of [address, payload]

address
string

Event address as a 0x-prefixed hex string

payload
object

Event payload data

coin
string

Instrument symbol (e.g., HYPE, BTC, SUI, XRP, xyz:HOOD, xyz:XYZ100, @198)

px
string

Execution price as a stringified number

sz
string

Execution size/quantity as a stringified number

side
string

Trade side indicator (e.g., B or A)

time
integer

Event timestamp in milliseconds since Unix epoch

startPosition
string

Position size before the event as a stringified number

dir
string

Action direction describing the position change (e.g., Open Long, Open Short, Close Long, Close Short, Buy, Sell, Long > Short, Short > Long)

closedPnl
string

Realized PnL from this event as a stringified number

hash
string

Transaction hash as a 0x-prefixed hex string

oid
integer

Order identifier

crossed
boolean

Whether the order crossed the book

fee
string

Fee amount as a stringified number (can be negative depending on rebates)

feeToken
string

Token symbol used for fees (e.g., USDC, WOULD)

tid
integer

Trade identifier

twapId
integer

TWAP identifier if the event is associated with a TWAP; otherwise null

cloid
string

Client order identifier

builder
string

Builder address as a 0x-prefixed hex string

builderFee
string

Builder fee amount as a stringified number

Request
Don't have an account yet?
Create your Quicknode endpoint in seconds and start building
Get started for free