cURL
curl --compressed -X POST 'https://portal.sqd.dev/datasets/hyperliquid-fills/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/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/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/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/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/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/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"
}
]
}
]Stream Blocks
Stream Hyperliquid fills data with the SQD Portal API.
POST
/
stream
cURL
curl --compressed -X POST 'https://portal.sqd.dev/datasets/hyperliquid-fills/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/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/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/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/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/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/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"
}
]
}
]Body
application/json
Data query to filter and retrieve blocks. Request body may be gzipped (Content-Encoding: gzip).
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, indicating the latest finalized block that's on the same chain as the returned blocks.
Was this page helpful?