Skip to content
Tradable Quantity and Margin

Get Option Replace Order Calculation Factors

On the order amendment page of a margin-mode option, after the limit price changes, queries the account's available funds (taking the original order's usage into account) and the initial margin per contract, so the Broker App can estimate the quantity and required margin after amendment locally. The parameters are the same as Get Option Open Order Calculation Factors, plus the original order ID. The response also includes single_option_im_margin, calculated for the direction of the original order.

When you call this endpoint through WhaleCore requestService(), set requiresTradeToken to true.

GEThttps://api.lbkrs.com/v1/app/risk/opt_replace_order/calculation_factor_query_v2

Parameters

opt_counter_idstringqueryRequired

Option contract security ID (counter_id), such as OP/US/AAPL260724C110000

opt_pricestringqueryRequired

Option order price (premium per share) in the trading currency

currencystringqueryRequired

Trading (settlement) currency, such as USD

order_idstringqueryRequired

Original order ID

Responses

HTTP 200The request succeeded. The response body contains the result of the “Get Option Replace Order Calculation Factors” operation.
Standard response envelopecodemessagedata
dataobjectdata structure
aaidinteger

Asset account ID

available_financestring

Available funds including margin financing

available_cashstring

Available cash in the currency

max_buy_limitstring

Maximum buying power

long_single_option_im_marginstring

Unfilled initial margin per contract in the buy (long) direction

short_single_option_im_marginstring

Unfilled initial margin per contract in the sell (short) direction

single_option_im_marginstring

Unfilled initial margin per contract calculated for the direction of the original order. When it is returned, use it first: treat it as long_single_option_im_margin if the original order is a buy, or as short_single_option_im_margin if it is a sell

Whale Docs