Skip to main content

List of Enumerations

Class

Class

Condition Object

ParameterTypeMeaning
market_typeTradingTypeTrading Type Valid in : Reference Reference to order object、Scheduled Time
symbolstringSymbol
triggerTriggerContentTrigger Condition Valid in : BidPriceAskPriceMatchedPriceTotalQuantityTime
trigger_valuestringTrigger Value
comparisonOperatorDirection Valid in : GreaterThanOrEqualLessThanOrEqualGreaterThanLessThan
info
  1. When using Reference, trigger can be BidPriceAskPriceMatchedPriceTotalQuantity or Time. If the trigger is Time, then the order would be triggered if the time condition is true and the reference product has actully trade happened with in the time range.
  2. When selecting Scheduled, symbol should be empty "", and the trigger must be Time. It would use the system time to determine if the order to be triggered when the time condition is true.

ConditionOrder Object

ParameterTypeMeaning
buy_sellBSActionBuy/Sell Type valid in BuySell
symbolstringSymbol
pricestringOrder Price
quantityintOrder Quantity
market_typeConditionMarketTypeTrading Session valid in CommonFixingIntradayOddOdd
price_typeConditionPriceTypePrice Type valid in : LimitLimitUpLimitDownMarket BidPrice Bid Price、AskPrice Ask Price、Reference Reference Price (Flat Price)、MatchedPrice current market price
time_in_forceTimeInForceTime In Force valid in RODFOKIOC
order_typeConditionOrderTypeOrder Type valid in : StockMarginShort

TPSLOrder Object

ParameterTypeMeaning
time_in_forceTimeInforceTime In Force valid in : RODFOKIOC
price_typeConditionPriceTypePrice Type valid in : LimitLimitUpLimitDownMarket BidPrice Bid Price、AskPrice Ask Price、Reference Reference Price (Flat Price)、MatchedPrice current market price
order_typeConditionOrderTypeOrder Type valid in : StockMarginShort
target_pricestringTake Profit / Stop Loss Trigger Price
pricestringTake Profit / Stop Loss Order Price
trigger (optional)TriggerContentTake Profit / Stop Loss TriggerContent (details below)
info

When priceType equals limit , should fill in price; Otherwise, price equals empty string ""

TP/SL Trigger Content

New parameter added since v2.2.0 (v2.1.1 and earlier version do not have this parameter). This can be used to set the trigger price type for take-profit/stop-loss order. The price type can be one of the follows: 1. MatchedPrice, 2. BidPrice, 3. AskPrice

If the parameter is not set manually, the function use the default value MatchedPrice.

TPSLWrapper Object

ParameterTypeMeaning
stop_signStopSignStop Condition : Valid Full Until Fully filled、Partial Once Filled happened 、 UntilEnd Until Expiry
tpTPSLOrder Object (Optional)TP Object
slTPSLOrder Object (Optional)SL Object
end_datestring (Optional : null equals Condition startDate)TP / SL EndDate
intradaybool (Optional)When Fully Filled Then Execuate Intraday DayTrade

TrailOrder

ParameterTypeMeaning
symbolstringsymbol
pricestringActivate Price (Note. Can only take up to two decimal places, otherwise it will fail to be activated.)
directionDirectionDirection : Valid UpDown
percentageintUp / down percentage
buy_sellBSActionBuy / Sell Type : Valid BuySell
quantityintOrder Quantity
price_typeConditionPriceTypePriceType : Valid BidPrice Bid Price、AskPrice Ask Price、MatchedPrice Current Price、MarketLimitUpLimitDownReference Reference Price (Flat Price)
diffintBuy / Sell Ticker ( Base on priceType up / down)
time_in_forceTimeInForceTime In Force Valid RODFOKIOC
order_typeConditionOrderTypeOrderType Valid Stock Common Stock、MarginShort Short Sale

SplitDescription

ParameterTypeMeaning
methodSliceTypeSlice 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.

intervalintervalThe Interval Between Orders (seconds)
single_quantityintSingle Order Shares
total_quantityint (Optional)Total Order Shares
start_timestringStart Time
end_timestring (Optional)End Time
caution

totalQuantity must be greater than single_quantity.

ConditionOrderResult

ParameterTypeMeaning
guidstringCondition Order Serial Number

Constants ( Corresponding Values for Returned Fields )

BsAction

NameMeaning
BuyBuy
SellSell

ConditionMarketType

Trading Session Type

NameMeaning
CommonRegular Session
FixingFixing Session
IntradayOddIntraday Odd Lot
OddOdd

TradingType

NameMeaning
ReferenceReference to order object
ScheduledTime
IndexIndex

TriggerContent

NameMeaning
BidPriceBid Price
AskPriceSell Price
MatchedPriceMatched Price
TotalQuantityTotal Quantity
TimeTime

Operator

NameMeaning
GreaterThanOrEqualGreater Than or Equal
LessThanOrEqualLess Than or Equal
GreaterThanGreater Than
LessThanLess Than

StopSign

NameMeaning
FullUntil Fully Filled
PartialOnce Filled Happen
UntilEndUntil Expiry

Direction

Take Profit trace up / down/ (direction)

NameMeaning
UpUp
DownDown

SliceType

NameMeaning
Type1Starting from start_time, send one order every interval seconds, for total_quantity, with single_quantity shares per order
Type2Starting from start_time , send one order every interval seconds, for total_quantity. The remaining shares will be aggregated and included in the last order
Type3Starting from start_time , send one order every interval seconds, for total_quantity. Distribute the remaining shares starting from the last order backwards

TimeInForce

NameMeaning
RODRest of Day
FOKFill-or-Kill
IOCImmediate-or-Cancel

ConditionPriceType

PriceType (ConditionPriceType)

NameMeaning
LimitLimit
BidPriceBid Price
AskPriceAsk Price
MarketMarket Price
MatchedPriceCurrent Price
LimitUpLimit Up
LimitDownLimit Down
ReferenceReference Price (Flat Price)

ConditionOrderType

OrderType (ConditionOrderType)

NameMeaning
StockCommon Stock
MarginMargin
ShortShort Sale

ConditionStatus

NameMeaning
Type1Query Today's Working Condition Order
Type2Valid Orders Remaining
Type3Condition Matching
Type4Order Processing
Type5Order Successful
Type6Notified
Type7Order Failed
Type8Filled
Type9Delete Successful
Type10Exception
Type11Expired

HistoryStatus

NameMeaning
Type1All condition orders (excluding deleted and expired)
Type2Fully filled within the selected period
Type3Partial filled within the selected period
Type4Canceled within the selected period
Type5Expired within the selected period
Type6Triggered records within the selected period