Skip to content
Order Checks

Validate Order Card (US)

Validates an order card generated in an AI conversation for a US 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/us/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 Hong Kong and Singapore stock accounts, use POST /v1/trade/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/us/widget/validate

Request body application/json

symbolstringrequired

Security symbol in {Code}.{Market} format. For a stock or single-leg option order, use the traded symbol, for example AAPL.US or TSLA260613C350000.US. For a multi-leg order, use the underlying stock, for example TSLA.US; it provides market and currency context only and does not count as a leg

order_typestringrequired

Order type:

  • LO - Limit order
  • MO - Market order
  • SO_LIT - Limit if touched
  • SO_MIT - Market if touched
sideintegerrequired

Order side:

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

Order price, for example 388.5. Required when order_type is LO or SO_LIT; not used for MO or SO_MIT

submitted_quantitystring

Order quantity, for example 100

time_in_forceintegerrequired

Time in force:

  • 0 - Day
  • 1 - Good till canceled (GTC)
  • 6 - Good till date (GTD); expire_date is also required
Values
0
1
6
trigger_pricestring

Trigger price, for example 388.5. Required when order_type is SO_LIT or SO_MIT; not used for LO or MO

limit_offsetstring

Limit offset amount. Required for trailing stop limit orders (TSLPAMT and TSLPPCT)

trailing_amountstring

Trailing amount. Required for TSLPAMT

trailing_percentstring

Trailing percentage. Required for TSLPPCT

expire_datestring

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

outside_rthintegerrequired

Trading session:

  • 0 - Any session (ANY_TIME)
  • 1 - Regular trading hours only (RTH_ONLY)
  • 4 - Overnight (OVERNIGHT)
Values
0
1
4
remarkstring

Order remark, up to 64 characters

multileg_strategyinteger

Multi-leg option strategy. Required when legs is not empty:

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

Leg symbols of a multi-leg option order; exactly 2 legs are required. Leave it empty for stock orders and single-leg option orders. Option symbols use the {Underlying}{YYMMDD}{C/P}{strike × 1000, 8 digits}.{Market} format, for example TSLA260613C350000.US. For a strategy that involves stock (CoveredCall, CoveredPut, or Collar), include the stock symbol as a leg, for example ["TSLA.US", "TSLA260613C350000.US"]

Responses

HTTP 200The request succeeded. The response body contains the result of the “Validate Order Card (US)” 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