---
title: "Types"
description: "Every request, response, frame and nested object type with its fields. RPC and stream pages expand these inline."
---

RPC and stream pages already expand nested fields inline; this page is for looking a type up by name.

## Ack

| Field | Type | Required | Summary |
|---|---|---|---|
| `ack` · lite `a` | bool | yes | True when the exchange received the request and will process it. |

## AckResponse

Used to acknowledge a request has been received and will be processed

| Field | Type | Required | Summary |
|---|---|---|---|
| `result` · lite `r` | [object Ack](#ack) | yes | The Ack Object |

## AggregatedAccountSummary

| Field | Type | Required | Summary |
|---|---|---|---|
| `main_account_id` · lite `ma` | string (0x address) | yes | The main account ID of the account to which the summary belongs |
| `total_equity` · lite `te` | string | yes | Total equity of the main (+ sub) account, denominated in USD |
| `spot_balances` · lite `sb` | [object SpotBalance[]](#spotbalance) | yes | The list of spot assets owned by this main (+ sub) account, and their balances |
| `vault_investments` · lite `vi` | [object VaultInvestment[]](#vaultinvestment) | yes | The list of vault investments held by this main account |
| `total_sub_account_balance` · lite `ts` | string | yes | Deprecated: Use totalSubAccountEquity instead |
| `total_sub_account_equity` · lite `ts1` | string | yes | Total equity of the sub-accounts, denominated in USD |
| `total_vault_investments_balance` · lite `tv` | string | yes | Total amount of the vault investments, denominated in USD |
| `total_sub_account_available_balance` · lite `ts2` | string | yes | Total available balance of the main account, denominated in USD |
| `total_usd_notional_invested` · lite `tu` | string | yes | Total entry (initial investment) amount of the open investments, denominated in USD |

## AlgoOrder

An algo order: a parent order that the exchange works for you by placing and managing sub-orders, until it is filled, cancelled or expires. It does not rest on the book itself.

Algo trading must be enabled for the sub-account first (`algo_trading_enabled` in the sub-account summary). You don't sign an algo order; the exchange signs and places its sub-orders. Follow the algo order on the `v1.algo.order` stream. Its sub-orders can also show up on the `v1.order` and `v1.state` streams, in open orders and in order history, marked by `metadata.algo_order_id`.

`type` picks the strategy. Only `CHASE` is supported.

**CHASE**: a post-only limit order that follows the market. It is placed at the best bid (buy) or best ask (sell) and re-priced from time to time to keep up, until it is filled, cancelled or expires. Being post-only, it only ever adds liquidity and never trades as a taker. Its settings are in `metadata.chase`.

- With a `trigger`, it waits until the trigger price is crossed; without one, it starts at once.
- A partial fill doesn't stop it: the rest keeps being re-priced.

Its status is `PENDING` while it waits for its trigger, `OPEN` while it chases (also while held at its maximum distance), and `FILLED`, `CANCELLED` or `REJECTED` once it ends.

| Field | Type | Required | Summary |
|---|---|---|---|
| `algo_order_id` · lite `ao` | string (uint128) | no | Set by the server. |
| `sub_account_id` · lite `sa` | string (uint64) | yes | The sub-account initiating the algo order |
| `type` · lite `t` | [enum AlgoOrderType](enums.md#algoordertype) | yes | The type of the algo order |
| `post_only` · lite `po` | bool | no | If True, every sub-order must be a maker order. |
| `reduce_only` · lite `ro` | bool | no | If True, every sub-order must reduce the position size, or be cancelled |
| `leg` · lite `l` | [object AlgoOrderLeg](#algoorderleg) | yes | The single leg traded by this algo order |
| `metadata` · lite `m` | [object AlgoOrderMetadata](#algoordermetadata) | yes | Algo order metadata, including the type-specific parameters |
| `state` · lite `s` | [object AlgoOrderState](#algoorderstate) | no | Set by the server. |
| `builder` · lite `b` | string (0x address) | yes | The main account ID of the builder |
| `builder_fee` · lite `bf` | string | yes | Builder fee charged for every sub-order, expressed as a percentage (e.g., 0.001 means 0.001%). |

## AlgoOrderLeg

| Field | Type | Required | Summary |
|---|---|---|---|
| `instrument` · lite `i` | string (instrument name) | yes | The instrument to trade |
| `size` · lite `s` | string | yes | The total number of assets to trade across all sub-orders. |
| `is_buying_asset` · lite `ib` | bool | yes | Specifies if the algo order is a buy or sell |

## AlgoOrderMetadata

Metadata fields are used to support Backend only operations.
Type-specific parameters live in the nested struct matching the algo order type.

| Field | Type | Required | Summary |
|---|---|---|---|
| `client_order_id` · lite `co` | string (uint64) | yes | Your own id for the algo order, unique among the sub-account's open algo orders. |
| `create_time` · lite `ct` | string (int64 unix ns) | no | Set by the server. |
| `trigger` · lite `t` | [object TriggerOrderMetadata](#triggerordermetadata) | no | Trigger fields. |
| `broker` · lite `b` | [enum BrokerTag](enums.md#brokertag) | no | Specifies the broker who brokered the algo order |
| `expiry` · lite `e` | string (int64 unix ns) | no | Time at which the algo order expires, expressed in unix nanoseconds. |
| `chase` · lite `c` | [object ChaseAlgoOrderMetadata](#chasealgoordermetadata) | no | Chase order parameters. |

## AlgoOrderState

| Field | Type | Required | Summary |
|---|---|---|---|
| `status` · lite `s` | [enum OrderStatus](enums.md#orderstatus) | yes | The status of the algo order |
| `reject_reason` · lite `rr` | [enum OrderRejectReason](enums.md#orderrejectreason) | yes | The reason for rejection or cancellation |
| `traded_size` · lite `ts` | string | yes | The total number of assets traded across all sub-orders |
| `avg_fill_price` · lite `af` | string | yes | The average fill price across all sub-orders |
| `trigger_time` · lite `tt` | string (int64 unix ns) | no | Time at which the algo order was triggered in unix nanoseconds, 0 if not triggered yet |
| `update_time` · lite `ut` | string (int64 unix ns) | yes | Time at which the algo order was updated by Grvt in unix nanoseconds |
| `chase` · lite `c` | [object ChaseOrderState](#chaseorderstate) | no | Chase order state. |
| `last_sub_order_id` · lite `ls` | string (uint128) | yes | The latest sub-order placed for this algo order, 0 until the first sub-order is placed |

## ApiAddIsolatedPositionMarginRequest

The request to add margin to a isolated position

| Field | Type | Required | Summary |
|---|---|---|---|
| `sub_account_id` · lite `sa` | string (uint64) | yes | The sub-account ID to add isolated margin in or remove margin from |
| `instrument` · lite `i` | string (instrument name) | yes | The instrument to add margin into, or remove margin from |
| `amount` · lite `a` | string | yes | The amount of margin to add to the position, positive to add, negative to remove, in the quote asset. |
| `signature` · lite `s` | [object Signature](#signature) | yes | The signature of this operation |

## ApiAddIsolatedPositionMarginResponse

The response to add margin to a isolated position

| Field | Type | Required | Summary |
|---|---|---|---|
| `success` · lite `s` | bool | yes | Whether the margin mode and leverage was set successfully |

## ApiAggregatedAccountSummaryResponse

The aggregated account summary, that reports the total equity and spot balances of a funding (main) account, and its constituent trading (sub) accounts

| Field | Type | Required | Summary |
|---|---|---|---|
| `result` · lite `r` | [object AggregatedAccountSummary](#aggregatedaccountsummary) | yes | The aggregated account summary |

## ApiAlgoOrderHistoryRequest

Retrieves the algo order history for the account. Returns one row per terminated or filled parent algo order, not per sub-order.

Pagination works as follows:

- We perform a reverse chronological lookup, starting from `end_time`. If `end_time` is not set, we start from the most recent data.
- The lookup is limited to `limit` records. If more data is requested, the response will contain a `next` cursor for you to query the next page.
- If a `cursor` is provided, it will be used to fetch results from that point onwards.
- Pagination will continue until the `start_time` is reached. If `start_time` is not set, pagination will continue as far back as our data retention policy allows.

| Field | Type | Required | Summary |
|---|---|---|---|
| `sub_account_id` · lite `sa` | string (uint64) | yes | The sub-account ID to filter by |
| `type` · lite `t` | [enum AlgoOrderType[]](enums.md#algoordertype) | no | The algo order type filter to apply. |
| `start_time` · lite `st` | string (int64 unix ns) | no | The start time to apply in nanoseconds. |
| `end_time` · lite `et` | string (int64 unix ns) | no | The end time to apply in nanoseconds. |
| `limit` · lite `l` | integer (uint32) | no | The limit to query for. |
| `cursor` · lite `c` | string | no | The cursor to indicate when to start the query from |

## ApiAlgoOrderHistoryResponse

| Field | Type | Required | Summary |
|---|---|---|---|
| `result` · lite `r` | [object AlgoOrder[]](#algoorder) | yes | The algo orders matching the request filter |
| `next` · lite `n` | string | yes | The cursor to indicate when to start the query from |

## ApiAlgoSubOrderHistoryRequest

Retrieves the terminal sub-orders of an algo order. A sub-order appears once it reaches a terminal state: partially filled and superseded, fully filled, cancelled or rejected. Re-price cancels and rejects are not included.

| Field | Type | Required | Summary |
|---|---|---|---|
| `sub_account_id` · lite `sa` | string (uint64) | yes | The sub-account ID to filter by |
| `algo_order_id` · lite `ao` | string (uint128) | yes | The `algo_order_id` whose sub-orders are retrieved |

## ApiAlgoSubOrderHistoryResponse

| Field | Type | Required | Summary |
|---|---|---|---|
| `result` · lite `r` | [object Order[]](#order) | yes | The sub-orders of the requested algo order |

## ApiAuthorizedBuilder

| Field | Type | Required | Summary |
|---|---|---|---|
| `builder_account_id` · lite `ba` | string (0x address) | yes | The main account ID of the builder |
| `max_futures_fee_rate` · lite `mf` | string | yes | The maximum fee rate for the authorized builder |
| `max_spot_fee_rate` · lite `ms` | string | yes | The maximum fee rate for the authorized builder |

## ApiBuilderFillHistoryRequest

The request to get the historical builder trade of a builder
The history is returned in reverse chronological order

Pagination works as follows:

- We perform a reverse chronological lookup, starting from `end_time`. If `end_time` is not set, we start from the most recent data.
- The lookup is limited to `limit` records. If more data is requested, the response will contain a `next` cursor for you to query the next page.
- If a `cursor` is provided, it will be used to fetch results from that point onwards.
- Pagination will continue until the `start_time` is reached. If `start_time` is not set, pagination will continue as far back as our data retention policy allows.

| Field | Type | Required | Summary |
|---|---|---|---|
| `start_time` · lite `st` | string (int64 unix ns) | no | The start time to query for in unix nanoseconds |
| `end_time` · lite `et` | string (int64 unix ns) | no | The end time to query for in unix nanoseconds |
| `limit` · lite `l` | integer (uint32) | no | The limit to query for. |
| `cursor` · lite `c` | string | no | The cursor to indicate when to start the next query from |

## ApiBuilderFillHistoryResponse

| Field | Type | Required | Summary |
|---|---|---|---|
| `result` · lite `r` | [object BuilderFillHistory[]](#builderfillhistory) | yes | The builder fill history matching the request builder account |
| `next` · lite `n` | string | no | The cursor to indicate when to start the next query from |

## ApiBulkOrdersRequest

Bulk create, cancel, or cancel-replace orders for a single sub-account.

A cancel-replace is a cancel of the old order plus a create of a new one. The new order is assigned a new `order_id`; the cancelled `order_id` is terminated. Clients must track the new `order_id` from the response.

**Rules**

- Up to 100 entries in each of `orders`, `order_i_ds`, and `client_order_i_ds`
- All create orders must target the same instrument
- `client_order_id`s within `orders` must be unique
- `order_i_ds` and `client_order_i_ds` are mutually exclusive; supplying both is rejected
- Rate limits: N creates consume N create_order tokens; any cancels consume 1 cancel_order token

**BulkCreate**

Populate `orders` only; leave `order_i_ds` and `client_order_i_ds` empty. A batch may not mix multiple normal orders with trigger orders.

To mark an order as TP or SL, populate its `metadata.trigger` field; see `TriggerOrderMetadata` for details.

A 'parent' order is a normal order whose linked TP/SL trigger orders become active once the parent is fully filled.

Supported combinations:

- **Normal orders (non-TPSL)**: one or many orders
- **Standalone TP**: 1 TP order
- **Standalone SL**: 1 SL order
- **OCO** (2 orders: 1 TP + 1 SL): same asset, same size, same side
- **OTO** (2 orders: parent + 1 trigger): 1 parent + 1 TP or SL order. Same asset and size. Parent side is opposite of the trigger side.
- **OTOCO** (3 orders: parent + TP + SL): 1 parent + 1 TP order + 1 SL order. Same asset and size across all three. Parent side is opposite of TP and SL sides.

**BulkCancel**

Leave `orders` empty; populate either `order_i_ds` or `client_order_i_ds` (not both). Targets can be normal orders, standalone TP/SL, or members of an OCO/OTO/OTOCO group. Passing any member id of a grouped TPSL order cancels the whole group.

**BulkCancelReplace**

Populate `orders` together with `order_i_ds` or `client_order_i_ds`. Ids below refer to entries in whichever id list you chose.

*Normal orders (non-TPSL)*: the batch is processed as all cancels first, then all creates.

*TPSL*: `#creates` must equal `#cancels`, and one request may modify only one group. For OTO and OTOCO, only the trigger part is replaceable — the parent order is not included in `orders` or in the cancel id list, and stays on the book unchanged.

- **Standalone TP / Standalone SL**: cancel 1 id (the existing trigger order) + create 1 new trigger order with matching `triggerType`.
- **OCO**: cancel both ids of the existing OCO group (the TP and SL) + create 2 new orders (1 TP + 1 SL); shape conditions same as BulkCreate OCO.
- **OTO**: cancel the id of the existing trigger order in the OTO group + create 1 new trigger order. The new trigger is linked to the same parent.
- **OTOCO**: cancel both ids of the existing OTOCO group (the TP and SL) + create 2 new orders (1 TP + 1 SL); shape conditions same as BulkCreate OCO. The new TP and SL are linked to the same parent.

| Field | Type | Required | Summary |
|---|---|---|---|
| `sub_account_id` · lite `sa` | string (uint64) | yes | The sub-account ID of the user creating the request |
| `orders` · lite `o` | [object Order[]](#order) | no | Orders to create or replace, supply up to 100 orders |
| `order_i_ds` · lite `oi` | string (uint128)[] | no | The order IDs of the orders to cancel or replace, supply up to 100 orderIDs (a request with both `order_i_ds` and `client_order_i_ds` is rejected) |
| `client_order_i_ds` · lite `co` | string (uint64)[] | no | The client order IDs of the orders to cancel or replace, supply up to 100 clientOrderIDs (a request with both `order_i_ds` and `client_order_i_ds` is rejected) |
| `time_to_live_ms` · lite `tt` | string (uint64) | no | How long a cancel by `client_order_id` keeps waiting, in milliseconds, for an order that hasn't arrived yet. |

## ApiBulkOrdersResponse

| Field | Type | Required | Summary |
|---|---|---|---|
| `orders` · lite `o` | [object Order[]](#order) | yes | The orders in same order as requested |
| `cancel_acks` · lite `ca` | [object Ack[]](#ack) | yes | A list of acks for the cancelled orders |

## ApiCancelAlgoOrderRequest

Cancel an algo order for this sub-account. This cascades to a full cancel of the sub-order currently resting on the orderbook. Either `algo_order_id` or `client_order_id` must be provided.

| Field | Type | Required | Summary |
|---|---|---|---|
| `sub_account_id` · lite `sa` | string (uint64) | yes | The sub-account ID cancelling the algo order |
| `algo_order_id` · lite `ao` | string (uint128) | no | Cancel the algo order with this `algo_order_id` |
| `client_order_id` · lite `co` | string (uint64) | no | Cancel the algo order with this `client_order_id` |

## ApiCancelAllOrdersRequest

Cancel all orders on the orderbook for this sub-account. This may not match new orders in flight.

| Field | Type | Required | Summary |
|---|---|---|---|
| `sub_account_id` · lite `sa` | string (uint64) | yes | The sub-account ID cancelling all orders |
| `kind` · lite `k` | [enum Kind[]](enums.md#kind) | no | The kind filter to apply. |
| `base` · lite `b` | string[] | no | The base filter to apply. |
| `quote` · lite `q` | string[] | no | The quote filter to apply. |

## ApiCancelOnDisconnectRequest

Arm, refresh or stop a dead man's switch for one sub-account: if the countdown reaches zero before you call again, the exchange cancels all of that sub-account's open orders.

| `countdown_time` (ms) | Effect |
|---|---|
| omitted, or 0 to 999 | Stops the countdown (999 rounds down to 0). Nothing is cancelled. |
| 1000 to 300999 | Rounded down to whole seconds, then (re)starts the countdown from now. |
| 301000 or more | Rejected with error 6000 (*Countdown time is bigger than 300s supported*). |

Scope: one countdown per `sub_account_id`. Each call replaces the previous countdown of that sub-account, from any session or socket. It is not tied to your connection: despite the name, the orders are cancelled when you stop calling, not when a socket closes. Call it as a heartbeat, e.g. every 30 s with `120000`.

| Field | Type | Required | Summary |
|---|---|---|---|
| `sub_account_id` · lite `sa` | string (uint64) | yes | The sub-account ID cancelling the orders for |
| `countdown_time` · lite `ct` | string (uint64) | no | Countdown in milliseconds, as a string, e.g. |

## ApiCancelOrderRequest

Cancel an order on the orderbook for this sub-account. Either `order_id` or `client_order_id` must be provided.

| Field | Type | Required | Summary |
|---|---|---|---|
| `sub_account_id` · lite `sa` | string (uint64) | yes | The sub-account ID cancelling the order |
| `order_id` · lite `oi` | string (uint128) | no | Cancel the order with this `order_id` |
| `client_order_id` · lite `co` | string (uint64) | no | Cancel the order with this `client_order_id` |
| `time_to_live_ms` · lite `tt` | string (uint64) | no | How long a cancel by `client_order_id` keeps waiting, in milliseconds, for an order that hasn't arrived yet. |

## ApiCancelRfqRequest

Cancels an open RFQ identified by its `rfq_id` before it is accepted or expires.
On cancellation the platform auto-cancels any maker private quotes bound to the RFQ, and emits a CANCELLED event on the `v1.rfq` stream. (An RFQ left untouched also auto-cancels its bound quotes when it reaches `rfq.expiry`.)

| Field | Type | Required | Summary |
|---|---|---|---|
| `sub_account_id` · lite `sa` | string (uint64) | yes | The sub-account ID cancelling the RFQ |
| `rfq_id` · lite `ri` | string (uint128) | yes | Cancel the RFQ with this `rfq_id` |

## ApiCandlestickRequest

Kline/Candlestick bars for an instrument. Klines are uniquely identified by their instrument, type, interval, and open time.

Pagination works as follows:

- We perform a reverse chronological lookup, starting from `end_time`. If `end_time` is not set, we start from the most recent data.
- The lookup is limited to `limit` records. If more data is requested, the response will contain a `next` cursor for you to query the next page.
- If a `cursor` is provided, it will be used to fetch results from that point onwards.
- Pagination will continue until the `start_time` is reached. If `start_time` is not set, pagination will continue as far back as our data retention policy allows.

| Field | Type | Required | Summary |
|---|---|---|---|
| `instrument` · lite `i` | string (instrument name) | yes | The instrument name, e.g. |
| `interval` · lite `i1` | [enum CandlestickInterval](enums.md#candlestickinterval) | yes | The interval of each candlestick |
| `type` · lite `t` | [enum CandlestickType](enums.md#candlesticktype) | yes | The type of candlestick data to retrieve. |
| `start_time` · lite `st` | string (int64 unix ns) | no | Start time of kline data in unix nanoseconds |
| `end_time` · lite `et` | string (int64 unix ns) | no | End time of kline data in unix nanoseconds |
| `limit` · lite `l` | integer (uint32) | no | The limit to query for. |
| `cursor` · lite `c` | string | no | The cursor to indicate when to start the query from |

## ApiCandlestickResponse

| Field | Type | Required | Summary |
|---|---|---|---|
| `result` · lite `r` | [object Candlestick[]](#candlestick) | yes | The candlestick result set for given interval |
| `next` · lite `n` | string | no | The cursor to indicate when to start the next query from |

## ApiCollateralAssetInfo

Platform-wide collateral configuration and usage for a single asset

| Field | Type | Required | Summary |
|---|---|---|---|
| `currency` · lite `c` | string | yes | The asset |
| `collateral_value_ratio` · lite `cv` | string | yes | CVR, expressed in percentage points. |
| `collateral_deposit_cap` · lite `cd` | string | yes | CDC limit, native units. |
| `max_borrow_rate` · lite `mb` | string | yes | MBR - per-asset ceiling on the annual borrow rate, expressed in percentage points; the tier borrow rate never exceeds this. |
| `manual_repayment_fee_rate` · lite `mr` | string | yes | Effective manual-repay/convert fee = max((1-CVR)/MRR, RFR), expressed in percentage points. |
| `cdc_status` · lite `cs` | [enum CDCStatus](enums.md#cdcstatus) | yes | Collateral-deposit-cap utilization status: normal / reduceOnly / autoExchange. |
| `show_only_when_held` · lite `so` | bool | yes | Show this currency only when the sub-account holds a balance of it |
| `vault_id` · lite `vi` | string (uint64) | yes | The vault whose shares this currency is; 0 for an ordinary currency. |

## ApiCollateralPreferenceStatus

The current effective collateral state of a single currency.

| Field | Type | Required | Summary |
|---|---|---|---|
| `currency` · lite `c` | string | yes | The currency whose collateral state is being reported |
| `enabled` · lite `e` | bool | yes | Whether this currency currently counts as collateral for the sub-account |
| `locked` · lite `l` | bool | yes | The sub-account cannot turn this currency off as collateral |

## ApiCreateAlgoOrderRequest

Create an algo order for a sub-account. Algo trading must be enabled for the sub-account first. You don't sign an algo order: the exchange signs and places its sub-orders. Only `CHASE` is supported.

| Field | Type | Required | Summary |
|---|---|---|---|
| `order` · lite `o` | [object AlgoOrder](#algoorder) | yes | The algo order to create |

## ApiCreateAlgoOrderResponse

| Field | Type | Required | Summary |
|---|---|---|---|
| `result` · lite `r` | [object AlgoOrder](#algoorder) | yes | The created algo order |

## ApiCreateOrderRequest

Create an order on the orderbook for this sub-account. STABLE_PERP orders require the sub-account to be in multi-asset mode.

| Field | Type | Required | Summary |
|---|---|---|---|
| `order` · lite `o` | [object Order](#order) | yes | The order to create |

## ApiCreateOrderResponse

| Field | Type | Required | Summary |
|---|---|---|---|
| `result` · lite `r` | [object Order](#order) | yes | The created order |

## ApiCreateRfqRequest

Creates a new RFQ (Request For Quote): a taker solicits private quotes for a single STABLE_PERP instrument by specifying a size, and optionally a direction (`rfq.side`; omit for a two-way request). This request is unsigned — creating an RFQ commits the taker to nothing.

End-to-end flow:

1. The taker submits an RFQ here. (In the Grvt UI, entering a size on the trade page is the RFQ.)
2. Grvt broadcasts the RFQ to makers on the `v1.rfq` stream; makers respond with private quotes.
3. Those private quotes stream back to the taker on the `v1.quote` stream, alongside the public order book (firm resting liquidity + public quotes) which is already visible.
4. The taker accepts by signing an order via create_order with `metadata.rfq_id` set (single leg; IOC or FOK), which executes across the private pool merged with the public book — or walks away and lets the RFQ expire.

The created RFQ is returned in the response. A sub-account may hold at most one open RFQ per instrument. The RFQ lives until `rfq.expiry`, after which Grvt expires it and auto-cancels the makers' private quotes bound to it.
The sub-account must be in multi-asset mode.

| Field | Type | Required | Summary |
|---|---|---|---|
| `rfq` · lite `r` | [object Rfq](#rfq) | yes | The RFQ to create |

## ApiCreateRfqResponse

| Field | Type | Required | Summary |
|---|---|---|---|
| `rfq` · lite `r` | [object Rfq](#rfq) | yes | The created RFQ |

## ApiDepositHistoryRequest

The request to get the historical deposits of an account
The history is returned in reverse chronological order
Both finalized and pending deposits are returned, and pending deposits are indicated by an empty `confirmedTime` field.

Pagination works as follows:

- We perform a reverse chronological lookup, starting from `end_time`. If `end_time` is not set, we start from the most recent data.
- The lookup is limited to `limit` records (default 500, max 1000). If more data matches, the response returns a non-empty `next` cursor. To read the full result set you MUST re-issue the request with `cursor` set to that value and keep looping until `next` is empty.
- **A single call silently truncates at `limit` and returns no error.** Callers that read only the first page (or omit `limit`, which just applies the 500 default) will undercount whenever the account has more than `limit` matching records — e.g. summing deposits/transfers for a balance or PnL calculation must drain the cursor, not read one page.
- If a `cursor` is provided, it will be used to fetch results from that point onwards.
- Pagination will continue until the `start_time` is reached. If `start_time` is not set, pagination will continue as far back as our data retention policy allows.

| Field | Type | Required | Summary |
|---|---|---|---|
| `currency` · lite `c` | string[] | yes | The token currency to query for, if nil or empty, return all deposits. |
| `start_time` · lite `st` | string (int64 unix ns) | no | The start time to query for in unix nanoseconds |
| `end_time` · lite `et` | string (int64 unix ns) | no | The end time to query for in unix nanoseconds |
| `limit` · lite `l` | integer (uint32) | no | The page size for a single response. |
| `cursor` · lite `c1` | string | no | The cursor to indicate when to start the next query from |
| `main_account_id` · lite `ma` | string (0x address) | no | Main account ID being queried. |

## ApiDepositHistoryResponse

| Field | Type | Required | Summary |
|---|---|---|---|
| `result` · lite `r` | [object DepositHistory[]](#deposithistory) | yes | The deposit history matching the request account |
| `next` · lite `n` | string | no | The cursor to indicate when to start the next query from |

## ApiFillHistoryRequest

Query for all historical fills made by a single account. A single order can be matched multiple times, hence there is no real way to uniquely identify a trade.

Pagination works as follows:

- We perform a reverse chronological lookup, starting from `end_time`. If `end_time` is not set, we start from the most recent data.
- The lookup is limited to `limit` records. If more data is requested, the response will contain a `next` cursor for you to query the next page.
- If a `cursor` is provided, it will be used to fetch results from that point onwards.
- Pagination will continue until the `start_time` is reached. If `start_time` is not set, pagination will continue as far back as our data retention policy allows.

| Field | Type | Required | Summary |
|---|---|---|---|
| `sub_account_id` · lite `sa` | string (uint64) | yes | The sub-account ID to request for |
| `kind` · lite `k` | [enum Kind[]](enums.md#kind) | no | The kind filter to apply. |
| `base` · lite `b` | string[] | no | The base filter to apply. |
| `quote` · lite `q` | string[] | no | The quote filter to apply. |
| `start_time` · lite `st` | string (int64 unix ns) | no | The start time to apply in unix nanoseconds. |
| `end_time` · lite `et` | string (int64 unix ns) | no | The end time to apply in unix nanoseconds. |
| `limit` · lite `l` | integer (uint32) | no | The limit to query for. |
| `cursor` · lite `c` | string | no | The cursor to indicate when to start the query from |

## ApiFillHistoryResponse

| Field | Type | Required | Summary |
|---|---|---|---|
| `result` · lite `r` | [object Fill[]](#fill) | yes | The private trades matching the request asset |
| `next` · lite `n` | string | yes | The cursor to indicate when to start the query from |

## ApiFundingAccountSummaryResponse

The funding account summary, that reports the total equity and spot balances of a funding (main) account

| Field | Type | Required | Summary |
|---|---|---|---|
| `result` · lite `r` | [object FundingAccountSummary](#fundingaccountsummary) | yes | The funding account summary |
| `tier` · lite `t` | [object ClientTier](#clienttier) | yes | Client fee tier at the time of query |

## ApiFundingPaymentHistoryRequest

Query for all historical funding payments made by a single account.

Pagination works as follows:

- We perform a reverse chronological lookup, starting from `end_time`. If `end_time` is not set, we start from the most recent data.
- The lookup is limited to `limit` records. If more data is requested, the response will contain a `next` cursor for you to query the next page.
- If a `cursor` is provided, it will be used to fetch results from that point onwards.
- Pagination will continue until the `start_time` is reached. If `start_time` is not set, pagination will continue as far back as our data retention policy allows.

| Field | Type | Required | Summary |
|---|---|---|---|
| `sub_account_id` · lite `sa` | string (uint64) | yes | The sub-account ID to request for |
| `instrument` · lite `i` | string (instrument name) | no | The perpetual instrument to filter for |
| `start_time` · lite `st` | string (int64 unix ns) | no | The start time to apply in unix nanoseconds. |
| `end_time` · lite `et` | string (int64 unix ns) | no | The end time to apply in unix nanoseconds. |
| `limit` · lite `l` | integer (uint32) | no | The limit to query for. |
| `cursor` · lite `c` | string | no | The cursor to indicate when to start the query from |
| `kind` · lite `k` | [enum Kind[]](enums.md#kind) | no | The kind filter to apply. |
| `base` · lite `b` | string[] | no | The base filter to apply. |
| `quote` · lite `q` | string[] | no | The quote filter to apply. |

## ApiFundingPaymentHistoryResponse

| Field | Type | Required | Summary |
|---|---|---|---|
| `result` · lite `r` | [object FundingPayment[]](#fundingpayment) | yes | The funding payments matching the request asset |
| `next` · lite `n` | string | yes | The cursor to indicate when to start the query from |

## ApiFundingRate

| Field | Type | Required | Summary |
|---|---|---|---|
| `instrument` · lite `i` | string (instrument name) | yes | The instrument name, e.g. |
| `funding_rate` · lite `fr` | string | no | The funding rate of the instrument, expressed in percentage points. |
| `funding_time` · lite `ft` | string (int64 unix ns) | yes | The funding timestamp of the funding rate, expressed in unix nanoseconds |
| `mark_price` · lite `mp` | string | yes | The mark price of the instrument at funding timestamp. |
| `funding_rate_8_h_avg` · lite `fr1` | string | no | Deprecated: Refer to `funding_rate` instead. |
| `funding_interval_hours` · lite `fi` | integer (uint8) | yes | Funding interval in hours (e.g. |
| `funding_rate_long_apr_pct` · lite `fr2` | string | no | Stable perps only: the annual rate for retail longs at this charge, in percent a year (`'-5.5'` = retail longs paid 5.5%; positive = retail receives, negative = retail pays). |
| `funding_rate_short_apr_pct` · lite `fr3` | string | no | Stable perps only: the annual rate for retail shorts at this charge, in percent a year (`'-5'` = retail shorts paid 5%; positive = retail receives, negative = retail pays). |
| `funding_multiplier` · lite `fm` | integer (uint8) | no | Stable perps only: days of funding the charge covered, 3 on the triple day, else 1. |

## ApiFundingRateRequest

Lookup the historical funding rate of a perpetual future.

Pagination works as follows:

- We perform a reverse chronological lookup, starting from `end_time`. If `end_time` is not set, we start from the most recent data.
- The lookup is limited to `limit` records. If more data is requested, the response will contain a `next` cursor for you to query the next page.
- If a `cursor` is provided, it will be used to fetch results from that point onwards.
- Pagination will continue until the `start_time` is reached. If `start_time` is not set, pagination will continue as far back as our data retention policy allows.

| Field | Type | Required | Summary |
|---|---|---|---|
| `instrument` · lite `i` | string (instrument name) | yes | The instrument name, e.g. |
| `start_time` · lite `st` | string (int64 unix ns) | no | Start time of funding rate in unix nanoseconds |
| `end_time` · lite `et` | string (int64 unix ns) | no | End time of funding rate in unix nanoseconds |
| `limit` · lite `l` | integer (uint32) | no | The limit to query for. |
| `cursor` · lite `c` | string | no | The cursor to indicate when to start the query from |
| `agg_type` · lite `at` | [enum FundingRateAggregationType](enums.md#fundingrateaggregationtype) | no | Aggregation method for historical funding rate observations. |

## ApiFundingRateResponse

| Field | Type | Required | Summary |
|---|---|---|---|
| `result` · lite `r` | [object ApiFundingRate[]](#apifundingrate) | yes | The funding rate result set for given interval |
| `next` · lite `n` | string | no | The cursor to indicate when to start the next query from |

## ApiGetAlgoOrderRequest

Retrieve an algo order for the account. Either `algo_order_id` or `client_order_id` must be provided.

| Field | Type | Required | Summary |
|---|---|---|---|
| `sub_account_id` · lite `sa` | string (uint64) | yes | The sub-account ID to filter by |
| `algo_order_id` · lite `ao` | string (uint128) | no | Filter for `algo_order_id` |
| `client_order_id` · lite `co` | string (uint64) | no | Filter for `client_order_id` |

## ApiGetAlgoOrderResponse

| Field | Type | Required | Summary |
|---|---|---|---|
| `result` · lite `r` | [object AlgoOrder](#algoorder) | yes | The algo order for the requested filter |

## ApiGetAllCollateralAssetInfoResponse

Response for the collateral asset info endpoint

| Field | Type | Required | Summary |
|---|---|---|---|
| `assets` · lite `a` | [object ApiCollateralAssetInfo[]](#apicollateralassetinfo) | yes | Collateral configuration for every collateral-eligible asset (CVR > 0) |

## ApiGetAllInitialLeverageRequest

The request to get the initial leverage of a sub-account

| Field | Type | Required | Summary |
|---|---|---|---|
| `sub_account_id` · lite `sa` | string (uint64) | yes | The sub-account ID to get the leverage for |

## ApiGetAllInitialLeverageResponse

The response to get the initial leverage of a sub-account

| Field | Type | Required | Summary |
|---|---|---|---|
| `results` · lite `r` | [object InitialLeverageResult[]](#initialleverageresult) | yes | The initial leverage of the sub-account |

## ApiGetAllInstrumentsRequest

Fetch all instruments

| Field | Type | Required | Summary |
|---|---|---|---|
| `is_active` · lite `ia` | bool | no | Fetch only active instruments |
| `kinds` · lite `k` | [enum Kind[]](enums.md#kind) | no | The kind filter to apply. |

## ApiGetAllInstrumentsResponse

| Field | Type | Required | Summary |
|---|---|---|---|
| `result` · lite `r` | [object InstrumentDisplay[]](#instrumentdisplay) | yes | List of instruments |

## ApiGetAuthorizedBuildersResponse

Returns list of authorized builders and the associated fee

| Field | Type | Required | Summary |
|---|---|---|---|
| `results` · lite `r` | [object ApiAuthorizedBuilder[]](#apiauthorizedbuilder) | yes | The list of authorized builders |

## ApiGetCurrencyRequest

Fetch all currencies

No fields.

## ApiGetCurrencyResponse

The list of currencies

| Field | Type | Required | Summary |
|---|---|---|---|
| `result` · lite `r` | [object CurrencyDetail[]](#currencydetail) | yes | The list of currencies |

## ApiGetFilteredInstrumentsRequest

Fetch a list of instruments based on the filters provided

| Field | Type | Required | Summary |
|---|---|---|---|
| `kind` · lite `k` | [enum Kind[]](enums.md#kind) | no | The kind filter to apply. |
| `base` · lite `b` | string[] | no | The base filter to apply. |
| `quote` · lite `q` | string[] | no | The quote filter to apply. |
| `is_active` · lite `ia` | bool | no | Request for active instruments only |
| `limit` · lite `l` | integer (uint32) | no | The limit to query for. |

## ApiGetFilteredInstrumentsResponse

| Field | Type | Required | Summary |
|---|---|---|---|
| `result` · lite `r` | [object InstrumentDisplay[]](#instrumentdisplay) | yes | The instruments matching the request filter |

## ApiGetInstrumentRequest

Fetch a single instrument by supplying the asset or instrument name

| Field | Type | Required | Summary |
|---|---|---|---|
| `instrument` · lite `i` | string (instrument name) | yes | The instrument name, e.g. |

## ApiGetInstrumentResponse

| Field | Type | Required | Summary |
|---|---|---|---|
| `result` · lite `r` | [object InstrumentDisplay](#instrumentdisplay) | yes | The instrument matching the request asset |

## ApiGetIsolatedPositionMarginLimitsRequest

The request to get the max addable and removable amount for an isolated position

| Field | Type | Required | Summary |
|---|---|---|---|
| `sub_account_id` · lite `sa` | string (uint64) | yes | The sub-account ID to get the margin limits for |
| `instrument` · lite `i` | string (instrument name) | yes | The isolated position asset to get the margin limits for |

## ApiGetIsolatedPositionMarginLimitsResponse

The response to get the max addable and removable amount for an isolated position request

| Field | Type | Required | Summary |
|---|---|---|---|
| `instrument` · lite `i` | string (instrument name) | yes | The isolated position asset |
| `max_addable_amount` · lite `ma` | string | yes | The max addable amount that can be added to the isolated position, in the quote asset. |
| `max_removable_amount` · lite `mr` | string | yes | The max removable amount that can be removed from the isolated position, in the quote asset. |

## ApiGetMarginRulesRequest

API request payload to get margin rules for a particular instrument

| Field | Type | Required | Summary |
|---|---|---|---|
| `instrument` · lite `i` | string (instrument name) | yes | The instrument to query margin rules for |

## ApiGetMarginRulesResponse

API response payload for margin rules of a particular instrument

| Field | Type | Required | Summary |
|---|---|---|---|
| `instrument` · lite `i` | string (instrument name) | yes | The instrument name |
| `max_position_size` · lite `mp` | string | yes | The maximum position size. |
| `risk_brackets` · lite `rb` | [object RiskBracket[]](#riskbracket) | yes | List of risk brackets defining margin requirements at different notional tiers |

## ApiGetOrderRequest

Retrieve the order for the account. Either `order_id` or `client_order_id` must be provided.

| Field | Type | Required | Summary |
|---|---|---|---|
| `sub_account_id` · lite `sa` | string (uint64) | yes | The sub-account ID to filter by |
| `order_id` · lite `oi` | string (uint128) | no | Filter for `order_id` |
| `client_order_id` · lite `co` | string (uint64) | no | Filter for `client_order_id` |

## ApiGetOrderResponse

| Field | Type | Required | Summary |
|---|---|---|---|
| `result` · lite `r` | [object Order](#order) | yes | The order object for the requested filter |

## ApiGetSubAccountCollateralPreferenceRequest

Fetch the per-currency collateral enable/disable state for a Multi-Asset Mode sub-account.

Returns one entry per collateral-eligible currency (CVR > 0), including USDT, which is always enabled and cannot be toggled off.

| Field | Type | Required | Summary |
|---|---|---|---|
| `sub_account_id` · lite `sa` | string (uint64) | yes | The sub-account ID to fetch collateral preferences for |

## ApiGetSubAccountCollateralPreferenceResponse

The response to get the sub-account collateral preference

| Field | Type | Required | Summary |
|---|---|---|---|
| `sub_account_id` · lite `sa` | string (uint64) | yes | The sub-account ID the preferences apply to |
| `preferences` · lite `p` | [object ApiCollateralPreferenceStatus[]](#apicollateralpreferencestatus) | yes | One entry per collateral-eligible currency (CVR configured), with its current effective state. |

## ApiGetSubAccountsResponse

Response payload containing all sub-accounts accessible within the given auth session

| Field | Type | Required | Summary |
|---|---|---|---|
| `sub_account_ids` · lite `sa` | string (uint64)[] | yes | List of sub-account IDs accessible to the session |

## ApiGetSupportedAssetsResponse

Response for the supported assets endpoint

| Field | Type | Required | Summary |
|---|---|---|---|
| `funding` · lite `f` | [object SupportedAsset[]](#supportedasset) | yes | Assets supported in funding wallets |
| `spot` · lite `s` | [object SupportedAsset[]](#supportedasset) | yes | Assets supported in spot wallets |
| `futures` · lite `f1` | [object FuturesWalletAssets[]](#futureswalletassets) | yes | Assets supported in futures wallets, grouped by mode |

## ApiInterestPaymentHistoryRequest

Query for all hourly interest payments (multi-asset mode) charged to a single sub-account.

Pagination works as follows:

- We perform a reverse chronological lookup, starting from `end_time`. If `end_time` is not set, we start from the most recent data.
- The lookup is limited to `limit` records. If more data is requested, the response will contain a `next` cursor for you to query the next page.
- If a `cursor` is provided, it will be used to fetch results from that point onwards.
- Pagination will continue until the `start_time` is reached. If `start_time` is not set, pagination will continue as far back as our data retention policy allows.

| Field | Type | Required | Summary |
|---|---|---|---|
| `sub_account_id` · lite `sa` | string (uint64) | yes | The sub-account ID to request for |
| `currency` · lite `c` | string[] | no | The currency filter to apply. |
| `start_time` · lite `st` | string (int64 unix ns) | no | The start time to apply in unix nanoseconds. |
| `end_time` · lite `et` | string (int64 unix ns) | no | The end time to apply in unix nanoseconds. |
| `limit` · lite `l` | integer (uint32) | no | The limit to query for. |
| `cursor` · lite `c1` | string | no | The cursor to indicate when to start the query from |

## ApiInterestPaymentHistoryResponse

| Field | Type | Required | Summary |
|---|---|---|---|
| `result` · lite `r` | [object InterestPayment[]](#interestpayment) | yes | The interest payments matching the request |
| `next` · lite `n` | string | yes | The cursor to indicate when to start the query from |

## ApiMiniTickerRequest

Retrieves a single mini ticker value for a single instrument. Please do not use this to repeatedly poll for data -- a websocket subscription is much more performant, and useful.

| Field | Type | Required | Summary |
|---|---|---|---|
| `instrument` · lite `i` | string (instrument name) | yes | The instrument name, e.g. |

## ApiMiniTickerResponse

| Field | Type | Required | Summary |
|---|---|---|---|
| `result` · lite `r` | [object MiniTicker](#miniticker) | yes | The mini ticker matching the request asset |

## ApiOpenAlgoOrdersRequest

Retrieves all open algo orders for the account, including algo orders still pending on their trigger.

| Field | Type | Required | Summary |
|---|---|---|---|
| `sub_account_id` · lite `sa` | string (uint64) | yes | The sub-account ID to filter by |
| `kind` · lite `k` | [enum Kind[]](enums.md#kind) | no | The kind filter to apply. |
| `base` · lite `b` | string[] | no | The base filter to apply. |
| `quote` · lite `q` | string[] | no | The quote filter to apply. |
| `type` · lite `t` | [enum AlgoOrderType[]](enums.md#algoordertype) | no | The algo order type filter to apply. |
| `trigger_filter` · lite `tf` | [enum AlgoTriggerFilter](enums.md#algotriggerfilter) | no | The trigger filter to apply. |

## ApiOpenAlgoOrdersResponse

| Field | Type | Required | Summary |
|---|---|---|---|
| `result` · lite `r` | [object AlgoOrder[]](#algoorder) | yes | The open algo orders matching the request filter |

## ApiOpenOrdersRequest

| Field | Type | Required | Summary |
|---|---|---|---|
| `sub_account_id` · lite `sa` | string (uint64) | yes | The sub-account ID to filter by |
| `kind` · lite `k` | [enum Kind[]](enums.md#kind) | no | The kind filter to apply. |
| `base` · lite `b` | string[] | no | The base filter to apply. |
| `quote` · lite `q` | string[] | no | The quote filter to apply. |

## ApiOpenOrdersResponse

Retrieves all open orders for the account. This may not match new orders in flight.

| Field | Type | Required | Summary |
|---|---|---|---|
| `result` · lite `r` | [object Order[]](#order) | yes | The Open Orders matching the request filter |

## ApiOrderHistoryRequest

Retrieves the order history for the account.

Pagination works as follows:

- We perform a reverse chronological lookup, starting from `end_time`. If `end_time` is not set, we start from the most recent data.
- The lookup is limited to `limit` records. If more data is requested, the response will contain a `next` cursor for you to query the next page.
- If a `cursor` is provided, it will be used to fetch results from that point onwards.
- Pagination will continue until the `start_time` is reached. If `start_time` is not set, pagination will continue as far back as our data retention policy allows.

| Field | Type | Required | Summary |
|---|---|---|---|
| `sub_account_id` · lite `sa` | string (uint64) | yes | The sub-account ID to filter by |
| `kind` · lite `k` | [enum Kind[]](enums.md#kind) | no | The kind filter to apply. |
| `base` · lite `b` | string[] | no | The base filter to apply. |
| `quote` · lite `q` | string[] | no | The quote filter to apply. |
| `start_time` · lite `st` | string (int64 unix ns) | no | The start time to apply in nanoseconds. |
| `end_time` · lite `et` | string (int64 unix ns) | no | The end time to apply in nanoseconds. |
| `limit` · lite `l` | integer (uint32) | no | The limit to query for. |
| `cursor` · lite `c` | string | no | The cursor to indicate when to start the query from |

## ApiOrderHistoryResponse

| Field | Type | Required | Summary |
|---|---|---|---|
| `result` · lite `r` | [object Order[]](#order) | yes | The Open Orders matching the request filter |
| `next` · lite `n` | string | yes | The cursor to indicate when to start the query from |

## ApiOrderbookLevelsRequest

Retrieves aggregated price depth for a single instrument, with a maximum depth of 10 levels. Do not use this to poll for data -- a websocket subscription is much more performant, and useful.

| Field | Type | Required | Summary |
|---|---|---|---|
| `instrument` · lite `i` | string (instrument name) | yes | The instrument name, e.g. |
| `depth` · lite `d` | integer (uint32) | yes | Depth of the order book to be retrieved (10, 50, 100, 500) |

## ApiOrderbookLevelsResponse

| Field | Type | Required | Summary |
|---|---|---|---|
| `result` · lite `r` | [object OrderbookLevels](#orderbooklevels) | yes | The orderbook levels objects matching the request asset |

## ApiPositionHistory

A position lifecycle record.

When status is `PARTIALLY_CLOSED`, the position is still open. Fields that describe the close event (`close_time`, `position_close_mark_price`) will be omitted, and `leverage` reflects the current value

| Field | Type | Required | Summary |
|---|---|---|---|
| `sub_account_id` · lite `sa` | string (uint64) | yes | Sub-account ID which held this position |
| `instrument` · lite `i` | string (instrument name) | yes | Asset this position was for |
| `open_time` · lite `ot` | string (int64 unix ns) | yes | Timestamp of first trade that opened this lifecycle |
| `status` · lite `s` | [enum PositionCloseStatus](enums.md#positionclosestatus) | yes |  |
| `is_long` · lite `il` | bool | yes | True if the closed position was long |
| `margin_type` · lite `mt` | [enum PositionMarginType](enums.md#positionmargintype) | yes |  |
| `close_time` · lite `ct` | string (int64 unix ns) | no | Timestamp when the position lifecycle ended. |
| `entry_price` · lite `ep` | string | yes | Average entry price at 9 decimals |
| `exit_price` · lite `ep1` | string | yes | Average exit price at 9 decimals |
| `position_close_mark_price` · lite `pc` | string | no | Mark price at close. |
| `realized_pnl` · lite `rp` | string | yes | Cumulative realized PnL in quote currency |
| `cumulative_fee` · lite `cf` | string | yes | Cumulative fees in quote currency |
| `cumulative_realized_funding_payment` · lite `cr` | string | yes | Cumulative realized funding payment in quote currency |
| `closed_volume_base` · lite `cv` | string | yes | Sum of abs(reducingTradeSize) across all reducing trades |
| `closed_volume_quote` · lite `cv1` | string | yes | Sum of abs(reducingTradeSize) * tradePrice across all reducing trades |
| `max_open_interest_base` · lite `mo` | string | yes | Max absolute position size reached during lifecycle |
| `max_open_interest_quote` · lite `mo1` | string | yes | Max abs(size) * entryVWAP reached during lifecycle |
| `cumulative_initial_margin` · lite `ci` | string | yes | Sum of markPrice * abs(tradeSize) / leverage for position-increasing trades |
| `max_initial_margin` · lite `mi` | string | yes | High-water mark of cumulativeInitialMargin during lifecycle |
| `leverage` · lite `l` | string | yes | Leverage at time of close. |
| `unrealized_pnl` · lite `up` | string | no | The unrealized PnL of the position, in the quote asset. |
| `split_ratio_from` · lite `sr` | integer (int32) | no | Stock split 'from' ratio (pre-split units); the position size scaled by to/from |
| `split_ratio_to` · lite `sr1` | integer (int32) | no | Stock split 'to' ratio (post-split units) |
| `split_remaining_size` · lite `sr2` | string | no | Signed position size. |

## ApiPositionHistoryRequest

Query for position lifecycle records for a single sub-account.

Returns both fully closed positions and positions that are still open but have been partially reduced (`PARTIALLY_CLOSED`).

Results are ordered as follows: partially closed positions (most recently opened first), then fully closed positions (most recently closed first).

Partially closed positions are included only when all of the following are true:

- `start_time` is unset (partially closed positions have no close time)
- `end_time` is unset (partially closed positions have no close time)
- `cursor` is unset (they are only returned on the initial page)
- `status` is nil or includes `PARTIALLY_CLOSED`

Since these positions have no close time, query-row limits, as well as time-range and cursor-based pagination, do not apply to them.

Pagination works as follows:

- We perform a reverse chronological lookup by position-close time, starting from `end_time`. If `end_time` is not set, we start from the most recent data.
- The lookup is limited to `limit` records. If more data is requested, the response will contain a `next` cursor for you to query the next page.
- If a `cursor` is provided, it will be used to fetch results from that point onwards.
- Pagination will continue until the `start_time` is reached. If `start_time` is not set, pagination will continue as far back as our data retention policy allows.

| Field | Type | Required | Summary |
|---|---|---|---|
| `sub_account_id` · lite `sa` | string (uint64) | yes | The sub-account ID to request for |
| `start_time` · lite `st` | string (int64 unix ns) | no | Start of the close-time range in unix nanoseconds. |
| `end_time` · lite `et` | string (int64 unix ns) | no | End of the close-time range in unix nanoseconds. |
| `kind` · lite `k` | [enum Kind[]](enums.md#kind) | no | The kind filter to apply. |
| `base` · lite `b` | string[] | no | The base filter to apply. |
| `quote` · lite `q` | string[] | no | The quote filter to apply. |
| `limit` · lite `l` | integer (uint32) | no | The limit to query for. |
| `cursor` · lite `c` | string | no | The cursor to indicate when to start the next page query from. |
| `status` · lite `s` | [enum PositionCloseStatus[]](enums.md#positionclosestatus) | no | The status filter to apply. |
| `is_long` · lite `il` | bool | no | Set to true to filter for long positions. |
| `is_short` · lite `is` | bool | no | Set to true to filter for short positions. |
| `margin_type` · lite `mt` | [enum PositionMarginType[]](enums.md#positionmargintype) | no | The margin type filter to apply. |

## ApiPositionHistoryResponse

| Field | Type | Required | Summary |
|---|---|---|---|
| `result` · lite `r` | [object ApiPositionHistory[]](#apipositionhistory) | yes | Position lifecycle records matching the request filters. |
| `next` · lite `n` | string | yes | The cursor to indicate when to start the query from |

## ApiPositionsRequest

Query the positions of a sub-account

| Field | Type | Required | Summary |
|---|---|---|---|
| `sub_account_id` · lite `sa` | string (uint64) | yes | The sub-account ID to request for |
| `kind` · lite `k` | [enum Kind[]](enums.md#kind) | no | The kind filter to apply. |
| `base` · lite `b` | string[] | no | The base filter to apply. |
| `quote` · lite `q` | string[] | no | The quote filter to apply. |

## ApiPositionsResponse

| Field | Type | Required | Summary |
|---|---|---|---|
| `result` · lite `r` | [object Positions[]](#positions) | yes | The positions matching the request filter |

## ApiQueryVaultManagerInvestorHistoryRequest

Request for the manager to retrieve the vault investor history for their vault

| Field | Type | Required | Summary |
|---|---|---|---|
| `vault_id` · lite `vi` | string (uint64) | yes | The unique identifier of the vault to filter by |
| `only_own_investments` · lite `oo` | bool | yes | Whether to only return investments made by the manager |
| `start_time` · lite `st` | string (int64 unix ns) | no | Optional. |
| `end_time` · lite `et` | string (int64 unix ns) | no | Optional. |

## ApiQueryVaultManagerInvestorHistoryResponse

Response to retrieve the vault summary for a given vault

| Field | Type | Required | Summary |
|---|---|---|---|
| `result` · lite `r` | [object ApiVaultInvestorHistory[]](#apivaultinvestorhistory) | yes | The list of vault investor history belong to the manager |

## ApiSetDeriskToMaintenanceMarginRatioRequest

The request to set the derisk margin to maintenance margin ratio of a sub-account

| Field | Type | Required | Summary |
|---|---|---|---|
| `sub_account_id` · lite `sa` | string (uint64) | yes | The sub-account ID to set the leverage for |
| `ratio` · lite `r` | string | yes | The derisk margin to maintenance margin ratio of this sub-account |
| `signature` · lite `s` | [object Signature](#signature) | yes | The signature of this operation |

## ApiSetDeriskToMaintenanceMarginRatioResponse

The response to set the derisk margin to maintenance margin ratio of a sub-account

| Field | Type | Required | Summary |
|---|---|---|---|
| `success` · lite `s` | bool | yes | Whether the derisk margin to maintenance margin ratio was set successfully |

## ApiSetInitialLeverageRequest

The request to set the initial leverage of a sub-account.
 DEPRECATED: This API is deprecated, use set_position_config API instead

| Field | Type | Required | Summary |
|---|---|---|---|
| `sub_account_id` · lite `sa` | string (uint64) | yes | The sub-account ID to set the leverage for |
| `instrument` · lite `i` | string (instrument name) | yes | The instrument to set the leverage for |
| `leverage` · lite `l` | string | yes | The leverage to set for the sub-account |

## ApiSetInitialLeverageResponse

The response to set the initial leverage of a sub-account.
 DEPRECATED: This API is deprecated, use set_position_config API instead

| Field | Type | Required | Summary |
|---|---|---|---|
| `success` · lite `s` | bool | yes | Whether the leverage was set successfully |

## ApiSetSubAccountPositionMarginConfigRequest

Sets the margin type and leverage configuration for a specific position (instrument) within a sub-account.

This configuration is applied per-instrument, allowing different margin settings for different positions.

| Field | Type | Required | Summary |
|---|---|---|---|
| `sub_account_id` · lite `sa` | string (uint64) | yes | The sub-account ID to set the margin type and leverage for |
| `instrument` · lite `i` | string (instrument name) | yes | The instrument of the position to set the margin type and leverage for |
| `margin_type` · lite `mt` | [enum PositionMarginType](enums.md#positionmargintype) | yes | The margin type to set for the position |
| `leverage` · lite `l` | string | yes | The leverage to set for the position |
| `signature` · lite `s` | [object Signature](#signature) | yes | The signature of this operation |

## ApiSetSubAccountPositionMarginConfigResponse

The response to set the margin type and leverage for a position

| Field | Type | Required | Summary |
|---|---|---|---|
| `ack` · lite `a` | bool | yes | Whether the margin type and leverage was acked |

## ApiSfpTradingScheduleResponse

| Field | Type | Required | Summary |
|---|---|---|---|
| `update_time` · lite `ut` | string (int64) | yes | Session data update timestamp in milliseconds |
| `equity` · lite `e` | [object SfpMarketSchedule](#sfpmarketschedule) | no | Legacy: use `schedules` instead. |
| `equity_nyse` · lite `en` | [object SfpMarketSchedule](#sfpmarketschedule) | no | Legacy: use `schedules` instead. |
| `equity_nasdaq` · lite `en1` | [object SfpMarketSchedule](#sfpmarketschedule) | no | Legacy: use `schedules` instead. |
| `commodity` · lite `c` | [object SfpMarketSchedule](#sfpmarketschedule) | no | Legacy: use `schedules` instead. |
| `commodity_cme` · lite `cc` | [object SfpMarketSchedule](#sfpmarketschedule) | no | Legacy: use `schedules` instead. |
| `schedules` · lite `s` | [object SfpTradingScheduleGroup[]](#sfptradingschedulegroup) | yes | Trading hours, as groups of stable funding perps that share them: one group per asset class, named after it, then one per instrument schedule, named by the exchange. |

## ApiSpotBorrowConfig

Per-currency borrow & collateral limits resolved at this account's tier (incl. per-account overrides).

| Field | Type | Required | Summary |
|---|---|---|---|
| `currency` · lite `c` | string | yes |  |
| `borrow_limit` · lite `bl` | string | yes | BL — max borrowable amount, denominated in the asset. |
| `borrow_rate` · lite `br` | string | yes | BR — annual borrow interest rate at this tier. |
| `collateral_limit` · lite `cl` | string | yes | CL — max amount counted as collateral, denominated in the asset. |

## ApiSpotSubAccountSummaryRequest

| Field | Type | Required | Summary |
|---|---|---|---|
| `sub_account_id` · lite `sa` | string (uint64) | yes | The sub-account ID to filter by |

## ApiSpotSubAccountSummaryResponse

The spot account summary, that reports the total equity and spot balances of a spot sub-account

| Field | Type | Required | Summary |
|---|---|---|---|
| `result` · lite `r` | [object SpotSubAccount](#spotsubaccount) | yes | The spot sub-account summary |

## ApiSubAccountSummaryRequest

| Field | Type | Required | Summary |
|---|---|---|---|
| `sub_account_id` · lite `sa` | string (uint64) | yes | The sub-account ID to filter by |

## ApiSubAccountSummaryResponse

Query for sub-account details, including base currency balance, all derivative positions, margin levels, and P&L.

| Field | Type | Required | Summary |
|---|---|---|---|
| `result` · lite `r` | [object SubAccount](#subaccount) | yes | The sub-account matching the request sub-account |

## ApiTickerRequest

Retrieves a single ticker value for a single instrument. Please do not use this to repeatedly poll for data -- a websocket subscription is much more performant, and useful.

Rate limit:

- Perpetuals and spot swaps: the standard rate limit for this endpoint, per IP address.
- Stable perps (`_SFP` instruments): a separate per-IP-address limit, shared across all stable perp instruments (one budget for all of them, not one per instrument). IP addresses on the gateway whitelist are exempt.

A request over the limit is rejected with error `1006` (HTTP `429`). The `X-RateLimit-Limit` and `X-RateLimit-Remaining` response headers show the limit that applied to the request.

| Field | Type | Required | Summary |
|---|---|---|---|
| `instrument` · lite `i` | string (instrument name) | yes | The instrument name, e.g. |

## ApiTickerResponse

| Field | Type | Required | Summary |
|---|---|---|---|
| `result` · lite `r` | [object Ticker](#ticker) | yes | The mini ticker matching the request asset |

## ApiTradeHistoryRequest

Perform historical lookup of public trades in any given instrument.
This endpoint offers public trading data, use the Trading APIs instead to query for your personalized trade tape.
Only data from the last three months will be retained.

Pagination works as follows:

- We perform a reverse chronological lookup, starting from `end_time`. If `end_time` is not set, we start from the most recent data.
- The lookup is limited to `limit` records. If more data is requested, the response will contain a `next` cursor for you to query the next page.
- If a `cursor` is provided, it will be used to fetch results from that point onwards.
- Pagination will continue until the `start_time` is reached. If `start_time` is not set, pagination will continue as far back as our data retention policy allows.

| Field | Type | Required | Summary |
|---|---|---|---|
| `instrument` · lite `i` | string (instrument name) | yes | The instrument name, e.g. |
| `start_time` · lite `st` | string (int64 unix ns) | no | The start time to apply in nanoseconds. |
| `end_time` · lite `et` | string (int64 unix ns) | no | The end time to apply in nanoseconds. |
| `limit` · lite `l` | integer (uint32) | no | The limit to query for. |
| `cursor` · lite `c` | string | no | The cursor to indicate when to start the query from |

## ApiTradeHistoryResponse

| Field | Type | Required | Summary |
|---|---|---|---|
| `result` · lite `r` | [object Trade[]](#trade) | yes | The public trades matching the request asset |
| `next` · lite `n` | string | no | The cursor to indicate when to start the next query from |

## ApiTradeRequest

Retrieves up to 1000 of the most recent trades in any given instrument. Do not use this to poll for data -- a websocket subscription is much more performant, and useful.
This endpoint offers public trading data, use the Trading APIs instead to query for your personalized trade tape.

| Field | Type | Required | Summary |
|---|---|---|---|
| `instrument` · lite `i` | string (instrument name) | yes | The instrument name, e.g. |
| `limit` · lite `l` | integer (uint32) | yes | The limit to query for. |

## ApiTradeResponse

| Field | Type | Required | Summary |
|---|---|---|---|
| `result` · lite `r` | [object Trade[]](#trade) | yes | The public trades matching the request asset |

## ApiTransferAck

| Field | Type | Required | Summary |
|---|---|---|---|
| `ack` · lite `a` | bool | yes | True when the exchange has processed the transfer. |
| `tx_id` · lite `ti` | string (uint64) | yes | The transaction ID of the transfer. |

## ApiTransferHistoryRequest

The request to get the historical transfers of an account
The history is returned in reverse chronological order

Pagination works as follows:

- We perform a reverse chronological lookup, starting from `end_time`. If `end_time` is not set, we start from the most recent data.
- The lookup is limited to `limit` records (default 500, max 1000). If more data matches, the response returns a non-empty `next` cursor. To read the full result set you MUST re-issue the request with `cursor` set to that value and keep looping until `next` is empty.
- **A single call silently truncates at `limit` and returns no error.** Callers that read only the first page (or omit `limit`, which just applies the 500 default) will undercount whenever the account has more than `limit` matching records — e.g. summing deposits/transfers for a balance or PnL calculation must drain the cursor, not read one page.
- If a `cursor` is provided, it will be used to fetch results from that point onwards.
- Pagination will continue until the `start_time` is reached. If `start_time` is not set, pagination will continue as far back as our data retention policy allows.

| Field | Type | Required | Summary |
|---|---|---|---|
| `currency` · lite `c` | string[] | yes | The token currency to query for, if nil or empty, return all transfers. |
| `start_time` · lite `st` | string (int64 unix ns) | no | The start time to query for in unix nanoseconds |
| `end_time` · lite `et` | string (int64 unix ns) | no | The end time to query for in unix nanoseconds |
| `limit` · lite `l` | integer (uint32) | no | The page size for a single response. |
| `cursor` · lite `c1` | string | no | The cursor to indicate when to start the next query from |
| `tx_id` · lite `ti` | string (uint64) | no | The transaction ID to query for |
| `main_account_id` · lite `ma` | string (0x address) | no | Main account ID being queried. |
| `transfer_types` · lite `tt` | [enum TransferType[]](enums.md#transfertype) | no | The transfer type to filters for. |

## ApiTransferHistoryResponse

| Field | Type | Required | Summary |
|---|---|---|---|
| `result` · lite `r` | [object TransferHistory[]](#transferhistory) | yes | The transfer history matching the request account |
| `next` · lite `n` | string | no | The cursor to indicate when to start the next query from |

## ApiTransferRequest

Transfer funds:

- between sub-accounts of your main account
- between your main account and its sub-accounts
- to other main accounts you have allowlisted

| Field | Type | Required | Summary |
|---|---|---|---|
| `from_account_id` · lite `fa` | string (0x address) | yes | The main account to transfer from |
| `from_sub_account_id` · lite `fs` | string (uint64) | yes | The sub-account to transfer from (0 if transferring from main account) |
| `to_account_id` · lite `ta` | string (0x address) | yes | The main account to deposit into |
| `to_sub_account_id` · lite `ts` | string (uint64) | yes | The sub-account to transfer to (0 if transferring to main account) |
| `currency` · lite `c` | string | yes | The token currency to transfer |
| `num_tokens` · lite `nt` | string | yes | The number of tokens to transfer. |
| `signature` · lite `s` | [object Signature](#signature) | yes | The signature of the transfer |
| `transfer_type` · lite `tt` | [enum TransferType](enums.md#transfertype) | yes | The type of transfer |
| `transfer_metadata` · lite `tm` | string | no | The metadata of the transfer |
| `from_wallet_type` · lite `fw` | [enum WalletType](enums.md#wallettype) | no | The wallet type of the from account or sub-account |
| `to_wallet_type` · lite `tw` | [enum WalletType](enums.md#wallettype) | no | The wallet type of the to account or sub-account |

## ApiTransferResponse

Used to acknowledge a transfer request outcome

| Field | Type | Required | Summary |
|---|---|---|---|
| `result` · lite `r` | [object ApiTransferAck](#apitransferack) | yes | The Transfer response object |

## ApiVaultBurnTokensRequest

Request payload for burning tokens in a vault.

This API allows a client to burn a specified amount of tokens in a particular vault.

| Field | Type | Required | Summary |
|---|---|---|---|
| `vault_id` · lite `vi` | string (uint64) | yes | The unique identifier of the vault to burn tokens from. |
| `currency` · lite `c` | string | yes | The currency used for the burn. |
| `num_tokens` · lite `nt` | string | yes | The number of tokens to burn. |
| `signature` · lite `s` | [object Signature](#signature) | yes | The digital signature from the investing account. |

## ApiVaultConversionRateRequest

Request payload for the highest exchange rate the gateway currently accepts for a vault investment or redemption that converts `fromCurrency` into `toCurrency`.

| Field | Type | Required | Summary |
|---|---|---|---|
| `from_currency` · lite `fc` | string | yes | The currency converted from. |
| `to_currency` · lite `tc` | string | yes | The currency converted into. |
| `from_num_tokens` · lite `fn` | string | no | Optional amount of `fromCurrency`. |

## ApiVaultConversionRateResponse

Response payload with the highest exchange rate the gateway currently accepts for the currency pair. Sign it as `exchangeRate`: any rate at or below it passes while the quote is valid.

| Field | Type | Required | Summary |
|---|---|---|---|
| `from_currency` · lite `fc` | string | yes | The currency converted from. |
| `to_currency` · lite `tc` | string | yes | The currency converted into. |
| `exchange_rate` · lite `er` | string | yes | The highest rate accepted now, `toCurrency` per unit of `fromCurrency`, floored to 9 decimal places. |
| `spot_rate` · lite `sr` | string | yes | The current spot rate from the latest oracle prices, 9 decimal places. |
| `fee_rate_centi_beeps` · lite `fr` | integer (uint32) | yes | The conversion fee configured for the pair, in centibeeps (1 = 0.0001%). |
| `window_seconds` · lite `ws` | integer (uint32) | yes | The length of the window the rate is the highest of, in seconds. |
| `valid_until` · lite `vu` | string (int64 unix ns) | yes | When the price sample the rate comes from leaves the window, in unix nanoseconds. |
| `event_time` · lite `et` | string (int64 unix ns) | yes | The time of the newest oracle price the rate uses, in unix nanoseconds. |
| `from_num_tokens` · lite `fn` | string | no | The amount of `fromCurrency` the request named, if any. |
| `to_num_tokens` · lite `tn` | string | no | What `fromNumTokens` converts into at `exchangeRate`, floored to `toCurrency` decimals. |

## ApiVaultInvestV2Request

Request payload for investing in a vault from the funding account or from a sub-account, converting the source currency into the vault's investment currency when they differ.

The investor signs `VaultInvestV3` over both currencies, the amount and the exchange rate. Without conversion the rate is exactly 1. With conversion it must be at most the rate `/vault_conversion_rate` returns.

| Field | Type | Required | Summary |
|---|---|---|---|
| `vault_id` · lite `vi` | string (uint64) | yes | The unique identifier of the vault to invest in. |
| `from_sub_account_id` · lite `fs` | string (uint64) | yes | The sub-account to invest from. |
| `from_wallet_type` · lite `fw` | [enum WalletType](enums.md#wallettype) | yes | FUNDING when `fromSubAccountID` is 0, otherwise SPOT or FUTURES. |
| `from_currency` · lite `fc` | string | yes | The currency debited from the source wallet. |
| `from_num_tokens` · lite `fn` | string | yes | The amount debited from the source wallet, in `fromCurrency`. |
| `to_currency` · lite `tc` | string | yes | The currency the vault receives. |
| `exchange_rate` · lite `er` | string | yes | The signed rate, `toCurrency` per unit of `fromCurrency`, up to 9 decimal places. |
| `signature` · lite `s` | [object Signature](#signature) | yes | The `VaultInvestV3` signature of the investing account. |

## ApiVaultInvestV2Response

Response payload for a vault investment.

| Field | Type | Required | Summary |
|---|---|---|---|
| `ack` · lite `a` | bool | yes | Whether the investment was accepted. |
| `tx_id` · lite `ti` | string (uint64) | yes | The transaction ID of the investment once risk confirmed it. |
| `enqueued` · lite `e` | bool | no | Cross-exchange vaults only: true when the vault was locked and the investment was queued. |

## ApiVaultInvestorHistory

The vault investor history returned by the service to client

| Field | Type | Required | Summary |
|---|---|---|---|
| `event_time` · lite `et` | string (int64 unix ns) | yes | Time at which the event was emitted in unix nanoseconds |
| `off_chain_account_id` · lite `oc` | string | yes | The off chain account id of the investor, only visible to the manager |
| `vault_id` · lite `vi` | string (uint64) | yes | The unique identifier of the vault. |
| `type` · lite `t` | [enum VaultInvestorAction](enums.md#vaultinvestoraction) | yes | The type of transaction that occurred. |
| `price` · lite `p` | string | yes | The price of the vault LP tokens at the time of the event. |
| `size` · lite `s` | string | yes | The amount of Vault LP tokens invested or redeemed. |
| `realized_pnl` · lite `rp` | string | yes | The realized PnL of the vault. |
| `performance_fee` · lite `pf` | string | yes | The performance fee of the vault. |
| `token_currency` · lite `tc` | string | yes | The vault leg's currency: the vault's investment currency, which the vault received or paid. |
| `num_tokens` · lite `nt` | string | yes | The vault leg: the tokens of tokenCurrency the vault received on an invest or paid on a redemption. |
| `from_currency` · lite `fc` | string | yes | The currency that left its owner: on an invest the investor's source currency (the user leg), on a redemption tokenCurrency. |
| `from_num_tokens` · lite `fn` | string | yes | The tokens of fromCurrency that left their owner: on an invest what the investor paid (the user leg), on a redemption numTokens. |
| `to_currency` · lite `tc1` | string | yes | The currency that reached its owner: on a redemption the investor's payout currency (the user leg), on an invest tokenCurrency. |
| `to_num_tokens` · lite `tn` | string | yes | The tokens of toCurrency that reached their owner: on a redemption what the investor received (the user leg), on an invest numTokens. |
| `conversion_fee_num_tokens` · lite `cf` | string | yes | The conversion fee in toCurrency: the difference between the two legs of a converting invest or redemption. |
| `from_sub_account_id` · lite `fs` | string (uint64) | yes | The trading sub-account an invest was paid from. |
| `from_wallet_type` · lite `fw` | [enum WalletType](enums.md#wallettype) | yes | The wallet an invest was paid from: FUNDING for the funding account, otherwise SPOT or FUTURES. |
| `request_time` · lite `rt` | string (int64 unix ns) | yes | On a redemption, when its redemption request was made, in unix nanoseconds. |

## ApiVaultInvestorSummaryRequest

Request payload for fetching the summary of a vault investor.

This API allows a client to retrieve the summary of investments in a specific vault.

| Field | Type | Required | Summary |
|---|---|---|---|
| `vault_id` · lite `vi` | string (uint64) | no | The unique identifier of the vault to fetch the summary for. |

## ApiVaultInvestorSummaryResponse

Response payload for the summary of a vault investor.

This API provides the summary of investments in a specific vault.

| Field | Type | Required | Summary |
|---|---|---|---|
| `vault_investor_summary` · lite `vi` | [object VaultInvestorSummary[]](#vaultinvestorsummary) | yes | The summary of investments in the vault. |

## ApiVaultRedeemCancelRequest

Request payload for canceling a vault redemption.

This API allows a client to cancel a previously initiated redemption from a vault.

| Field | Type | Required | Summary |
|---|---|---|---|
| `vault_id` · lite `vi` | string (uint64) | yes | The unique identifier of the vault to cancel the redemption from. |

## ApiVaultRedeemV2Request

Request payload for redeeming from a vault, paid in the vault's investment currency or converted into another currency.

The investor signs `VaultRedeemV3` over both currencies, the number of shares and the exchange rate. The request keeps the signed rate and is paid at it, at the share price of the payout.

| Field | Type | Required | Summary |
|---|---|---|---|
| `vault_id` · lite `vi` | string (uint64) | yes | The unique identifier of the vault to redeem from. |
| `from_currency` · lite `fc` | string | yes | The currency the vault pays. |
| `to_currency` · lite `tc` | string | yes | The currency paid into the funding account: the investment currency, or another currency converted at `exchangeRate`. |
| `num_tokens` · lite `nt` | string | yes | The number of shares to redeem. |
| `exchange_rate` · lite `er` | string | yes | The signed rate, `toCurrency` per unit of `fromCurrency`, up to 9 decimal places. |
| `signature` · lite `s` | [object Signature](#signature) | yes | The `VaultRedeemV3` signature of the redeeming account. |

## ApiVaultViewRedemptionQueueRequest

Request payload for a vault manager to view the redemption queue for their vault.

Fetches the redemption queue for a vault, ordered by descending priority.

**Urgent** redemption requests, defined as having been pending >90% of the manager-defined maximum redemption period, have top priority (following insertion order).

**Non-urgent** redemption requests are otherwise prioritized by insertion order, **unless** they are >5x the size of the smallest redemption request.

E.g., If FIFO ordering (all non-urgent) is 1k -> 50k -> 100k -> 20k -> 10k -> 25k, then priority ordering is 1k -> 10k -> 50k -> 20k -> 100k -> 25k.

Only displays redemption requests that are eligible for automated redemption, i.e., have been pending for the manager-defined minimum redemption period.

| Field | Type | Required | Summary |
|---|---|---|---|
| `vault_id` · lite `vi` | string (uint64) | yes | The unique identifier of the vault to fetch the redemption queue for. |

## ApiVaultViewRedemptionQueueResponse

Response payload for a vault manager to view the redemption queue for their vault, ordered by descending priority.

Also includes counters for total redemption sizes pending as well as urgent (refer to API integration guide for more detail on redemption request classifications).

| Field | Type | Required | Summary |
|---|---|---|---|
| `redemption_queue` · lite `rq` | [object VaultRedemptionRequest[]](#vaultredemptionrequest) | yes | Outstanding vault redemption requests, ordered by descending priority. |
| `pending_redemption_token_count` · lite `pr` | string | yes | Number of shares eligible for automated redemption (held in queue for at least the minimum redemption period). |
| `urgent_redemption_token_count` · lite `ur` | string | yes | Number of shares nearing the maximum redemption period (>= 90% of maximum redemption period). |
| `auto_redeemable_balance` · lite `ar` | string | yes | Amount available for automated redemption request servicing (in USD). |
| `share_price` · lite `sp` | string | yes | Current share price (in USD). |
| `pre_min` · lite `pm` | [object PreMinRedemptions](#preminredemptions) | yes | Dedicated section for requests yet to wait at least the minimum redemption period. |

## ApiWithdrawalFeeRequest

Query the flat withdrawal fee for a native (L2 -> L1) bridge withdrawal, expressed in the requested currency

| Field | Type | Required | Summary |
|---|---|---|---|
| `token_currency` · lite `tc` | integer (uint16) | yes | Currency ID to express the withdrawal fee in (e.g. |

## ApiWithdrawalFeeResponse

The native bridge withdrawal fee, in the requested currency

| Field | Type | Required | Summary |
|---|---|---|---|
| `withdrawal_fee` · lite `wf` | string | yes | The withdrawal fee. |
| `token_currency` · lite `tc` | string | yes | The currency the withdrawal fee is expressed in. |

## ApiWithdrawalHistoryRequest

The request to get the historical withdrawals of an account
The history is returned in reverse chronological order
Both finalized and pending withdrawals are returned, and pending withdrawals are indicated by an empty `l1Hash` field.

Pagination works as follows:

- We perform a reverse chronological lookup, starting from `end_time`. If `end_time` is not set, we start from the most recent data.
- The lookup is limited to `limit` records (default 500, max 1000). If more data matches, the response returns a non-empty `next` cursor. To read the full result set you MUST re-issue the request with `cursor` set to that value and keep looping until `next` is empty.
- **A single call silently truncates at `limit` and returns no error.** Callers that read only the first page (or omit `limit`, which just applies the 500 default) will undercount whenever the account has more than `limit` matching records — e.g. summing deposits/transfers for a balance or PnL calculation must drain the cursor, not read one page.
- If a `cursor` is provided, it will be used to fetch results from that point onwards.
- Pagination will continue until the `start_time` is reached. If `start_time` is not set, pagination will continue as far back as our data retention policy allows.

| Field | Type | Required | Summary |
|---|---|---|---|
| `currency` · lite `c` | string[] | yes | The token currency to query for, if nil or empty, return all withdrawals. |
| `start_time` · lite `st` | string (int64 unix ns) | no | The start time to query for in unix nanoseconds |
| `end_time` · lite `et` | string (int64 unix ns) | no | The end time to query for in unix nanoseconds |
| `limit` · lite `l` | integer (uint32) | no | The page size for a single response. |
| `cursor` · lite `c1` | string | no | The cursor to indicate when to start the next query from |
| `main_account_id` · lite `ma` | string (0x address) | no | Main account ID being queried. |

## ApiWithdrawalHistoryResponse

| Field | Type | Required | Summary |
|---|---|---|---|
| `result` · lite `r` | [object WithdrawalHistory[]](#withdrawalhistory) | yes | The withdrawals history matching the request account |
| `next` · lite `n` | string | no | The cursor to indicate when to start the next query from |

## ApiWithdrawalRequest

Withdraw funds from Grvt to an Ethereum address. Bridging to Ethereum takes time; the Grvt web app shows its progress. Unless you withdraw your whole balance there is a minimum amount (currently about 25 USDT), and a fee pays for the Ethereum transaction. Your funds stay in self-custody throughout: Grvt never takes control of them.

| Field | Type | Required | Summary |
|---|---|---|---|
| `from_account_id` · lite `fa` | string (0x address) | yes | The main account to withdraw from |
| `to_eth_address` · lite `te` | string (0x address) | yes | The Ethereum wallet to withdraw into |
| `currency` · lite `c` | string | yes | The token currency to withdraw |
| `num_tokens` · lite `nt` | string | yes | The number of tokens to withdraw. |
| `signature` · lite `s` | [object Signature](#signature) | yes | The signature of the withdrawal |

## BuilderFillHistory

| Field | Type | Required | Summary |
|---|---|---|---|
| `event_time` · lite `et` | string (int64 unix ns) | yes | Time at which the event was emitted in unix nanoseconds |
| `off_chain_account_id` · lite `oc` | string | yes | The off chain account id |
| `instrument` · lite `i` | string (instrument name) | yes | The instrument being represented |
| `is_buyer` · lite `ib` | bool | yes | The side that the sub-account took on the trade |
| `is_taker` · lite `it` | bool | yes | The role that the sub-account took on the trade |
| `size` · lite `s` | string | yes | The number of assets being traded. |
| `price` · lite `p` | string | yes | The traded price. |
| `mark_price` · lite `mp` | string | yes | The mark price of the instrument at point of trade. |
| `index_price` · lite `ip` | string | yes | The index price of the instrument at point of trade. |
| `fee_rate` · lite `fr` | string | yes | Builder fee percentage charged for this order. |
| `fee` · lite `f` | string (int64) | yes | The builder fee paid on the trade, in the quote asset. |

## CancelStatusFeed

| Field | Type | Required | Summary |
|---|---|---|---|
| `sub_account_id` · lite `sa` | string (uint64) | yes | The sub-account ID that requested the cancellation |
| `client_order_id` · lite `co` | string (uint64) | yes | A unique identifier for the active order within a sub-account, specified by the client |
| `order_id` · lite `oi` | string (uint128) | yes | The exchange's 128-bit id for the order. |
| `reason` · lite `r` | [enum OrderRejectReason](enums.md#orderrejectreason) | yes | The user-provided reason for cancelling the order |
| `update_time` · lite `ut` | string (int64 unix ns) | no | Set by the server. |
| `cancel_status` · lite `cs` | [enum CancelStatus](enums.md#cancelstatus) | yes | Status of the cancellation attempt |

## Candlestick

| Field | Type | Required | Summary |
|---|---|---|---|
| `open_time` · lite `ot` | string (int64 unix ns) | yes | Open time of kline bar in unix nanoseconds |
| `close_time` · lite `ct` | string (int64 unix ns) | yes | Close time of kline bar in unix nanosecond |
| `open` · lite `o` | string | yes | The open price, expressed in underlying currency resolution units |
| `close` · lite `c` | string | yes | The close price, expressed in underlying currency resolution units |
| `high` · lite `h` | string | yes | The high price, expressed in underlying currency resolution units |
| `low` · lite `l` | string | yes | The low price, expressed in underlying currency resolution units |
| `volume_b` · lite `vb` | string | yes | The underlying volume transacted. |
| `volume_q` · lite `vq` | string | yes | The quote volume transacted, in the quote asset. |
| `trades` · lite `t` | integer (uint32) | yes | The number of trades transacted |
| `instrument` · lite `i` | string (instrument name) | yes | The instrument name, e.g. |

## ChaseAlgoOrderMetadata

Contains the parameters of a chase algo order.

- `chase_price_mode` defines how the price is derived at each re-price.
- `max_distance` caps how far the chase price may move away from the reference price. Once the cap is reached, the order is held at the boundary instead of chasing further.

| Field | Type | Required | Summary |
|---|---|---|---|
| `chase_price_mode` · lite `cp` | [enum ChasePriceMode](enums.md#chasepricemode) | yes | How the chase price is determined at each re-price tick |
| `max_distance` · lite `md` | string | yes | The maximum distance the chase price can move away from the reference price, as an absolute price distance in quote currency units. |
| `max_distance_bps` · lite `md1` | integer (uint32) | no | The max distance as a percentage in basis points (1 bp = 0.01%, 100% = 10000), as the user entered it. |

## ChaseOrderState

Contains the runtime state specific to a chase algo order

| Field | Type | Required | Summary |
|---|---|---|---|
| `reprice_count` · lite `rc` | integer (uint32) | yes | The number of successful re-prices of this algo order's sub-orders |

## ClientTier

| Field | Type | Required | Summary |
|---|---|---|---|
| `tier` · lite `t` | integer (uint8) | yes |  |
| `futures_taker_fee` · lite `ft` | integer (int32) | yes |  |
| `futures_maker_fee` · lite `fm` | integer (int32) | yes |  |
| `options_taker_fee` · lite `ot` | integer (int32) | yes |  |
| `options_maker_fee` · lite `om` | integer (int32) | yes |  |
| `spot_taker_fee` · lite `st` | integer (int32) | yes |  |
| `spot_maker_fee` · lite `sm` | integer (int32) | yes |  |
| `spot_borrow_configs` · lite `sb` | [object ApiSpotBorrowConfig[]](#apispotborrowconfig) | yes | Per-currency borrow & collateral limits for this tier. |

## CurrencyDetail

| Field | Type | Required | Summary |
|---|---|---|---|
| `id` · lite `i` | integer (uint16) | yes | The integer value of the currency |
| `symbol` · lite `s` | string | yes | The name of the currency |
| `balance_decimals` · lite `bd` | integer (int8) | yes | The balance decimals of the currency |
| `quantity_multiplier` · lite `qm` | string (uint64) | yes | The quantity multiplier of the currency |

## Deposit

| Field | Type | Required | Summary |
|---|---|---|---|
| `tx_hash` · lite `th` | string (uint256) | yes | The hash of the bridgemint event producing the deposit |
| `to_account_id` · lite `ta` | string (0x address) | yes | The account to deposit into |
| `currency` · lite `c` | string | yes | The token currency to deposit |
| `num_tokens` · lite `nt` | string | yes | The number of tokens to deposit |

## DepositHistory

| Field | Type | Required | Summary |
|---|---|---|---|
| `l_1_hash` · lite `l1` | string (uint256) | yes | The L1 txHash of the deposit |
| `l_2_hash` · lite `l2` | string (uint256) | yes | The L2 txHash of the deposit |
| `to_account_id` · lite `ta` | string (0x address) | yes | The account to deposit into |
| `currency` · lite `c` | string | yes | The token currency to deposit |
| `num_tokens` · lite `nt` | string | yes | The number of tokens to deposit |
| `initiated_time` · lite `it` | string (int64 unix ns) | yes | The timestamp when the deposit was initiated on L1 in unix nanoseconds |
| `confirmed_time` · lite `ct` | string (int64 unix ns) | yes | The timestamp when the deposit was confirmed on L2 in unix nanoseconds, empty if the deposit is pending. |
| `from_address` · lite `fa` | string (0x address) | yes | The address of the sender |

## EdgeApiKeyLoginRequest

| Field | Type | Required | Summary |
|---|---|---|---|
| `api_key` | string | yes | The API key created in the Grvt UI. |

## EdgeLoginError

| Field | Type | Required | Summary |
|---|---|---|---|
| `status` | string | yes | "failure" |
| `error` | string | yes | Human-readable reason. |

## EdgeLoginResponse

| Field | Type | Required | Summary |
|---|---|---|---|
| `status` | string | yes | "success" on success. |
| `location` | string | yes | Always empty for API callers. |
| `funding_account_address` | string (0x address) | yes | Funding (main) account the key belongs to. |
| `sub_account_id` | uint64 | no | Set only when the key was created for a trading (sub) account. |

## EdgeWalletLoginRequest

| Field | Type | Required | Summary |
|---|---|---|---|
| `address` | string (0x address) | yes | Wallet address being logged in. |
| `signature` | [object Signature](#signature) | yes | WalletLogin EIP-712 signature by that wallet. |

## EdgeWalletLoginResponse

| Field | Type | Required | Summary |
|---|---|---|---|
| `funding_account_address` | string (0x address) | yes | Funding (main) account linked to the wallet. |

## EmptyRequest

Used for requests that do not require any parameters

No fields.

## Error

An error response

| Field | Type | Required | Summary |
|---|---|---|---|
| `code` · lite `c` | integer (uint16) | yes | The error code for the request |
| `message` · lite `m` | string | yes | The error message for the request |

## Fill

| Field | Type | Required | Summary |
|---|---|---|---|
| `event_time` · lite `et` | string (int64 unix ns) | yes | Time at which the event was emitted in unix nanoseconds |
| `sub_account_id` · lite `sa` | string (uint64) | yes | The sub-account ID that participated in the trade |
| `instrument` · lite `i` | string (instrument name) | yes | The instrument being represented |
| `is_buyer` · lite `ib` | bool | yes | True if you bought in this trade, false if you sold. |
| `is_taker` · lite `it` | bool | yes | True if your order took liquidity (taker), false if it was resting on the book (maker). |
| `size` · lite `s` | string | yes | The number of assets being traded. |
| `price` · lite `p` | string | yes | The traded price. |
| `mark_price` · lite `mp` | string | no | The mark price of the instrument at point of trade. |
| `index_price` · lite `ip` | string | yes | The index price of the instrument at point of trade. |
| `interest_rate` · lite `ir` | string | yes | The interest rate of the underlying when the trade happened, in percent (`"0.01"` = 0.01%). |
| `forward_price` · lite `fp` | string | no | [Options] The forward price of the option at point of trade. |
| `realized_pnl` · lite `rp` | string | yes | The realized PnL of the trade, in the quote asset. |
| `fee` · lite `f` | string | yes | The fees paid on the trade, in the quote asset. |
| `fee_rate` · lite `fr` | string | yes | The fee rate charged on this fill, in percent (`"0.02"` = 0.02%). |
| `trade_id` · lite `ti` | string | yes | A trade identifier, globally unique, and monotonically increasing (not by `1`). |
| `order_id` · lite `oi` | string (uint128) | yes | The exchange's id of your order that filled. |
| `venue` · lite `v` | [enum Venue](enums.md#venue) | yes | The venue where the trade occurred |
| `is_liquidation` · lite `il` | bool | yes | If the trade was a liquidation |
| `client_order_id` · lite `co` | string (uint64) | yes | The `client_order_id` of your order that filled. |
| `signer` · lite `s1` | string (uint256) | yes | The address of the wallet that signed the order. |
| `broker` · lite `b` | [enum BrokerTag](enums.md#brokertag) | no | Specifies the broker who brokered the order |
| `is_rpi` · lite `ir1` | bool | yes | If the trade is a RPI trade |
| `builder` · lite `b1` | string (0x address) | yes | The main account id of the builder the order went through, if any. |
| `builder_fee_rate` · lite `bf` | string | yes | The builder's fee rate for this order, in percent (`"0.001"` = 0.001%), as set in the order's `builder_fee`. |
| `builder_fee` · lite `bf1` | string | yes | The builder fee paid on this trade, in the quote asset. |
| `fee_currency` · lite `fc` | string | yes | The currency of the fee paid on the trade |
| `repayment_scenario` · lite `rs` | [enum RepaymentScenario](enums.md#repaymentscenario) | yes | Set when this fill repaid a multi-asset-mode USDT loan, and says how; `UNSPECIFIED` for ordinary trades. |
| `rfq_id` · lite `ri` | string (uint128) | no | The RFQ this fill was cleared against. |
| `counterparty_type` · lite `ct` | [enum RfqCounterpartyType](enums.md#rfqcounterpartytype) | no | The type of counterparty this fill was matched against (maker quote / resting order / forced-exit netting). |

## FundingAccountSummary

The funding account summary, that reports the total equity and spot balances of a funding (main) account

| Field | Type | Required | Summary |
|---|---|---|---|
| `main_account_id` · lite `ma` | string (0x address) | yes | The main account ID of the account to which the summary belongs |
| `total_equity` · lite `te` | string | yes | Total equity of the main account, denominated in USD |
| `spot_balances` · lite `sb` | [object SpotBalance[]](#spotbalance) | yes | The list of spot assets owned by this main account, and their balances |
| `vault_investments` · lite `vi` | [object VaultInvestment[]](#vaultinvestment) | yes | The list of vault investments held by this main account |
| `total_cash_balance` · lite `tc` | string | yes | Total balance of cash (stablecoin) currencies, denominated in USD |
| `total_spot_asset_balance` · lite `ts` | string | yes | Total balance of non-cash spot currencies, denominated in USD |

## FundingPayment

| Field | Type | Required | Summary |
|---|---|---|---|
| `event_time` · lite `et` | string (int64 unix ns) | yes | Time at which the event was emitted in unix nanoseconds |
| `sub_account_id` · lite `sa` | string (uint64) | yes | The sub-account ID that made the funding payment |
| `instrument` · lite `i` | string (instrument name) | yes | The instrument being funded (perpetual or stable perp) |
| `currency` · lite `c` | string | yes | The currency of the funding payment |
| `amount` · lite `a` | string | yes | The amount of the funding payment. |
| `tx_id` · lite `ti` | string (uint64) | yes | The transaction ID of the funding payment. |

## FuturesWalletAssets

Supported assets for a futures wallet mode

| Field | Type | Required | Summary |
|---|---|---|---|
| `mode` · lite `m` | [enum SubAccountMode](enums.md#subaccountmode) | yes | The sub-account mode |
| `supported_assets` · lite `sa` | [object SupportedAsset[]](#supportedasset) | yes | Assets supported under this futures mode |

## InitialLeverageResult

| Field | Type | Required | Summary |
|---|---|---|---|
| `instrument` · lite `i` | string (instrument name) | yes | The instrument to get the leverage for |
| `leverage` · lite `l` | string | yes | The initial leverage of this instrument |
| `min_leverage` · lite `ml` | string | yes | The min leverage user can set for this instrument |
| `max_leverage` · lite `ml1` | string | yes | The max leverage user can set for this instrument |
| `margin_type` · lite `mt` | [enum PositionMarginType](enums.md#positionmargintype) | yes | The margin type of this instrument |

## InstrumentDisplay

| Field | Type | Required | Summary |
|---|---|---|---|
| `instrument` · lite `i` | string (instrument name) | yes | The instrument name, e.g. |
| `instrument_hash` · lite `ih` | string (uint256) | yes | The asset ID used for instrument signing. |
| `base` · lite `b` | string | yes | The base currency |
| `quote` · lite `q` | string | yes | The quote currency |
| `kind` · lite `k` | [enum Kind](enums.md#kind) | yes | The kind of instrument |
| `venues` · lite `v` | [enum Venue[]](enums.md#venue) | yes | Venues that this instrument can be traded at |
| `settlement_period` · lite `sp1` | [enum InstrumentSettlementPeriod](enums.md#instrumentsettlementperiod) | no | The settlement period of the instrument |
| `base_decimals` · lite `bd` | integer (int8) | yes | The smallest denomination of the base asset supported by Grvt (+3 represents 0.001, -3 represents 1000, 0 represents 1) |
| `quote_decimals` · lite `qd` | integer (int8) | yes | The smallest denomination of the quote asset supported by Grvt (+3 represents 0.001, -3 represents 1000, 0 represents 1) |
| `tick_size` · lite `ts` | string | yes | The size of a single tick. |
| `min_size` · lite `ms` | string | yes | The minimum contract size. |
| `create_time` · lite `ct` | string (int64 unix ns) | yes | Creation time in unix nanoseconds |
| `max_position_size` · lite `mp` | string | no | The maximum position size. |
| `funding_interval_hours` · lite `fi` | integer (uint8) | no | Defines the funding interval to be applied. |
| `adjusted_funding_rate_cap` · lite `af` | string | no | Funding rate cap over the defined `intervalHours`. |
| `adjusted_funding_rate_floor` · lite `af1` | string | no | Funding rate floor over the defined `intervalHours`. |
| `min_notional` · lite `mn` | string | yes | The minimum order notional value, in the quote asset. |
| `asset_class` · lite `ac` | [enum AssetClass](enums.md#assetclass) | no | The asset class of the underlying the instrument tracks |
| `status` · lite `s` | [enum InstrumentStatus](enums.md#instrumentstatus) | no | The current lifecycle/trading status of the instrument |
| `guaranteed_exit_band` · lite `ge` | string | no | The guaranteed exit band, expressed in percentage points |
| `spread_penalty_tolerance` · lite `sp2` | string | no | The spread penalty tolerance, expressed in percentage points |
| `funding_cap_adjustment_time` · lite `fc` | string (int64 unix ns) | no | Timestamp in unix nanoseconds at which the funding cap adjustment applies |
| `funding_cap_adjustment_value` · lite `fc1` | string | no | The funding cap adjustment value, expressed as a decimal daily rate |
| `triple_swap_day` · lite `ts2` | [enum DayOfWeek](enums.md#dayofweek) | no | Stable perps only: the weekday whose daily funding charge covers 3 days (the weekend) |

## InterestPayment

| Field | Type | Required | Summary |
|---|---|---|---|
| `event_time` · lite `et` | string (int64 unix ns) | yes | Time at which the interest charge was computed in unix nanoseconds |
| `sub_account_id` · lite `sa` | string (uint64) | yes | The sub-account being charged interest |
| `currency` · lite `c` | string | yes | The currency the interest is charged in |
| `amount` · lite `a` | string | yes | The interest charged for this hour. |
| `charge_time` · lite `ct` | string (int64 unix ns) | yes | The last interest charge time accumulated to this amount (HH:05 tick). |
| `borrowed_amount` · lite `ba` | string | yes | The borrowed principal in this currency that the hourly interest was computed on. |

## JSONRPCRequest

All Websocket JSON RPC Requests are housed in this wrapper. You may specify a stream, and a list of feeds to subscribe to.
If a `request_id` is supplied in this JSON RPC request, it will be propagated back to any relevant JSON RPC responses (including error).
When subscribing to the same primary selector again, the previous secondary selector will be replaced. See `Overview` page for more details.

| Field | Type | Required | Summary |
|---|---|---|---|
| `jsonrpc` · lite `j` | string | yes | The JSON RPC version to use for the request |
| `method` · lite `m` | string | yes | The method to use for the request (eg: `subscribe` / `unsubscribe` / `v1/instrument` ) |
| `params` · lite `p` | any | yes | The parameters for the request |
| `id` · lite `i` | integer (uint32) | no | Optional Field which is used to match the response by the client. |

## JSONRPCResponse

All Websocket JSON RPC Responses are housed in this wrapper. It returns a confirmation of the JSON RPC subscribe request.
If a `request_id` is supplied in the JSON RPC request, it will be propagated back in this JSON RPC response.

| Field | Type | Required | Summary |
|---|---|---|---|
| `jsonrpc` · lite `j` | string | yes | The JSON RPC version to use for the request |
| `result` · lite `r` | any | no | The result for the request |
| `error` · lite `e` | [object Error](#error) | no | The error for the request |
| `id` · lite `i` | integer (uint32) | no | Optional Field which is used to match the response by the client. |
| `method` · lite `m` | string | yes | The method used in the request for this response (eg: `subscribe` / `unsubscribe` / `v1/instrument` ) |

## MiniTicker

| Field | Type | Required | Summary |
|---|---|---|---|
| `event_time` · lite `et` | string (int64 unix ns) | no | Time at which the event was emitted in unix nanoseconds |
| `instrument` · lite `i` | string (instrument name) | no | The instrument name, e.g. |
| `mark_price` · lite `mp` | string | no | The mark price of the instrument. |
| `index_price` · lite `ip` | string | no | The index price of the instrument. |
| `last_price` · lite `lp` | string | no | The last traded price of the instrument (also close price). |
| `last_size` · lite `ls` | string | no | The number of assets traded in the last trade. |
| `mid_price` · lite `mp1` | string | no | The mid price of the instrument. |
| `best_bid_price` · lite `bb` | string | no | The best bid price of the instrument. |
| `best_bid_size` · lite `bb1` | string | no | The number of assets offered on the best bid price of the instrument. |
| `best_ask_price` · lite `ba` | string | no | The best ask price of the instrument. |
| `best_ask_size` · lite `ba1` | string | no | The number of assets offered on the best ask price of the instrument. |

## Order

An order: what to trade (its legs), how long it stays open, and the signature that authorises it. The same object is used for order book, RFQ and liquidation orders.

Every field except `order_id`, `metadata` and `state` is part of the signed message and enforced on chain, so Grvt cannot change it.

| Field | Type | Required | Summary |
|---|---|---|---|
| `order_id` · lite `oi` | string (uint128) | no | Set by the server. |
| `sub_account_id` · lite `sa` | string (uint64) | yes | The sub-account placing the order. |
| `is_market` · lite `im` | bool | no | True for a market order. |
| `time_in_force` · lite `ti` | [enum TimeInForce](enums.md#timeinforce) | yes | How long the order stays open and whether it may fill partly. |
| `post_only` · lite `po` | bool | no | If true, the order must rest on the book as a maker order: if it would match at once, it is rejected (`FAIL_POST_ONLY`). |
| `reduce_only` · lite `ro` | bool | no | If true, the order may only reduce your position; the part that would increase it is cancelled. |
| `legs` · lite `l` | [object OrderLeg[]](#orderleg) | yes | What to trade. |
| `signature` · lite `s` | [object Signature](#signature) | yes | The EIP-712 signature that authorises this order. |
| `metadata` · lite `m` | [object OrderMetadata](#ordermetadata) | yes | Unsigned data the exchange uses but the chain never sees, such as your `client_order_id`. |
| `state` · lite `s1` | [object OrderState](#orderstate) | no | Set by the server. |
| `builder` · lite `b` | string (0x address) | no | The main account id of a builder (a third party that routes your order and charges a fee on it). |
| `builder_fee` · lite `bf` | string | no | The builder's fee for this order, as a percentage: `"0.001"` means 0.001%. |

## OrderLeg

| Field | Type | Required | Summary |
|---|---|---|---|
| `instrument` · lite `i` | string (instrument name) | yes | The instrument to trade, e.g. |
| `size` · lite `s` | string | yes | How much to trade, in the base asset. |
| `limit_price` · lite `lp` | string | no | The worst price you accept, in the quote currency per unit. |
| `is_buying_asset` · lite `ib` | bool | yes | True to buy, false to sell. |

## OrderMetadata

Fields for the exchange's own bookkeeping. They are never signed and never sent on chain.

| Field | Type | Required | Summary |
|---|---|---|---|
| `client_order_id` · lite `co` | string (uint64) | yes | Your own id for the order, to find or cancel it later. |
| `create_time` · lite `ct` | string (int64 unix ns) | no | Set by the server. |
| `trigger` · lite `t` | [object TriggerOrderMetadata](#triggerordermetadata) | no | Trigger fields are used to support any type of trigger order such as TP/SL |
| `broker` · lite `b` | [enum BrokerTag](enums.md#brokertag) | no | Specifies the broker who brokered the order |
| `is_ecn` · lite `ie` | bool | no | Marks an ECN order, eligible for market maker last look. |
| `slippage_bps` · lite `sb` | integer (uint16) | no | Maximum slippage from the mark price for an `IMMEDIATE_OR_CANCEL` limit order, in basis points (800 = 8%). |
| `rfq_id` · lite `ri` | string (uint128) | no | Binds this order to an RFQ (see ApiCreateRfqRequest and the `v1.rfq` / `v1.quote` streams). |
| `is_private` · lite `ip1` | bool | no | Maker quotes only. |
| `algo_order_id` · lite `ao` | string (uint128) | no | The algo order that placed this order as a sub-order; zero for an ordinary order. |

## OrderState

| Field | Type | Required | Summary |
|---|---|---|---|
| `status` · lite `s` | [enum OrderStatus](enums.md#orderstatus) | yes | The order's status. |
| `reject_reason` · lite `rr` | [enum OrderRejectReason](enums.md#orderrejectreason) | yes | Why the order was rejected or cancelled. |
| `book_size` · lite `bs` | string[] | yes | The size still open to fill, per leg (same order as `legs`), in the base asset. |
| `traded_size` · lite `ts` | string[] | yes | The size filled so far, per leg (same order as `legs`), in the base asset. |
| `update_time` · lite `ut` | string (int64 unix ns) | yes | When the order last changed, in unix nanoseconds. |
| `avg_fill_price` · lite `af` | string[] | yes | The average price of the fills so far, per leg (same order as `legs`); 0 before the first fill. |

## OrderStateFeed

| Field | Type | Required | Summary |
|---|---|---|---|
| `order_id` · lite `oi` | string (uint128) | yes | The exchange's 128-bit id for the order. |
| `client_order_id` · lite `co` | string (uint64) | yes | A unique identifier for the active order within a sub-account, specified by the client |
| `order_state` · lite `os` | [object OrderState](#orderstate) | yes | The order state object being created or updated |

## OrderbookLevel

| Field | Type | Required | Summary |
|---|---|---|---|
| `price` · lite `p` | string | yes | The price of the level. |
| `size` · lite `s` | string | yes | The number of assets offered. |
| `num_orders` · lite `no` | integer (uint32) | yes | The number of open orders at this level |

## OrderbookLevels

| Field | Type | Required | Summary |
|---|---|---|---|
| `event_time` · lite `et` | string (int64 unix ns) | yes | Time at which the event was emitted in unix nanoseconds |
| `instrument` · lite `i` | string (instrument name) | yes | The instrument name, e.g. |
| `bids` · lite `b` | [object OrderbookLevel[]](#orderbooklevel) | yes | The list of best bids up till query depth |
| `asks` · lite `a` | [object OrderbookLevel[]](#orderbooklevel) | yes | The list of best asks up till query depth |

## Positions

| Field | Type | Required | Summary |
|---|---|---|---|
| `event_time` · lite `et` | string (int64 unix ns) | yes | Time at which the event was emitted in unix nanoseconds |
| `sub_account_id` · lite `sa` | string (uint64) | yes | The sub-account ID that participated in the trade |
| `instrument` · lite `i` | string (instrument name) | yes | The instrument being represented |
| `size` · lite `s` | string | yes | The size of the position. |
| `notional` · lite `n` | string | yes | The notional value of the position, negative for short assets, in the quote asset. |
| `entry_price` · lite `ep` | string | yes | The entry price of the position. |
| `exit_price` · lite `ep1` | string | yes | The exit price of the position. |
| `mark_price` · lite `mp` | string | yes | The mark price of the position. |
| `unrealized_pnl` · lite `up` | string | yes | The unrealized PnL of the position, in the quote asset. |
| `realized_pnl` · lite `rp` | string | yes | The realized PnL of the position, in the quote asset. |
| `total_pnl` · lite `tp` | string | yes | The total PnL of the position, in the quote asset. |
| `roi` · lite `r` | string | yes | The ROI of the position, expressed as a percentage |
| `quote_index_price` · lite `qi` | string | yes | The index price of the quote currency. |
| `est_liquidation_price` · lite `el` | string | yes | The estimated liquidation price |
| `leverage` · lite `l` | string | yes | The current leverage value for this position |
| `cumulative_fee` · lite `cf` | string | yes | The cumulative fee paid on the position, in the quote asset. |
| `cumulative_realized_funding_payment` · lite `cr` | string | yes | The cumulative realized funding payment of the position, in the quote asset. |
| `margin_type` · lite `mt` | [enum PositionMarginType](enums.md#positionmargintype) | yes | The margin type of the position |
| `isolated_balance` · lite `ib` | string | no | [IsolatedOnly] The wallet balance reserved for this isolated margin position, in the quote asset. |
| `isolated_im` · lite `ii` | string | no | [IsolatedOnly] The initial margin of the isolated margin position, in the quote asset. |
| `isolated_mm` · lite `im` | string | no | [IsolatedOnly] The maintenance margin of the isolated margin position, in the quote asset. |

## PreMinRedemptions

Vault redemption queue section hidden from main view. All requests here have yet to age past the vault's minimum redemption period.

| Field | Type | Required | Summary |
|---|---|---|---|
| `requests` · lite `r` | [object VaultRedemptionRequest[]](#vaultredemptionrequest) | yes | Pre-minimum-age redemption requests, ordered by age (first element is the oldest request that is pre-minimum-age). |
| `token_count` · lite `tc` | string | yes | Number of shares in the pre-minimum-age section of the vault's redemption queue. |

## Rfq

A Request for Quote (RFQ) lets a taker solicit private quotes on a single instrument from makers.

- Single instrument

- Each RFQ targets one instrument (kind = STABLE_PERP) for a single requested size.
- The taker may disclose a direction via `rfq.side`, or omit it to request a two-way (buy and sell) quote.

- Maker solicitation

- On submission, Grvt broadcasts the RFQ to makers over the `v1.rfq` feed (see RfqFeed).
- While the RFQ is open, the taker receives on the `v1.quote` feed an estimate of the average fill price for the RFQ size against the public book (see RfqQuoteFeed).

- Anonymity

- Anonymity is automatic and always enforced — the taker and makers only ever see each other's derived anonymous account ids.
- Real taker and maker identities are never exposed to the counterparty.

- Expiry

- The RFQ lives until `rfq.expiry`, after which Grvt expires it and auto-cancels the makers' private quotes bound to it.

| Field | Type | Required | Summary |
|---|---|---|---|
| `rfq_id` · lite `ri` | string (uint128) | yes | Set by the server. |
| `sub_account_id` · lite `sa` | string (uint64) | yes | The sub-account initiating the RFQ |
| `expiry` · lite `e` | string (int64 unix ns) | yes | When the RFQ expires, in unix nanoseconds. |
| `instrument` · lite `i` | string (instrument name) | yes | The instrument to trade. |
| `size` · lite `s` | string | yes | Requested size (positive). |
| `side` · lite `s1` | [enum RfqSide](enums.md#rfqside) | no | Optional — omitted = two-way request. |

## RfqQuoteFeed

| Field | Type | Required | Summary |
|---|---|---|---|
| `rfq_id` · lite `ri` | string (uint128) | yes | The RFQ this estimate belongs to. |
| `best_bid` · lite `bb` | string | no | Average fill price to sell the RFQ size. |
| `best_ask` · lite `ba` | string | no | Average fill price to buy the RFQ size. |
| `bid_levels` · lite `bl` | [object RfqQuoteLevel[]](#rfqquotelevel) | yes | The sell-side estimate (at most one level), from the bids |
| `ask_levels` · lite `al` | [object RfqQuoteLevel[]](#rfqquotelevel) | yes | The buy-side estimate (at most one level), from the asks |

## RfqQuoteLevel

| Field | Type | Required | Summary |
|---|---|---|---|
| `price` · lite `p` | string | yes | Average fill price for the size. |
| `size` · lite `s` | string | yes | Fillable size, up to the RFQ size. |
| `maker_anon_account_id` · lite `ma` | string (uint128) | yes | The maker's derived anonymous account id shown to the taker. |
| `time_in_force` · lite `ti` | [enum TimeInForce](enums.md#timeinforce) | yes | Distinguishes an AON level (liftable only in full — POST-MVP) from a GTT level |

## RiskBracket

| Field | Type | Required | Summary |
|---|---|---|---|
| `tier` · lite `t` | integer (uint32) | yes | 1-indexed tier number |
| `notional_floor` · lite `nf` | string | yes | Lower bound of notional value (inclusive) in quote currency |
| `notional_cap` · lite `nc` | string | no | Upper bound of notional value (exclusive) in quote currency, omitted for last tier |
| `maintenance_margin_rate` · lite `mm` | string | yes | Maintenance margin rate as a decimal (e.g., '0.01' for 1%) |
| `initial_margin_rate` · lite `im` | string | yes | Initial margin rate as a decimal (e.g., '0.02' for 2%) |
| `max_leverage` · lite `ml` | integer (uint32) | yes | Maximum leverage allowed at this tier (floor of 1 / initial_margin_rate) |
| `cumulative_maintenance_amount` · lite `cm` | string | yes | Cumulative maintenance margin amount in quote currency |

## SfpMarketSchedule

| Field | Type | Required | Summary |
|---|---|---|---|
| `sessions` · lite `s` | [object TradingSession[]](#tradingsession) | yes | Trading sessions for the current calendar week (Sunday to Saturday in the exchange's local time). |
| `holidays` · lite `h` | [object TradingHolidaySchedule[]](#tradingholidayschedule) | yes | Market holidays and early closes, past and upcoming, sorted by start time. |

## SfpTradingScheduleGroup

| Field | Type | Required | Summary |
|---|---|---|---|
| `name` · lite `n` | string | yes | The group name. |
| `asset_class` · lite `ac` | [enum AssetClass](enums.md#assetclass) | yes | The instruments' asset class. |
| `instruments` · lite `i` | string (instrument name)[] | yes | The stable perps trading these hours, sorted. |
| `sessions` · lite `s` | [object TradingSession[]](#tradingsession) | yes | Trading sessions for the current calendar week (Sunday to Saturday in the exchange's local time). |
| `holidays` · lite `h` | [object TradingHolidaySchedule[]](#tradingholidayschedule) | yes | Market holidays and early closes, past and upcoming, sorted by start time. |

## Signature

| Field | Type | Required | Summary |
|---|---|---|---|
| `signer` · lite `s` | string (uint256) | yes | The address of the wallet that signed (`0x` + 40 hex characters). |
| `r` · lite `r` | string (uint256) | yes | The signature's `r`, as `0x` + 64 hex characters. |
| `s` · lite `s1` | string (uint256) | yes | The signature's `s`, as `0x` + 64 hex characters. |
| `v` · lite `v` | integer (uint8) | yes | The signature's `v`, 27 or 28. |
| `expiration` · lite `e` | string (int64 unix ns) | yes | When the signature stops being valid, in unix nanoseconds, measured on the exchange's clock. |
| `nonce` · lite `n` | integer (uint32) | yes | A number you choose, 0 to 4,294,967,295 (uint32), so that two otherwise identical requests have different signatures. |
| `chain_id` · lite `ci` | string (uint64) | yes | The chain id in the signed EIP-712 domain, as a string. |

## SpotBalance

| Field | Type | Required | Summary |
|---|---|---|---|
| `currency` · lite `c` | string | yes | The currency you hold a spot balance in |
| `balance` · lite `b` | string | yes | This currency's balance in this sub-account. |
| `index_price` · lite `ip` | string | yes | The index price of this currency. |
| `entry_price` · lite `ep` | string | yes | The entry price of this spot currency. |
| `realized_pnl` · lite `rp` | string | yes | The realized PnL of this spot currency. |
| `unrealized_pnl` · lite `up` | string | yes | The unrealized PnL of this spot currency. |
| `available_to_transfer` · lite `at` | string | yes | The available to transfer amount of this spot currency. |
| `borrowed_amount` · lite `ba` | string | no | The amount borrowed in this currency, inclusive of accrued interest. |

## SpotSubAccount

| Field | Type | Required | Summary |
|---|---|---|---|
| `event_time` · lite `et` | string (int64 unix ns) | yes | Time at which the event was emitted in unix nanoseconds |
| `sub_account_id` · lite `sa` | string (uint64) | yes | The sub-account ID this entry refers to |
| `total_equity` · lite `te` | string | yes | Total equity of the spot sub-account, denominated USD |
| `spot_balances` · lite `sb` | [object SpotBalance[]](#spotbalance) | yes | The list of spot assets owned by this spot sub-account, and their balances |

## StreamReference

| Field | Type | Required | Summary |
|---|---|---|---|
| `stream` · lite `s` | string | yes | The channel to subscribe to (eg: ticker.s / ticker.d) |
| `selectors` · lite `s1` | string[] | yes | The list of selectors for the stream |

## SubAccount

| Field | Type | Required | Summary |
|---|---|---|---|
| `event_time` · lite `et` | string (int64 unix ns) | yes | Time at which the event was emitted in unix nanoseconds |
| `sub_account_id` · lite `sa` | string (uint64) | yes | The sub-account ID this entry refers to |
| `margin_type` · lite `mt` | [enum MarginType](enums.md#margintype) | yes | The type of margin algorithm this sub-account uses |
| `settle_currency` · lite `sc` | string | yes | The settlement, margin, and reporting currency of this account. |
| `unrealized_pnl` · lite `up` | string | yes | The total unrealized PnL of all positions owned by this sub-account, in the quote asset. |
| `total_equity` · lite `te` | string | yes | The notional value of your account if all positions are closed, excluding trading fees (reported in `settle_currency`). |
| `initial_margin` · lite `im` | string | yes | The `total_equity` required to open positions in the account (reported in `settle_currency`). |
| `maintenance_margin` · lite `mm` | string | yes | The `total_equity` required to avoid liquidation of positions in the account (reported in `settle_currency`). |
| `available_balance` · lite `ab` | string | yes | DEPRECATED: use the per-currency `availableToTransfer` of the quote-currency entry in `spotBalances` instead. |
| `spot_balances` · lite `sb` | [object SpotBalance[]](#spotbalance) | yes | The list of spot assets owned by this sub-account, and their balances |
| `positions` · lite `p` | [object Positions[]](#positions) | yes | The list of positions owned by this sub-account |
| `settle_index_price` · lite `si` | string | yes | The index price of the settle currency. |
| `is_vault` · lite `iv` | bool | no | Whether this sub-account is a vault |
| `vault_im_additions` · lite `vi` | string | no | Total amount of IM (reported in `settle_currency`) deducted from the vault due to redemptions nearing the end of their redemption period |
| `derisk_margin` · lite `dm` | string | yes | The derisk margin of this sub-account |
| `derisk_to_maintenance_margin_ratio` · lite `dt` | string | yes | The derisk margin to maintenance margin ratio of this sub-account |
| `total_cross_equity` · lite `tc` | string | yes | The total equity of this sub-account for cross margin |
| `cross_unrealized_pnl` · lite `cu` | string | yes | The unrealized PnL of this sub-account for cross margin |
| `sub_account_mode` · lite `sa1` | [enum SubAccountMode](enums.md#subaccountmode) | yes | The mode of the sub-account |
| `margin_balance` · lite `mb` | string | yes | The margin balance of this sub-account for cross margin |
| `algo_trading_enabled` · lite `at` | bool | yes | Whether algo trading is enabled for this sub-account |

## SupportedAsset

An asset supported for a given wallet type

| Field | Type | Required | Summary |
|---|---|---|---|
| `asset_id` · lite `ai` | integer (uint16) | yes | The currency ID of the asset |
| `asset_code` · lite `ac` | string | yes | The readable currency code of the asset |
| `balance_decimals` · lite `bd` | integer (int8) | yes | The number of decimals used for balance representation |
| `transfer_disabled` · lite `td` | bool | yes | The asset cannot be transferred between wallets |

## TPSLOrderMetadata

Contains metadata for Take Profit (TP) and Stop Loss (SL) trigger orders.

| Field | Type | Required | Summary |
|---|---|---|---|
| `trigger_by` · lite `tb` | [enum TriggerBy](enums.md#triggerby) | yes | Defines the price type (e.g., index price) that activates a Take Profit (TP) or Stop Loss (SL) order |
| `trigger_price` · lite `tp` | string | yes | The Trigger Price of the order. |
| `close_position` · lite `cp` | bool | yes | If True, the order will close the position when the trigger price is reached |
| `is_split_position` · lite `is` | bool | yes | If True, the order will be treated as part of a position's split-TP/SL set, subject to aggregate size/count limits. |

## Ticker

Prices, 24-hour statistics, open interest and funding for one instrument.

Figures that can be worked out from these fields are not sent. For example the 24-hour volume is `buy_volume_24h_b + sell_volume_24h_b`.

| Field | Type | Required | Summary |
|---|---|---|---|
| `event_time` · lite `et` | string (int64 unix ns) | no | Time at which the event was emitted in unix nanoseconds |
| `instrument` · lite `i` | string (instrument name) | no | The instrument name, e.g. |
| `mark_price` · lite `mp` | string | no | The mark price of the instrument. |
| `index_price` · lite `ip` | string | no | The index price of the instrument. |
| `last_price` · lite `lp` | string | no | The price of the last trade (the close price). |
| `last_size` · lite `ls` | string | no | The number of assets traded in the last trade. |
| `mid_price` · lite `mp1` | string | no | The mid price of the instrument. |
| `best_bid_price` · lite `bb` | string | no | The best bid price of the instrument. |
| `best_bid_size` · lite `bb1` | string | no | The number of assets offered on the best bid price of the instrument. |
| `best_ask_price` · lite `ba` | string | no | The best ask price of the instrument. |
| `best_ask_size` · lite `ba1` | string | no | The number of assets offered on the best ask price of the instrument. |
| `funding_rate_8h_curr` · lite `fr` | string | no | Deprecated and will be removed. |
| `funding_rate_8h_avg` · lite `fr1` | string | no | Deprecated and will be removed. |
| `interest_rate` · lite `ir` | string | no | The interest rate of the underlying, in percent (`"0.01"` = 0.01%). |
| `forward_price` · lite `fp` | string | no | [Options] The forward price of the option. |
| `buy_volume_24h_b` · lite `bv` | string | no | Taker buy volume over the last 24 hours, in the base asset. |
| `sell_volume_24h_b` · lite `sv` | string | no | Taker sell volume over the last 24 hours, in the base asset. |
| `buy_volume_24h_q` · lite `bv1` | string | no | Taker buy volume over the last 24 hours, in the quote asset. |
| `sell_volume_24h_q` · lite `sv1` | string | no | Taker sell volume over the last 24 hours, in the quote asset. |
| `high_price` · lite `hp` | string | no | The highest trade price of the last 24 hours. |
| `low_price` · lite `lp1` | string | no | The lowest trade price of the last 24 hours. |
| `open_price` · lite `op` | string | no | The first trade price of the last 24 hours. |
| `open_interest` · lite `oi` | string | no | The open interest in the instrument. |
| `long_short_ratio` · lite `ls1` | string | no | The ratio of accounts that are net long to accounts that are net short on this instrument. |
| `funding_rate` · lite `fr2` | string | no | The indicative funding rate for the current funding interval, in percent (`"0.01"` = 0.01%). |
| `next_funding_time` · lite `nf` | string (int64 unix ns) | no | When the current funding interval ends, in unix nanoseconds. |
| `status` · lite `s` | [enum InstrumentStatus](enums.md#instrumentstatus) | no | The current status of the instrument |
| `session` · lite `s1` | [enum TradingSessionType](enums.md#tradingsessiontype) | no | The current trading session of the instrument's underlying market |
| `long_open_interest` · lite `lo` | string | no | The long open interest in the instrument. |
| `short_open_interest` · lite `so` | string | no | The short open interest in the instrument. |
| `funding_rate_long_apr_pct` · lite `fr3` | string | no | Stable perps only: the indicative annual rate for retail longs at the next charge, in percent a year (`'-5.5'` = retail longs pay 5.5%; positive = retail receives, negative = retail pays). |
| `funding_rate_short_apr_pct` · lite `fr4` | string | no | Stable perps only: the indicative annual rate for retail shorts at the next charge, in percent a year (`'-5'` = retail shorts pay 5%; positive = retail receives, negative = retail pays). |

## Trade

All private RFQs and Private AXEs will be filtered out from the responses

| Field | Type | Required | Summary |
|---|---|---|---|
| `event_time` · lite `et` | string (int64 unix ns) | yes | Time at which the event was emitted in unix nanoseconds |
| `instrument` · lite `i` | string (instrument name) | yes | The instrument name, e.g. |
| `is_taker_buyer` · lite `it` | bool | yes | If taker was the buyer on the trade |
| `size` · lite `s` | string | yes | The number of assets being traded. |
| `price` · lite `p` | string | yes | The traded price. |
| `mark_price` · lite `mp` | string | no | The mark price of the instrument at point of trade. |
| `index_price` · lite `ip` | string | yes | The index price of the instrument at point of trade. |
| `interest_rate` · lite `ir` | string | yes | The interest rate of the underlying when the trade happened, in percent (`"0.01"` = 0.01%). |
| `forward_price` · lite `fp` | string | no | [Options] The forward price of the option at point of trade. |
| `trade_id` · lite `ti` | string | yes | A trade identifier, globally unique, and monotonically increasing (not by `1`). |
| `venue` · lite `v` | [enum Venue](enums.md#venue) | yes | The venue where the trade occurred |
| `is_rpi` · lite `ir1` | bool | yes | If the trade is a RPI trade |

## TradingHolidaySchedule

| Field | Type | Required | Summary |
|---|---|---|---|
| `name` · lite `n` | string | yes | Holiday name |
| `close_type` · lite `ct` | [enum TradingScheduleCloseType](enums.md#tradingscheduleclosetype) | yes | `FULL_DAY`: the market is closed for the whole day. |
| `start_time` · lite `st` | string (int64) | yes | When the closure begins, as a Unix timestamp in milliseconds. |
| `end_time` · lite `et` | string (int64) | yes | When the closed or shortened trading day's session would have closed, as a Unix timestamp in milliseconds. |

## TradingSession

| Field | Type | Required | Summary |
|---|---|---|---|
| `start_time` · lite `st` | string (int64) | yes | Trading session start time timestamp in milliseconds |
| `end_time` · lite `et` | string (int64) | yes | Trading session end time timestamp in milliseconds |
| `type` · lite `t` | [enum TradingSessionType](enums.md#tradingsessiontype) | yes | Trading session type |

## TransferHistory

| Field | Type | Required | Summary |
|---|---|---|---|
| `tx_id` · lite `ti` | string (uint64) | yes | The transaction ID of the transfer |
| `from_account_id` · lite `fa` | string (0x address) | yes | The account to transfer from |
| `from_sub_account_id` · lite `fs` | string (uint64) | yes | The sub-account to transfer from (0 if transferring from main account) |
| `to_account_id` · lite `ta` | string (0x address) | yes | The account to deposit into |
| `to_sub_account_id` · lite `ts` | string (uint64) | yes | The sub-account to transfer to (0 if transferring to main account) |
| `currency` · lite `c` | string | yes | The token currency to transfer |
| `num_tokens` · lite `nt` | string | yes | The number of tokens to transfer |
| `signature` · lite `s` | [object Signature](#signature) | yes | The signature of the transfer |
| `event_time` · lite `et` | string (int64 unix ns) | yes | The timestamp of the transfer in unix nanoseconds |
| `transfer_type` · lite `tt` | [enum TransferType](enums.md#transfertype) | yes | The type of transfer |
| `transfer_metadata` · lite `tm` | string | yes | The metadata of the transfer |
| `from_wallet_type` · lite `fw` | [enum WalletType](enums.md#wallettype) | yes | The wallet type of the from account or sub-account |
| `to_wallet_type` · lite `tw` | [enum WalletType](enums.md#wallettype) | yes | The wallet type of the to account or sub-account |

## TriggerOrderMetadata

Contains metadata related to trigger orders, such as Take Profit (TP) or Stop Loss (SL).

Trigger orders are used to automatically execute an order when a predefined price condition is met, allowing traders to implement risk management strategies.

| Field | Type | Required | Summary |
|---|---|---|---|
| `trigger_type` · lite `tt` | [enum TriggerType](enums.md#triggertype) | yes | Type of the trigger order. |
| `tpsl` · lite `t` | [object TPSLOrderMetadata](#tpslordermetadata) | yes | Contains metadata for Take Profit (TP) and Stop Loss (SL) trigger orders. |

## VaultInvestment

Summarizes a vault investment held by a funding account

| Field | Type | Required | Summary |
|---|---|---|---|
| `vault_id` · lite `vi` | string (uint64) | yes | The sub-account ID of the vault invested in. |
| `num_lp_tokens` · lite `nl` | string | yes | The number of shares held by the investor. |
| `share_price` · lite `sp` | string | yes | The current share price (in USD) of this vault investment. |
| `usd_notional_invested` · lite `un` | string | yes | The USD notional invested in this vault investment. |
| `share_balances` · lite `sb` | [object VaultShareBalances](#vaultsharebalances) | no | The owner's Funding, trading and reserved vault shares. |

## VaultInvestorSummary

Vault investor summary information.

This struct contains the summary of investments in a vault.

| Field | Type | Required | Summary |
|---|---|---|---|
| `sub_account_id` · lite `sa` | string (uint64) | yes | The unique identifier of the vault sub-account. |
| `num_lp_tokens` · lite `nl` | string | yes | The number of vault LP tokens the investor holds: those in the funding account plus those in every sub-account. |
| `avg_entry_price` · lite `ae` | string | yes | The average entry price (in USD) of the investor's vault LP tokens: the investor's invested notional divided by numLPTokens. |
| `current_price` · lite `cp` | string | yes | The current price (in USD) of the vault LP tokens. |
| `total_equity` · lite `te` | string | yes | The vault's total equity (in USD). |
| `all_time_realized_pnl` · lite `at` | string | yes | The all-time realized PnL (in USD) that the investor has received from the vault. |
| `pending_redemption` · lite `pr` | [object VaultRedemption](#vaultredemption) | no | The singleton pending redemption (omitted if none). |
| `can_burn` · lite `cb` | bool | no | True if the requesting account is authorized to burn tokens on this vault, omitted otherwise. |
| `num_lp_tokens_locked` · lite `nl1` | string | yes | The number of the investor's vault LP tokens still within the vault's minimum investment period. |
| `num_lp_tokens_redeemable` · lite `nl2` | string | yes | The number of vault LP tokens the investor can request to redeem now: those past the minimum investment period, less any pending redemption. |
| `locked_lots` · lite `ll` | [object VaultLpLotView[]](#vaultlplotview) | yes | The investor's vault LP tokens within the minimum investment period, by the time they unlock (earliest first). |
| `share_balances` · lite `sb` | [object VaultShareBalances](#vaultsharebalances) | yes | Where the investor's vault LP tokens sit: the funding account and the sub-accounts. |
| `trading_balances` · lite `tb` | [object VaultShareTradingBalance[]](#vaultsharetradingbalance) | yes | One entry per sub-account holding the vault's LP tokens. |
| `investor_equity` · lite `ie` | string | yes | The current valuation (in USD) of all the investor's vault LP tokens: numLPTokens times currentPrice. |
| `unrealized_pnl` · lite `up` | string | yes | The investor's unrealized PnL (in USD): investorEquity less the investor's invested notional. |

## VaultLpLotView

Vault LP tokens minted together that unlock at the same time.

| Field | Type | Required | Summary |
|---|---|---|---|
| `unlock_time` · lite `ut` | string (int64 unix ns) | yes | Time in unix nanoseconds from which these LP tokens can be redeemed. |
| `num_lp_tokens` · lite `nl` | string | yes | The number of LP tokens in the lot. |

## VaultRedemption

Vault redemption information.

This struct contains information about a pending redemption from a vault.

| Field | Type | Required | Summary |
|---|---|---|---|
| `num_lp_tokens` · lite `nl` | string | yes | The number of LP Tokens requested for redemption. |
| `request_valuation` · lite `rv` | string | yes | The valuation (in USD) of the redemption request. |
| `request_time` · lite `rt` | string (int64 unix ns) | yes | Set by the server. |
| `max_redemption_period_timestamp` · lite `mr` | string (int64 unix ns) | yes | Set by the server. |
| `cancel_blocked` · lite `cb` | bool | no | Omitted for redemption requests to non-cross exchange vaults. |
| `to_currency` · lite `tc` | string | yes | The currency the request pays into the investor's funding account: the vault's investment currency, unless the request converts. |
| `exchange_rate` · lite `er` | string | yes | The signed rate the request is paid at, `to_currency` per unit of the vault's investment currency. |

## VaultRedemptionRequest

Representation of a pending redemption request for a given vault.

| Field | Type | Required | Summary |
|---|---|---|---|
| `request_time` · lite `rt` | string (int64 unix ns) | yes | Set by the server. |
| `num_lp_tokens` · lite `nl` | string | yes | The number of shares to redeem |
| `max_redemption_period_timestamp` · lite `mr` | string (int64 unix ns) | yes | Set by the server. |
| `age_category` · lite `ac` | [enum VaultRedemptionReqAgeCategory](enums.md#vaultredemptionreqagecategory) | yes | Age category of this redemption request. |
| `is_manager` · lite `im` | bool | no | `true` if this request belongs to the vault manager, omitted otherwise. |
| `eligible_for_auto_redemption_timestamp` · lite `ef` | string (int64 unix ns) | yes | Set by the server. |
| `from_currency` · lite `fc` | string | yes | The currency the vault pays: the vault's investment currency. |
| `to_currency` · lite `tc` | string | yes | The currency paid into the investor's funding account. |
| `exchange_rate` · lite `er` | string | yes | The signed rate the request is paid at, `to_currency` per unit of `from_currency`. |

## VaultShareBalances

Where an investor's vault LP tokens sit.

| Field | Type | Required | Summary |
|---|---|---|---|
| `funding_lp_token_balance` · lite `fl` | string | yes | The vault LP tokens in the funding account, including those a pending redemption reserves. |
| `trading_lp_token_balance` · lite `tl` | string | yes | The vault LP tokens across all sub-accounts: the sum of tradingBalances. |
| `pending_redemption_lp_token_balance` · lite `pr` | string | yes | The funding account's vault LP tokens a pending redemption reserves. |
| `available_to_transfer` · lite `at` | string | yes | The funding account's vault LP tokens that can move to a sub-account now: fundingLpTokenBalance less pendingRedemptionLpTokenBalance. |
| `currency` · lite `c` | string | no | The vault's share currency, used to transfer its LP tokens. |

## VaultShareTradingBalance

A sub-account's holding of a vault's LP tokens.

| Field | Type | Required | Summary |
|---|---|---|---|
| `sub_account_id` · lite `sa` | string (uint64) | yes | The sub-account. |
| `num_lp_tokens` · lite `nl` | string | yes | The vault LP tokens in the sub-account. |
| `equity` · lite `e` | string | yes | The current valuation (in USD) of the sub-account's vault LP tokens. |
| `available_to_transfer` · lite `at` | string | yes | An estimate of the vault LP tokens that can move back to the funding account without failing the sub-account's withdrawal checks. |
| `margin_balance_usd` · lite `mb` | string | yes | What the vault LP tokens add to the sub-account's margin (in USD): equity times the collateral value ratio. |

## WSAlgoOrderFeedDataV1

| Field | Type | Required | Summary |
|---|---|---|---|
| `stream` · lite `s` | string | yes | The stream this frame belongs to, e.g. |
| `selector` · lite `s1` | string | yes | The selector this frame is for, as you subscribed with it. |
| `sequence_number` · lite `sn` | string (uint64) | yes | This frame's number, an unsigned 64-bit integer sent as a decimal string: compare it as an integer. |
| `feed` · lite `f` | [object AlgoOrder](#algoorder) | yes | The algo order object being created or updated |
| `prev_sequence_number` · lite `ps` | string (uint64) | yes | The `sequence_number` of the frame before this one on this selector. |

## WSAlgoOrderFeedSelectorV1

Subscribes to a feed of algo order updates pertaining to algo orders made by your account.
Each algo order can be uniquely identified by its `algo_order_id` or `client_order_id`, and carries its `type` so that clients can filter by algo order type.
To subscribe to all algo orders, specify an empty `instrument` (eg. `2345123`).
Otherwise, specify the `instrument` to only receive algo orders for that instrument (eg. `2345123-BTC_USDT_Perp`).

| Field | Type | Required | Summary |
|---|---|---|---|
| `sub_account_id` · lite `sa` | string (uint64) | yes | The sub-account ID to filter by |
| `instrument` · lite `i` | string (instrument name) | no | The instrument filter to apply. |

## WSCancelFeedDataV1

| Field | Type | Required | Summary |
|---|---|---|---|
| `stream` · lite `s` | string | yes | The stream this frame belongs to, e.g. |
| `selector` · lite `s1` | string | yes | The selector this frame is for, as you subscribed with it. |
| `sequence_number` · lite `sn` | string (uint64) | yes | This frame's number, an unsigned 64-bit integer sent as a decimal string: compare it as an integer. |
| `feed` · lite `f` | [object CancelStatusFeed](#cancelstatusfeed) | yes | Data relating to the status of the cancellation attempt |
| `prev_sequence_number` · lite `ps` | string (uint64) | yes | The `sequence_number` of the frame before this one on this selector. |

## WSCancelFeedSelectorV1

Subscribes to a feed of time-to-live expiry events for order cancellations requested by a given sub-account.
**This stream presently only provides expiry updates for cancel-order requests set with a valid TTL value**.
Successful order cancellations will reflect as updates published to the [order-state stream](https://api-docs.grvt.io/trading_streams/#order-state).
_A future release will expand the functionality of this stream to provide more general status updates on order cancellation requests._
Each Order can be uniquely identified by its `client_order_id`.

| Field | Type | Required | Summary |
|---|---|---|---|
| `sub_account_id` · lite `sa` | string (uint64) | yes | The sub-account ID to filter by |

## WSCandlestickFeedDataV1

| Field | Type | Required | Summary |
|---|---|---|---|
| `stream` · lite `s` | string | yes | The stream this frame belongs to, e.g. |
| `selector` · lite `s1` | string | yes | The selector this frame is for, as you subscribed with it. |
| `sequence_number` · lite `sn` | string (uint64) | yes | This frame's number, an unsigned 64-bit integer sent as a decimal string: compare it as an integer. |
| `feed` · lite `f` | [object Candlestick](#candlestick) | yes | A candlestick entry matching the request filters |
| `prev_sequence_number` · lite `ps` | string (uint64) | yes | The `sequence_number` of the frame before this one on this selector. |

## WSCandlestickFeedSelectorV1

Subscribes to a stream of Kline/Candlestick updates for an instrument. A Kline is uniquely identified by its open time.
A new Kline is published every interval (if it exists). Upon subscription, the server will send the 5 most recent Kline for the requested interval.

| Field | Type | Required | Summary |
|---|---|---|---|
| `instrument` · lite `i` | string (instrument name) | yes | The instrument name, e.g. |
| `interval` · lite `i1` | [enum WsCandlestickInterval](enums.md#wscandlestickinterval) | yes | The interval of each candlestick |
| `type` · lite `t` | [enum CandlestickType](enums.md#candlesticktype) | yes | The type of candlestick data to retrieve |

## WSDepositFeedDataV1

Subscribes to a feed of deposit updates.

| Field | Type | Required | Summary |
|---|---|---|---|
| `stream` · lite `s` | string | yes | The stream this frame belongs to, e.g. |
| `selector` · lite `s1` | string | yes | The selector this frame is for, as you subscribed with it. |
| `sequence_number` · lite `sn` | string (uint64) | yes | This frame's number, an unsigned 64-bit integer sent as a decimal string: compare it as an integer. |
| `feed` · lite `f` | [object Deposit](#deposit) | yes | The Deposit object |
| `prev_sequence_number` · lite `ps` | string (uint64) | yes | The `sequence_number` of the frame before this one on this selector. |

## WSDepositFeedSelectorV1

Subscribes to a feed of deposits. This will execute when there is any deposit to selected account.
To subscribe to a main account, specify the account ID (eg. `0x9fe3758b67ce7a2875ee4b452f01a5282d84ed8a`).

| Field | Type | Required | Summary |
|---|---|---|---|
| `main_account_id` · lite `ma` | string (0x address) | yes | The main account ID to request for |

## WSFillFeedDataV1

| Field | Type | Required | Summary |
|---|---|---|---|
| `stream` · lite `s` | string | yes | The stream this frame belongs to, e.g. |
| `selector` · lite `s1` | string | yes | The selector this frame is for, as you subscribed with it. |
| `sequence_number` · lite `sn` | string (uint64) | yes | This frame's number, an unsigned 64-bit integer sent as a decimal string: compare it as an integer. |
| `feed` · lite `f` | [object Fill](#fill) | yes | A private trade matching the request filter |
| `prev_sequence_number` · lite `ps` | string (uint64) | yes | The `sequence_number` of the frame before this one on this selector. |

## WSFillFeedSelectorV1

Subscribes to a feed of private trade updates. This happens when a trade is executed.
To subscribe to all private trades, specify an empty `instrument` (eg. `2345123`).
Otherwise, specify the `instrument` to only receive private trades for that instrument (eg. `2345123-BTC_USDT_Perp`).

| Field | Type | Required | Summary |
|---|---|---|---|
| `sub_account_id` · lite `sa` | string (uint64) | yes | The sub-account ID to request for |
| `instrument` · lite `i` | string (instrument name) | no | The instrument filter to apply. |

## WSListStreamsParams

List down all the streams this connection has connected to.

No fields.

## WSListStreamsResult

Returns a list of all rooms the client has subscribed to.

| Field | Type | Required | Summary |
|---|---|---|---|
| `stream_reference` · lite `sr` | [object StreamReference[]](#streamreference) | yes | The list of stream references  the connection is connected to |

## WSMiniTickerFeedDataV1

| Field | Type | Required | Summary |
|---|---|---|---|
| `stream` · lite `s` | string | yes | The stream this frame belongs to, e.g. |
| `selector` · lite `s1` | string | yes | The selector this frame is for, as you subscribed with it. |
| `sequence_number` · lite `sn` | string (uint64) | yes | This frame's number, an unsigned 64-bit integer sent as a decimal string: compare it as an integer. |
| `feed` · lite `f` | [object MiniTicker](#miniticker) | yes | A mini ticker matching the request filter |
| `prev_sequence_number` · lite `ps` | string (uint64) | yes | The `sequence_number` of the frame before this one on this selector. |

## WSMiniTickerFeedSelectorV1

Subscribes to a mini ticker feed for a single instrument. The `mini.s` channel offers simpler integration. To experience higher publishing rates, please use the `mini.d` channel.
Unlike the `mini.d` channel which publishes an initial snapshot, then only streams deltas after, the `mini.s` channel publishes full snapshots at each feed.

The Delta feed will work as follows:

- On subscription, the server will send a full snapshot of the mini ticker.
- After the snapshot, the server will only send deltas of the mini ticker.
- The server will send a delta if any of the fields in the mini ticker have changed.

Field Semantics:

- [DeltaOnly] If a field is not updated, \{\}
- If a field is updated, \{field: '123'\}
- If a field is set to zero, \{field: '0'\}
- If a field is set to null, \{field: ''\}

| Field | Type | Required | Summary |
|---|---|---|---|
| `instrument` · lite `i` | string (instrument name) | yes | The instrument name, e.g. |
| `rate` · lite `r` | integer (uint32) | yes | The minimal rate at which we publish feeds (in milliseconds) |

## WSOrderFeedDataV1

| Field | Type | Required | Summary |
|---|---|---|---|
| `stream` · lite `s` | string | yes | The stream this frame belongs to, e.g. |
| `selector` · lite `s1` | string | yes | The selector this frame is for, as you subscribed with it. |
| `sequence_number` · lite `sn` | string (uint64) | yes | This frame's number, an unsigned 64-bit integer sent as a decimal string: compare it as an integer. |
| `feed` · lite `f` | [object Order](#order) | yes | The order object being created or updated |
| `prev_sequence_number` · lite `ps` | string (uint64) | yes | The `sequence_number` of the frame before this one on this selector. |

## WSOrderFeedSelectorV1

Subscribes to a feed of order updates pertaining to orders made by your account.
Each Order can be uniquely identified by its `order_id` or `client_order_id`.
To subscribe to all orders, specify an empty `instrument` (eg. `2345123`).
Otherwise, specify the `instrument` to only receive orders for that instrument (eg. `2345123-BTC_USDT_Perp`).

| Field | Type | Required | Summary |
|---|---|---|---|
| `sub_account_id` · lite `sa` | string (uint64) | yes | The sub-account ID to filter by |
| `instrument` · lite `i` | string (instrument name) | no | The instrument filter to apply. |

## WSOrderStateFeedDataV1

| Field | Type | Required | Summary |
|---|---|---|---|
| `stream` · lite `s` | string | yes | The stream this frame belongs to, e.g. |
| `selector` · lite `s1` | string | yes | The selector this frame is for, as you subscribed with it. |
| `sequence_number` · lite `sn` | string (uint64) | yes | This frame's number, an unsigned 64-bit integer sent as a decimal string: compare it as an integer. |
| `feed` · lite `f` | [object OrderStateFeed](#orderstatefeed) | yes | The Order State Feed |
| `prev_sequence_number` · lite `ps` | string (uint64) | yes | The `sequence_number` of the frame before this one on this selector. |

## WSOrderStateFeedSelectorV1

Subscribes to a feed of order updates pertaining to orders made by your account.
Unlike the Order Stream, this only streams state updates, drastically improving throughput, and latency.
Each Order can be uniquely identified by its `order_id` or `client_order_id`.
To subscribe to all orders, specify an empty `instrument` (eg. `2345123`).
Otherwise, specify the `instrument` to only receive orders for that instrument (eg. `2345123-BTC_USDT_Perp`).

| Field | Type | Required | Summary |
|---|---|---|---|
| `sub_account_id` · lite `sa` | string (uint64) | yes | The sub-account ID to filter by |
| `instrument` · lite `i` | string (instrument name) | no | The instrument filter to apply. |

## WSOrderbookLevelsFeedDataV1

| Field | Type | Required | Summary |
|---|---|---|---|
| `stream` · lite `s` | string | yes | The stream this frame belongs to, e.g. |
| `selector` · lite `s1` | string | yes | The selector this frame is for, as you subscribed with it. |
| `sequence_number` · lite `sn` | string (uint64) | yes | This frame's number, an unsigned 64-bit integer sent as a decimal string: compare it as an integer. |
| `feed` · lite `f` | [object OrderbookLevels](#orderbooklevels) | yes | An orderbook levels object matching the request filter |
| `prev_sequence_number` · lite `ps` | string (uint64) | yes | The `sequence_number` of the frame before this one on this selector. |

## WSOrderbookLevelsFeedSelectorV1

Subscribes to aggregated orderbook updates for a single instrument. The `book.s` channel offers simpler integration. To experience higher publishing rates, please use the `book.d` channel.
Unlike the `book.d` channel which publishes an initial snapshot, then only streams deltas after, the `book.s` channel publishes full snapshots at each feed.

The Delta feed will work as follows:

- On subscription, the server will send a full snapshot of all levels of the Orderbook.
- After the snapshot, the server will only send levels that have changed in value.

Subscription Pattern:

- Delta - `instrument@rate`
- Snapshot - `instrument@rate-depth`

Field Semantics:

- [DeltaOnly] If a level is not updated, level not published
- If a level is updated, \{size: '123'\}
- If a level is set to zero, \{size: '0'\}
- Incoming levels will be published as soon as price moves
- Outgoing levels will be published with `size = 0`

| Field | Type | Required | Summary |
|---|---|---|---|
| `instrument` · lite `i` | string (instrument name) | yes | The instrument name, e.g. |
| `rate` · lite `r` | integer (uint32) | yes | The minimal rate at which we publish feeds (in milliseconds) |
| `depth` · lite `d` | integer (uint32) | no | Depth of the order book to be retrieved |

## WSPositionsFeedDataV1

| Field | Type | Required | Summary |
|---|---|---|---|
| `stream` · lite `s` | string | yes | The stream this frame belongs to, e.g. |
| `selector` · lite `s1` | string | yes | The selector this frame is for, as you subscribed with it. |
| `sequence_number` · lite `sn` | string (uint64) | yes | This frame's number, an unsigned 64-bit integer sent as a decimal string: compare it as an integer. |
| `feed` · lite `f` | [object Positions](#positions) | yes | A Position being created or updated matching the request filter |
| `prev_sequence_number` · lite `ps` | string (uint64) | yes | The `sequence_number` of the frame before this one on this selector. |

## WSPositionsFeedSelectorV1

Subscribes to a feed of position updates.
Updates get published when a trade is executed, and when leverage configurations are changed for instruments with ongoing positions.
To subscribe to all positions, specify an empty `instrument` (eg. `2345123`).
Otherwise, specify the `instrument` to only receive positions for that instrument (eg. `2345123-BTC_USDT_Perp`).

| Field | Type | Required | Summary |
|---|---|---|---|
| `sub_account_id` · lite `sa` | string (uint64) | yes | The sub-account ID to filter by |
| `instrument` · lite `i` | string (instrument name) | no | The instrument filter to apply. |

## WSRfqQuoteFeedDataV1

| Field | Type | Required | Summary |
|---|---|---|---|
| `stream` · lite `s` | string | yes | The stream this frame belongs to, e.g. |
| `selector` · lite `s1` | string | yes | The selector this frame is for, as you subscribed with it. |
| `sequence_number` · lite `sn` | string (uint64) | yes | This frame's number, an unsigned 64-bit integer sent as a decimal string: compare it as an integer. |
| `feed` · lite `f` | [object RfqQuoteFeed](#rfqquotefeed) | yes | The taker's private quote book for their open RFQ on this instrument |
| `prev_sequence_number` · lite `ps` | string (uint64) | yes | The `sequence_number` of the frame before this one on this selector. |

## WSRfqQuoteFeedSelectorV1

Taker feed. Subscribe with selector `(sub_account_id, instrument)` to receive your private RFQ quote book — best bid/ask and all private quote levels — for your open RFQ on that instrument.

These private quotes are the makers' responses to your RFQ (created via ApiCreateRfqRequest). View them alongside the public order book (firm resting liquidity + public quotes) to decide, then accept by signing an order via create_order with `metadata.rfq_id` set.

Each update pertains to a single RFQ, uniquely identified by its `rfq_id`. A sub-account may hold at most one open RFQ per instrument, which is what lets this selector be keyed by `(sub_account_id, instrument)` alone, with no `rfq_id` required.

| Field | Type | Required | Summary |
|---|---|---|---|
| `sub_account_id` · lite `sa` | string (uint64) | yes | The sub-account ID to filter by |
| `instrument` · lite `i` | string (instrument name) | no | The instrument filter to apply. |

## WSSubscribeParams

The `params` of a WebSocket `subscribe` request: a stream and the selectors to subscribe to. Subscribing again to the same selector before `@` replaces the options after it.

Set `use_global_sequence_number` to true. Each frame's `sequence_number` is then unique across the exchange and you can chain frames with `prev_sequence_number`. With false, sequence numbers count up by one per stream and start again when the server you are connected to restarts.

| Field | Type | Required | Summary |
|---|---|---|---|
| `stream` · lite `s` | string | yes | The channel to subscribe to (eg: ticker.s / ticker.d) |
| `selectors` · lite `s1` | string[] | yes | The list of feeds to subscribe to |
| `use_global_sequence_number` · lite `ug` | bool | no | Whether to use the global sequence number for the stream |

## WSSubscribeRequestV1Legacy

All V1 Websocket Requests are housed in this wrapper. You may specify a stream, and a list of feeds to subscribe to.
If a `request_id` is supplied in this JSON RPC request, it will be propagated back to any relevant JSON RPC responses (including error).
When subscribing to the same primary selector again, the previous secondary selector will be replaced. See `Overview` page for more details.

| Field | Type | Required | Summary |
|---|---|---|---|
| `request_id` · lite `ri` | integer (uint32) | no | Optional Field which is used to match the response by the client. |
| `stream` · lite `s` | string | yes | The channel to subscribe to (eg: ticker.s / ticker.d) |
| `feed` · lite `f` | string[] | yes | The list of feeds to subscribe to |
| `method` · lite `m` | string | yes | The method to use for the request (eg: subscribe / unsubscribe) |
| `is_full` · lite `if` | bool | no | Whether the request is for full data or lite data |

## WSSubscribeResponseV1Legacy

All V1 Websocket Responses are housed in this wrapper. It returns a confirmation of the JSON RPC subscribe request.
If a `request_id` is supplied in the JSON RPC request, it will be propagated back in this JSON RPC response.
To ensure you always know if you have missed any payloads, Grvt servers apply the following heuristics to sequence numbers:

- All snapshot payloads will have a sequence number of `0`. All delta payloads will have a sequence number of `1+`. So its easy to distinguish between snapshots, and deltas
- Num snapshots returned in Response (per stream): You can ensure that you received the right number of snapshots
- First sequence number returned in Response (per stream): You can ensure that you received the first stream, without gaps from snapshots
- Sequence numbers should always monotonically increase by `1`. If it decreases, or increases by more than `1`. Please reconnect
- Duplicate sequence numbers are possible due to network retries. If you receive a duplicate, please ignore it, or idempotently re-update it.

When subscribing to the same primary selector again, the previous secondary selector will be replaced. See `Overview` page for more details.

| Field | Type | Required | Summary |
|---|---|---|---|
| `request_id` · lite `ri` | integer (uint32) | no | Optional Field which is used to match the response by the client. |
| `stream` · lite `s` | string | yes | The channel to subscribe to (eg: ticker.s / ticker.d) |
| `subs` · lite `s1` | string[] | yes | The list of feeds subscribed to |
| `unsubs` · lite `u` | string[] | yes | The list of feeds unsubscribed from |
| `num_snapshots` · lite `ns` | integer (uint32)[] | yes | The number of snapshot payloads to expect for each subscribed feed. |
| `first_sequence_number` · lite `fs` | string (uint64)[] | yes | The first sequence number to expect for each subscribed feed. |
| `latest_sequence_number` · lite `ls` | string (uint64)[] | yes | The sequence number of the most recent message in the stream. |

## WSSubscribeResult

To ensure you always know if you have missed any payloads, Grvt servers apply the following heuristics to sequence numbers:

- All snapshot payloads will have a sequence number of `0`. All delta payloads will have a sequence number of `1+`. So its easy to distinguish between snapshots, and deltas
- Num snapshots returned in Response (per stream): You can ensure that you received the right number of snapshots
- First sequence number returned in Response (per stream): You can ensure that you received the first stream, without gaps from snapshots
- Sequence numbers should always monotonically increase by `1`. If it decreases, or increases by more than `1`. Please reconnect
- Duplicate sequence numbers are possible due to network retries. If you receive a duplicate, please ignore it, or idempotently re-update it.

When subscribing to the same primary selector again, the previous secondary selector will be replaced. See `Overview` page for more details.

| Field | Type | Required | Summary |
|---|---|---|---|
| `stream` · lite `s` | string | yes | The channel to subscribe to (eg: ticker.s / ticker.d) |
| `subs` · lite `s1` | string[] | yes | The list of feeds subscribed to |
| `unsubs` · lite `u` | string[] | yes | The list of feeds unsubscribed from |
| `num_snapshots` · lite `ns` | integer (uint32)[] | yes | The number of snapshot payloads to expect for each subscribed feed. |
| `first_sequence_number` · lite `fs` | string (uint64)[] | yes | The first sequence number to expect for each subscribed feed. |
| `latest_sequence_number` · lite `ls` | string (uint64)[] | yes | The sequence number of the most recent message in the stream. |

## WSTickerFeedDataV1

| Field | Type | Required | Summary |
|---|---|---|---|
| `stream` · lite `s` | string | yes | The stream this frame belongs to, e.g. |
| `selector` · lite `s1` | string | yes | The selector this frame is for, as you subscribed with it. |
| `sequence_number` · lite `sn` | string (uint64) | yes | This frame's number, an unsigned 64-bit integer sent as a decimal string: compare it as an integer. |
| `feed` · lite `f` | [object Ticker](#ticker) | yes | A ticker matching the request filter |
| `prev_sequence_number` · lite `ps` | string (uint64) | yes | The `sequence_number` of the frame before this one on this selector. |

## WSTickerFeedSelectorV1

Subscribes to a ticker feed for a single instrument. The `ticker.s` channel offers simpler integration. To experience higher publishing rates, please use the `ticker.d` channel.
Unlike the `ticker.d` channel which publishes an initial snapshot, then only streams deltas after, the `ticker.s` channel publishes full snapshots at each feed.

The Delta feed will work as follows:

- On subscription, the server will send a full snapshot of the ticker.
- After the snapshot, the server will only send deltas of the ticker.
- The server will send a delta if any of the fields in the ticker have changed.

Field Semantics:

- [DeltaOnly] If a field is not updated, \{\}
- If a field is updated, \{field: '123'\}
- If a field is set to zero, \{field: '0'\}
- If a field is set to null, \{field: ''\}

| Field | Type | Required | Summary |
|---|---|---|---|
| `instrument` · lite `i` | string (instrument name) | yes | The instrument name, e.g. |
| `rate` · lite `r` | integer (uint32) | yes | The minimal rate at which we publish feeds (in milliseconds) |

## WSTradeFeedDataV1

| Field | Type | Required | Summary |
|---|---|---|---|
| `stream` · lite `s` | string | yes | The stream this frame belongs to, e.g. |
| `selector` · lite `s1` | string | yes | The selector this frame is for, as you subscribed with it. |
| `sequence_number` · lite `sn` | string (uint64) | yes | This frame's number, an unsigned 64-bit integer sent as a decimal string: compare it as an integer. |
| `feed` · lite `f` | [object Trade](#trade) | yes | A public trade matching the request filter |
| `prev_sequence_number` · lite `ps` | string (uint64) | yes | The `sequence_number` of the frame before this one on this selector. |

## WSTradeFeedSelectorV1

Subscribes to a stream of Public Trades for an instrument.

| Field | Type | Required | Summary |
|---|---|---|---|
| `instrument` · lite `i` | string (instrument name) | yes | The instrument name, e.g. |
| `limit` · lite `l` | integer (uint32) | yes | The limit to query for. |

## WSTransferFeedDataV1

Subscribes to a feed of transfer updates.

| Field | Type | Required | Summary |
|---|---|---|---|
| `stream` · lite `s` | string | yes | The stream this frame belongs to, e.g. |
| `selector` · lite `s1` | string | yes | The selector this frame is for, as you subscribed with it. |
| `sequence_number` · lite `sn` | string (uint64) | yes | This frame's number, an unsigned 64-bit integer sent as a decimal string: compare it as an integer. |
| `feed` · lite `f` | [object TransferHistory](#transferhistory) | yes | The transfer history matching the requested filters |
| `prev_sequence_number` · lite `ps` | string (uint64) | yes | The `sequence_number` of the frame before this one on this selector. |

## WSTransferFeedSelectorV1

Subscribes to a feed of transfers. This will execute when there is any transfer to or from the selected account.
To subscribe to a main account, specify the account ID (eg. `0x9fe3758b67ce7a2875ee4b452f01a5282d84ed8a`).
To subscribe to a sub-account, specify the main account and the sub-account dash separated (eg. `0x9fe3758b67ce7a2875ee4b452f01a5282d84ed8a-1920109784202388`).

| Field | Type | Required | Summary |
|---|---|---|---|
| `main_account_id` · lite `ma` | string (0x address) | yes | The main account ID to request for |
| `sub_account_id` · lite `sa` | string (uint64) | no | The sub-account ID to request for |

## WSUnsubscribeAllParams

All V1 Websocket Unsubscription Request to unsubscribe from all active websocket streams.

No fields.

## WSUnsubscribeAllResult

Returns a list of all rooms the client has unsubscribed from.

| Field | Type | Required | Summary |
|---|---|---|---|
| `stream_reference` · lite `sr` | [object StreamReference[]](#streamreference) | yes | The list of stream references unsubscribed from |

## WSUnsubscribeParams

All V1 Websocket Unsubscription Requests are housed in this wrapper. You may specify a stream, a list of feeds and whether those feeds use global sequence numbers to unsubscribe from.

| Field | Type | Required | Summary |
|---|---|---|---|
| `stream` · lite `s` | string | yes | The channel to unsubscribe from (eg: ticker.s / ticker.d) |
| `selectors` · lite `s1` | string[] | yes | The list of feeds to unsubscribe from |
| `use_global_sequence_number` · lite `ug` | bool | no | Whether to use the global sequence number for the stream |

## WSUnsubscribeResult

Returns a confirmation of all unsubscribes

| Field | Type | Required | Summary |
|---|---|---|---|
| `stream` · lite `s` | string | yes | The channel to subscribe to (eg: ticker.s / ticker.d) |
| `unsubs` · lite `u` | string[] | yes | The list of feeds unsubscribed from |

## WSWithdrawalFeedDataV1

Subscribes to a feed of withdrawal updates.

| Field | Type | Required | Summary |
|---|---|---|---|
| `stream` · lite `s` | string | yes | The stream this frame belongs to, e.g. |
| `selector` · lite `s1` | string | yes | The selector this frame is for, as you subscribed with it. |
| `sequence_number` · lite `sn` | string (uint64) | yes | This frame's number, an unsigned 64-bit integer sent as a decimal string: compare it as an integer. |
| `feed` · lite `f` | [object Withdrawal](#withdrawal) | yes | The Withdrawal object |
| `prev_sequence_number` · lite `ps` | string (uint64) | yes | The `sequence_number` of the frame before this one on this selector. |

## WSWithdrawalFeedSelectorV1

Subscribes to a feed of withdrawals. This will execute when there is any withdrawal from the selected account.
To subscribe to a main account, specify the account ID (eg. `0x9fe3758b67ce7a2875ee4b452f01a5282d84ed8a`).

| Field | Type | Required | Summary |
|---|---|---|---|
| `main_account_id` · lite `ma` | string (0x address) | yes | The main account ID to request for |

## Withdrawal

| Field | Type | Required | Summary |
|---|---|---|---|
| `from_account_id` · lite `fa` | string (0x address) | yes | The sub-account to withdraw from |
| `to_eth_address` · lite `te` | string (0x address) | yes | The ethereum address to withdraw to |
| `currency` · lite `c` | string | yes | The token currency to withdraw |
| `num_tokens` · lite `nt` | string | yes | The number of tokens to withdraw |
| `signature` · lite `s` | [object Signature](#signature) | yes | The signature of the withdrawal |

## WithdrawalHistory

| Field | Type | Required | Summary |
|---|---|---|---|
| `tx_id` · lite `ti` | string (uint64) | yes | The transaction ID of the withdrawal |
| `from_account_id` · lite `fa` | string (0x address) | yes | The sub-account to withdraw from |
| `to_eth_address` · lite `te` | string (0x address) | yes | The ethereum address to withdraw to |
| `currency` · lite `c` | string | yes | The token currency to withdraw |
| `num_tokens` · lite `nt` | string | yes | The number of tokens to withdraw |
| `signature` · lite `s` | [object Signature](#signature) | yes | The signature of the withdrawal |
| `event_time` · lite `et` | string (int64 unix ns) | yes | The timestamp of the withdrawal in unix nanoseconds |
| `l_1_hash` · lite `l1` | string | no | The finalized withdrawal transaction hash on L1, empty if the withdrawal is 'pending'. |
| `l_2_hash` · lite `l2` | string | yes | The transaction hash on L2 |
