Skip to content
Order Queries

Get Order Details

Gets the details of one order, including its status, order and fill information, conditional trigger information, trailing parameters, time in force, and option or multi-leg information. To query an attached order, pass is_attached=true; current_attached_order in the response is that attached order. To track an order after submission, poll this operation until the order reaches a final state, and apply order push updates incrementally. Stop polling when the status is final (filled, rejected, canceled, expired, or canceled after a partial fill).

When you call this operation through WhaleCore requestService(), set requiresTradeToken to true.

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

GEThttps://api.lbkrs.com/v3/orders/detail

Parameters

order_idstringqueryRequired

Order ID

order_id_strstringquery

String form of the order ID; pass the same value as order_id

is_attachedbooleanquery

Whether the order to query is an attached order

account_channelstringquery

Account channel (account_channel) of the current account

timestampstringquery

Request time as a millisecond timestamp, used to avoid cached responses

Responses

HTTP 200The request succeeded. The response body contains the result of the “Get Order Details” operation.
Standard response envelopecodemessagedata
dataobjectdata structure
orderobject

Order information

Child attributes
idstring

Order ID

counter_idstring

Security ID (counter_id), for example ST/US/AAPL or ST/HK/700

namestring

Security name

statusstring

Order status:

  • NotReported - Not reported
  • ReplacedNotReported - Not reported after a successful modification
  • ProtectedNotReported - Not reported (protected order)
  • VarietiesNotReported - Conditional order being monitored and not yet triggered
  • NotActivate - Not reported (conditional order not activated)
  • WaitToActivate - Not reported (conditional order waiting for activation)
  • Activated - Not reported (conditional order activated)
  • SuspenedStatus - Suspended
  • WaitToNew - Submitted, waiting to be reported
  • PendingNewStatus - Pending new
  • NewStatus - New
  • WaitToReplace - Modification waiting to be reported
  • PendingReplaceStatus - Pending modification
  • ReplacedStatus - Modified
  • WaitToCancel - Cancellation waiting to be reported
  • PendingCancelStatus - Pending cancellation
  • PartialFilledStatus - Partially filled
  • FilledStatus - 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.

Values
NotReported
ReplacedNotReported
ProtectedNotReported
VarietiesNotReported
NotActivate
WaitToActivate
Activated
SuspenedStatus
WaitToNew
PendingNewStatus
NewStatus
WaitToReplace
PendingReplaceStatus
ReplacedStatus
WaitToCancel
PendingCancelStatus
PartialFilledStatus
FilledStatus
RejectedStatus
CanceledStatus
ExpiredStatus
PartialWithdrawal
actioninteger

Order side:

  • 1 - Buy
  • 2 - Sell
order_typestring

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)

pricestring

Order price

quantitystring

Order quantity

executed_pricestring

Average filled price

executed_qtystring

Filled quantity

trigger_pricestring

Trigger price of a conditional order

trigger_statusinteger

Trigger status of a conditional order:

  • 1 - Not triggered
  • 2 - Invalidated
  • 3 - Triggered
  • 4 - Active
Values
1
2
3
4
trigger_countinteger

Number of triggers within one minute for a conditional order

trigger_atstring

Trigger time of a conditional order as a Unix timestamp in seconds; returned only after the order is triggered

monitor_pricestring

Monitoring price of a trailing order

tailing_amountstring

Trailing amount

tailing_percentstring

Trailing percentage

limit_offsetstring

Limit offset of a trailing stop limit order

force_only_rthinteger

Trading session (force_only_rth). US stocks:

  • 0 - Any session
  • 1 - Regular trading hours only
  • 4 - Overnight

Hong Kong and Singapore stocks:

  • 1 - Regular trading hours only
  • 2 - Regular trading hours plus pre-market and after-hours
  • 3 - Overnight only
  • 4 - Options pre-market
time_in_forceinteger

Time in force:

  • 0 - Day
  • 1 - 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
gtdstring

Expiry date when time_in_force=6, in YYYY-MM-DD format

currencystring

Order currency

msgstring

Reason for a rejected or abnormal order, localized to the request language

submitted_atinteger

Submission time as a Unix timestamp in seconds

done_atinteger

Completion time as a Unix timestamp in seconds

security_typestring

Security type; returned for single-option orders

contract_directionstring

Option direction (C for call, P for put); returned for single-option orders

strike_pricestring

Strike price; returned for single-option orders

multi_legobject

Multi-leg option combination

Child attributes
strategyinteger

Combination strategy type

strategy_namestring

Combination strategy name

multi_leg_idstring

Multi-leg combination ID

codestring

Combination code for display

namestring

Combination name

legsarray<object>

Legs of the combination

Child attributes
counter_idstring

Security ID of the option contract in this leg

actioninteger

Order side:

  • 1 - Buy
  • 2 - Sell
Values
1
2
ratio_quantitystring

Ratio quantity of this leg in the combination

quantitystring

Order quantity of this leg, in contracts

security_typestring

Security type of this leg

expire_datestring

Option expiry date

contract_directionstring

Option direction:

  • C - Call
  • P - Put
Values
C
P
strike_pricestring

Strike price

current_attached_orderobject

Order information

Child attributes
idstring

Order ID

counter_idstring

Security ID (counter_id), for example ST/US/AAPL or ST/HK/700

namestring

Security name

statusstring

Order status:

  • NotReported - Not reported
  • ReplacedNotReported - Not reported after a successful modification
  • ProtectedNotReported - Not reported (protected order)
  • VarietiesNotReported - Conditional order being monitored and not yet triggered
  • NotActivate - Not reported (conditional order not activated)
  • WaitToActivate - Not reported (conditional order waiting for activation)
  • Activated - Not reported (conditional order activated)
  • SuspenedStatus - Suspended
  • WaitToNew - Submitted, waiting to be reported
  • PendingNewStatus - Pending new
  • NewStatus - New
  • WaitToReplace - Modification waiting to be reported
  • PendingReplaceStatus - Pending modification
  • ReplacedStatus - Modified
  • WaitToCancel - Cancellation waiting to be reported
  • PendingCancelStatus - Pending cancellation
  • PartialFilledStatus - Partially filled
  • FilledStatus - 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.

Values
NotReported
ReplacedNotReported
ProtectedNotReported
VarietiesNotReported
NotActivate
WaitToActivate
Activated
SuspenedStatus
WaitToNew
PendingNewStatus
NewStatus
WaitToReplace
PendingReplaceStatus
ReplacedStatus
WaitToCancel
PendingCancelStatus
PartialFilledStatus
FilledStatus
RejectedStatus
CanceledStatus
ExpiredStatus
PartialWithdrawal
actioninteger

Order side:

  • 1 - Buy
  • 2 - Sell
order_typestring

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)

pricestring

Order price

quantitystring

Order quantity

executed_pricestring

Average filled price

executed_qtystring

Filled quantity

trigger_pricestring

Trigger price of a conditional order

trigger_statusinteger

Trigger status of a conditional order:

  • 1 - Not triggered
  • 2 - Invalidated
  • 3 - Triggered
  • 4 - Active
Values
1
2
3
4
trigger_countinteger

Number of triggers within one minute for a conditional order

trigger_atstring

Trigger time of a conditional order as a Unix timestamp in seconds; returned only after the order is triggered

monitor_pricestring

Monitoring price of a trailing order

tailing_amountstring

Trailing amount

tailing_percentstring

Trailing percentage

limit_offsetstring

Limit offset of a trailing stop limit order

force_only_rthinteger

Trading session (force_only_rth). US stocks:

  • 0 - Any session
  • 1 - Regular trading hours only
  • 4 - Overnight

Hong Kong and Singapore stocks:

  • 1 - Regular trading hours only
  • 2 - Regular trading hours plus pre-market and after-hours
  • 3 - Overnight only
  • 4 - Options pre-market
time_in_forceinteger

Time in force:

  • 0 - Day
  • 1 - 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
gtdstring

Expiry date when time_in_force=6, in YYYY-MM-DD format

currencystring

Order currency

msgstring

Reason for a rejected or abnormal order, localized to the request language

submitted_atinteger

Submission time as a Unix timestamp in seconds

done_atinteger

Completion time as a Unix timestamp in seconds

security_typestring

Security type; returned for single-option orders

contract_directionstring

Option direction (C for call, P for put); returned for single-option orders

strike_pricestring

Strike price; returned for single-option orders

multi_legobject

Multi-leg option combination

Child attributes
strategyinteger

Combination strategy type

strategy_namestring

Combination strategy name

multi_leg_idstring

Multi-leg combination ID

codestring

Combination code for display

namestring

Combination name

legsarray<object>

Legs of the combination

Child attributes
counter_idstring

Security ID of the option contract in this leg

actioninteger

Order side:

  • 1 - Buy
  • 2 - Sell
Values
1
2
ratio_quantitystring

Ratio quantity of this leg in the combination

quantitystring

Order quantity of this leg, in contracts

security_typestring

Security type of this leg

expire_datestring

Option expiry date

contract_directionstring

Option direction:

  • C - Call
  • P - Put
Values
C
P
strike_pricestring

Strike price

Whale Docs