Skip to content
Trading

Get Estimated Option Opening Quantity (Server-Side Margin Breakdown)

Before placing an option order, estimate the available opening quantity based on the current order parameters (underlying, direction, price, quantity, etc.), and return the margin breakdown calculated by the server (initial margin, expiry-day option margin add-on, multi-leg margin reduction, and estimated total margin).

GEThttps://api.lbkrs.com/v2/orders/stock_contract/available_open_quantity

Parameters

order_idstringquery

Original order id passed in when modifying an order

counter_idstringqueryRequired

Underlying code (option contract)

currencystringqueryRequired

Currency

actionintegerqueryRequired

Buy/sell direction:

  • 1 - Buy
  • 2 - Sell

12

order_typestringqueryRequired

Order type

pricestringqueryRequired

Order price submitted by the Client

quantitystringqueryRequired

Order quantity submitted by the Client

Responses

HTTP 200The request succeeded. The response body contains the result of the “Get estimated option opening quantity (server-side margin breakdown)” operation.
Standard response envelopecodemessagedata
dataobjectdata structure
cash_max_qtystring

Maximum opening quantity by cash

margin_max_qtystring

Maximum opening quantity by financing

im_marginstring

Initial margin

expiry_margin_raisestring

Expiry-day option margin add-on

compose_margin_reducestring

Multi-leg margin reduction

estimated_total_marginstring

Estimated total margin requirement

HTTP 400The service rejected the request because a business rule or input validation failed. Review the business codes and correct the request before retrying.
codeintegerrequired

Business status code, 0 indicates success

messagestringrequired

Human-readable result or error message.

Whale Docs