---
title: GET /v1/account
---

# `GET /v1/account`

Get my account

Account balances, the rail address and the per-path deposit fees.

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

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

**Scope:** `read`

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

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

## Request

```bash [curl]
curl -fsS "$HB/v1/account" \
  -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/account",
    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/account`, {
  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-accountId"></span>`accountId` · string · required
  - <span id="res-200-userId"></span>`userId` · string · required
  - <span id="res-200-railAddress"></span>`railAddress` · string · required
  - <span id="res-200-autoSweepThresholdMsat"></span>`autoSweepThresholdMsat` · string \| null · unit `msat` · required: Not an account movement: a configured threshold; null when auto-sweep is off.
  - <span id="res-200-freeMsat"></span>`freeMsat` · string · unit `msat` · required: Not an account movement: a balance, the withdrawable funds held by the account (>= 0). Fills, funding and liquidations that credit the account raise it; debits lower it.
  - <span id="res-200-reservedMsat"></span>`reservedMsat` · string · unit `msat` · required: Not an account movement: a balance, the margin held against open positions (>= 0), including funding already settled into position margin.
  - <span id="res-200-depositFees"></span>`depositFees` · object[] · required
    - <span id="res-200-depositFees-path"></span>`path` · enum(`spark`, `l1`, `lightning`) · required
    - <span id="res-200-depositFees-description"></span>`description` · string · required
    - <span id="res-200-depositFees-recommendedMinimumSats"></span>`recommendedMinimumSats` · string · unit `sats` · optional: Not an account movement: an advisory minimum deposit for this path, in whole sats.
  - <span id="res-200-usdhb"></span>`usdhb` · string · optional
  - <span id="res-200-usdhbPending"></span>`usdhbPending` · string · optional
  - <span id="res-200-susdhb"></span>`susdhb` · string · optional
  - <span id="res-200-susdhbCooling"></span>`susdhbCooling` · string · optional
  - <span id="res-200-cooling"></span>`cooling` · object[] · optional
    - <span id="res-200-cooling-unstakeId"></span>`unstakeId` · string · required
    - <span id="res-200-cooling-susdhb"></span>`susdhb` · string · required
    - <span id="res-200-cooling-releaseAtMs"></span>`releaseAtMs` · string · unit `ms` · required
  - <span id="res-200-binaryValueAtMarkMsat"></span>`binaryValueAtMarkMsat` · string \| null · unit `msat` · optional: Not an account movement: the account's open YES/NO positions valued at mark, per the PoR claim rule; null when any open position has no fresh mark.

Example `200` response:

```json
{
  "accountId": "string",
  "userId": "string",
  "railAddress": "string",
  "autoSweepThresholdMsat": "100000",
  "freeMsat": "100000",
  "reservedMsat": "100000",
  "depositFees": [
    {
      "path": "spark",
      "description": "string",
      "recommendedMinimumSats": "100000"
    }
  ],
  "usdhb": "string",
  "usdhbPending": "string",
  "susdhb": "string",
  "susdhbCooling": "string",
  "cooling": [
    {
      "unstakeId": "string",
      "susdhb": "string",
      "releaseAtMs": "100000"
    }
  ],
  "binaryValueAtMarkMsat": "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.
