Parameter comparison table
Category
Class
Condition Object
| Parameter | Type | Meaning |
|---|---|---|
| marketType | TradingType | Monitoring type Optional parameters: REFERENCE automatically refers to the commission object, SCHEDULED time |
| symbol | string | stock code |
| trigger | TriggerContent | Trigger condition Optional parameters: BID_PRICE buying price, ASK_PRICE selling price, MATCHED_PRICE transaction price, TOTAL_QUANTITY total amount, TIME time |
| triggerValue | string | Monitoring condition value (if it is time, fill in HHMMSS) |
| comparison | Operator | Comparison value Optional parameters GREATER_THAN_OR_EQUAL is greater than or equal to, LESS_THAN_OR_EQUAL is less than or equal to , GREATER_THAN is greater than , LESS_THAN is less than |
- When
REFERENCEis selected, trigger can be matched withBID_PRICE,ASK_PRICE,MATCHED_PRICE,TOTAL_QUANTITY,TIME. If trigger usesTIME, the time condition will be met and the product will only be triggered if there is a transaction within the time range. - When selecting
SCHEDULED, the symbol needs to be filled with a null value "", and the trigger needs to be brought inTIME, then the system time will be used to judge, and it will be triggered when the time condition is met.
ConditionOrder Object
| Parameter | Type | Meaning |
|---|---|---|
| buySell | BsAction | Buy and sell |
| symbol | string | stock code |
| price | string | order price |
| quantity | int | Order quantity |
| marketType | ConditionMarketType | Type The parameters COMMON can be used for whole shares, FIXING fixed order, INTRADAY_ODD intraday odd lots, ODD after-hours odd lots |
| priceType | ConditionPriceType | Price Type: Optional parameters: BID_PRICE buying price, ASK_PRICE selling price, MATCHED_PRICE transaction price, LIMIT limit price, LIMIT_UP daily limit, LIMIT_DOWN lower limit, MARKET market price, REFERENCE reference price (flat price) |
| timeInForce | TimeInForce | Order condition Optional parameters are ROD, FOK, IOC |
| orderType | ConditionOrderType | Order type: Optional parameters: STOCK spot, MARGIN financing, SHORT securities lending |
ConditionDayTrade Object
| Parameter | Type | Meaning |
|---|---|---|
| dayTradeEndTime | string | Offsetting time before closing, format "HHMMSS" (e.g. "130000"); the settable range is 130100 ~ 132000 |
| autoCancel | bool | Whether to delete the triggered order after the price validation is over |
| price | string | Order price (if there is no specified price, such as a market order, please fill in the blank string "") |
| priceType | ConditionPriceType | Price Type: Optional parameters: BID_PRICE buying price, ASK_PRICE selling price, MATCHED_PRICE transaction price, LIMIT limit price, LIMIT_UP daily limit, LIMIT_DOWN lower limit, MARKET market price, REFERENCE reference price (flat price) |
The settable range is 130100 ~ 132000
TpslOrder Object
| Parameter | Type | Meaning |
|---|---|---|
| timeInForce | TimeInforce | Order Condition : Optional parameters: ROD, IOC, FOK |
| priceType | ConditionPriceType | Price Type: Optional parameters: BID_PRICE buying price, ASK_PRICE selling price, MATCHED_PRICE transaction price, LIMIT limit price, LIMIT_UP daily limit, LIMIT_DOWN lower limit, MARKET market price, REFERENCE reference price (flat price) |
| orderType | ConditionOrderType | Order type: Optional parameters: STOCK spot, MARGIN financing, SHORT securities lending |
| targetPrice | string | Stop loss/stop profit trigger price |
| price | string | Stop loss/stop profit order price |
| trigger | TriggerContent | Stop loss/stop profit trigger condition (see the description at the end of the table for details) |
If priceType is LIMIT, price needs to be filled in with price; for other prices, fill in std::nullopt
Newly added in versions 2.2.0 and later (2.1.1 and previous versions do not have this field), the stop loss/stop profit trigger prices can be set as 1. MATCHED_PRICE 2. Best bid price (BID_PRICE); 3. Best selling price (ASK_PRICE)
If not set, this field will be filled with null, and the transaction price (MATCHED_PRICE) will be used by default.
TpslWrapper Object
| Parameter | Type | Meaning |
|---|---|---|
| stopSign | StopSign | Stop condition: You can choose FULL until all transactions are completed, PARTIAL until partial transactions are completed, and UNTIL_END until the end of the validity period |
| tp | TpslOrder Object (Optional) | Stop profit condition content |
| sl | TpslOrder Object (Optional) | Stop loss condition content |
| endDate | string (Optional: null value is the same as StartDate) | conditional stop date |
| intraday | bool (Optional) | Hedging within the day after all transactions are completed (* Need to be set to true when used with hedging condition orders) |
When using hedging conditional orders, intraday needs to be set to true
TrailOrder
| Parameter | Type | Meaning |
|---|---|---|
| symbol | string | stock code |
| price | string | Base price (Note. You can only enter up to two decimal places. If it exceeds the limit, the system will fail to validate the price) |
| direction | Direction | Direction: You can choose UP to rise or DOWN to fall |
| percentage | int | increase/decrease in % |
| buysell | BsAction | Buy and sell type: You can choose BUY or SELL |
| quantity | int | number of commissioned shares |
| PriceType | ConditionPriceType | Price Category: You can choose BID_PRICE buying price, ASK_PRICE selling price, MATCHED_PRICE transaction price, MARKET market price, LIMIT_UP upper limit price, LIMIT_DOWN lower limit price, REFERENCE reference price (flat price) |
| diff | int | The number of commissioned buying and selling price levels (the number of additions and subtractions based on priceType), the positive value is the number of upward additions, the negative value is the number of downward additions |
| timeInForce | TimeInForce | Order condition Optional parameters are ROD, FOK, IOC |
| orderType | ConditionOrderType | Order type Optional parameters are STOCK current stock, MARGIN financing, SHORT securities lending |
SplitDescription
| Parameter | Type | Meaning |
|---|---|---|
| method | SliceType | Slice Condition: Optional: TYPE1 starts from startTime, sends one amount every few seconds, a total of totalQuantity, and sends singleQuantity for each transaction TYPE2 starts from startTime and ends with endTime, sends one amount every interval seconds, in total totalQuantity, the remaining number of tickets is added up to the last one TYPE3 starts from startTime and ends with endTime, one is sent every interval seconds, the total is totalQuantity, the remaining number of tickets is allocated forward from the last one. |
| interval | int | Order interval time (seconds) |
| singleQuantity | int | Single order quantity (number of shares) |
| totalQuantity | int (Optional) | Total order quantity (number of shares) |
| startTime | string | start time |
| endTime | string (Optional) | end time |
Please note that the total order quantity must be greater than the single order quantity.
ConditionOrderResult
| Parameter | Type | Meaning |
|---|---|---|
| guid | string | condition order number |
Constants (field corresponding value)
BsAction
Buy and sell
| Name | Value | Meaning |
|---|---|---|
| BUY | 1 | Buy |
| SELL | 2 | Sell |
| UN_SUPPORTED | 3 | This type is not supported |
| UN_DEFINED | 4 | This type is not defined |
ConditionMarketType
farewell
| Name | Value | Meaning |
|---|---|---|
| COMMON | 1 | General disk |
| FIXING | 2 | Fixing |
| INTRADAY_ODD | 3 | Odd lots in intraday |
| ODD | 4 | After-hours odd lot |
TradingType
Monitoring type
| Name | Value | Meaning |
|---|---|---|
| REFERENCE | 1 | Automatically reference the delegate object |
| SCHEDULED | 3 | Time |
TriggerContent
Trigger condition
| Name | Value | Meaning |
|---|---|---|
| BID_PRICE | 1 | Purchase price |
| ASK_PRICE | 2 | Ask price |
| MATCHED_PRICE | 3 | Transaction price |
| TOTAL_QUANTITY | 4 | TOTAL QUANTITY |
| TIME | 5 | time |
Operator
| Name | Value | Meaning |
|---|---|---|
| GREATER_THAN_OR_EQUAL | 1 | Greater than or equal to |
| LESS_THAN_OR_EQUAL | 2 | Less than or equal to |
| GREATER_THAN | 3 | Greater than |
| LESS_THAN | 4 | Less than |
StopSign
| Name | Value | Meaning |
|---|---|---|
| FULL | 1 | Until all transactions are completed |
| PARTIAL | 2 | Until partial transaction |
| UNTIL_END | 3 | Until the end of the validity period |
TimeInForce
Order conditions (TimeInForce)
| Name | Value | Meaning |
|---|---|---|
| ROD | 1 | Valid on the same day (Rest of Day) |
| FOK | 2 | Full-or-Kill (Fill-or-Kill) |
| IOC | 3 | Immediate-or-Cancel (Immediate-or-Cancel) |
| UN_SUPPORTED | 4 | This type is not supported |
| UN_DEFINED | 5 | This type is not defined |
ConditionPriceType
Price Type (ConditionPriceType)
| Name | Value | Meaning |
|---|---|---|
| LINIT | 1 | Limit Price |
| BID_PRICE | 2 | Purchase price |
| ASK_PRICE | 3 | Ask price |
| MARKET | 4 | Market price |
| MATCHED_PRICE | 5 | Transaction price |
| LIMIT_UP | 6 | Limit price |
| LIMIT_DOWN | 7 | Limit down price |
| REFERENCE | 8 | Reference price (flat price) |
ConditionOrderType
OrderType (orderType)
| Name | Value | Meaning |
|---|---|---|
| STOCK | 1 | In stock |
| MARGIN | 2 | Financing |
| SHORT | 3 | Securities Lending |
| DAY_TRADE | 4 | Hedging current stocks |
Direction
Trailing-profit up/down tracking (direction)
| Name | Value | Meaning |
|---|---|---|
| Up | 1 | Up |
| Down | 2 | Down |
SliceType
SliceType
| Name | Meaning |
|---|---|
| Type1 | From the start time, one will be sent every few seconds, a total of N will be given, and each will be given M pieces |
| Type2 | From the beginning to the end, one will be sent every X seconds, a total of N pictures, and the remaining number of pictures will be added to the last one |
| Type3 | From the beginning to the end, one will be sent every X seconds, a total of N pictures, and the remaining number of pictures will be allocated from the last one |
ConditionStatus
Condition status (ConditionStatus)
| Name | Meaning |
|---|---|
| Type1 | Today’s related queries |
| Type2 | Still valid order |
| Type3 | Conditional comparison |
| Type4 | Commission processing |
| Type5 | Delegation successful |
| Type6 | Notified |
| Type7 | Delegation failed |
| Type8 | Already done |
| Type9 | Deletion successful |
| Type10 | Exception |
| Type11 | Failure |
HistoryStatus
History condition order status (HistoryStatus)
| Name | Meaning |
|---|---|
| Type1 | All conditional orders (excluding deleted and expired) |
| Type2 | Select all transaction orders within the period |
| Type3 | Select intra-period divided delivery documents |
| Type4 | Select period deletion order |
| Type5 | Select period invalid order |
| Type6 | Triggered recording within the selected period |