List of Enumerations
Class
Class
Condition Object
| Parameter | Type | Meaning |
|---|---|---|
| marketType | TradingType | Monitoring Type Optional: REFERENCE Auto Reference Object, SCHEDULED Time |
| symbol | string | Stock Symbol |
| trigger | TriggerContent | Trigger Condition Optional: BID_PRICE Bid Price, ASK_PRICE Ask Price, MATCHED_PRICE Matched Price, TOTAL_QUANTITY Total Quantity, TIME Time |
| triggerValue | string | Monitoring Condition Value (If Time, use format HHMMSS) |
| comparison | Operator | Comparison Operator Optional: GREATER_THAN_OR_EQUAL, LESS_THAN_OR_EQUAL, GREATER_THAN, LESS_THAN |
- When selecting
REFERENCE, trigger can be combined withBID_PRICE,ASK_PRICE,MATCHED_PRICE,TOTAL_QUANTITY,TIME. If trigger usesTIME, it triggers when the time condition is met AND there is a transaction for the commodity within the time range. - When selecting
SCHEDULED, symbol must be empty "", trigger must beTIME. It will use system time and trigger when time condition is met.
ConditionOrder Object
| Parameter | Type | Meaning |
|---|---|---|
| buySell | BsAction | Buy/Sell Action |
| symbol | string | Stock Symbol |
| price | string | Order Price |
| quantity | int | Order Quantity |
| marketType | ConditionMarketType | Market Type Optional: COMMON Round Lot, FIXING Fixed Price, INTRADAY_ODD Intraday Odd Lot, ODD After-hours Odd Lot |
| priceType | ConditionPriceType | Price Type : Optional: BID_PRICE Bid Price, ASK_PRICE Ask Price, MATCHED_PRICE Matched Price, LIMIT Limit Price, LIMIT_UP Limit Up, LIMIT_DOWN Limit Down, MARKET Market Price, REFERENCE Reference Price (Flat Price) |
| timeInForce | TimeInForce | Time In Force Optional: ROD, FOK, IOC |
| orderType | ConditionOrderType | Order Type : Optional: STOCK Stock, MARGIN Margin Trading, SHORT Short Selling |
ConditionDayTrade Object
| Parameter | Type | Meaning |
|---|---|---|
| dayTradeEndTime | string | Day Trade Closing Time, format "HHMMSS" (e.g. "130000"); range 130100 ~ 132000 |
| autoCancel | bool | Whether to delete triggered orders after washing prices |
| price | string | Order Price (If no specific price, e.g., Market Order, leave blank "") |
| priceType | ConditionPriceType | Price Type : Optional: BID_PRICE Bid Price, ASK_PRICE Ask Price, MATCHED_PRICE Matched Price, LIMIT Limit Price, LIMIT_UP Limit Up, LIMIT_DOWN Limit Down, MARKET Market Price, REFERENCE Reference Price (Flat Price) |
Range can be set 130100 ~ 132000
TpslOrder Object
| Parameter | Type | Meaning |
|---|---|---|
| timeInForce | TimeInforce | Time In Force : Optional: ROD, IOC, FOK |
| priceType | ConditionPriceType | Price Type : Optional: BID_PRICE Bid Price, ASK_PRICE Ask Price, MATCHED_PRICE Matched Price, LIMIT Limit Price, LIMIT_UP Limit Up, LIMIT_DOWN Limit Down, MARKET Market Price, REFERENCE Reference Price (Flat Price) |
| orderType | ConditionOrderType | Order Type : Optional: STOCK Stock, MARGIN Margin Trading, SHORT Short Selling |
| targetPrice | string | TPSL Trigger Price |
| price | string | TPSL Order Price |
| trigger | TriggerContent | TPSL Trigger Condition (See details at end of table) |
If priceType is LIMIT, price must be filled; otherwise set price to std::nullopt
New in version 2.2.0 (Not available in 2.1.1 and earlier), TPSL trigger price type can be set to 1. MATCHED_PRICE 2. Best Bid (BID_PRICE); 3. Best Ask (ASK_PRICE)
If not set, fill this field with null, defaults to Matched Price (MATCHED_PRICE)
TpslWrapper Object
| Parameter | Type | Meaning |
|---|---|---|
| stopSign | StopSign | Stop Sign : Optional: FULL Until Full Execution, PARTIAL Until Partial Execution, UNTIL_END Until Expiry |
| tp | TpslOrder Object (Optional) | Take Profit Condition |
| sl | TpslOrder Object (Optional) | Stop Loss Condition |
| endDate | string (Optional : Same as parent StartDate if empty) | Condition End Date |
| intraday | bool (Optional) | Intraday Day Trade after Full Execution (* Must be set to true when used with Day Trade Condition Order) |
When using Day Trade Condition Order, intraday must be set to true
TrailOrder
| Parameter | Type | Meaning |
|---|---|---|
| symbol | string | Stock Symbol |
| price | string | Base Price (Note: Max 2 decimal places, system wash price will fail if exceeded) |
| direction | Direction | Direction : Optional: UP, DOWN |
| percentage | int | Up / Down % |
| buysell | BsAction | Buy/Sell : Optional: BUY, SELL |
| quantity | int | Order Quantity |
| PriceType | ConditionPriceType | Price Type : Optional BID_PRICE Bid Price, ASK_PRICE Ask Price, MATCHED_PRICE Matched Price, MARKET Market Price, LIMIT_UP Limit Up, LIMIT_DOWN Limit Down, REFERENCE Reference Price (Flat Price) |
| diff | int | Order Price Ticks (Add/Subtract ticks based on priceType), positive adds ticks upwards, negative adds ticks downwards |
| timeInForce | TimeInForce | Time In Force Optional: ROD, FOK, IOC |
| orderType | ConditionOrderType | Order Type Optional: STOCK Stock, MARGIN Margin Trading, SHORT Short Selling |
SplitDescription
| Parameter | Type | Meaning |
|---|---|---|
| method | SliceType | Slice Condition : Optional: TYPE1 From startTime, send one order every few seconds, total totalQuantity, each order singleQuantity TYPE2 From startTime to endTime, send one order every interval seconds, total totalQuantity, remaining quantity added to the last order TYPE3 From startTime to endTime, send one order every interval seconds, total totalQuantity, remaining quantity distributed from the last order backwards. |
| interval | int | Order Interval (Seconds) |
| singleQuantity | int | Single Order Quantity (Shares) |
| totalQuantity | int (Optional) | Total Order Quantity (Shares) |
| startTime | string | Start Time |
| endTime | string (Optional) | End Time |
Note: Total order quantity must be greater than single order quantity.
ConditionOrderResult
| Parameter | Type | Meaning |
|---|---|---|
| guid | string | Condition Order GUID |
Constants (Field Value Mapping)
BsAction
Buy/Sell Action
| Name | Value | Meaning |
|---|---|---|
| BUY | 1 | Buy |
| SELL | 2 | Sell |
| UN_SUPPORTED | 3 | Unsupported Type |
| UN_DEFINED | 4 | Undefined Type |
ConditionMarketType
Market Type
| Name | Value | Meaning |
|---|---|---|
| COMMON | 1 | Common |
| FIXING | 2 | Fixing |
| INTRADAY_ODD | 3 | Intraday Odd |
| ODD | 4 | Odd Lot |
TradingType
Monitoring Type
| Name | Value | Meaning |
|---|---|---|
| REFERENCE | 1 | Auto Reference Object |
| SCHEDULED | 3 | Time |
TriggerContent
Trigger Condition
| Name | Value | Meaning |
|---|---|---|
| BID_PRICE | 1 | Bid Price |
| ASK_PRICE | 2 | Ask Price |
| MATCHED_PRICE | 3 | Matched Price |
| TOTAL_QUANTITY | 4 | Total Quantity |
| TIME | 5 | Time |
Operator
| Name | Value | Meaning |
|---|---|---|
| GREATER_THAN_OR_EQUAL | 1 | Greater Than or Equal |
| LESS_THAN_OR_EQUAL | 2 | Less Than or Equal |
| GREATER_THAN | 3 | Greater Than |
| LESS_THAN | 4 | Less Than |
StopSign
| Name | Value | Meaning |
|---|---|---|
| FULL | 1 | Until Full Execution |
| PARTIAL | 2 | Until Partial Execution |
| UNTIL_END | 3 | Until Expiry |
TimeInForce
Time In Force (TimeInForce)
| Name | Value | Meaning |
|---|---|---|
| ROD | 1 | Rest of Day (ROD) |
| FOK | 2 | Fill-or-Kill (FOK) |
| IOC | 3 | Immediate-or-Cancel (IOC) |
| UN_SUPPORTED | 4 | Unsupported Type |
| UN_DEFINED | 5 | Undefined Type |
ConditionPriceType
Price Type (ConditionPriceType)
| Name | Value | Meaning |
|---|---|---|
| LINIT | 1 | Limit |
| BID_PRICE | 2 | Bid Price |
| ASK_PRICE | 3 | Ask Price |
| MARKET | 4 | Market |
| MATCHED_PRICE | 5 | Matched Price |
| LIMIT_UP | 6 | Limit Up |
| LIMIT_DOWN | 7 | Limit Down |
| REFERENCE | 8 | Reference Price |
ConditionOrderType
Order Type (orderType)
| Name | Value | Meaning |
|---|---|---|
| STOCK | 1 | Stock |
| MARGIN | 2 | Margin |
| SHORT | 3 | Short Selling |
| DAY_TRADE | 4 | Day Trade |
Direction
Trailing Stop Up/Down (direction)
| Name | Value | Meaning |
|---|---|---|
| Up | 1 | Up |
| Down | 2 | Down |
SliceType
Slice Type (SliceType)
| Name | Meaning |
|---|---|
| Type1 | From Start Time, send one order every few seconds, total N orders, M shares each |
| Type2 | From Start to End, send one order every X seconds, total N shares, remaining shares added to last order |
| Type3 | From Start to End, send one order every X seconds, total N shares, remaining shares distributed from last backwards |
ConditionStatus
Condition Status (ConditionStatus)
| Name | Meaning |
|---|---|
| Type1 | Today's Query |
| Type2 | Valid Orders |
| Type3 | Comparing Conditions |
| Type4 | Order Processing |
| Type5 | Order Success |
| Type6 | Notified |
| Type7 | Order Failed |
| Type8 | Has Match |
| Type9 | Delete Success |
| Type10 | Abnormal |
| Type11 | Invalid |
HistoryStatus
History Status (HistoryStatus)
| Name | Meaning |
|---|---|
| Type1 | All Condition Orders (Excluding Deleted, Invalid) |
| Type2 | Full Match Orders in Period |
| Type3 | Partial Match Orders in Period |
| Type4 | Deleted Orders in Period |
| Type5 | Invalid Orders in Period |
| Type6 | Triggered Records in Period |