Skip to main content

hl_getLatestBlocks JSON-RPC Method

Retrieves the latest blocks from a specified Hyperliquid stream type like trades, orders, or events.

Updated on
May 07, 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.

Parameters

stream
string
REQUIRED

The stream type to query (trades, orders, events, book, twap, writer_actions)

count
integer
REQUIRED

Number of latest blocks to retrieve

Returns

result
object

Result payload containing the latest blocks

blocks
array

Array of block objects from the specified stream

local_time
string

Local server timestamp in ISO 8601 format

block_time
string

Block timestamp in ISO 8601 format

block_number
integer

Block number on the Hyperliquid chain

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

object
object

Event payload data object which contains the following fields:

coin
string

Instrument symbol (e.g., ETH, BTC, PAXG, xyz:AMZN, hyna:ZEC, @142)

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)

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)

tid
integer

Trade identifier

feeToken
string

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

twapId
integer|null

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

cloid
string

Client order identifier

builderFee
string

Builder fee amount as a stringified number

builder
string

Builder address as a 0x-prefixed hex string

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