---
title: GET /v1/markets/{id}/stats24h
---

# `GET /v1/markets/{id}/stats24h`

Get 24h stats

24-hour volume and traded high and low, derived from fills, including the venue's own USDhb hedge legs.

Money, price, rate and count fields cross the wire as decimal strings; units are shown beside each field ([Wire encoding](/api/wire-encoding)). Group: [Markets](/api/reference/markets/).

**Auth:** none (public)

**Effect:** `read`: reads only

## Parameters

- <span id="param-id"></span>`id` (path) · string · required

## Request

```bash [curl]
curl -fsS "$HB/v1/markets/$ID/stats24h"
```

```python [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 [TypeScript]
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());
```

## Responses

- **200**: OK
  - <span id="res-200-marketId"></span>`marketId` · string · required
  - <span id="res-200-windowMs"></span>`windowMs` · string · unit `ms` · required
  - <span id="res-200-basis"></span>`basis` · const `fills` · required
  - <span id="res-200-fills"></span>`fills` · integer · required
  - <span id="res-200-volumeContracts"></span>`volumeContracts` · string · unit `contracts` · required
  - <span id="res-200-hiQ8"></span>`hiQ8` · string \| null · unit `q8` · required
  - <span id="res-200-loQ8"></span>`loQ8` · string \| null · unit `q8` · required
  - <span id="res-200-truncated"></span>`truncated` · boolean · required

Example `200` response:

```json
{
  "marketId": "string",
  "windowMs": "100000",
  "basis": "fills",
  "fills": 0,
  "volumeContracts": "100000",
  "hiQ8": "100000",
  "loQ8": "100000",
  "truncated": true
}
```

## Errors

Every refusal carries a stable `code` from [`ErrorCode`](/api/reference/all#errorcode) beside human `error` prose; match on the code. See [Errors](/api/errors).

- **404**: A refusal carrying a stable machine `code` (ErrorCode) beside human `error` prose.
