Skip to content
Trade Order

Clearing - Order Details

Query order details retained on the clearing side, used to reconcile the orders entering clearing and billing by ledger date, trade date, and customer.

Request parameters

  • Combine business filters through filters (optional fields are listed under the filters field notes below), and use page, page_size, and orderBy to control pagination and sorting.

Business notes

The data is an order snapshot synced on the clearing side; each record corresponds to one order that has entered clearing and billing processing.

Every record carries the ledger date (ledger_date), trade date (trade_date), customer account (aaid), security code, OMS order id (order_id), original placement channel (op_entrust_way) and placement channel (manual_op_entrust_way), together with a billed flag (billed).

It is commonly used to reconcile order origins before and after clearing-side billing, to correct the placement channel and billing status, and to locate a specific order by ledger date, trade date, customer, or order id.

Returns

On success, returns the list of matching records with pagination. See the response definition for column meanings.

POSThttps://b-api.lbkrs.com/v1/datasets/clearing_ods_order_details

Authorization

AuthorizationstringheaderRequired

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

Permission

lb_hk_clearing.clear_account_balance_changeslb_hk_clearing.clear_equity_holding_change

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

Request body application/json

filtersobject

Combines business filters. Omit a filter field to disable that filter.

Child attributes
ledger_datestring

Filters results by Ledger Date.

trade_datestring

Filters results by Trade Date.

aaidstring

Filters results by Client.

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.

counter_idstring

Filters results by Counter ID. Format is {type}/{market}/{code}, for example, stock ST/HK/700 or ST/US/AAPL, and option OP/US/AAPL270319C320000.

order_idstring

Filters results by OMS Order ID.

op_entrust_waystring

Filters results by Order Channel.

Allowed values: 0 APP, 1 BO, 2 Fix, 3 PRO, 4 LONGPORT, 5 OTHER, 6 WTT, 7 API, 8 Other APP, 9 WEB

Values
0
APP
1
BO
2
Fix
3
PRO
4
LONGPORT
5
OTHER
6
WTT
7
API
8
Other APP
9
WEB
manual_op_entrust_waystring

Filters results by Order Channel.

Allowed values: 0 APP, 1 BO, 2 Fix, 3 PRO, 4 LONGPORT, 5 OTHER, 6 WTT, 7 API, 8 Other APP, 9 WEB

Values
0
APP
1
BO
2
Fix
3
PRO
4
LONGPORT
5
OTHER
6
WTT
7
API
8
Other APP
9
WEB
billedstring

Filters results by Billed.

Allowed values: ! YES, = NO

Values
!
YES
=
NO
pageinteger

Page number to retrieve, starting from 1.

page_sizeinteger

Number of records to return per page.

Responses

HTTP 200On success, returns paginated Clear - order detail records together with pagination metadata such as the page number, page size, and total record count.
Standard response envelopecodemessagedata
dataobjectdata structure
listarray<object>required

Returned value: List of list.

Child attributes
idstring

Record ID. Returned value: Record ID (row primary key); write operations on this record take it as their id.

ledger_datestring

Returned value: Ledger Date. The date or time format follows the value returned by the API.

trade_datestring

Returned value: Trade Date. The date or time format follows the value returned by the API.

origin_idstring

Returned value: A/C No..

biz_typestring

Returned value: Biz Type.

biz_type_valstring

Raw value of biz_type. The biz_type field contains the display value resolved through a dictionary or related record; this field contains the underlying code or ID.

settlement_channelstring

Returned value: Settlement Channel.

settlement_channel_valstring

Raw value of settlement_channel. The settlement_channel field contains the display value resolved through a dictionary or related record; this field contains the underlying code or ID.

sub_position_nostring

Returned value: Sub Account/Broker No..

marketstring

Returned value: Market.

counter_idstring

Returned value: Counter ID.

order_idstring

Returned value: OMS Order ID.

directionstring

Returned value: Trade Direction.

direction_valstring

Raw value of direction. The direction field contains the display value resolved through a dictionary or related record; this field contains the underlying code or ID.

op_entrust_waystring

Returned value: Original Order Channel.

op_entrust_way_valstring

Raw value of op_entrust_way. The op_entrust_way field contains the display value resolved through a dictionary or related record; this field contains the underlying code or ID.

manual_op_entrust_waystring

Returned value: Order Channel.

manual_op_entrust_way_valstring

Raw value of manual_op_entrust_way. The manual_op_entrust_way field contains the display value resolved through a dictionary or related record; this field contains the underlying code or ID.

trade_quantitystring

Returned value: Trade Quantity.

trade_amountstring

Returned value: Trade Amount.

currencystring

Returned value: Currency.

makerstring

Returned value: Operator.

maker_valstring

Raw value of maker. The maker field contains the display value resolved through a dictionary or related record; this field contains the underlying code or ID.

updated_atstring

Returned value: Updated At. The date or time format follows the value returned by the API.

billedstring

Returned value: Billed.

billed_valstring

Raw value of billed. The billed field contains the display value resolved through a dictionary or related record; this field contains the underlying code or ID.

totalintegerrequired

Returned value: Total number of matching records, used for pagination.

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