Get the public ticker
The landing-page ticker, microcached.
GET
https://testnet.hardbasis.com/v1/public/tickerbash
curl -fsS "$HB/v1/public/ticker"python
import os
import requests
HB = os.environ.get("HB", "https://testnet.hardbasis.com")
resp = requests.get(
f"{HB}/v1/public/ticker",
)
resp.raise_for_status()
print(resp.json())ts
const HB = process.env.HB ?? "https://testnet.hardbasis.com";
const res = await fetch(`${HB}/v1/public/ticker`, {
method: "GET",
});
if (!res.ok) throw new Error(`${res.status} ${await res.text()}`);
console.log(await res.json());json
{
"asOfMs": "100000",
"tickers": [
{
"marketId": "string",
"last": {
"midQ8": "100000",
"tsMs": "100000"
},
"stalenessMs": "100000"
}
]
}Responses
200 OKasOfMsstringmsrequiredtickersobject[]requiredShow 3 child fields
marketIdstringrequiredlastobject | nullrequiredstalenessMsstringmsrequired