Skip to content
Custodian Query

Estimate Settlement Channel and Sub-Position

Given the asset account, side, open/close type, and trading counter, infer the settlement channel and sub-position (large account) that this trade should use. This only computes a suggestion and writes nothing.

Request parameters

  • Required: aaid (asset account ID), direction (side), open_close (open/close), counter_id (trading counter)
  • See each field's description for format, value range, and business meaning.

Result

On success, returns the inferred settlement channel and sub-position (large account). See the response definition below for field meanings.

POSThttps://b-api.lbkrs.com/clearing/get_settlement_and_sub_position

Authorization

AuthorizationstringheaderRequired

Send the Broker ACCESS_TOKEN as Authorization: Bearer <token>.

Permission

lb_hk_clearing.clearing_busin_steps

The Broker ACCESS_TOKEN must be granted the permission above, or the call will be rejected.

Request body application/json

aaidintegerrequired

Asset account ID identifying the account for this trade. This field is required.

Pass the internal numeric ID of the customer's securities account (aaid), not the securities account number account_no (such as H00000000) or the customer ID member_id. One customer can have multiple aaid values.

directionintegerrequired

Trade direction. This field is required.

Allowed values: 1 Buy, 2 Sell

Values
1
Buy
2
Sell
open_closestringrequired

Open or close type. This field is required.

Values
OPEN
Open
CLOSE
Close
counter_idstringrequired

Trading counter identifier. This field is required.

Responses

HTTP 200The request was processed successfully. data contains the settlement channel and sub-position information.
Standard response envelopecodemessagedata
dataobjectdata structure
settlement_channel_valuestring

Settlement channel enum value.

settlement_channelstring

Settlement channel name.

sub_position_nostring

Sub-position (large account) number.

need_settlement_accountboolean

Whether the large account needs to be shown.

HTTP 400Bad request. Check the business error code in code and the error details in message.
Standard response envelopecodemessagedata
dataobjectdata structure

No nested fields

HTTP 401The user is not authenticated, or the login session has expired.
Standard response envelopecodemessagedata
dataobjectdata structure

No nested fields

HTTP 403The current account is not authorized to use this feature. Grant the required permission to the account in User Permission.
Standard response envelopecodemessagedata
dataobjectdata structure

No nested fields

HTTP 408The request timed out. Check the business error code in code and the error details in message.
Standard response envelopecodemessagedata
dataobjectdata structure

No nested fields

Whale Docs