Skip to main content

WEBSOCKET API Trading - Get open orders

WEBSOCKET API Trading - Get open orders

Written by Albert
Updated today

Get open orders

Connection

URL:

/frontoffice/ws/v4/account?access_token={YOUR_ACCESS_TOKEN}

arguments array

The connection parameters.

In the first element, provide the accountId as a string.

invocationId string

The invocation identifier.

Must be unique and increase by 1 for each sent message.

target string

The stream name.

Specify "OpenOrders".

type int

The operation type.

Set to 4 to indicate a subscription to the stream.

Example:

{
"arguments": [
"67d0456f8c7b1108e4cf5d46"
],
"invocationId": "0",
"target": "OpenOrders",
"type": 4
}


Message

type string

The operation type.

2 indicates the streaming is in progress.

invocationId string

The invocation identifier. Same as in the request.

item array of objects

The array of market objects.

item.marketId string

The market identifier, in the following format: {marketType}.{baseAssetId}_{quoteAssetId}, for example: cfd.eth_eur.

item.marketType string

The market type.

Possible values:

  • Spot

  • Cfd

  • Perp

item.marketDisplayName string

The market ticker.

item.marketFullName string

The market full name or description (optional).

item.orderId string

The unique identifier of the order assigned by the system.

item.timeInForce string

The time-in-force policy for the order, controlling its lifetime.

Possible values:

  • Gtc

  • Ioc

  • Fok

  • Gtd

  • Day

item.status string

The current order status.

Possible values:

  • Started

  • Pending

  • Working

item.source string

The source of the order.

Possible values:

  • Manual β€” the order was created manually via UI or API.

item.reason string

The reason for placing the order.

Possible values:

  • Trader

  • StopOut

  • MarketHalted

  • MarketDisabled

  • TakeProfit

  • StopLoss

  • Admin

item.side string

The order side, indicating the direction of the trade.

Possible values:

  • Buy

  • Sell

item.orderType string

The order type.

Possible values:

  • Market

  • Limit

item.requestedAmount decimal string

The quantity of the base asset to buy or sell. For market orders, this represents the total base amount to fill; the executed amount may be lower if liquidity is insufficient.

item.remainingAmount decimal string

The order amount that hasn't yet been filled, in the base asset.

item.requestedPrice decimal string

The limit price for Limit orders; null for Market orders.

item.executionPrice decimal string

The volume-weighted average price of the order executions.

item.createdAt dateTime

The timestamp when the order was created, in ISO 8601 format.

item.updatedAt dateTime

The timestamp of the most recent update to the order, in ISO 8601 format.

item.cancellationDate dateTime

The timestamp when the order was cancelled or expired, in ISO 8601 format; null if not cancelled.

item.commissionAssetId string

The currency in which the commission was held.

item.commissionAmount decimal string

The total commissions put on hold for executing the order.

item.leverage int

Applicable only to CFD markets.

The leverage ratio used when placing the order.

item.fillFactor decimal string

The proportion of the order amount filled so far, where 1 represents 100% fulfillment.

item.takeProfit decimal string

The Take Profit price, if set.

item.stopLoss decimal string

The Stop Loss price, if set.

{
"type": 2,
"invocationId": "0",
"item": [
{
"marketId": "cfd.eur_chf",
"marketType": "Cfd",
"marketDisplayName": "EUR/CHF",
"marketFullName": "",
"orderId": "01JVQBFSTVC40VK03A0AY7K016",
"timeInForce": "Gtc",
"status": "Pending",
"source": "Manual",
"reason": "Trader",
"side": "Buy",
"orderType": "Limit",
"requestedAmount": "10000",
"remainingAmount": "10000",
"requestedPrice": "0.9",
"executionPrice": "0",
"createdAt": "2025-05-20T17:22:31.899Z",
"updatedAt": "2025-05-20T17:22:31.9001213Z",
"cancellationDate": null,
"commissionAssetId": "eur",
"commissionAmount": "0",
"leverage": 1,
"fillFactor": "0",
"takeProfit": null,
"stopLoss": null
}
]
}

Did this answer your question?