NewOrderSingle
ANewOrderSingle message allows a user to submit an order and receive execution reports over the same WebSocket session. Currently MARKET and LIMIT order types are supported.
Example request:
Request parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
messageType | string | Yes | NewOrderSingle |
timestamp | string (date-time) | Yes | RFC3990 date-time string |
clOrderId | string | Yes | Client order ID, must be unique; recommend UUID |
accountId | string | Yes | Anchorage brokerage account ID |
symbol | string | Yes | Trading symbol, e.g. "BTC-USD" |
side | "BUY" | "SELL" | Yes | Side for the order |
orderQty | string | Yes | Order quantity |
currency | string | Yes | Currency the order quantity is specified in; can be either side of the symbol |
orderType | "MARKET" | "LIMIT" | Yes | Order type |
limitPrice | string | No | Limit price; required if orderType is LIMIT |
timeInForce | "FOK" | "GTC" | "IOC" | No | FOK = Fill Or Kill, GTC = Good Till Cancel, IOC = Immediate Or Cancel |
Response parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
messageType | string | Yes | ExecutionReport |
timestamp | string (date-time) | Yes | RFC3990 date-time string |
clOrderId | string | Yes | Client order ID as specified on the order request |
orderId | string | Yes | Anchorage order ID |
accountId | string | Yes | Anchorage brokerage account ID |
symbol | string | Yes | Trading symbol as specified on the order request |
side | "BUY" | "SELL" | Yes | Order side as specified on the order request |
orderQty | string | Yes | Order quantity as specified on the order request |
currency | string | Yes | Currency as specified on the order request |
orderType | "MARKET" | "LIMIT" | Yes | Order type as specified on the order request |
limitPrice | string | No | Limit price as specified on the order request |
timeInForce | "FOK" | "GTC" | "IOC" | No | Time in force as specified on the order request |
orderStatus | string | Yes | PENDING, NEW, REJECTED, PENDING_CANCEL, CANCELED, FILLED, PARTIALLY_FILLED |
execId | string | No | Execution ID, can be used to query for trades |
execType | string | No | NEW, FILL, CANCEL, REJECT, CANCEL_REJECT |
avgPx | string | No | Average price of filled portion of the order |
avgPxAllIn | string | No | Average price including fees of filled portion |
cumQty | string | Yes | Cumulative quantity filled |
fillPx | string | No | Fill quantity of this execution (execType="FILL") |
fillQty | string | No | Fill price of this execution (excluding fees) |
leavesQty | string | Yes | Leaves quantity of this order |
cancelQty | string | No | Canceled quantity of this order |
fee | string | No | Anchorage commission charged for this execution |
feeCurrency | string | No | Currency that the commission is charged in |
rejectReason | string | No | Reason for rejection |
rejectReasonText | string | No | Additional description for reason of reject |
submitTime | string (date-time) | Yes | Order submission time in RFC3990 format |
transactTime | string (date-time) | No | Transaction time in RFC3990 format |
CancelOrderRequest
Cancel an order.origClOrderId and accountId must match the original order request. orderId must match the order ID returned on execution reports.
Cancel requests on any completed order will be rejected.
Example cancel request:
Request parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
messageType | string | Yes | OrderCancelRequest |
timestamp | string (date-time) | Yes | RFC3990 date-time string |
origClOrderId | string | Yes | Client order ID as specified on the order request |
orderId | string | Yes | Anchorage order ID |
accountId | string | Yes | Anchorage brokerage account ID as specified on the order request |
ExecutionReportResendRequest
Resend execution reports for an order. Allows a client to request execution reports for a live or completed order. If the order is completed, all previous execution reports are sent again. If the order is still alive, in addition to any previous execution reports, newer reports will be streamed on this WebSocket as they occur. Use this to synchronize order states after a WebSocket disconnect. Example resend request:Request parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
messageType | string | Yes | ExecutionReportResendRequest |
timestamp | string (date-time) | Yes | RFC3990 date-time string |
origClOrderId | string | Yes | Client order ID as specified on the order request |
orderId | string | Yes | Anchorage order ID |
accountId | string | Yes | Anchorage brokerage account ID as specified on the order request |

