Get 24h stats
24-hour volume and traded high and low, derived from fills, including the venue's own USDhb hedge legs.
GET
https://testnet.hardbasis.com/v1/markets/{id}/stats24hbash
curl -fsS "$HB/v1/markets/$ID/stats24h"python
import os
import requests
HB = os.environ.get("HB", "https://testnet.hardbasis.com")
ID = os.environ["ID"]
resp = requests.get(
f"{HB}/v1/markets/{ID}/stats24h",
)
resp.raise_for_status()
print(resp.json())ts
const HB = process.env.HB ?? "https://testnet.hardbasis.com";
const ID = process.env.ID!;
const res = await fetch(`${HB}/v1/markets/${ID}/stats24h`, {
method: "GET",
});
if (!res.ok) throw new Error(`${res.status} ${await res.text()}`);
console.log(await res.json());json
{
"marketId": "string",
"windowMs": "100000",
"basis": "fills",
"fills": 0,
"volumeContracts": "100000",
"hiQ8": "100000",
"loQ8": "100000",
"truncated": true
}json
{
"error": "string",
"code": "not_found"
}