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, such as rithmic or paper. Omit it to use your default provider. An unknown value is refused with 400, never replaced with another provider.

account
string

The account number at that provider. It must be one of your own accounts, or the call is refused with 400.

Body

application/json

The order to size.

instrument
string
required

The instrument.

side
enum<string>
required

Buy or sell.

Available options:
buy,
sell
size
object
required

The account's money an order puts in: its margin with the commission its fill pays, in the account's currency, counted as the paper book counts it against free collateral. trdrs places the largest order that amount pays for, on the market's quantity step, so it puts in at most the amount. For a future with a micro or full-size twin the account trades (ES and MES, NQ and MNQ), it places on the twin where that puts in more of the amount, nearer what you asked for; an order placed with exits stays on the instrument you sent, since its exits are set for it. Only the paper book, including a Demo, sizes an order in money; another provider refuses it, invalid_request with the reason size_unsupported. An amount below the smallest order is refused with the reason size_below_minimum; POST /api/trading/order-size tells you the smallest beforehand.

orderType
string

The order type. Omit it for market.

limitPrice
number

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

triggerPrice
number

The trigger price, for a stop order.

withExits
boolean

True when the order will be placed with exits: it is then sized on the instrument you sent alone, as the order route sizes it.

Response

The order the amount would place now. The price and the free collateral can change before an order arrives, so the order is sized again when it does.

The order size would place now, and the range of money an order can put in.

instrument
string
required

The instrument it would be placed on: the one you sent, or its micro or full-size twin.

qty
number | null
required

Its quantity, or null when the amount is below the smallest order.

cost
string | null
required

What it would put in, its margin with its commission, or null with no quantity.

smallest
string | null
required

What the smallest order puts in, on the instrument or its twin, whichever is less; null when the market takes no order now.

available
string | null
required

The collateral the account has free, the most an order can put in; null when it couldn't be read.

currency
string
required

The currency of every amount, the account's.