Skip to content
Fee Estimates

Estimate Trading Fees

Estimates the commission, third-party charges, and platform fee of a trade from the security, order price, quantity, and direction after the user changes the price or quantity on the order page, to show the estimated fees. The sum of the three can be passed as fee_amount to Estimate Post-Trade Average Cost. Do not call this endpoint when the price or quantity is 0. When you call this endpoint through WhaleCore requestService(), set requiresTradeToken to true.

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

GEThttps://api.lbkrs.com/v4/portfolio/current/estimatedcost

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.

pricestringqueryRequired

Order unit price in the trading currency. For a UK security quoted in GBX and traded in GBP, divide by 100 to convert to GBP first.

qtystringqueryRequired

Order quantity in shares

dirstringqueryRequired

Order direction:

  • 0 - Buy
  • 1 - Sell

01

account_channelstringqueryRequired

Broker channel

order_tagintegerquery

Order tag. Use tag from Get Order Configuration:

  • 1 - Regular order
  • 2 - Long-term order
  • 3 - Grey market order

123

order_typestringquery

Order type code, for example LO or MO

position_sidestringquery

Position side. Pass LONG when the current position is greater than 0 and SHORT when it is less than 0. With no position, pass LONG to buy and SHORT to sell.

LONGSHORT

Responses

HTTP 200The request succeeded. The response body contains the result of the “Estimate Trading Fees” operation.
Standard response envelopecodemessagedata
dataobjectdata structure
commissionstring

Estimated commission

thirdstring

Estimated third-party charges

platformstring

Estimated platform fee

Whale Docs