Parameter Reference
Type
Class
Condition Object
| Parameter | Type | Meaning |
|---|---|---|
| marketType | 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 |
| triggerValue | 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 |
|---|---|---|
| buySell | BSAction | Side |
| symbol | string | Stock symbol |
| price | string | Order price |
| quantity | int | Order quantity |
| marketType | ConditionMarketType | Market session Available parametersCommon Board lot、FixingFixing、IntradayOdd Intraday odd lot、Odd After-hours odd lot |
| priceType | 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) |
| timeInForce | TimeInForce | Time in force Available parametersis ROD、FOK、IOC |
| orderType | ConditionOrderType | Order type : Available parameters :StockCash、MarginMargin、ShortShort |
TPSLOrder Object
| Parameter | Type | Meaning |
|---|---|---|
| timeInForce | TimeInforce | Time in force : Available parameters :ROD、IOC、FOK |
| priceType | 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) |
| orderType | ConditionOrderType | Order type : Available parameters :StockCash、MarginMargin、ShortShort |
| targetPrice | 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 omit the price field (>= 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 |
|---|---|---|
| stopSign | 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 |
| endDate | 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) |
| PriceType | 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 |
| timeInForce | TimeInForce | Time in force Available parametersis ROD、FOK、IOC |
| orderType | ConditionOrderType | Order type Available parametersis StockCash equity、MarginMargin、ShortShort |
SplitDescription
| Parameter | Type | Meaning |
|---|---|---|
| method | SliceType | Slice Condition : Available values : Type1 Starting from startTime,Everysecondssubmit one order,totaltotalQuantity,each order sends singleQuantity Type2 Starting from startTimeto endTime ,Every interval secondssubmit one order,total totalQuantity,add the remaining lots to the last order Type3 Starting from startTimeto endTime ,Every interval secondssubmit one order,total totalQuantity,allocate the remaining lots backwards from the last order. |
| interval | int | Order interval (seconds) |
| singleQuantity | int | Quantity per order (shares) |
| totalQuantity | int (Optional) | Total order quantity (shares) |
| startTime | string | Start time |
| endTime | 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 |
|---|---|---|
| dayTradeEndTime | string | Pre-close offset time,Format "HHMMSS" (Example "131500") |
| autoCancel | 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 "") |
| priceType | ConditionPriceType | Place orderPrice type |
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 (orderType)
| 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 |