curl --compressed -X POST 'https://portal.sqd.dev/datasets/hyperliquid-replica-cmds/finalized-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"]
}]
}'import requests
response = requests.post(
"https://portal.sqd.dev/datasets/hyperliquid-replica-cmds/finalized-stream",
json={
"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"]
}]
}
)
data = response.json()const response = await fetch("https://portal.sqd.dev/datasets/hyperliquid-replica-cmds/finalized-stream", {
method: "POST",
headers: { "Content-Type": "application/json" },
body: JSON.stringify({
"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"]
}]
})
});
const data = await response.json();<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://portal.sqd.dev/datasets/hyperliquid-replica-cmds/finalized-stream",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'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'
]
]
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://portal.sqd.dev/datasets/hyperliquid-replica-cmds/finalized-stream"
payload := strings.NewReader("{\n \"type\": \"hyperliquidReplicaCmds\",\n \"fromBlock\": 880000000,\n \"toBlock\": 880000002,\n \"fields\": {\n \"block\": {\n \"number\": true,\n \"timestamp\": true\n },\n \"action\": {\n \"actionIndex\": true,\n \"user\": true,\n \"action\": true,\n \"status\": true,\n \"response\": true,\n \"nonce\": true\n }\n },\n \"actions\": [\n {\n \"user\": [\n \"0x010461c14e146ac35fe42271bdc1134ee31c703a\"\n ]\n }\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://portal.sqd.dev/datasets/hyperliquid-replica-cmds/finalized-stream")
.header("Content-Type", "application/json")
.body("{\n \"type\": \"hyperliquidReplicaCmds\",\n \"fromBlock\": 880000000,\n \"toBlock\": 880000002,\n \"fields\": {\n \"block\": {\n \"number\": true,\n \"timestamp\": true\n },\n \"action\": {\n \"actionIndex\": true,\n \"user\": true,\n \"action\": true,\n \"status\": true,\n \"response\": true,\n \"nonce\": true\n }\n },\n \"actions\": [\n {\n \"user\": [\n \"0x010461c14e146ac35fe42271bdc1134ee31c703a\"\n ]\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://portal.sqd.dev/datasets/hyperliquid-replica-cmds/finalized-stream")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"type\": \"hyperliquidReplicaCmds\",\n \"fromBlock\": 880000000,\n \"toBlock\": 880000002,\n \"fields\": {\n \"block\": {\n \"number\": true,\n \"timestamp\": true\n },\n \"action\": {\n \"actionIndex\": true,\n \"user\": true,\n \"action\": true,\n \"status\": true,\n \"response\": true,\n \"nonce\": true\n }\n },\n \"actions\": [\n {\n \"user\": [\n \"0x010461c14e146ac35fe42271bdc1134ee31c703a\"\n ]\n }\n ]\n}"
response = http.request(request)
puts response.read_body[
{
"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
}
]
}
]"<string>""<string>""<string>"{
"previousBlocks": [
{
"number": 123,
"hash": "<string>"
}
]
}"<string>""<string>""<string>"Stream Finalized Blocks
Stream finalized Hyperliquid replica command data with the SQD Portal API.
curl --compressed -X POST 'https://portal.sqd.dev/datasets/hyperliquid-replica-cmds/finalized-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"]
}]
}'import requests
response = requests.post(
"https://portal.sqd.dev/datasets/hyperliquid-replica-cmds/finalized-stream",
json={
"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"]
}]
}
)
data = response.json()const response = await fetch("https://portal.sqd.dev/datasets/hyperliquid-replica-cmds/finalized-stream", {
method: "POST",
headers: { "Content-Type": "application/json" },
body: JSON.stringify({
"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"]
}]
})
});
const data = await response.json();<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://portal.sqd.dev/datasets/hyperliquid-replica-cmds/finalized-stream",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'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'
]
]
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://portal.sqd.dev/datasets/hyperliquid-replica-cmds/finalized-stream"
payload := strings.NewReader("{\n \"type\": \"hyperliquidReplicaCmds\",\n \"fromBlock\": 880000000,\n \"toBlock\": 880000002,\n \"fields\": {\n \"block\": {\n \"number\": true,\n \"timestamp\": true\n },\n \"action\": {\n \"actionIndex\": true,\n \"user\": true,\n \"action\": true,\n \"status\": true,\n \"response\": true,\n \"nonce\": true\n }\n },\n \"actions\": [\n {\n \"user\": [\n \"0x010461c14e146ac35fe42271bdc1134ee31c703a\"\n ]\n }\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://portal.sqd.dev/datasets/hyperliquid-replica-cmds/finalized-stream")
.header("Content-Type", "application/json")
.body("{\n \"type\": \"hyperliquidReplicaCmds\",\n \"fromBlock\": 880000000,\n \"toBlock\": 880000002,\n \"fields\": {\n \"block\": {\n \"number\": true,\n \"timestamp\": true\n },\n \"action\": {\n \"actionIndex\": true,\n \"user\": true,\n \"action\": true,\n \"status\": true,\n \"response\": true,\n \"nonce\": true\n }\n },\n \"actions\": [\n {\n \"user\": [\n \"0x010461c14e146ac35fe42271bdc1134ee31c703a\"\n ]\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://portal.sqd.dev/datasets/hyperliquid-replica-cmds/finalized-stream")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"type\": \"hyperliquidReplicaCmds\",\n \"fromBlock\": 880000000,\n \"toBlock\": 880000002,\n \"fields\": {\n \"block\": {\n \"number\": true,\n \"timestamp\": true\n },\n \"action\": {\n \"actionIndex\": true,\n \"user\": true,\n \"action\": true,\n \"status\": true,\n \"response\": true,\n \"nonce\": true\n }\n },\n \"actions\": [\n {\n \"user\": [\n \"0x010461c14e146ac35fe42271bdc1134ee31c703a\"\n ]\n }\n ]\n}"
response = http.request(request)
puts response.read_body[
{
"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
}
]
}
]"<string>""<string>""<string>"{
"previousBlocks": [
{
"number": 123,
"hash": "<string>"
}
]
}"<string>""<string>""<string>"Body
Data query to filter and retrieve finalized blocks. Request body may be gzipped (Content-Encoding: gzip).
The type of data (fixed to hyperliquidReplicaCmds for this API).
hyperliquidReplicaCmds The block number to start fetching from (inclusive).
The block number to fetch up to (inclusive). Optional; if omitted, streams until dataset height or timeout.
Expected hash of the parent of the first requested block.
If true, includes blocks with no matching data in the response.
Field selector for data items to retrieve.
Show child attributes
Show child attributes
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.
Show child attributes
Show child attributes
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.
Show child attributes
Show child attributes
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.
Show child attributes
Show child attributes
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.
Show child attributes
Show child attributes
Batch modify action requests. Filters actions that contain batch order modifications. An empty object matches all batch modify actions; an empty array matches none.
Show child attributes
Show child attributes
Response
A stream of finalized blocks in JSON lines format, optionally gzipped.
Was this page helpful?