Skip to main content
POST
TypeScript

Authorizations

Authorization
string
header
required

The Trading API key (trdrs_sk_…), for market data, orders and account state on the accounts its owner holds. Use it server-to-server, and keep it on your server. Its scope is named trading in the API.

Query Parameters

provider
string

The provider the account is at. Omit it to use your default provider.

account
string

The account number at that provider. It must be one of your own accounts.

Body

application/json

The order to place. Send a new clientOrderId for each order you mean to place, and the same one when you retry it.

instrument
string
required

The instrument, as GET /api/account/markets names it, or any other symbol of the same market.

side
enum<string>
required

Buy or sell.

Available options:
buy,
sell
qty
number
required

The quantity, positive.

clientOrderId
string
required

Your own id for this order, and its idempotency key. Keep it the same across retries of one order.

orderType
enum<string>
default:market

The order type. Omit it for a market order.

Available options:
market,
limit,
stop,
stop_limit
limitPrice
number

The limit price, for a limit order.

triggerPrice
number

The trigger price, for a stop or stop-limit order.

stopLimitPrice
number

The limit price a stop-limit order rests at once its trigger is hit.

exits
object

The take profits and stop losses to place with the order. Distances are measured from the entry's own price, or the market's for a market order.

Example:
tif
enum<string>

The time in force.

Available options:
day,
gtc
reduceOnly
boolean

Close only: the order can shrink the position and never open or add to it. It carries no exits.

Response

The order is placed. bracket is the bracket placed with it, or null. The account stream carries the whole bracket at the same revision, with its ladders and the orders resting for it.

The order you placed.

providerOrderId
string
required

The order id at the provider.

filledQty
number
required

How much filled at once.

avgFillPrice
number
required

The average fill price of what filled at once.

bracket
object | null
required

The bracket placed with the order, or null for an order placed without one.

Example: