cURL
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
}
]
}
]Stream Finalized Blocks
Stream finalized Hyperliquid replica command data with the SQD Portal API.
POST
/
finalized-stream
cURL
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
}
]
}
]Body
application/json
Data query to filter and retrieve finalized blocks. Request body may be gzipped (Content-Encoding: gzip).
Response
A stream of finalized blocks in JSON lines format, optionally gzipped.
Was this page helpful?