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 preview.

instrument
string
required

The instrument.

side
enum<string>
required

Buy or sell.

Available options:
buy,
sell
qty
number
required

The quantity.

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.

Response

The preview. estimate is false where the provider computes the figure itself (a Tastytrade dry run) and true otherwise, and marginRequired is null when it isn't known. On the paper book, including a Demo, the figure is the initial margin the order adds under the account's risk policy: trdrs's own for a Demo, and the policy your venue published for an issued account. sufficient says whether the order fits the account's free collateral now, judged the same way the order is judged when it arrives: the paper book refuses an order that adds exposure when its margin, plus the commission of an order that fills now, doesn't fit. The figure stays an estimate, because the price and the free collateral can change before your order arrives. marginRequired and sufficient are null when there's no verdict: there's no price, a position can't be valued, the risk policy doesn't cover the instrument, or the order would be refused for another reason first. basis says which. A risk lock and your size limits aren't judged here.

The margin the order would need, and whether the account can cover it.

marginRequired
number | null
required

The margin the order would need, or null when it isn't known.

estimate
boolean
required

True when the figure is trdrs's estimate rather than the provider's own.

currency
string
required

The currency of the figure.

sufficient
boolean | null
required

Whether the account can cover the order, by the provider's own figures, or on the paper book by the same collateral check the order meets when it arrives. False means your interface should block the order. Null means there is no verdict and nothing blocks: the figure is unknown, or it can't be judged now.

basis
string

Where the figure comes from, or why it is unknown, where the provider says. The paper book names the risk policy version the figure was read from, or says why there is no verdict.