Place Order

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

Places a new order. There are several types of orders available - Market, Limit, TWAP and SteadyPace (with or without a limit). Orders can only be placed if your account has a sufficient balance. When an order is placed, funds will be reserved for the amount of the order.

Path Parameters

  • accountIdstringRequired
    The id of the trading account to retrieve

Request Body

One of
clientOrderId string
Custom order ID. This must be a unique ID associated with an order and cannot be the same across multiple requests.
Max length: <= 256 characters
product string required
Product name e.g. BTC-USD
type string required
Must be set to "market"
fundingType string required
The funding type of the order. Funded orders will be placed with the user's available balance. Margin orders will be placed with the user's margin balance.
Allowed values: margin funded
Default: funded
side string required
Side of a trade, from the perspective of the requesting user
Allowed values: buy sell
Example: buy
quantity string <decimal>required
quantityCurrency string required
The quantity currency must be in quote currency for buy and base currency for sell. e.g. If product is BTC-USD, the base currency will be BTC.

200 Response

id string <uuid>required
accountId string required
clientOrderId string
time string <date-time>required
DEPRECATED
creationDate string <date-time>required
scheduledDate string <date-time>
lastFillDate string <date-time>
completionDate string <date-time>required
settleDate string <date-time>
type string required
fundingType string required
The funding type of the order. Funded orders will be placed with the user's available balance. Margin orders will be placed with the user's margin balance.
Allowed values: margin funded
Default: funded
status string required
Allowed values: pending_open open completed pending_cancel canceled error scheduled
product string required
Product name e.g. BTC-USD
side string required
Side of a trade, from the perspective of the requesting user
Allowed values: buy sell
Example: buy
quantity string <decimal>required
The specified quantity.
quantityCurrency string required
The specified quantity currency.
filledQuantity string <decimal>required
The base quantity that was filled.
filledQuoteQuantity string <decimal>required
The quote quantity that was filled.
averagePrice string <decimal>required
limitPrice string <decimal>
duration integer
Duration of the order in minutes.
twapInterval integer
Interval length of the TWAP order in minutes.
reason string
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.
Allowed values: internalError insufficientFunds
Example: insufficientFunds
parameters object
isTimeSliced boolean
The isTimeSliced field, when provided under the parameters section, determines the order's time slicing behavior: - If isTimeSliced is set to true, the order will be executed using a time-sliced strategy. - If isTimeSliced is set to false, the order will be executed using a regular TWAP strategy without time slicing. - If isTimeSliced is not specified, the default behavior uses a regular TWAP strategy without time slicing.
boundsControl string
The boundsControl field, when provided under the parameters section, determines how strictly the TWAP algorithm adheres to the target fill progression. - It is optional but can be provided for a regular TWAP strategy. - Default value is `standard`.
Allowed values: narrow standard wide
interval integer required
The interval for the SteadyPace order, specified in conjunction with the interval unit.
intervalUnit string required
The unit of time for the interval. Defaults to "minute".
Allowed values: second minute hour
subOrderSize string required
The size of each sub-order in the SteadyPace order.
variance number
Optional degree of randomization for sub-order sizes. Accepts a decimal value rounded to two decimal places between 0 and 1, representing the variation in the size of each sub-order. For example, a value of 0.20 indicates a 20% variance.

default Response

error string required
errorName string required
reqId string required