Get Open Orders
Retrieve all currently open orders for the authenticated subaccount. This endpoint returns only active orders (not filled or cancelled), with optional filtering by symbol. Note: side, type, and status params are accepted in the request but are not forwarded to the backend and have no filtering effect.
Endpoint
POST https://papi.synthetix.io/v1/tradeRequest
Request Format
{
"params": {
"action": "getOpenOrders",
"subAccountId": "1867542890123456789",
"symbol": "BTC-USDT",
"limit": 50,
"offset": 0
},
"expiresAfter": 1704067500,
"signature": {
"v": 28,
"r": "0x19480589384695193600abcdef19480589384695193600abcdef19480589384695193600abcdef19480589384695193600abcdef",
"s": "0xabcdef19480589384695193600abcdef19480589384695193600abcdef19480589384695193600abcdef19480589384695193600"
}
}Request Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
params | object | Yes | Request parameters wrapper |
params.action | string | Yes | Must be "getOpenOrders" |
params.subAccountId | string | Yes | SubAccount ID to retrieve orders for |
params.symbol | string | No | Filter orders by specific market symbol (e.g., "BTC-USDT") |
params.side | string | No | Accepted but currently has no filtering effect |
params.type | string | No | Accepted but currently has no filtering effect |
params.status | string | No | Accepted but currently has no filtering effect |
params.limit | integer | No | Maximum number of orders to return (default: 50) |
params.offset | integer | No | Number of orders to skip for pagination (default: 0) |
| Parameter | Type | Required | Description |
|---|---|---|---|
nonce | uint64 | Yes* | Positive integer nonce (must be incrementing and unique per request) |
signature | object | Yes | EIP-712 signature object |
expiresAfter | uint64 | No | Unix milliseconds expiration timestamp (5x rate limit on stale cancels) |
:::info Common Parameters
These are top-level request parameters. The subAccountId parameter is specified within the params object (see each endpoint's parameter table).
:::
:::info SubAccountAction Endpoints
Endpoints using SubAccountAction signing (getPositions, getOpenOrders, getOrderHistory, getTrades, getFundingPayments, getSubAccount, getSubAccounts, getDelegatedSigners, getBalanceUpdates, getWithdrawableAmounts, getFeeRate, getSnaxpotEpochTickets) do not require the nonce parameter. Only signature and optional expiresAfter are needed.
:::
Response
Response Structure
| Field | Type | Description |
|---|---|---|
status | string | Always "ok" for successful requests or "error" for failures |
response | array | Array of open order objects matching filter criteria (omitted when status is "error") |
error | object | Error details (only present when status is "error") |
request_id | string | Request tracking identifier |
Success Response
{
"status": "ok",
"response": [
{
"order": {
"venueId": "1958787130134106112",
"clientId": "cli-1958787130134106112"
},
"orderId": "1958787130134106112",
"symbol": "BTC-USDT",
"side": "buy",
"type": "LIMIT",
"quantity": "0.1",
"price": "45000.00",
"triggerPrice": "",
"triggerPriceType": "",
"timeInForce": "GTC",
"reduceOnly": false,
"postOnly": false,
"closePosition": false,
"createdTime": 1755846234000,
"updatedTime": 1755846234000,
"filledQuantity": "0.0",
"takeProfitOrder": {
"venueId": "1958787130134106115",
"clientId": "cli-1958787130134106115"
},
"takeProfitOrderId": "1958787130134106115",
"stopLossOrder": {
"venueId": "1958787130134106116",
"clientId": "cli-1958787130134106116"
},
"stopLossOrderId": "1958787130134106116"
},
{
"order": {
"venueId": "1958787130134106113",
"clientId": "cli-1958787130134106113"
},
"orderId": "1958787130134106113",
"symbol": "ETH-USDT",
"side": "sell",
"type": "limit",
"quantity": "2.0",
"price": "2800.00",
"triggerPrice": "",
"triggerPriceType": "",
"timeInForce": "GTC",
"reduceOnly": false,
"postOnly": true,
"closePosition": false,
"createdTime": 1755846235000,
"updatedTime": 1755846235000,
"filledQuantity": "0.5"
},
{
"order": {
"venueId": "1958787130134106120",
"clientId": "cli-1958787130134106120"
},
"orderId": "1958787130134106120",
"symbol": "BTC-USDT",
"side": "buy",
"type": "limit",
"quantity": "1.0",
"price": "45000.00",
"triggerPrice": "",
"triggerPriceType": "",
"timeInForce": "GTC",
"reduceOnly": false,
"postOnly": false,
"closePosition": false,
"createdTime": 1755846236000,
"updatedTime": 1755846240000,
"filledQuantity": "0.5",
"expiresAt": 1755850000000
}
],
"request_id": "5ccf215d37e3ae6d"
}Empty Result
{
"status": "ok",
"response": [],
"request_id": "5ccf215d37e3ae6f"
}Order Object Fields
| Field | Type | Description |
|---|---|---|
order | object | Canonical order identifier object |
order.venueId | string | Canonical venue-generated order identifier |
order.clientId | string | Optional client-provided order identifier |
orderId | string | Deprecated legacy order identifier (venue ID string) |
symbol | string | Trading pair symbol (e.g., "BTC-USDT") |
side | string | Order side: "buy" or "sell" |
type | string | Order type (e.g., "LIMIT", "MARKET", "TWAP") |
quantity | string | Total order quantity |
price | string | Order price (empty for market orders) |
triggerPrice | string | Trigger price for conditional orders (populated for stop market, stop limit, take profit limit, take profit market; omitted for non-conditional orders) |
triggerPriceType | string | Reference price used to evaluate the trigger: "mark" or "last" |
timeInForce | string | Time in force: "GTC", "IOC", or "FOK" |
reduceOnly | boolean | Whether order can only reduce position |
postOnly | boolean | Whether order must be maker (no immediate match) |
closePosition | boolean | Whether order closes entire position |
createdTime | integer | Order creation timestamp (Unix milliseconds) |
updatedTime | integer | Last update timestamp (Unix milliseconds) |
filledQuantity | string | Quantity that has been filled |
takeProfitOrder | object | Canonical linked take-profit order identifier object |
takeProfitOrderId | string | Deprecated linked take-profit venue ID |
stopLossOrder | object | Canonical linked stop-loss order identifier object |
stopLossOrderId | string | Deprecated linked stop-loss venue ID |
expiresAt | integer | Order expiration timestamp (Unix milliseconds); omitted when the order has no explicit expiry |
twapDetails | object | TWAP execution progress. Present only on orders with type: "TWAP"; omitted for all other order types. See TWAP Progress |
Migration Note: Use order.venueId as the canonical order ID. Legacy orderId, takeProfitOrderId, and stopLossOrderId fields are deprecated compatibility fields.
Note on TP/SL Fields: When orders are placed with normalTpsl or positionTpsl grouping, the entry order will contain takeProfitOrder / stopLossOrder linking to the associated TP/SL trigger orders. Deprecated takeProfitOrderId / stopLossOrderId are still returned for compatibility.
TWAP Progress
For orders with type: "TWAP", the response item includes an additional twapDetails object that carries live execution progress for the parent TWAP order.
| Field | Type | Description |
|---|---|---|
averagePrice | string | Volume-weighted average fill price across all filled chunks so far. "0" when no chunks have filled yet |
intervalMs | integer | Chunk firing interval in milliseconds |
intervalVarianceBps | integer | Configured timing interval variance in basis points. Omitted when zero |
sizeVarianceBps | integer | Configured size variance in basis points. Omitted when zero |
totalTrades | integer | Total number of chunks the TWAP will submit |
tradesFilled | integer | Number of chunks that have received at least one fill |
totalFees | string | Cumulative fees paid across all filled chunks |
startedAtMs | integer | Unix milliseconds timestamp when the TWAP began executing |
totalDurationMs | integer | Total execution window in milliseconds (totalTrades × intervalMs) |
twapDetails is omitempty — it is absent from the response for non-TWAP order types.
Example — TWAP Open Order
{
"order": { "venueId": "10000000123", "clientId": "" },
"orderId": "10000000123",
"symbol": "BTC-USDT",
"side": "buy",
"type": "TWAP",
"quantity": "1.5",
"price": "0",
"triggerPrice": "0",
"triggerPriceType": "",
"timeInForce": "GTC",
"reduceOnly": false,
"postOnly": false,
"closePosition": false,
"createdTime": 1713800000000,
"updatedTime": 1713800030000,
"filledQuantity": "0.5",
"twapDetails": {
"averagePrice": "63250.50",
"intervalMs": 60000,
"totalTrades": 60,
"tradesFilled": 20,
"totalFees": "12.45",
"startedAtMs": 1713800000000,
"totalDurationMs": 3600000
}
}Error Response
{
"status": "error",
"error": {
"code": "INVALID_FORMAT",
"message": "Invalid request body"
},
"request_id": "5ccf215d37e3ae6d"
}Usage Examples
Get All Open Orders
{
"params": {
"action": "getOpenOrders",
"subAccountId": "1867542890123456789"
},
"expiresAfter": 1704067500,
"signature": { "v": 28, "r": "0x...", "s": "0x..." }
}Get Open Orders for Specific Market
{
"params": {
"action": "getOpenOrders",
"subAccountId": "1867542890123456789",
"symbol": "BTC-USDT"
},
"expiresAfter": 1704067500,
"signature": { "v": 28, "r": "0x...", "s": "0x..." }
}Get Open Buy Orders with Pagination
{
"params": {
"action": "getOpenOrders",
"subAccountId": "1867542890123456789",
"side": "buy",
"limit": 100,
"offset": 0
},
"expiresAfter": 1704067500,
"signature": { "v": 28, "r": "0x...", "s": "0x..." }
}EIP-712 Signature
const domain = {
name: "Synthetix",
version: "1",
chainId: 1,
verifyingContract: "0x0000000000000000000000000000000000000000"
};
const types = {
SubAccountAction: [
{ name: "subAccountId", type: "uint256" },
{ name: "action", type: "string" },
{ name: "expiresAfter", type: "uint256" }
]
};
const message = {
subAccountId: "1867542890123456789",
action: "getOpenOrders",
expiresAfter: 0
};
const signature = await signer._signTypedData(domain, types, message);Implementation Notes
- Returns only active orders (placed, partially filled)
- Does not include filled, cancelled, or rejected orders
- For historical orders with time ranges and status filters, use
getOrderHistory - Pagination uses limit/offset approach (default limit: 50)
- Orders are returned in creation order (newest first)
- Authentication requires signature by account owner or authorized delegate
- Linked TP/SL orders: use
takeProfitOrder.venueIdandstopLossOrder.venueIdas canonical IDs (takeProfitOrderId/stopLossOrderIdremain deprecated compatibility fields)
Signing
All trading methods are signed using EIP-712. Each successful trading request will contain:
- A piece of structured data that includes the sender address
- A signature of the hash of that structured data, signed by the sender
For detailed information on EIP-712 signing, see EIP-712 Signing.
Nonce Management
The nonce system prevents replay attacks and ensures order uniqueness:
- Use any positive integer as nonce
- Each nonce must be greater than the previous one (incrementing)
Date.now()is a convenient option, not a requirement- If nonce conflicts occur, increment by 1 and retry
:::note SubAccountAction Exception
SubAccountAction endpoints (getPositions, getOpenOrders, getOrderHistory, getTrades, getFundingPayments, getSubAccount, getSubAccounts, getDelegatedSigners, getBalanceUpdates, getWithdrawableAmounts, getFeeRate, getSnaxpotEpochTickets) do not require a nonce. Only the signature and optional expiresAfter parameters are needed.
:::
Error Handling
Common error scenarios:
| Error Code | Description | Retryable |
|---|---|---|
UNAUTHORIZED | EIP-712 signature validation failed | No |
VALIDATION_ERROR | Request validation failed | No |
MISSING_REQUIRED_FIELD | Required field is missing | No |
INVALID_FORMAT | Field format is invalid | No |
INVALID_VALUE | Invalid parameter value | No |
RATE_LIMIT_EXCEEDED | Too many requests in time window | Yes |
INSUFFICIENT_MARGIN | Not enough margin for trade | No |
ORDER_NOT_FOUND | Order does not exist | No |
OPERATION_TIMEOUT | Operation timed out | Yes |
| Error | Description |
|---|---|
| Invalid request format | Request payload could not be parsed |
| Internal error | Failed to retrieve orders |
| Subaccount not found | Specified subaccount does not exist |
Invalid symbol (INVALID_FORMAT) | Symbol is malformed — message is "market name invalid" or "market name empty" |
| Invalid pagination | Limit or offset out of valid range |
Comparison with getOrderHistory
| Feature | getOpenOrders | getOrderHistory |
|---|---|---|
| Purpose | Currently open orders only | All orders with comprehensive history |
| Time Filtering | Not supported | startTime/endTime range |
| Status Filtering | Param accepted, no effect | Multiple status filters |
| Default Scope | Active orders only | Latest 7-day window when time bounds are omitted |
| Use Case | Real-time order management | Historical analysis and reporting |
| Sorting | Creation order (newest first) | Configurable sort fields/order |