Skip to main content
POST
/
finalized-stream
curl --compressed -X POST 'https://portal.sqd.dev/datasets/hyperliquid-replica-cmds/finalized-stream' \
  -H 'Content-Type: application/json' \
  -d '{
    "type": "hyperliquidReplicaCmds",
    "fromBlock": 900000000,
    "toBlock": 900001000,
    "fields": {
      "block": {
        "number": true,
        "timestamp": true
      },
      "action": {
        "actionIndex": true,
        "user": true,
        "action": true,
        "status": true,
        "response": true,
        "nonce": true
      }
    },
    "actions": [{
      "user": ["0xe019d6167e7e324aed003d94098496b6d986aed"]
    }]
  }'
[
  {
    "header": {
      "number": 123,
      "hash": "<string>",
      "parentHash": "<string>",
      "round": 123,
      "parentRound": 123,
      "proposer": "<string>",
      "timestamp": 123,
      "hardfork": {}
    },
    "actions": [
      {
        "actionIndex": 123,
        "user": "<string>",
        "action": {},
        "signature": {},
        "nonce": 123,
        "vaultAddress": "<string>",
        "status": "ok",
        "response": {}
      }
    ]
  }
]

Body

application/json

Data query to filter and retrieve finalized blocks

type
enum<string>
default:hyperliquidReplicaCmds
required

The type of data (fixed to hyperliquidReplicaCmds for this API).

Available options:
hyperliquidReplicaCmds
fromBlock
integer<int64>
required

The block number to start fetching from (inclusive).

toBlock
integer<int64>

The block number to fetch up to (inclusive). Optional; if omitted, streams until dataset height or timeout.

parentBlockHash
string

Expected hash of the parent of the first requested block.

includeAllBlocks
boolean
default:false

If true, includes blocks with no matching data in the response.

fields
object

Field selector for data items to retrieve.

actions
object[]

Generic action data requests. An empty object matches all actions; an empty array matches no actions. To filter by specialized action subtypes (orders, cancels, batch modifies), use the dedicated request arrays instead.

orderActions
object[]

Order action requests. Filters actions that contain order placements matching the given criteria. An empty object matches all order actions; an empty array matches none.

cancelActions
object[]

Cancel action requests. Filters actions that contain order cancellations matching the given criteria. An empty object matches all cancel actions; an empty array matches none.

cancelByCloidActions
object[]

Cancel-by-client-order-ID action requests. Filters cancellation actions referencing specific client order IDs. An empty object matches all such actions; an empty array matches none.

batchModifyActions
object[]

Batch modify action requests. Filters actions that contain batch order modifications. An empty object matches all batch modify actions; an empty array matches none.

Response

A stream of finalized blocks in JSON lines format, optionally gzipped.

header
object
required

Block header data. Fields are conditionally returned based on the fields.block parameter.

actions
object[]

Blockchain actions included in this block. Fields are conditionally returned based on the fields.action parameter.