List of Enumerations
Class
Class
Condition Object
| Parameter | Type | Meaning |
|---|---|---|
| market_type | TradingType | Monitor Type Valid in : Reference Reference to order object、Scheduled Time |
| symbol | string | Symbol |
| trigger | TriggerContent | Trigger Condition Valid in : BidPrice 、AskPrice 、MatchedPrice 、TotalQuantity 、Time |
| trigger_value | string | Trigger Value |
| comparison | Operator | Direction Valid in : GreaterThanOrEqual 、LessThanOrEqual 、GreaterThan 、LessThan |
info
- When
Reference, trigger can matchBidPrice、AskPrice、MatchedPrice、TotalQuantity - When selecting
Scheduled, symbol should filled the symbolId to be triggered, and trigger must beTime.
FutOptConditionOrder Object
| Parameter | Type | Meaning |
|---|---|---|
| buy_sell | BSAction | Buy/Sell Type valid in Buy 、 Sell |
| symbol | string | Symbol |
| price | string | Order Price |
| quantity | int | Order Quantity |
| market_type | FutOptConditionMarketType | Trading Session valid in Future、Option、FutureNight、OptionNight (IMPORTANT: The following condition order functions do not support after-hours session: 1. Time slice, 2. Trail profit, 3. Time triggered conditions) |
| price_type | FutOptConditionPriceType | Price Type valid in : Limit、LimitUp、LimitDown、Market、 BidPrice Bid Price、AskPrice Ask Price、Reference Reference Price (Flat Price)、MatchedPrice current market price 、RangeMarket |
| time_in_force | TimeInForce | Time In Force valid in Rod、Fok、Ioc |
| order_type | FutOptConditionOrderType | Order Type valid in : New、Close |
caution
The following condition order functions do not support after-hours session:
- Time slice
- Trail profit
- Time triggered conditions
FutOptTPSLOrder Object
| Parameter | Type | Meaning |
|---|---|---|
| time_in_force | TimeInforce | Time In Force valid in : ROD、FOK、 IOC |
| price_type | FutOptConditionPriceType | Price Type valid in : Limit、LimitUp、LimitDown、Market、 BidPrice Bid Price、AskPrice Ask Price、Reference Reference Price (Flat Price)、MatchedPrice current market price 、RangeMarket |
| order_type | FutOptConditionOrderType | Order Type valid in : New、Close |
| target_price | string | Take Profit / Stop Loss Trigger Price |
| price | string | Take Profit / Stop Loss Order Price |
| trigger (reserved field) | TriggerContent | Added since v2.2.0. No actual function yet. |
info
When priceType equals limit , should fill in price; Otherwise, price equals empty string ""
FutOptTPSLWrapper Object
| Parameter | Type | Meaning |
|---|---|---|
| stop_sign | StopSign | Stop Condition : Valid Full Until Fully filled、Partial Once Filled happened 、 UntilEnd Until Expiry |
| tp | FutOptTPSLOrder Object (Optional) | TP Object |
| sl | FutOptTPSLOrder Object (Optional) | SL Object |
| end_date | string (Optional : null equals Condition startDate) | TP / SL EndDate |
| day_trade | bool (Optional) | When Fully Filled Execuate DayTrade (Fixed to True for futures) |
FutOptTrailOrder
| Parameter | Type | Meaning |
|---|---|---|
| symbol | string | symbol |
| price | string | Activate Price |
| direction | Direction | Direction : Valid Up 、Down |
| tick_num | int | Up / down tick |
| buy_sell | BSAction | Buy / Sell Type : Valid Buy 、Sell |
| lot | int | Order lot |
| Price_type | FutOptConditionPriceType | PriceType : Valid BidPrice Bid Price、AskPrice Ask Price、MatchedPrice Current Price、Market 、LimitUp 、LimitDown 、Reference Flat Price、RangeMarket Market with Protection Orders |
| diff | int | Buy / Sell Ticker Count (Base on PriceType ) ,Positive value indicates upward increments、Negative value indicates downward decrements |
| time_in_force | TimeInForce | Time In Force Valid ROD、FOK、IOC |
| order_type | FutOptConditionOrderType | OrderType Valid New Open Position、Close Close Position |
SplitDescription
| Parameter | Type | Meaning |
|---|---|---|
| method | SliceType | Slice Condition : Valid in : Type1 Starting from start_time, send one order every interval seconds, for total_quantity, with single_quantity shares per order Type2 Starting from start_time , send one order every interval seconds, for total_quantity. The remaining shares will be aggregated and included in the last order Type3 Starting from start_time , send one order every interval seconds, for total_quantity. Distribute the remaining shares starting from the last order backwards. |
| interval | interval | The Interval Between Orders |
| single_quantity | int | Single Order Shares |
| total_quantity | int (Optional) | Total Order Shares |
| start_time | string | Start Time |
| end_time | string (Optional) | End Time |
caution
totalQuantity must be greater than single_quantity.
ConditionOrderResult
| Parameter | Type | Meaning |
|---|---|---|
| guid | string | Condition Order Serial Number |
Constants ( Corresponding Values for Returned Fields )
BsAction
| Name | Meaning |
|---|---|
| Buy | Buy |
| Sell | Sell |
MarketType
Trading Session Type
| Name | Meaning |
|---|---|
| Common | Regular Session |
| Fixing | Fixing Session |
| IntradayOdd | Intraday Odd Lot |
| Odd | Odd |
| Emg | Emerging Stock Market |
| EmgOdd | Emerging Stock Market (share Unit ) |
TradingType
| Name | Meaning |
|---|---|
| Reference | Reference to order object |
| Index | Index |
| Scheduled | Time |
TriggerContent
| Name | Meaning |
|---|---|
| BidPrice | Bid Price |
| AskPrice | Sell Price |
| MatchedPrice | Matched Price |
| TotalQuantity | Total Quantity |
| Time | Time |
| LimitUp | Limit Up |
| LimitDown | Limit Down |
| ReferencePrice | Reference Price |
Operator
| Name | Meaning |
|---|---|
| GreaterThanOrEqual | Greater Than or Equal |
| LessThanOrEqual | Less Than or Equal |
| GreaterThan | Greater Than |
| LessThan | Less Than |
StopSign
| Name | Meaning |
|---|---|
| Full | Until Fully Filled |
| Partial | Once Filled Happen |
| UntilEnd | Until Expiry |
Direction
Take Profit trace up / down/ (direction)
| Name | Meaning |
|---|---|
| Up | Up |
| Down | Down |
SliceType
| Name | Meaning |
|---|---|
| Type1 | Starting from start_time, send one order every interval seconds, for total_quantity, with single_quantity shares per order |
| Type2 | Starting from start_time , send one order every interval seconds, for total_quantity. The remaining shares will be aggregated and included in the last order |
| Type3 | Starting from start_time , send one order every interval seconds, for total_quantity. Distribute the remaining shares starting from the last order backwards |
TimeInForce
| Name | Meaning |
|---|---|
| ROD | Rest of Day |
| FOK | Fill-or-Kill |
| IOC | Immediate-or-Cancel |
FutOptConditionMarketType
MarketType (FutOptConditionMarketType)
| Name | Meaning |
|---|---|
| Future | Future (day session) |
| Option | Option (day session) |
FutOptConditionPriceType
PriceType (FutOptConditionPriceType)
| Name | Meaning |
|---|---|
| Limit | Limit |
| BidPrice | Bid Price |
| AskPrice | Ask Price |
| Market | Market Price |
| MatchedPrice | Current Price |
| LimitUp | Limit Up |
| LimitDown | Limit Down |
| Reference | Reference Price (Flat Price) |
| RangeMarket | Market with Protection Orders |
FutOptConditionOrderType
OrderType (FutOptConditionOrderType)
| Name | Meaning |
|---|---|
| New | Open Position |
| Close | Close Position |
ConditionStatus
| Name | Meaning |
|---|---|
| Type1 | Query Today's Working Condition Order |
| Type2 | Valid Orders Remaining |
| Type3 | Condition Matching |
| Type4 | Order Processing |
| Type5 | Order Successful |
| Type6 | Notified |
| Type7 | Order Failed |
| Type8 | Filled |
| Type9 | Delete Successful |
| Type10 | Exception |
| Type11 | Expired |
HistoryStatus
| Name | Meaning |
|---|---|
| Type1 | All condition orders (excluding deleted and expired) |
| Type2 | Fully filled within the selected period |
| Type3 | Partial filled within the selected period |
| Type4 | Canceled within the selected period |
| Type5 | Expired within the selected period |
| Type6 | Triggered records within the selected period |