Parameter Reference
Type
Class
Condition Object
| Parameter | Type | Meaning |
|---|---|---|
| market_type | TradingType | Monitoring type Available parameters : Reference Automatic reference order object、Scheduled Time |
| symbol | string | Stock symbol |
| trigger | TriggerContent | Trigger condition Available parameters : BidPrice Bid price、AskPrice Ask price、MatchedPrice Matched price、TotalQuantity Total quantity、Time Time |
| trigger_value | string | Monitored condition value (Use HHMMSS for time) |
| comparison | Operator | Comparison value Available parametersGreaterThanOrEqual Greater than or equal to、LessThanOrEqualLess than or equal to 、 GreaterThan Greater than 、 LessThan Less than |
- Select
Reference, trigger can be combined withBidPrice、AskPrice、MatchedPrice、TotalQuantity、Time,if trigger Time,thenthe time condition is met,andtrigger only if the instrument trades within the time range - Select
Scheduled,symbolmust be empty"",triggermust be set toTime,thenthe system time is used for evaluation,whenthe time condition is met
ConditionOrder Object
| Parameter | Type | Meaning |
|---|---|---|
| buy_sell | BSAction | Side |
| symbol | string | Stock symbol |
| price | string | Order price |
| quantity | int | Order quantity |
| market_type | ConditionMarketType | Market session Available parametersCommon Board lot、FixingFixing、IntradayOdd Intraday odd lot、Odd After-hours odd lot |
| price_type | ConditionPriceType | Price type : Available parameters :BidPrice Bid price、 AskPrice Ask price、MatchedPriceMatched price、Limit Limit、LimitUp 、LimitDown 、Market Market price、Reference Reference price(Previous close) |
| time_in_force | TimeInforce | Time in force : Available parameters :ROD、IOC、FOK |
| order_type | ConditionOrderType | Order type : Available parameters :StockCash、MarginMargin、ShortShort |
TPSLOrder Object
| Parameter | Type | Meaning |
|---|---|---|
| time_in_force | TimeInforce | Time in force : Available parameters :ROD、IOC、FOK |
| price_type | ConditionPriceType | Price type : Available parameters :BidPrice Bid price、 AskPrice Ask price、MatchedPriceMatched price、Limit Limit、LimitUp 、LimitDown 、Market Market price、Reference Reference price(Previous close) |
| order_type | ConditionOrderType | Order type : Available parameters :StockCash、MarginMargin、ShortShort |
| target_price | string | Take-profit/stop-loss trigger price |
| price | string | Take-profit/stop-loss order price |
| trigger (optional) | TriggerContent | Take-Profit/Stop-LossTrigger condition (Description) |
priceType when it is limit,pricea price is required;otherwise use an empty string for price or None (>= ver. 2.2.4)
2.2.0 and laterAdded(2.1.1andand earlier do not have this field),canSetTake-Profit/Stop-LossPrice typeis 1. Matched price(MatchedPrice);2. best bid(BidPrice);3. best ask(AskPrice)
If unset, the default is Matched price(MatchedPrice)
TPSLWrapper Object
| Parameter | Type | Meaning |
|---|---|---|
| stop_sign | StopSign | Stop condition : Available values Full Until fully filled、PartialUntil partially filled、UntilEndUntil expiry |
| tp | TPSLOrder Object (Optional) | Take-profit condition details |
| sl | TPSLOrder Object (Optional) | Stop-loss condition details |
| end_date | string (Optional : empty uses the parent order StartDate) | Condition stop date |
| intraday | bool (Optional) | After the full fill,Intraday day trading |
When using day-trading conditional orders,,intraday must be set to True
TrailOrder
| Parameter | Type | Meaning |
|---|---|---|
| symbol | string | Stock symbol |
| price | string | Base price (Note. accepts at most two decimal places,additional decimal places cause price refreshing to fail) |
| direction | Direction | Direction : Available values Up Up、Down Down |
| percentage | int | Up/down percentage |
| buysell | BSAction | Side : Available values Buy Buy 、Sell Sell |
| quantity | int | Order quantity (shares) |
| price_type | ConditionPriceType | Price type : Available values BidPrice Bid price、AskPrice Ask price、MatchedPrice Matched price、Market Market price、LimitUp Limit up、LimitDown Limit down、Reference Reference price(Previous close) |
| diff | int | Bid/ask price levels (number of levels added or subtracted based on priceType) ,positive values add upward levels、negative values add downward levels |
| time_in_force | TimeInForce | Time in force Available parametersis ROD、FOK、IOC |
| order_type | ConditionOrderType | Order type Available parametersis StockCash equity、MarginMargin、ShortShort |
SplitDescription
| Parameter | Type | Meaning |
|---|---|---|
| method | SliceType | Slice Condition : Available values : Type1 from start_time ,Everysecondssubmit one order,totaltotal_quantity,each order sends single_quantity Type2 from start_time to end_time ,Every interval secondssubmit one order,total total_quantity,add the remaining lots to the last order Type3 from start_time to end_time ,Every interval secondssubmit one order,total total_quantity,allocate the remaining lots backwards from the last order. |
| interval | int | Order interval (seconds) |
| single_quantity | int | Quantity per order (shares) |
| total_quantity | int (Optional) | Total order quantity (shares) |
| start_time | string | Start time |
| end_time | string (Optional) | End time |
Note,Total order quantitymustGreater thanQuantity per order。
ConditionOrderResult
| Parameter | Type | Meaning |
|---|---|---|
| guid | string | Conditional Order ID |
ConditionDayTrade Object
| Parameter | Type | Meaning |
|---|---|---|
| day_trade_end_time | string | Pre-close offset time,Format "HHMMSS" (Example "131500") |
| auto_cancel | bool | Whether to cancel triggered orders after price refreshing ends |
| price | string | Order price (If no price is specified,ExampleMarket priceorders,use an empty string "") |
| price_type | ConditionPriceType | Order price |
The allowed range is 130100 ~ 132000
Constants ( Fieldsmapped values )
BsAction
Side
| Name | Meaning |
|---|---|
| Buy | Buy |
| Sell | Sell |
ConditionMarketType
Market session
| Name | Meaning |
|---|---|
| Common | Regular session |
| Fixing | Fixing |
| IntradayOdd | Intraday odd lot |
| Odd | After-hours odd lot |
TradingType
Monitoring type
| Name | Meaning |
|---|---|
| Reference | Automatic reference order object |
| Scheduled | Time |
TriggerContent
Trigger condition
| Name | Meaning |
|---|---|
| BidPrice | Bid price |
| AskPrice | Ask price |
| MatchedPrice | Matched price |
| TotalQuantity | Total quantity |
| Time | Time |
Operator
| Name | Meaning |
|---|---|
| GreaterThanOrEqual | Greater than or equal to |
| LessThanOrEqual | Less than or equal to |
| GreaterThan | Greater than |
| LessThan | Less than |
StopSign
| Name | Meaning |
|---|---|
| Full | Until fully filled |
| Partial | Until partially filled |
| UntilEnd | Until expiry |
TimeInForce
Time in force (TimeInForce)
| Name | Meaning |
|---|---|
| ROD | Rest of day(Rest of Day) |
| FOK | Fill or kill(Fill-or-Kill) |
| IOC | Immediate or cancel(Immediate-or-Cancel) |
ConditionPriceType
Price type (ConditionPriceType)
| Name | Meaning |
|---|---|
| Limit | Limit |
| BidPrice | Bid price |
| AskPrice | Ask price |
| Market | Market price |
| MatchedPrice | Matched price |
| LimitUp | Limit up |
| LimitDown | Limit down |
| Reference | Reference price(Previous close) |
ConditionOrderType
Order type (ConditionOrderType)
| Name | Meaning |
|---|---|
| Stock | Cash |
| Margin | Margin |
| Short | Short |
Direction
Trailing ProfitUp/Downtracking (direction)
| Name | Meaning |
|---|---|
| Up | Up |
| Down | Down |
SliceType
Order slicing type (SliceType)
| Name | Meaning |
|---|---|
| Type1 | fromStart time,Everysecondssubmit one order,submit N orders in total,each for M lots |
| Type2 | From start to end,EveryXsecondssubmit one order,N lots in total,add the remaining lots to the last order |
| Type3 | From start to end,EveryXsecondssubmit one order,N lots in total,allocate the remaining lots backwards from the last order |
ConditionStatus
Conditional order status (ConditionStatus)
| Name | Meaning |
|---|---|
| Type1 | Today-related query |
| Type2 | Still-active orders |
| Type3 | Condition evaluation in progress |
| Type4 | Order processing |
| Type5 | Order succeeded |
| Type6 | Notified |
| Type7 | Order failed |
| Type8 | Has fills |
| Type9 | Deletion succeeded |
| Type10 | Error |
| Type11 | Invalid |
HistoryStatus
Historical conditional order status (HistoryStatus)
| Name | Meaning |
|---|---|
| Type1 | All conditional orders ( excluding deleted、Invalid) |
| Type2 | Selectperiodwithinfully filled orders |
| Type3 | Selectperiodwithinpartially filled orders |
| Type4 | Selectperioddeleted orders |
| Type5 | SelectperiodInvalidorders |
| Type6 | Selectperiodwithintriggered records |