---
title: GET /v1/usdhb/sagas
---

# `GET /v1/usdhb/sagas`

List mint and redeem sagas

The account's mint and redeem sagas, newest first, cursor-paginated by createdTsMs.

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

**Auth:** API key (`x-api-key`)

**Scope:** `read`

**Rate limit:** the `read` budget ([Rate limits](/api/rate-limits))

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

## Parameters

- <span id="param-limit"></span>`limit` (query) · string · optional: Page size, 1..200 (default 100).
- <span id="param-beforeTsMs"></span>`beforeTsMs` (query) · string · optional: Cursor: return sagas created strictly before this timestamp (ms, decimal). Omit for page one.

## Request

```bash [curl]
curl -fsS "$HB/v1/usdhb/sagas" \
  -H "x-api-key: $HB_KEY"
```

```python [Python]
import os

import requests

HB = os.environ.get("HB", "https://testnet.hardbasis.com")

resp = requests.get(
    f"{HB}/v1/usdhb/sagas",
    headers={
        "x-api-key": os.environ["HB_KEY"],
    },
)
resp.raise_for_status()
print(resp.json())
```

```ts [TypeScript]
const HB = process.env.HB ?? "https://testnet.hardbasis.com";

const res = await fetch(`${HB}/v1/usdhb/sagas`, {
  method: "GET",
  headers: {
    "x-api-key": process.env.HB_KEY!,
  },
});
if (!res.ok) throw new Error(`${res.status} ${await res.text()}`);
console.log(await res.json());
```

## Responses

- **200**: OK
  - <span id="res-200-sagas"></span>`sagas` · object[] · required
    - <span id="res-200-sagas-sagaId"></span>`sagaId` · string · required
    - <span id="res-200-sagas-side"></span>`side` · enum(`mint`, `redeem`) · required
    - <span id="res-200-sagas-state"></span>`state` · enum(`hedging`, `minted`, `queued`, `redeeming`, `paid`) · required
    - <span id="res-200-sagas-usdhb"></span>`usdhb` · string · required
    - <span id="res-200-sagas-contracts"></span>`contracts` · string · unit `contracts` · required
    - <span id="res-200-sagas-satsMsat"></span>`satsMsat` · string · unit `msat` · required
    - <span id="res-200-sagas-priceQ8"></span>`priceQ8` · string \| null · unit `q8` · required
    - <span id="res-200-sagas-queuedReason"></span>`queuedReason` · string \| null · required
    - <span id="res-200-sagas-queuedSinceMs"></span>`queuedSinceMs` · string \| null · unit `ms` · required
    - <span id="res-200-sagas-createdTsMs"></span>`createdTsMs` · string · unit `ms` · required
    - <span id="res-200-sagas-updatedTsMs"></span>`updatedTsMs` · string · unit `ms` · required
  - <span id="res-200-nextBeforeTsMs"></span>`nextBeforeTsMs` · string \| null · unit `ms` · required

Example `200` response:

```json
{
  "sagas": [
    {
      "sagaId": "string",
      "side": "mint",
      "state": "hedging",
      "usdhb": "string",
      "contracts": "100000",
      "satsMsat": "100000",
      "priceQ8": "100000",
      "queuedReason": "string",
      "queuedSinceMs": "100000",
      "createdTsMs": "100000",
      "updatedTsMs": "100000"
    }
  ],
  "nextBeforeTsMs": "100000"
}
```

## 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).

- **401**: A refusal carrying a stable machine `code` (ErrorCode) beside human `error` prose.
- **403**: A refusal carrying a stable machine `code` (ErrorCode) beside human `error` prose.
- **429**: A token bucket is exhausted.
