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

# Enumerations

> Every enumeration the Hypernova Public API sends, with the meaning of each value.

Enumerations are sent as their upper-case names.
Every enumeration also has an `…_UNSPECIFIED` value, which is what a field reads when it is unset, such as `rejectionReason` on an order that was not rejected.
The contract only grows within v1, so new values can appear.
Treat an enum name you do not know as unspecified.

## AccountType

| Value | Meaning |
| - | - |
| `ACCOUNT_TYPE_EVALUATION` | Assessment account |
| `ACCOUNT_TYPE_DEMO` | Demo account: real prices, no money at stake |
| `ACCOUNT_TYPE_FUNDED` | Funded account |

## AccountState

| Value | Meaning |
| - | - |
| `ACCOUNT_STATE_INITIALIZING` | Being set up |
| `ACCOUNT_STATE_AWAITING_SIGNATURE` | Waiting for your signature |
| `ACCOUNT_STATE_ACTIVE` | Trading |
| `ACCOUNT_STATE_PASSED` | Assessment passed |
| `ACCOUNT_STATE_FAILED` | Assessment failed or breached |
| `ACCOUNT_STATE_SUSPENDED` | Suspended |
| `ACCOUNT_STATE_CLOSED` | Closed |

## RiskLevel

| Value | Meaning |
| - | - |
| `RISK_LEVEL_TIGHT` | Tight: the tightest loss limits |
| `RISK_LEVEL_LOW` | Low |
| `RISK_LEVEL_MEDIUM` | Medium |
| `RISK_LEVEL_HIGH` | High: the loosest loss limits |
| `RISK_LEVEL_UNSPECIFIED` | The level is not known to this API version. Treat it as unknown, never as a level of its own. |

Listed from tightest to loosest loss limits; the enum's numbers do not follow that order, so compare by name. See [Risk level](https://hypernova.xyz/docs/api/accounts.md#risk-level).

## AssetClass

| Value | Meaning |
| - | - |
| `ASSET_CLASS_CRYPTO` | Crypto markets |
| `ASSET_CLASS_TRADFI` | Traditional markets |
| `ASSET_CLASS_ALL` | Every market |

## OrderSide

| Value | Meaning |
| - | - |
| `ORDER_SIDE_BUY` | Buy |
| `ORDER_SIDE_SELL` | Sell |

## OrderType

| Value | Meaning |
| - | - |
| `ORDER_TYPE_MARKET` | Fills now against the book |
| `ORDER_TYPE_LIMIT` | Rests at `price`, or fills at once if it crosses the book; needs `price`. See [LIMIT](https://hypernova.xyz/docs/api/place-order.md#limit) |
| `ORDER_TYPE_STOP_MARKET` | Market order once the price reaches `triggerPrice` |
| `ORDER_TYPE_TAKE_PROFIT` | Closes a position in profit; needs `positionId` and `triggerPrice` |
| `ORDER_TYPE_STOP_LOSS` | Closes a position at a loss; needs `positionId` and `triggerPrice` |

## OrderStatus

| Value | Meaning |
| - | - |
| `ORDER_STATUS_OPEN` | Resting, or waiting for its trigger |
| `ORDER_STATUS_FILLED` | Filled |
| `ORDER_STATUS_CANCELLED` | Cancelled |
| `ORDER_STATUS_REJECTED` | Refused |

## OrderRejectionReason

| Value | Meaning |
| - | - |
| `ORDER_REJECTION_REASON_INSUFFICIENT_MARGIN` | The account could not cover the order's margin |
| `ORDER_REJECTION_REASON_MAX_POSITION_SIZE_EXCEEDED` | The order would take the position past the market's cap |
| `ORDER_REJECTION_REASON_MARK_PRICE_UNAVAILABLE` | No mark price was available for the market |
| `ORDER_REJECTION_REASON_INVALID_SYMBOL` | The symbol is not a valid market |
| `ORDER_REJECTION_REASON_SYMBOL_DELISTED` | The market is delisted |
| `ORDER_REJECTION_REASON_OTHER` | Any other reason |

## OrderCancelReason

| Value | Meaning |
| - | - |
| `ORDER_CANCEL_REASON_USER` | You cancelled or changed the order |
| `ORDER_CANCEL_REASON_LADDER_RECONCILE` | Cancelled to keep your reduce-only, take-profit and stop-loss orders within the size of the position |
| `ORDER_CANCEL_REASON_POSITION_CLOSED` | Its position closed |
| `ORDER_CANCEL_REASON_FORCE_CLOSE` | The account was closed out, for example after a rule breach |
| `ORDER_CANCEL_REASON_SYMBOL_DELISTED` | The market was delisted |

Sent on the `orderCancelled` event of the [real-time stream](https://hypernova.xyz/docs/api/streaming.md#events). An order cancelled with no recorded reason reads `ORDER_CANCEL_REASON_UNSPECIFIED`.

## PositionSide

| Value | Meaning |
| - | - |
| `POSITION_SIDE_LONG` | Long |
| `POSITION_SIDE_SHORT` | Short |

## TradeDirection

| Value | Meaning |
| - | - |
| `TRADE_DIRECTION_OPEN_LONG` | Opened or added to a long |
| `TRADE_DIRECTION_OPEN_SHORT` | Opened or added to a short |
| `TRADE_DIRECTION_CLOSE_LONG` | Reduced or closed a long |
| `TRADE_DIRECTION_CLOSE_SHORT` | Reduced or closed a short |


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