https://api.lbkrs.com/v4/orders/historyParameters
account_channelstringqueryRequiredAccount channel (account_channel) of the current account
pagestringqueryRequiredPage number, starting from 1
limitstringqueryRequiredNumber of items per page
typeintegerqueryRequiredQuery type. Always pass 4
4
marketstringqueryFilter by market, for example US or HK. Requires type
counter_idstringqueryFilter by security. Security ID (counter_id), for example ST/US/AAPL or ST/HK/700
actionstringqueryFilter by side
statusintegerqueryFilter by order status:
0- All1- Filled2- Canceled3- Rejected4- Expired
01234
security_typesarrayqueryFilter by security type
start_atstringqueryStart time as a Unix timestamp in seconds; pass it together with end_at
end_atstringqueryEnd time as a Unix timestamp in seconds; pass it together with start_at
excluded_statusesstringqueryOrder statuses to exclude, using the status values, as a JSON array string such as [2]
Responses
HTTP 200The request succeeded. The response body contains the result of the “Get Order History” operation.codemessagedatadataobjectdata structureHistorical orders on the current page
Child attributes
Order ID
Security ID (counter_id), for example ST/US/AAPL or ST/HK/700
Security name
Order status:
NotReported- Not reportedReplacedNotReported- Not reported after a successful modificationProtectedNotReported- Not reported (protected order)VarietiesNotReported- Conditional order being monitored and not yet triggeredNotActivate- Not reported (conditional order not activated)WaitToActivate- Not reported (conditional order waiting for activation)Activated- Not reported (conditional order activated)SuspenedStatus- SuspendedWaitToNew- Submitted, waiting to be reportedPendingNewStatus- Pending newNewStatus- NewWaitToReplace- Modification waiting to be reportedPendingReplaceStatus- Pending modificationReplacedStatus- ModifiedWaitToCancel- Cancellation waiting to be reportedPendingCancelStatus- Pending cancellationPartialFilledStatus- Partially filledFilledStatus- Filled (final)RejectedStatus- Rejected (final)CanceledStatus- Canceled (final)ExpiredStatus- Expired (final)PartialWithdrawal- Canceled after a partial fill (final)
SuspenedStatus is the existing spelling used by the service.
NotReportedReplacedNotReportedProtectedNotReportedVarietiesNotReportedNotActivateWaitToActivateActivatedSuspenedStatusWaitToNewPendingNewStatusNewStatusWaitToReplacePendingReplaceStatusReplacedStatusWaitToCancelPendingCancelStatusPartialFilledStatusFilledStatusRejectedStatusCanceledStatusExpiredStatusPartialWithdrawal
Order side:
1- Buy2- Sell
Order type, for example LO (limit), MO (market), ELO (enhanced limit), ALO (at-auction limit), AO (at-auction market), ODD (odd lot), LIT (limit if touched), MIT (market if touched), TSLPAMT / TSLPPCT (trailing stop limit by amount / percentage), TSMAMT / TSMPCT (trailing stop market by amount / percentage), or MOC (market on close)
Order price
Order quantity
Average filled price
Filled quantity
Trigger price of a conditional order
Trigger status of a conditional order:
1- Not triggered2- Invalidated3- Triggered4- Active
1234
Number of triggers within one minute for a conditional order
Trigger time of a conditional order as a Unix timestamp in seconds; returned only after the order is triggered
Monitoring price of a trailing order
Trailing amount
Trailing percentage
Limit offset of a trailing stop limit order
Trading session (force_only_rth). US stocks:
0- Any session1- Regular trading hours only4- Overnight
Hong Kong and Singapore stocks:
1- Regular trading hours only2- Regular trading hours plus pre-market and after-hours3- Overnight only4- Options pre-market
Time in force:
0- Day1- Good till canceled (GTC)3- Immediate or cancel (IOC)5- Fill or kill (FOK)6- Good till date (GTD); an expiry time is also required
Expiry date when time_in_force=6, in YYYY-MM-DD format
Order currency
Reason for a rejected or abnormal order, localized to the request language
Submission time as a Unix timestamp in seconds
Completion time as a Unix timestamp in seconds
Security type; returned for single-option orders
Option direction (C for call, P for put); returned for single-option orders
Strike price; returned for single-option orders
Multi-leg option combination
Child attributes
Combination strategy type
Combination strategy name
Multi-leg combination ID
Combination code for display
Combination name
Legs of the combination
Child attributes
Security ID of the option contract in this leg
Order side:
1- Buy2- Sell
12
Ratio quantity of this leg in the combination
Order quantity of this leg, in contracts
Security type of this leg
Option expiry date
Option direction:
C- CallP- Put
CP
Strike price
Take-profit and stop-loss orders attached to the main order
Whether there is another page