Skip to main content
POST
/
stream
cURL
curl --compressed -X POST 'https://portal.sqd.dev/datasets/hyperliquid-replica-cmds/stream' \
  -H 'Content-Type: application/json' \
  -d '{
    "type": "hyperliquidReplicaCmds",
    "fromBlock": 880000000,
    "toBlock": 880000002,
    "fields": {
      "block": {
        "number": true,
        "timestamp": true
      },
      "action": {
        "actionIndex": true,
        "user": true,
        "action": true,
        "status": true,
        "response": true,
        "nonce": true
      }
    },
    "actions": [{
      "user": ["0x010461c14e146ac35fe42271bdc1134ee31c703a"]
    }]
  }'
[
  {
    "header": {
      "number": 880000001,
      "timestamp": 1710000000000
    },
    "actions": [
      {
        "actionIndex": 0,
        "user": "0x010461c14e146ac35fe42271bdc1134ee31c703a",
        "action": {
          "type": "order",
          "orders": [
            {
              "a": 3,
              "b": true,
              "p": "67234.5",
              "s": "0.1",
              "r": false,
              "t": {
                "limit": {
                  "tif": "Gtc"
                }
              }
            }
          ]
        },
        "status": "ok",
        "response": {
          "type": "order",
          "data": {
            "statuses": [
              {
                "resting": {
                  "oid": 12345678
                }
              }
            ]
          }
        },
        "nonce": 1710000000000
      }
    ]
  }
]

Documentation Index

Fetch the complete documentation index at: https://beta.docs.sqd.dev/llms.txt

Use this file to discover all available pages before exploring further.

Body

application/json

Data query to filter and retrieve 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 blocks in JSON lines format, optionally gzipped. Can be empty if the data query has a bounded range and all blocks in the range have been skipped. May include X-Sqd-Finalized-Head-Number and X-Sqd-Finalized-Head-Hash headers.

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.