Skip to content
Custodian Query

Estimate Settlement Channel and Sub-Position

Estimates the settlement channel and sub-position (large account) a trade should use, based on the asset account, trade direction, open/close type, and trading counter.

Request parameters

  • Required: aaid (Asset Account ID), direction (buy/sell direction), open_close (open/close), counter_id (trading counter)
  • See each field for its format, allowed values, and business meaning.

Result

On success, returns the estimated settlement channel and sub-position. See the 200 response schema for field definitions.

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

Production: https://b-api.lbkrs.com · Test: https://b-api.longbridge.xyz

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 below, or the call will be rejected.

Request body application/json

aaidintegerrequired

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

directionintegerrequired

Trade direction. This field is required.

1 · Buy2 · Sell

open_closestringrequired

Open or close type. This field is required.

OPEN · OpenCLOSE · 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