Skip to main content

hl_getBlock JSON-RPC Method

Retrieves a specific block from a Hyperliquid stream by block number.

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.

block
integer
REQUIRED

The specific block number to retrieve

Returns

The shape of result 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 the raw HyperCore block instead, which is documented in the blocks dataset.

result
object

The requested block object

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

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

builder
string

Builder address as a 0x-prefixed hex string (only present for some events)

builderFee
string

Builder fee amount as a stringified number (only present for some events)

cloid
string

Client order identifier (only present for some events)

closedPnl
string

Realized PnL from this event as a stringified number

coin
string

Instrument symbol (e.g., BTC, xyz:XYZ100, xyz:HOOD)

crossed
boolean

Whether the order crossed the book

dir
string

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

fee
string

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

feeToken
string

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

hash
string

Transaction hash as a 0x-prefixed hex string

oid
integer

Order identifier

px
string

Execution price as a stringified number

side
string

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

startPosition
string

Position size before the event as a stringified number

sz
string

Execution size/quantity as a stringified number

tid
integer

Trade identifier

time
integer

Event timestamp in milliseconds since Unix epoch

twapId
integer

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

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