curl --compressed -X POST 'https://portal.sqd.dev/datasets/hyperliquid-fills/finalized-stream' \
-H 'Content-Type: application/json' \
-d '{
"type": "hyperliquidFills",
"fromBlock": 900000000,
"toBlock": 900000100,
"fields": {
"block": {
"number": true,
"timestamp": true
},
"fill": {
"user": true,
"coin": true,
"px": true,
"sz": true,
"side": true,
"dir": true,
"fee": true
}
},
"fills": [{
"coin": ["BTC"]
}]
}'import requests
response = requests.post(
"https://portal.sqd.dev/datasets/hyperliquid-fills/finalized-stream",
json={
"type": "hyperliquidFills",
"fromBlock": 900000000,
"toBlock": 900000100,
"fields": {
"block": {
"number": True,
"timestamp": True
},
"fill": {
"user": True,
"coin": True,
"px": True,
"sz": True,
"side": True,
"dir": True,
"fee": True
}
},
"fills": [{
"coin": ["BTC"]
}]
}
)
data = response.json()const response = await fetch("https://portal.sqd.dev/datasets/hyperliquid-fills/finalized-stream", {
method: "POST",
headers: { "Content-Type": "application/json" },
body: JSON.stringify({
"type": "hyperliquidFills",
"fromBlock": 900000000,
"toBlock": 900000100,
"fields": {
"block": {
"number": true,
"timestamp": true
},
"fill": {
"user": true,
"coin": true,
"px": true,
"sz": true,
"side": true,
"dir": true,
"fee": true
}
},
"fills": [{
"coin": ["BTC"]
}]
})
});
const data = await response.json();<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://portal.sqd.dev/datasets/hyperliquid-fills/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' => 'hyperliquidFills',
'fromBlock' => 900000000,
'toBlock' => 900000100,
'fields' => [
'block' => [
'number' => true,
'timestamp' => true
],
'fill' => [
'user' => true,
'coin' => true,
'px' => true,
'sz' => true,
'side' => true,
'dir' => true,
'fee' => true
]
],
'fills' => [
[
'coin' => [
'BTC'
]
]
]
]),
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-fills/finalized-stream"
payload := strings.NewReader("{\n \"type\": \"hyperliquidFills\",\n \"fromBlock\": 900000000,\n \"toBlock\": 900000100,\n \"fields\": {\n \"block\": {\n \"number\": true,\n \"timestamp\": true\n },\n \"fill\": {\n \"user\": true,\n \"coin\": true,\n \"px\": true,\n \"sz\": true,\n \"side\": true,\n \"dir\": true,\n \"fee\": true\n }\n },\n \"fills\": [\n {\n \"coin\": [\n \"BTC\"\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-fills/finalized-stream")
.header("Content-Type", "application/json")
.body("{\n \"type\": \"hyperliquidFills\",\n \"fromBlock\": 900000000,\n \"toBlock\": 900000100,\n \"fields\": {\n \"block\": {\n \"number\": true,\n \"timestamp\": true\n },\n \"fill\": {\n \"user\": true,\n \"coin\": true,\n \"px\": true,\n \"sz\": true,\n \"side\": true,\n \"dir\": true,\n \"fee\": true\n }\n },\n \"fills\": [\n {\n \"coin\": [\n \"BTC\"\n ]\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://portal.sqd.dev/datasets/hyperliquid-fills/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\": \"hyperliquidFills\",\n \"fromBlock\": 900000000,\n \"toBlock\": 900000100,\n \"fields\": {\n \"block\": {\n \"number\": true,\n \"timestamp\": true\n },\n \"fill\": {\n \"user\": true,\n \"coin\": true,\n \"px\": true,\n \"sz\": true,\n \"side\": true,\n \"dir\": true,\n \"fee\": true\n }\n },\n \"fills\": [\n {\n \"coin\": [\n \"BTC\"\n ]\n }\n ]\n}"
response = http.request(request)
puts response.read_body[
{
"header": {
"number": 900000050,
"timestamp": 1710000000000
},
"fills": [
{
"user": "0xabc123def456abc123def456abc123def456abc1",
"coin": "BTC",
"px": "67234.5",
"sz": "0.1",
"side": "B",
"dir": "Open Long",
"fee": "6.7234"
}
]
}
]"<string>""<string>""<string>"{
"previousBlocks": [
{
"number": 123,
"hash": "<string>"
}
]
}"<string>""<string>""<string>"Stream Finalized Blocks
Stream finalized Hyperliquid fills data with the SQD Portal API.
curl --compressed -X POST 'https://portal.sqd.dev/datasets/hyperliquid-fills/finalized-stream' \
-H 'Content-Type: application/json' \
-d '{
"type": "hyperliquidFills",
"fromBlock": 900000000,
"toBlock": 900000100,
"fields": {
"block": {
"number": true,
"timestamp": true
},
"fill": {
"user": true,
"coin": true,
"px": true,
"sz": true,
"side": true,
"dir": true,
"fee": true
}
},
"fills": [{
"coin": ["BTC"]
}]
}'import requests
response = requests.post(
"https://portal.sqd.dev/datasets/hyperliquid-fills/finalized-stream",
json={
"type": "hyperliquidFills",
"fromBlock": 900000000,
"toBlock": 900000100,
"fields": {
"block": {
"number": True,
"timestamp": True
},
"fill": {
"user": True,
"coin": True,
"px": True,
"sz": True,
"side": True,
"dir": True,
"fee": True
}
},
"fills": [{
"coin": ["BTC"]
}]
}
)
data = response.json()const response = await fetch("https://portal.sqd.dev/datasets/hyperliquid-fills/finalized-stream", {
method: "POST",
headers: { "Content-Type": "application/json" },
body: JSON.stringify({
"type": "hyperliquidFills",
"fromBlock": 900000000,
"toBlock": 900000100,
"fields": {
"block": {
"number": true,
"timestamp": true
},
"fill": {
"user": true,
"coin": true,
"px": true,
"sz": true,
"side": true,
"dir": true,
"fee": true
}
},
"fills": [{
"coin": ["BTC"]
}]
})
});
const data = await response.json();<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://portal.sqd.dev/datasets/hyperliquid-fills/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' => 'hyperliquidFills',
'fromBlock' => 900000000,
'toBlock' => 900000100,
'fields' => [
'block' => [
'number' => true,
'timestamp' => true
],
'fill' => [
'user' => true,
'coin' => true,
'px' => true,
'sz' => true,
'side' => true,
'dir' => true,
'fee' => true
]
],
'fills' => [
[
'coin' => [
'BTC'
]
]
]
]),
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-fills/finalized-stream"
payload := strings.NewReader("{\n \"type\": \"hyperliquidFills\",\n \"fromBlock\": 900000000,\n \"toBlock\": 900000100,\n \"fields\": {\n \"block\": {\n \"number\": true,\n \"timestamp\": true\n },\n \"fill\": {\n \"user\": true,\n \"coin\": true,\n \"px\": true,\n \"sz\": true,\n \"side\": true,\n \"dir\": true,\n \"fee\": true\n }\n },\n \"fills\": [\n {\n \"coin\": [\n \"BTC\"\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-fills/finalized-stream")
.header("Content-Type", "application/json")
.body("{\n \"type\": \"hyperliquidFills\",\n \"fromBlock\": 900000000,\n \"toBlock\": 900000100,\n \"fields\": {\n \"block\": {\n \"number\": true,\n \"timestamp\": true\n },\n \"fill\": {\n \"user\": true,\n \"coin\": true,\n \"px\": true,\n \"sz\": true,\n \"side\": true,\n \"dir\": true,\n \"fee\": true\n }\n },\n \"fills\": [\n {\n \"coin\": [\n \"BTC\"\n ]\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://portal.sqd.dev/datasets/hyperliquid-fills/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\": \"hyperliquidFills\",\n \"fromBlock\": 900000000,\n \"toBlock\": 900000100,\n \"fields\": {\n \"block\": {\n \"number\": true,\n \"timestamp\": true\n },\n \"fill\": {\n \"user\": true,\n \"coin\": true,\n \"px\": true,\n \"sz\": true,\n \"side\": true,\n \"dir\": true,\n \"fee\": true\n }\n },\n \"fills\": [\n {\n \"coin\": [\n \"BTC\"\n ]\n }\n ]\n}"
response = http.request(request)
puts response.read_body[
{
"header": {
"number": 900000050,
"timestamp": 1710000000000
},
"fills": [
{
"user": "0xabc123def456abc123def456abc123def456abc1",
"coin": "BTC",
"px": "67234.5",
"sz": "0.1",
"side": "B",
"dir": "Open Long",
"fee": "6.7234"
}
]
}
]"<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 hyperliquidFills for this API).
hyperliquidFills 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
Fill data requests. An empty object matches all fills; an empty array matches no fills.
Show child attributes
Show child attributes
Response
A stream of finalized 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.
Block header data. Fields are conditionally returned based on the fields.block parameter in the request. Only requested fields will be included in the response.
Show child attributes
Show child attributes
Trade fill records contained in this block. Fields are conditionally returned based on the fields.fill parameter in the request.
Show child attributes
Show child attributes
Was this page helpful?