perpSnapshotTimestamp | Hyperliquid Info API
curl --request POST \
--url https://hypercore.goldrushdata.com/info \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"type": "<string>"
}
'import requests
url = "https://hypercore.goldrushdata.com/info"
payload = { "type": "<string>" }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({type: '<string>'})
};
fetch('https://hypercore.goldrushdata.com/info', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://hypercore.goldrushdata.com/info",
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' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"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://hypercore.goldrushdata.com/info"
payload := strings.NewReader("{\n \"type\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
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://hypercore.goldrushdata.com/info")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"type\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://hypercore.goldrushdata.com/info")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"type\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"snapshot_id": "<string>",
"timestamp": 123
}Info API
perpSnapshotTimestamp | Hyperliquid Info API
Hyperliquid perpSnapshotTimestamp: check for a new all-positions perpSnapshots snapshot for free before downloading it.
POST
/
info
perpSnapshotTimestamp | Hyperliquid Info API
curl --request POST \
--url https://hypercore.goldrushdata.com/info \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"type": "<string>"
}
'import requests
url = "https://hypercore.goldrushdata.com/info"
payload = { "type": "<string>" }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({type: '<string>'})
};
fetch('https://hypercore.goldrushdata.com/info', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://hypercore.goldrushdata.com/info",
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' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"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://hypercore.goldrushdata.com/info"
payload := strings.NewReader("{\n \"type\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
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://hypercore.goldrushdata.com/info")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"type\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://hypercore.goldrushdata.com/info")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"type\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"snapshot_id": "<string>",
"timestamp": 123
}Credit Cost
0 per call
Processing
Realtime
type: "perpSnapshotTimestamp" is used to check for a new all-positions perpSnapshots snapshot for free before downloading it.
Estimate your monthly cost for this API using the Pricing Calculator.
- GoldRush-native. Clients that already poll a
perpSnapshotTimestampmethod get the same request and response. - 0 credits and no per-key rate limit, unlike
perpSnapshots(250 credits, 5 calls per 10 minutes). - A new snapshot appears about every 12 minutes (every 10,000 HyperCore blocks).
snapshot_id and block time of the snapshot that perpSnapshots would serve right now. It costs nothing and returns a few bytes, so you can poll it every few seconds and spend a rate-limited perpSnapshots call only when a new snapshot exists.
Endpoint
POST https://hypercore.goldrushdata.com/info
Authorization: Bearer <GOLDRUSH_API_KEY>
Content-Type: application/json
Request
Always
"perpSnapshotTimestamp". Other fields are ignored.Example
curl -X POST https://hypercore.goldrushdata.com/info \
-H "Authorization: Bearer $GOLDRUSH_API_KEY" \
-H "Content-Type: application/json" \
-d '{"type": "perpSnapshotTimestamp"}'
import os, time, requests
URL = "https://hypercore.goldrushdata.com/info"
HEADERS = {"Authorization": f"Bearer {os.environ['GOLDRUSH_API_KEY']}"}
last_id = None
while True:
ts = requests.post(URL, headers=HEADERS, json={"type": "perpSnapshotTimestamp"}).json()
if ts.get("snapshot_id") and ts["snapshot_id"] != last_id:
last_id = ts["snapshot_id"]
print("new snapshot", last_id, "at", ts["timestamp"])
# ...now call perpSnapshots
time.sleep(10)
let lastId: string | undefined;
setInterval(async () => {
const res = await fetch("https://hypercore.goldrushdata.com/info", {
method: "POST",
headers: {
Authorization: `Bearer ${process.env.GOLDRUSH_API_KEY}`,
"Content-Type": "application/json",
},
body: JSON.stringify({ type: "perpSnapshotTimestamp" }),
});
if (!res.ok) return; // 404 / 503: no fresh snapshot yet, try again next tick
const { snapshot_id, timestamp } = await res.json();
if (snapshot_id !== lastId) {
lastId = snapshot_id;
console.log("new snapshot", snapshot_id, new Date(timestamp * 1000).toISOString());
// ...now call perpSnapshots
}
}, 10_000);
Response
{"snapshot_id": "20261130_state_1240000000", "timestamp": 1796031360}
Opaque id of the snapshot,
YYYYMMDD_state_<block height> (UTC date of the block). Compare it for equality only: it changes exactly when the served snapshot changes.Block time the snapshot was captured at, epoch seconds (not milliseconds). It equals the
x-snapshot-timestamp header of perpSnapshots.Errors
| Condition | Status | Body |
|---|---|---|
| Missing or invalid key, no credits, suspended | 401 / 402 / 403 | standard auth error |
| No snapshot loaded yet | 404 | {"error":"no_snapshot"} |
| Newest snapshot older than 15 minutes | 503 | {"error":"snapshot_stale","message":"…"}, with Retry-After: 60 |
Related endpoints
perpSnapshots
fetch every open perp position on Hyperliquid, with entry and liquidation prices, for liquidation maps and whale trackers.
batchClearinghouseState
fetch perpetuals account state for up to 50 wallets in a single request.
clearinghouseState
fetch a single user’s perpetuals account state by wallet address.
liquidatable
list accounts currently eligible for liquidation.
/info and /ws APIs at hypercore.goldrushdata.com, with no rate limits and every fill, order, trade, funding and ledger event retained from the start of HyperCore coverage.