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 StockMarginShortDayTrade
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 null

caution

When directly short selling common stocks, orderType should be DayTrade, buySell is Sell, and marketType is Commonn

OrderResult

OrderResult; You can use GetOrderResult(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
assetTypeintAsset Type : 0 Stock
marketstringMarket Type : TAIEX Listed 、 TAISDAQ OTC 、 TAIEMG Emg
marketTypeMarketTypeTrading Session Type : CommonFixingIntradayOddOddEmgEmgOdd
stockNostringSymbol
buySellBsActionBuy/Sell Type : BuySell
priceTypePriceTypeOriginal OPrder Price Type : LimitLimitUpLimitDownMarketReference
pricedoubleOrder Price
quantityintOriginal Order Quantity
timeInForceTimeInForceTime In Force : RodFokIoc
orderTypeOrderTypeOrder Type : StockMarginShort Short sale 、 DayTrade 、 SBL
isPreOrderboolReservation Order Flag
statusintOrder Status : 0 Reservation 、 4 Sending to the system backend 、 9 Timeout 、 10 Active order 、 30 Canceled 、 40 Partially filled, others canceled 、 50 Fully filled 、 90 Failed
afterPriceTypePriceTypeValid Order Price Type : LimitLimitUpLimitDownMarketReference
afterPricedoubleValid Order Price
unitintTrading Unit
afterQtyintValid Order Quantity (filled quantity included)
filledQtyintFilled Quantity
filledMoneyintFilled Value
beforeQtyintBefore the Quantity Modification
beforePricedoubleBefore the Price Modification
userDefstringCustom Fields
lastTimestringLast Modification Time (see below for the format)
errorMessagestringError Message
detailslistOrder Process (Return value when query OrderResultDetail or OrderHistory )
>> functionTypeintFunction 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)
>> beforeQtyintOriginal Order Quantity
>> afterQtyintValid Order Quantity (filled quantity included)
>> beforePricedoubleOriginal Order Price
>> afterPricedoubleValid Order Price
>> filledMoneydoubleFilled Value
>> statusintOrder 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

ParameterTypeMeaning
OrderResultObjectOrderResult
pricedoubleThe price after modification
PriceTypePriceTypeThe price type after modification : LimitLimitUpLimitDownMarketReference

ModifyQuantityObj

Modified Quantity Object

ParameterTypeMeaning
OrderResultObjectOrderResult
quantityintThe quantity after modification

FilledData

Filled Data Object

ParameterTypeMeaning
datestringFilled Date
branchNostringBranch Number
accountstringAccount
seqNostringOrder serial number (only display on filled callback)
orderNostringOrder Number
stockNostringSymbol
buySellBsActionBuy/Sell Type : BuySell
orderTypeOrderTypeOrder Type : StockMarginShort Short sale 、 DayTrade 、 SBL
filledNostringFilled Serial Number
filledAvgPricedoubleFilled Average Price
filledQtyintFilled Share
filledPricedoubleFilled 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
ShortShort sale
DayTradeDayTrade
SBLSecurity Lending

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
Fail to modify order price19
Fail to modify order quantity29
Fail to cancel39
Order not valid90