> ## Documentation Index
> Fetch the complete documentation index at: https://hypernova.xyz/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Accounts and markets

> ListAccounts, ListMarkets and GetAccountSnapshot - read your accounts, their rule progress, every tradable market and your live balances and positions.

Start here: `ListAccounts` gives you the `accountId` every other call takes, and `ListMarkets` the limits `PlaceOrder` and `SetLeverage` enforce.

## ListAccounts

`ListAccounts` · **read key** · Body: `{}`

Your accounts, newest first, with each account's progress against its Assessment rules.

| Field | Type | Description |
| - | - | - |
| `accountId` | string | The id every other endpoint takes. |
| `type` | AccountType | Assessment, demo or funded. |
| `state` | AccountState | Only an `ACCOUNT_STATE_ACTIVE` account can trade. |
| `assetClass` | AssetClass | The account trades markets of this class, or every market under `ASSET_CLASS_ALL`. |
| `riskLevel` | RiskLevel | See [Risk level](#risk-level). |
| `startingBalance` | decimal | Account size at the start, in USD. |
| `createdAt` | timestamp | When the account was created. |
| `activatedAt` *optional* | timestamp | When trading opened. |
| `dailyLoss` *optional* | DrawdownProgress | Today's loss against the daily loss limit, measured from `startOfDayBalance`. Never sent for an account with no daily loss limit. |
| `maxDrawdown` *optional* | DrawdownProgress | Loss against the maximum drawdown limit, measured from `startingBalance`. |
| `profitTarget` *optional* | ProfitTargetProgress | Progress towards the profit target. Left out on funded accounts. |
| `dailyPnl` *optional* | decimal | Signed USD: equity now minus equity at 00:00 UTC, with today's payouts added back. |
| `startOfDayBalance` *optional* | decimal | USD cash balance at 00:00 UTC. |
| `ruleProgressAt` *optional* | timestamp | When the portfolio update these figures come from happened, not when you called. |

**DrawdownProgress**: `currentAmount` is USD lost, never negative; `limitPct` is the limit in percent, so `"5"` is 5%; `progressPct` is `currentAmount` as a percent of the limit, not capped, so `"100"` means the limit is reached.
**ProfitTargetProgress**: `currentAmount` is USD of equity above `startingBalance`, never negative; `targetAmount` is the USD profit required; `progressPct` is their ratio in percent, not capped.

```json theme={null}
{
  "accounts": [
    {
      "accountId": "019f6a2e-41c8-7a1d-9b3e-5c2f8d1a7e40",
      "type": "ACCOUNT_TYPE_EVALUATION",
      "state": "ACCOUNT_STATE_ACTIVE",
      "assetClass": "ASSET_CLASS_CRYPTO",
      "startingBalance": "100000",
      "createdAt": "2026-09-01T12:00:00Z",
      "activatedAt": "2026-09-02T09:15:00Z",
      "dailyLoss": { "currentAmount": "450", "limitPct": "3", "progressPct": "15.15" },
      "maxDrawdown": { "currentAmount": "1200", "limitPct": "6", "progressPct": "20" },
      "profitTarget": { "currentAmount": "0", "targetAmount": "10000", "progressPct": "0" },
      "dailyPnl": "-450",
      "startOfDayBalance": "99000",
      "ruleProgressAt": "2026-09-03T14:02:11Z",
      "riskLevel": "RISK_LEVEL_LOW"
    }
  ]
}
```

### Risk level

From tightest to loosest loss limits: `RISK_LEVEL_TIGHT`, `RISK_LEVEL_LOW`, `RISK_LEVEL_MEDIUM`, `RISK_LEVEL_HIGH`.
The enum's numbers do not follow that order, so compare by name.

* Every account carries a level, a demo account included, since it runs under the rules of a real product.
* Use the level to classify an account, and size stops from `dailyLoss` and `maxDrawdown`: a level does not fix exact percentages.
* `RISK_LEVEL_UNSPECIFIED` means the level is unknown to this API version, never a level of its own.

### Rule progress

* The daily loss floor is `startOfDayBalance` × (1 − limit) minus today's payouts: with 100000, a 3% limit and a 1000 payout today, it is 96000. A payout is not counted as a loss, so the room left is unchanged.
* `dailyPnl` takes equity at 00:00 UTC as its base, open P\&L included. On a day that starts with an open loss it reads better than equity minus `startOfDayBalance`, so read the room left from `dailyLoss`, not `dailyPnl`.
* Max drawdown never trails a later equity high. A breach is judged on the lowest equity the account reached, so it fails the account even if equity recovers, and a failed account reports the figures its breach was judged on.
* No figures are sent for an account without a live portfolio or breach record, such as one awaiting signature. `dailyPnl` is left out for a failed account and until the current UTC day's figures are in.

## ListMarkets

`ListMarkets` · **read key** · Body: `{}`

Every market, ordered by symbol, with the limits PlaceOrder and SetLeverage enforce. It reads no account.

| Field | Type | Description |
| - | - | - |
| `symbol` | string | Market symbol, such as BTC. Case-sensitive. |
| `displayName` *optional* | string | Set on some markets, such as `"USD/JPY"`. |
| `assetClass` | AssetClass | Which accounts may trade it. |
| `tickSize` | decimal | Every price, trigger, take-profit and stop-loss must be a multiple of it. |
| `lotSize` | decimal | Every quantity must be a multiple of it and at least it. An order other than a reduce-only order, take-profit or stop-loss may also need a minimum value in USD: see [PlaceOrder limits](https://hypernova.xyz/docs/api/place-order.md#limits). |
| `maxLeverage` | integer | The highest leverage the market allows. |
| `maxPositionSize` | decimal | The largest position, in USD. |
| `makerFeeRate`, `takerFeeRate` | decimal | Per side, as a fraction: `"0.0004"` is 0.04%. |
| `hyperliquidCoin` | string | The market's name in Hyperliquid's `coin` field, to send as given: `BTC`, or `xyz:SKHX` for SKHX. Never build it from `symbol`: the prefix can differ. |

```json theme={null}
{ "markets": [{ "symbol": "BTC", "assetClass": "ASSET_CLASS_CRYPTO", "tickSize": "0.1", "lotSize": "0.00001", "maxLeverage": 10, "maxPositionSize": "1000000", "makerFeeRate": "0.0001", "takerFeeRate": "0.0004", "hyperliquidCoin": "BTC" }] }
```

A market can be delisted at any time. Only exits are then accepted: orders that set `reduceOnly`, take-profits and stop-losses, and a MARKET order placed as a position's [reduce-only exit](https://hypernova.xyz/docs/api/place-order.md#market). Any other order answers `failed_precondition`. ListMarkets keeps listing a delisted market and does not mark it, so that refusal is the only signal.

### Market data

This API serves no market data.
Read prices, books and candles from Hyperliquid's public API, `https://api.hyperliquid.xyz/info` and `wss://api.hyperliquid.xyz/ws`, under the market's `hyperliquidCoin`.
Our `markPrice` is Hyperliquid's `markPx` in the coin's `activeAssetCtx` subscription, and the best bid and offer that fire triggers are the coin's `bbo`.

> [!WARNING]
>
> **Size orders from that coin's prices, not another venue's.** SKHX trades as `xyz:SKHX`, whose price need not match the same name elsewhere, so a price from elsewhere can size a position far larger than intended.

## GetAccountSnapshot

`GetAccountSnapshot` · **read key** · Body: `{ "accountId": "…" }`

The account's balance and open positions at the time of the call.

| Field | Type | Description |
| - | - | - |
| `balance` *optional* | Balance | Absent when the account has no usable balance; never sent as zeros. |
| `equity` | decimal | Account value, including open positions. |
| `cashBalance` | decimal | Settled balance, before open positions. |
| `availableBalance` | decimal | What is free for new orders. |
| `unrealizedPnl` | decimal | Open positions' profit or loss at the mark price. |
| `initialMargin`, `maintenanceMargin` | decimal | Margin held by, and margin that must be kept by, open positions. |
| `reservedMargin` | decimal | Margin set aside for open orders. |
| `marginUtilization` | decimal | A ratio of equity: `0.25` means a quarter is committed. |
| `totalNotional` | decimal | Combined size of open positions, in USD. |
| `accountLeverage` | decimal | Total notional over equity. |
| `updatedAt` | timestamp | When these figures were last updated. |
| `positions` | Position\[] | Open positions; empty beside a balance means flat. Each leg of a pair trade is its own position. |
| `positionId` | string | Kept for the position's whole life. PlaceOrder exits and ClosePosition take it. |
| `symbol`, `side` | string, PositionSide | Market and direction. |
| `size` | decimal | Always positive; `side` gives the direction. |
| `entryPrice`, `markPrice` | decimal | Average entry price and current [mark price](#market-data). |
| `notional` | decimal | Value at the mark price, in USD. |
| `unrealizedPnl`, `realizedPnl` | decimal | Open profit or loss, and profit or loss already closed out of this position. |
| `leverage`, `initialMargin`, `maintenanceMargin` | decimal | This position's leverage and margin. |
| `cumulativeFees`, `cumulativeFunding` | decimal | Fees paid, and funding so far (positive received). |
| `createdAt`, `updatedAt` | timestamp | When it opened, and its last change. |

```json theme={null}
{
  "balance": { "equity": "100500", "cashBalance": "100000", "availableBalance": "98000", "unrealizedPnl": "500", "initialMargin": "2500", "maintenanceMargin": "1250", "reservedMargin": "0", "marginUtilization": "0.0249", "totalNotional": "25000", "accountLeverage": "0.2488", "updatedAt": "2026-10-15T06:30:00Z" },
  "positions": [
    { "positionId": "019f8b1c-0d2e-7f31-a4b5-c6d7e8f90a1b", "symbol": "BTC", "side": "POSITION_SIDE_LONG", "size": "0.25", "entryPrice": "98000", "markPrice": "100000", "notional": "25000", "unrealizedPnl": "500", "realizedPnl": "0", "leverage": "10", "initialMargin": "2500", "maintenanceMargin": "1250", "cumulativeFees": "12.5", "cumulativeFunding": "-3.2", "createdAt": "2026-10-14T18:00:00Z", "updatedAt": "2026-10-15T06:30:00Z" }
  ]
}
```


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.