Skip to main content

List of Enumerations

Class

Class

OrderObject

ParameterTypeMeaning
buySellBSActionBuy/Sell Type valid in BuySell
symbolstringSymbol
pricestringOrder Price (use null if priceType is not Limit)
quantityintOrder Quantity
marketTypeMarketTypeTrading Session valid in CommonFixingIntradayOddOddEmgEmgOdd
priceTypePriceTypePrice Type valid in LimitLimitUpLimitDownMarketReference
timeInForceTimeInForceTime In Force valid in RODFOKIOC
orderTypeOrderTypeOrder Type valid in StockMarginShortDayTradeSBL
userDef (optional)stringCustomer Field (Up to 10 characters, no special characters supported 、 Not applicable to Emg)
caution

The units and ranges for 'quantity' vary for different MarketTypes. Please refer to the MarketType description for details

caution

When marketType is one of MarketType.Common, MarketType.Odd, MarketType.IntradayOdd, MarketType.Emg, and priceType is PriceType.Limit, the 'price' field must be filled; otherwise, the 'price' field should be empty or null

Spot Short Selling

When spot short selling common stocks, orderType should be DayTrade, buySell is Sell, and marketType is Commonn
(For other spot day trading operations, orderType = Stock)

OrderResult

OrderResult; You can use getOrderResults(accounts) to get data.

ParameterTypeMeaning
functionTypeintFunction Type : 0 New Order 、 10 New Order Executed 、 15 Change Price 、 20 Change Quantity 、 30 Cancel 、 90 Failed
datestringTransaction date
seqNostringOrder serial number
branchNostringBranch number
accountstringAccount
orderNostringOrder number
assetTypenumberAsset type : 0 Stock
marketstringMarket type : TAIEX Listed 、 TAISDAQ OTC 、 TAIEMG EMG
marketTypejs:string / ts:MarketTypeTrading session type : CommonFixingIntradayOddOddEmgEmgOdd
stockNostringSymbol
buySelljs:string / ts:BSActionBuy/Sell Type : BuySell
priceTypejs:string / ts:PriceTypeOriginal order price type : LimitLimitUpLimitDownMarketReference
pricenumberOrder Price
quantitynumberOriginal order quantity
timeInForcejs:string / ts:TimeInForceTime In Force RODFOKIOC
orderTypejs:string / ts:OrderTypeOrder Type : StockMarginShort Short sale 、 DayTradeSBL
isPreOrderboolReservation Flag
statusnumberOrder status, for details please refer to STATUS
afterPriceTypejs:string / ts:OrderTypeValid order price type : LimitLimitUpLimitDownMarketReference
afterPricenumberValid order price
unitnumberTrading Unit
afterQtynumberValid Order Quantity (filled quantity included)
filledQtynumberFilled Quantity
filledMoneynumberFilled Value
beforeQtynumberBefore the Quantity Modification
beforePricenumberBefore the Price Modification
userDefstringCustom Fields
lastTimestringLast Modification Time (see below for the format)
errorMessagestringError Message
detailslistOrder Process (The following fields will only appear in the query details)
>> functionTypenumberFunction Type : 0 New Order 、 10 New Order Executed 、 15 Change Price 、 20 Change Quantity 、 30 Cancel 、 50 Fully Filled 、 90 Failed
>> modifiedTimestringOrder Modified Time (see below for the format)
>> beforeQtynumberOriginal Order Quantity
>> afterQtynumberValid Order Quantity (filled quantity included)
>> beforePricenumberOriginal Order Price
>> afterPricenumberValid Order Price
>> filledMoneynumberFilled Value
>> statusnumberOrder Status
>> errMsgstringError Message
Time Format

lastTime and modifiedTime format: HH:MM:SS.fff or HH:MM:SS (that is, if .fff = .000, .fff will be ommitted).

BatchResult

BatchResult; You can use BatchOrderLists(accounts) to get data.

ParameterTypeMeaning
functionTypeintFunction Type : 0 New Order、 10 New Order Executed 、 15 Change Price 、 20 Change Quantity 、 30 Cancel 、 90 Failed
datestringDate
branchNostringBranch Aumber
accountstringAccount
batchSeqNostringBatch Serial Number

ModifyPriceObj

Modified Price Object

ParameterTypeDefault ValueMeaning
OrderResultObject-OrderResult
pricenumber-The price after modification
PriceTypePriceType-The price type after modification : LimitLimitUpLimitDownMarketReference

ModifyQuantityObj

Modified Quantity Object

ParameterTypeDefault ValueMeaning
OrderResultObject-OrderResult
quantityint-The quantity after modification

FilledData

Filled Data Object

ParameterTypeMeaning
datestringFilled Date
branchNostringBranch Number
accountstringAccount
seqNostringOrder serial number (only display on filled callback)
orderNostringOrder Number
stockNostringSymbol
buySelljs:string / ts:BSActionBuy/Sell Type : BuySell
orderTypejs:string / ts:OrderTypeOrder Type : StockMarginShort Short sale 、 DayTradeSBL
filledNostringFilled Serial Number
filledAvgPricenumberFilled Average Price
filledQtynumberFilled Share
filledPricenumberFilled Price
filledTimestringFilled Time
userDefstringCustom Fields (only display on filled callback)

Account

Account Information

ParameterTypeMeaning
namestringCustomer Name
accountstringAccount
branchNostringBranch Number
accountTypestringAccount Type : stockfutopt

Constants ( Corresponding Values for Returned Fields )

BSAction

Buy / Sell Type

NameMeaning
BuyBuy
SellSell

MarketType

Trading Session Type

NameMeaning
CommonRegular Session
FixingFixing Session
IntradayOddIntraday Odd Lot
OddOdd
EmgEmerging Stock Market
EmgOddEmerging Stock Market ( Share Unit)

When using different MarketTypes, the corresponding units and ranges represented by Quantity may also vary. Details are as follows

NameQuantity UnitQuantity Ranges
CommonThousand Shares1000 ~ 499000
FixingThousand Shares1000 ~ 499000
IntradayOddShare1 ~ 999
OddShare1 ~ 999
EmgThousand Shares1000 ~ 499000
EmgOddShare1 ~ 999

When using different MarketTypes, the available PriceType and TimeInForce as below.

MarketTypeAvailable PriceTypeAvailable TimeInForce
CommonLimit 、 LimitUp 、 LimitDown 、 Market 、 ReferenceROD 、 IOC 、 FOK
FixingReferenceROD
IntradayOddLimit 、 LimitUp 、 LimitDown 、 ReferenceROD
OddLimit 、 LimitUp 、 LimitDown 、 ReferenceROD
EmgLimitROD
EmgOddLimitROD

PriceType

Price Type

NameMeaning
LimitLimit
LimitUpLimit Up
LimitDownLimit Down
MarketMarket
ReferenceReference Price (Fixing Price at Fixing Session)

TimeInForce

Time In Force

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

OrderType

Order Type

NameMeaning
StockCommon Stock
MarginMargin
ShortMargin Short Selling
DayTradeSpot Short Selling (day trading)
SBLShort Selling (with security borrowed)

functionType

Function Type

NameValue
New Order0
New Order Executed10
Change Price15
Change Quantity20
Cancel Order30
Fully Filled (for OrderResult details)50
Order Failed90

market

Market Category

NameValue
Listed stocksTAIEX
Over-the-Counter (OTC) stocksTAISDAQ
Emerging StockTAIEMG

status

Order Status

NameValue
Reservation0
Sending to the system backend4 (Using GetOrderResult to retrieve the latest status)
Processing by the backend8 (Using GetOrderResult to retrieve the latest status)
Timeout9 (Please wait a moment and use GetOrderResult to retrieve the latest status ; or contact your broker agent)
Active order10
Canceled30
Partially filled, others canceled40
Fully filled50
Order not valid90
Flags for order result details14 - ACK of modifing price、24 - ACK of modifing quantity、34 - ACK of canceling
Modify price successfully (for history order inquiry)15
Modify quantity successfully (for history order inquiry)20
Fail to modify order price (for callback)19
Fail to modify order quantity (for callback)29
Fail to cancel (for callback)39