List Orders
Retrieves orders for a specific subaccount, with various filtering options to narrow down the results based on order characteristics.
Method Declaration
Python
async def get_subaccount_orders(
self,
address: str,
subaccount_number: int,
ticker: Optional[str] = None,
ticker_type: TickerType = TickerType.PERPETUAL,
side: Optional[OrderSide] = None,
status: Optional[OrderStatus] = None,
type: Optional[OrderType] = None,
limit: Optional[int] = None,
good_til_block_before_or_at: Optional[int] = None,
good_til_block_time_before_or_at: Optional[str] = None,
return_latest_orders: Optional[bool] = None,
) -> Any
Unification Plan
Parameters
Parameter | Location | Type | Required | Description |
---|---|---|---|---|
address | query | Address | true | The wallet address that owns the account. |
subaccountNumber | query | SubaccountNumber | true | The identifier for the specific subaccount within the wallet address. |
limit | query | u32 | false | Maximum number of asset positions to return in the response. |
ticker | query | Ticker | false | The ticker filter. |
side | query | OrderSide | false | The order side filter. |
status | query | OrderStatus | false | The order status filter. |
type | query | OrderType | false | The order type filter. |
goodTilBlockBeforeOrAt | query | Height | false | The block number filter for orders good until before or at. |
goodTilBlockTimeBeforeOrAt | query | DateTime in UTC | false | The timestamp filter for orders good until before or at. |
returnLatestOrders | query | bool | false | Whether to return only the latest orders. |
Response
Status | Meaning | Schema | Description |
---|---|---|---|
200 | OK | ListOrdersResponse | The orders data. |
400 | Bad Request | The request was malformed or invalid. | |
404 | Not Found | The subaccount was not found. |
Examples: Guide - List Orders