Skip to content
Order Page Setup

Get Position and Cash for Order Entry

Retrieves, when the order page loads, the position quantity, available quantity, and cost of the current account in a security, together with the cash in the specified currency, to show the position and the quantity available to sell. The returned quantity, average_cost, and diluted_avg_cost are inputs to Estimate Post-Trade Average Cost, and the sign of quantity determines position_side when estimating trading fees. When you call this endpoint through WhaleCore requestService(), set requiresTradeToken to true.

WhaleCore's orderService() wraps this endpoint as the typed method getTradeDetail. If you use WhaleCore, prefer that method.

GEThttps://api.lbkrs.com/v1/portfolio/asset/trade/detail

Parameters

counter_idstringqueryRequired

Security ID (counter_id), for example ST/US/AAPL or ST/HK/700

currencystringqueryRequired

Trading (settlement) currency, for example USD or HKD. Use the first item of channel_infos.settlement_currency returned by Get Order Configuration.

Responses

HTTP 200The request succeeded. The response body contains the result of the “Get Position and Cash for Order Entry” operation.
Standard response envelopecodemessagedata
dataobjectdata structure
counter_idstring

Security ID

currencystring

Currency

balancestring

Cash balance in this currency

available_cashstring

Available cash of the account

quantitystring

Position quantity. A negative value indicates a short position.

available_quantitystring

Available position quantity

average_coststring

Average purchase cost

diluted_avg_coststring

Diluted cost

underlying_available_quantitystring

For an option, the available position quantity of the underlying stock

Whale Docs