Skip to content
Order Checks

Validate Order Card (Hong Kong and Singapore)

Validates an order card generated in an AI conversation for a Hong Kong or Singapore stock account. Send the card parameters, such as symbol, side, order_type, and submitted_quantity, not the order submission fields such as counter_id, action, and quantity; a request without symbol fails. If validation passes, data contains the normalized order parameters in the order submission format. Use them to render the card, and pass them unchanged to POST /v1/trade/widget/submit/check. If validation fails, use the business code to guide the Client through the prerequisite, such as opening an account, depositing funds, enabling options or crypto permissions, or verifying the trade password, and then validate again.

A validation result becomes stale when the password, funds, or permissions change. Validate again if the Client returns to the card after a long pause. Numeric fields in the request body can also be sent as strings. For US stock accounts, use POST /v1/trade/us/widget/validate.

When you call this operation through WhaleCore requestService(), you do not need to set requiresTradeToken to true. If the trade password has not been verified, the operation returns business code 402000 so that you can guide the Client to verify it.

POSThttps://api.lbkrs.com/v1/trade/widget/validate

Request body application/json

symbolstringrequired

Security symbol in {Code}.{Market} format, for example 700.HK

order_typestringrequired

Order type:

  • LO - Limit order
  • MO - Market order
  • MOC - Market on close
  • LIT - Limit if touched
  • MIT - Market if touched
  • TSL - Trailing stop limit
Values
LO
MO
MOC
LIT
MIT
TSL
sideintegerrequired

Order side:

  • 1 - Buy
  • 2 - Sell
Values
1
2
submitted_pricestring

Order price. Required when order_type is LO or LIT

submitted_quantitystring

Order quantity, for example 100

time_in_forceintegerrequired

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); expire_date is also required
Values
0
1
3
5
6
trigger_pricestring

Trigger price. Required when order_type is LIT or MIT

limit_offsetstring

Price offset added to or subtracted from the market price to form the order price after a TSL order triggers. Required for TSL when limit_depth_level is 0 or omitted; ignored otherwise

tailing_amountstring

Trailing amount. For TSL, set exactly one of tailing_amount and tailing_percent

tailing_percentstring

Trailing percentage. For TSL, set exactly one of tailing_amount and tailing_percent

expire_datestring

Expiry date in YYYY-MM-DD format. Required when time_in_force is 6

outside_rthstringrequired

Trading session:

  • ANY_TIME - Any session
  • RTH_ONLY - Regular trading hours only
  • OVERNIGHT - Overnight
Values
ANY_TIME
RTH_ONLY
OVERNIGHT
remarkstring

Order remark, up to 64 characters

multileg_strategyinteger

Multi-leg option strategy:

  • 0 - CoveredCall
  • 1 - CoveredPut
  • 2 - VerticalCallSpread
  • 3 - VerticalPutSpread
  • 4 - Collar
  • 5 - Straddle
  • 6 - Strangle
Values
0
1
2
3
4
5
6
legsarray<string>

Leg symbols of a multi-leg option order. Use only for multi-leg orders; exactly 2 legs are required

trendinteger

Trigger direction. Required for TSL. For LIT and MIT, the service derives it from trigger_price and monitor_price and ignores the value you send

monitor_pricestring

Price used to monitor the trigger condition. Required for LIT, MIT, and TSL

security_typestring

Security type. Optional; when provided, it must match the security type resolved from symbol:

  • CS - Common stock
  • OPT - Option
  • WAR - Warrant
  • VA - Virtual asset
  • MLEG - Multi-leg
Values
CS
OPT
WAR
VA
MLEG
trigger_countinteger

Number of times the trigger condition can fire per minute for LIT, MIT, and TSL. Defaults to 1

limit_depth_levelinteger

Order book level that prices a TSL order after it triggers. Defaults to 0:

  • 0 - Market price adjusted by limit_offset
  • -1 to -5 - Bid 1 to bid 5
  • 1 to 5 - Ask 1 to ask 5

Responses

HTTP 200The request succeeded. The response body contains the result of the “Validate Order Card (Hong Kong and Singapore)” operation.
Standard response envelopecodemessagedata
dataobjectdata structure

Normalized order parameters in the order submission format. POST /v1/trade/widget/validate and POST /v1/trade/us/widget/validate return them; pass them unchanged to the matching pre-order confirmation operation and build the order submission request from them.

counter_idstringrequired

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

actionintegerrequired

Order side:

  • 1 - Buy
  • 2 - Sell
Values
1
2
order_typestringrequired

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)

pricestringrequired

Order price; the limit price for stop-limit orders. Omit it for market orders

trigger_pricestring

Trigger price for conditional orders

quantitystringrequired

Order quantity

settlement_currencystringrequired

Settlement currency, for example USD, HKD, or SGD

force_only_rthintegerrequired

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
Values
0
1
3
5
6
tailing_amountstring

Trailing amount, used when a trailing order tracks by amount

tailing_percentstring

Trailing percentage, used when a trailing order tracks by percentage

limit_offsetstring

Limit offset for trailing stop limit orders

monitor_pricestring

Monitoring price for trailing orders

trigger_countinteger

Number of triggers within one minute for conditional orders

statistics_entrystringrequired

Order entry identifier used to attribute the order source. Order cards use ai_widget

stock_contractobject

Single option contract

Child attributes
underlying_counter_idstring

Security ID of the underlying

expire_datestring

Expiry date

strike_pricestring

Strike price

contract_directionstring

Option direction:

  • C - Call
  • P - Put
Values
C
P
contract_multiplierstring

Contract multiplier: the number of underlying shares per contract

multiLegobject

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

trendinteger

Trigger direction of a LIT, MIT, or TSL order

market_pricestring

Market price when the order card was validated, for LIT, MIT, and TSL orders. The service fetches it from quotes

limit_depth_levelinteger

Order book level that prices a TSL order after it triggers: 0 uses the market price adjusted by limit_offset, -1 to -5 use bid 1 to bid 5, and 1 to 5 use ask 1 to ask 5

expire_timeinteger

Expiry time as a Unix timestamp in seconds, derived from expire_date. Present only when time_in_force is 6

namestring

Localized security name for display

HTTP 400The service rejected the request because a business rule or input validation failed. Review the business codes and correct the request before retrying.
codeintegerrequired

Business status code, 0 indicates success

messagestringrequired

Human-readable result or error message.

Whale Docs