Testnetsats and USDhb here have no value.
Skip to content
Open testnet app

Get candles ​

OHLC candles at a 60, 3600 or 86400 second interval; volumeContracts counts fills, including the venue's own USDhb hedge legs.

GEThttps://testnet.hardbasis.com/v1/markets/{id}/candles
Auth none (public)Effect read
bash
curl -fsS "$HB/v1/markets/$ID/candles"
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}/candles",
)
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}/candles`, {
  method: "GET",
});
if (!res.ok) throw new Error(`${res.status} ${await res.text()}`);
console.log(await res.json());
json
{
  "interval": 60,
  "candles": [
    {
      "tsMs": "100000",
      "oQ8": "100000",
      "hQ8": "100000",
      "lQ8": "100000",
      "cQ8": "100000",
      "prints": 0,
      "seeded": true,
      "volumeContracts": "100000"
    }
  ]
}
json
{
  "error": "string",
  "code": "not_found"
}

Path parameters ​

idstringrequired

Query parameters ​

intervalenumoptional
Candle interval in SECONDS (integer, Coinbase granularity convention, not a label like "1m"): 60 (1m print-fold base, 96h retention), 3600 or 86400 (permanent rollups). Default 60. Aggregate intermediate frames (5m/15m/4h) client-side.
60360086400
limitstringoptional
Number of most-recent candles to return, 1..1440 (default 96): one UTC day of the 1m base in a single request.

Responses ​

200 OK
intervalconst 60 | const 3600 | const 86400required
candlesobject[]required
Show 8 child fields
tsMsstringmsrequired
oQ8stringq8required
hQ8stringq8required
lQ8stringq8required
cQ8stringq8required
printsintegerrequired
seededbooleanoptional
volumeContractsstringcontractsoptional

Errors ​

Match on code, never on the message. Full taxonomy in Errors.

CodeStatusRetry
not_found404final
404: A refusal carrying a stable machine code (ErrorCode) beside human error prose.

Last updated 2026-11-13 · spec 1.8.0

Program policy v1 · numbers current as of 2026-11-25

Testnet: test sats have no value. Nothing on this page is an offer, a solicitation, or advice.