latestOpenAPI 3.0.32026-08-224982,0272.8 MB

e445c15e5bee

Orders

Place Order

Places a new order. There are several types of orders available - Market, Limit, TWAP, SteadyPace, and Stop (the latter three optionally support a limit price). Orders can be funded by your account balance or on margin.

  • When an order with funding type "funded" is placed, funds will be reserved from your Go account for the amount of the order. You must have sufficient available balance in your Go account to place a funded order.
  • When an order with funding type "margin" is placed, funds will be reserved from your Margin Trade Account. You must have sufficient available margin (NOP limit) to place a margin order.
  • Stop orders require a triggerPrice. When the market reaches the trigger price, the order is activated. A stop order without a limitPrice executes as a market order (stop-market). A stop order with a limitPrice places a limit order at the specified price (stop-limit).
  • Buy orders can be placed in either base or quote currency. A buy in base currency specifies an exact quantity to purchase (e.g., "buy 1 BTC"), while a buy in quote currency specifies a total spend amount (e.g., "buy $10,000 of BTC"). Similarly, sell orders can be placed in either base or quote currency.
  • When no limitPrice is provided on a base-buy or quote-sell order, the system automatically computes a protective marketable limit price derived from the current reference price. This prevents orders from executing at an unexpectedly unfavorable price. For market (Sweep) orders, the computed limit is valid for a short window to avoid leaving orders open indefinitely if the market moves away. See our Trade Guide for more details on each order type and funding options.

Requires access token scope: trade_trade

post/api/prime/trading/v1/accounts/{accountId}/orders

Path parameters

accountIdstring required

The ID of the account

Request body

OR
OR
OR
OR

Example request

{
  "clientOrderId": "myorder1",
  "type": "market",
  "product": "BTC-USD",
  "side": "buy",
  "quantity": "10000",
  "quantityCurrency": "USD"
}

Response

An order

idstring uuid required

Unique identifier for the order. Used to reference the order in other endpoints.

accountIdstring required

The ID of the account

enterpriseIdstring required
initiatedByUserIdstring required
canceledByUserIdstring required
clientOrderIdstring required

Custom order ID provided by the client. This must be a unique ID for each individual order and cannot be the same across multiple requests. Can be used to ensure idempotency of order requests.

timestring date-time required
creationDatestring date-time required
scheduledDatestring date-time required

Date to schedule the order. If not provided, the order will be placed immediately.

lastFillDatestring date-time required
completionDatestring date-time required
settleDatestring date-time required
fundingType'margin' | 'funded' required

The funding type of the order.

  • Funded orders will be placed using the Go account balance.
  • Margin orders will be placed using the margin account balances. See our Trade Guide for more details on each funding type.
type'market' | 'twap' | 'limit' | 'steady_pace' | 'stop' required

The type of order to be placed. See our Trade Guide for more details on each order type.

timeInForce'GTC' | 'IOC' | 'FOK' | 'GTD' required

Time in force policy for the order.

  • GTC (Good Till Cancelled): Order remains active until filled or cancelled.
  • IOC (Immediate or Cancel): Order fills as much as possible immediately, any unfilled remainder is cancelled.
  • FOK (Fill or Kill): The entire order must be filled immediately or it is cancelled completely. Unlike IOC, no partial fills are accepted.
  • GTD (Good Till Date): Order remains active until filled, cancelled, or the specified duration expires. Requires duration to be set.
status'pending_open' | 'open' | 'completed' | 'pending_cancel' | 'canceled' | 'error' | 'scheduled' required
reason'internalError' | 'insufficientFunds' required

Reason for order cancellation. 'internalError' indicates an error occurred within the server while processing the order, resulting in an order cancellation. 'insufficientFunds' indicates that the order was cancelled due to shortage of funds to complete the transaction.

reasonDescriptionstring required
productstring required

Product name e.g. BTC-USD (base-quote)

side'buy' | 'sell' required

The side of the order

quantitystring decimal required

The specified quantity.

quantityCurrencystring required

The specified quantity currency.

filledQuantitystring decimal required

The total base quantity filled.

filledQuoteQuantitystring decimal required

The total quote quantity filled.

leavesQuantitystring decimal required

For orders created with base currency, this field is set to the remaining unfilled base quantity.

  • Only one of leavesQuantity or leavesQuoteQuantity will be set.
  • This field is set to null for orders created with quote currency.
leavesQuoteQuantitystring decimal required

For orders created with quote currency, this field is set to the remaining unfilled quote quantity.

  • Only one of leavesQuantity or leavesQuoteQuantity will be set.
  • This field is set to null for orders created with base currency.
averagePricestring decimal required

The average price for the order's trades.

limitPricestring decimal required

The limit price. It always refers to the quote currency.

  • It's maximum precision is determined by the product's quoteDisplayPrecision field, which can be fetched from the list products endpoint.
triggerPricestring decimal

The trigger price for stop orders. When the market reaches this price, the stop order is activated.

  • For buy stop-limit orders, triggerPrice must be less than or equal to limitPrice.
  • For sell stop-limit orders, triggerPrice must be greater than or equal to limitPrice.
  • It always refers to the quote currency.
durationinteger required

Duration of the order in minutes.

twapIntervalinteger required

Interval length of the TWAP order in minutes.

rtIdstring required

The request tracking ID associated with the order.

notesstring required

Additional notes associated with the order.

Example response

{
  "id": "67fd640c-cb6c-4218-80ae-49e79ec15646",
  "accountId": "60e740e7898f7d00064d43769a73dc48",
  "enterpriseId": "129841a2143f99c3229c1f4x590396b4",
  "initiatedByUserId": "1203c28030c4320a4b90255b4683ecq6",
  "canceledByUserId": null,
  "clientOrderId": "myorderid1",
  "time": "2025-11-25T23:12:18.210507Z",
  "creationDate": "2025-11-25T23:12:18.210507Z",
  "scheduledDate": null,
  "lastFillDate": "2025-11-25T23:12:17.642764Z",
  "completionDate": "2025-11-25T23:12:17.642764Z",
  "settleDate": null,
  "fundingType": "funded",
  "type": "market",
  "timeInForce": null,
  "status": "completed",
  "reason": null,
  "reasonDescription": null,
  "product": "BTC-USD",
  "side": "buy",
  "quantity": "1000",
  "quantityCurrency": "USD",
  "filledQuantity": "0.02457152",
  "filledQuoteQuantity": "1000",
  "leavesQuantity": null,
  "leavesQuoteQuantity": "0",
  "averagePrice": "40697.32",
  "limitPrice": null,
  "triggerPrice": null,
  "duration": null,
  "twapInterval": null,
  "rtId": null,
  "isFinanced": false,
  "notes": null
}