List of Enumerations

About 4 min

Refer to this section for enumerations used in the SDK

Language

tigeropen.common.consts.Language sourceopen in new window

NameLanuguage
zh_CNSimplified Chinese
zh_TWTraditional Chinese
en_USEnglish

Market

tigeropen.common.consts.Market sourceopen in new window

NameMarket
ALLAll markets
USUS market
HKHong kong market
CNA shares
SGSingapore market
AUAustralia market
NZNew zealand market

CapitalPeriod

NameMarket
INTRADAYintraday
DAYday
WEEKweek
MONTHmonth
YEARyear
QUARTERquarter
HALFAYEAR6month

Account Segment

tigeropen.common.consts.SegmentType

NameType
SECStock
FUTFuture

Contract Type

tigeropen.common.consts.SecurityType sourceopen in new window

NameAsset
STKStocks
OPTOptions
WARWarrants
IOPTCBBC
CASHFOREX
FUTFutures
FOPFuture Options

Currency

tigeropen.common.consts.Currency sourceopen in new window

NameCurrency
ALLALL
USDU.S Dollar
HKDHongkong Dollar
CNHChinese Yuan
SGDSingapore Dollar
AUDAustralia Dollar
JPYJapanese Yuan
EUREuro
GBPPound Sterling
CADCanada Dollar
NZDNew Zealand Dollar

Order Status

tigeropen.common.consts.OrderStatus sourceopen in new window
tigeropen.common.util.order_utils.get_order_status method of the SDK converts the raw status codes to a enum valuesourceopen in new window

IdentifierStatus ValueStatus CodeDescription
EXPIREDInvalid-2Illegal state
NEWInitial-1Order initial status
PENDING_CANCELPendingCancel3Pending cancellation
CANCELLEDCancelled4Cancelled
HELDSubmitted5Order Submitted
PARTIALLY_FILLEDPartiallyFilled2, 5, 8Partially filled
FILLEDFilled6Completed
REJECTEDInactive7Inactive

Note: The status of PARTIALLY_FILLED is special, it may be HELD, CANCELLED, EXPIRED, REJECTED of any kind of status, please see FAQ-trading - how to determine the order is a partial transaction status See also the method of order status in sdk tigeropen.trade.domain.order.Order.status, that is, if the order status returned by the server is HELD(submitted), and there is a partial number of transactions, then the order status is PARTIALLY_FILLED

class Order:
    ...
    ...
    @property
    def status(self):
        if not self.remaining and self.filled:
            return OrderStatus.FILLED
        elif self._status == OrderStatus.HELD and self.filled:
            return OrderStatus.PARTIALLY_FILLED
        else:
            return self._status

Account Status

StatusDescription
NewNew account
FundedAccount has been funded
OpenAccount has been opened
PendingPending confirmation
AbandonedAbandoned account
RejectedRejected
ClosedClosed account
UnknownUnkown

Order Types

TypeDescription
MKTMarket Order
LMTLimit Order
STPStop Order
STP_LMTStop Limit Order
TRAILTrailing Stop Order
AMAuction Market Order(HK)
ALAuction Limit Order(HK)

Additional Order Types

TypeDescription
PROFITAdditional Take Profit Order
LOSSAdditional Stop Loss Order
BRACKETSAdditional Bracket Order

Account Types

TypeDescription
CASHCash Accout
RegTMarginReg T Margin Account
PMGRNPortfolio Margin

Subscription Subject

SubjectDescription
OrderStatusChange of rrder status
AssetChange of total asset
PositionChange of position
QuoteStock quote
OptionOption quote
FutureFutures quote
QuoteDepthDepth quote

K-line Type

tigeropen.common.consts.BarPeriod sourceopen in new window

Enum class|Enum value| ---|---|--- DAY|day| WEEK|week| MONTH|month| YEAR|year| ONE_MINUTE|1min| THREE_MINUTES|3min| FIVE_MINUTES|5min| TEN_MINUTES|10min| FIFTEEN_MINUTES|15min| HALF_HOUR|30min| FORTY_FIVE_MINUTES|45min| ONE_HOUR|60min| TWO_HOURS|2hour| THREE_HOURS|3hour| FOUR_HOURS|4hour| SIX_HOURS|6hour|

Order Change

  • OrderChangeKey
NameDescription
idGlobal unique order number
accountUser account
typetype
timestampTiger server time
order_idAccount auto increment order number
namestock name
latest_priceLatest price
symbolstock symbol
actionbuy/sell
order_typeorder type
sec_typecontract type
currencycurrency type
local_symbolStock code (Hong Kong stocks are used to identify warrants and CBBCs)
origin_symbolOriginal stock symbol
strikeUnderlying price_Options, warrants, CBBCs exclusive
expiryExpiration Date_Options, Warrants, CBBCs Exclusive
rightOption direction_put/call_Options, warrants, CBBCs exclusive
limit_pricelimit order price
aux_pricetrack amount
trailing_percenttracing percentage
time_in_forcevalid time
good_till_dategtd time, format 2006050508:00:00est
outside_rthtrue_Allow pre-market and after-hours trading (US stock exclusive)
total_quantityorder quantity
filled_quantityNumber of executions
avg_fill_priceaverage cost
last_fill_priceLast fill price
open_timeorder creation time
latest_timeThe last modification time of the order
remainingNumber of outstanding shares
statusOrder Status
sourceorder source
liquidationliquidation value
error_codeerror code
error_msgError description
error_msg_cnError description
error_msg_twError description

Postion Changes

  • PositionChangeKey
NameDescription
accountUser account
symbolstock symbol
namestock name
typetype
timestampTiger server time
local_symbolStock code (Hong Kong stocks are used to identify warrants and CBBCs)
origin_symbolOriginal stock symbol
sec_typecontract type
markettrading market
currencycurrency type
latest_priceLatest price
market_valuemarket value
positionposition
average_costaverage cost
unrealized_pnlFloating profit and loss
expiryExpiration Date_Options, Warrants, CBBCs Exclusive
strikeUnderlying price_Options, warrants, CBBCs exclusive
rightOption direction_put/call_Options, warrants, CBBCs exclusive
multiplier1_lot_exclusive for options, warrants and CBBCs

Asset Changes

  • AssetChangeKey
NameDescription
accountUser account
typetype
timestampTiger server time
currencyCurrency type
depositIncoming and outgoing
buying_powerbuying power
cash_balanceAccount cash balance
gross_position_valueMarket value of positions
net_liquidationNet Liquidation Value
equity_with_loanEquity with loan value (including loan value assets)
init_margin_reqCurrent initial margin
maint_margin_reqcurrent maintenance margin
available_fundsAvailable funds (including loan equity_initial margin)
excess_liquidityexcess liquidity (loan value equity_maintenance margin)

Quote Change

  • QuoteChangeKey
NameDescription
symbolticker symbol
typetype
timestamptiger sever time
latest_pricelatest price
latest_timelastest time
pre_closeclose price of last trading day
volumetrading volume
openopening price
closeclosing price
highhigh price
lowlow price
market_statusmarket status
ask_priceask price
ask_sizeask size
bid_pricebid price
hour_trading_tagif the trade happens after hours.
hour_trading_latest_pricelatest price after hours
hour_trading_latest_timelast trading time after hours
hour_trading_volumepre-market trading volume
bid_sizebid size
plast price of the minute bar
aaverage price of the minute bar
ttimestamp
vtrading volume of the minute bar

Market Data Permissions

Data fieldDescription
usQuoteBasicNasdaq Basic
usStockQuoteLv2TotalviewNasdaq Basic+TotalView
hkStockQuoteLv2Honkong L2 market depth data
usOptionQuoteU.S. options L1 real time quote
CMEFuturesQuoteLv2CME futures L2
CBOTFuturesQuoteLv2CBOT futures L2
COMEXFuturesQuoteLv2COMEX futures L2
NYMEXFuturesQuoteLv2NYMEX futures L2
HKEXFuturesQuoteLv2HKEX futures L2
SGXFuturesQuoteLv2SGX futures L2
OSEFuturesQuoteLv2OSE futures L2
CBOEFuturesQuoteLv2CBOE futures L2

Trade Condition

Trade ConditionMarketDescription
US_REGULAR_SALEUSRegular sale
US_BUNCHED_TRADEUSBunched Trade
US_CASH_TRADEUSCash Trade
US_INTERMARKET_SWEEPUSIntermarket Sweep Order
US_BUNCHED_SOLD_TRADEUSBunched Sold Trade
US_PRICE_VARIATION_TRADEUSPrice Variation Trade
US_ODD_LOT_TRADEUSOdd Lot Trade
US_RULE_127_OR_155_TRADEUSRule 127 Trade (NYSE) or Rule 155 Trade (NYSE MKT)
US_SOLD_LASTUSSold Last (Late Reporting)
US_MARKET_CENTER_CLOSE_PRICEUSMarket Center Close Price
US_NEXT_DAY_TRADEUSNext Day Trade
US_MARKET_CENTER_OPENING_TRADEUSMarket center opening trade
US_PRIOR_REFERENCE_PRICEUSPrior reference price
US_MARKET_CENTER_OPEN_PRICEUSMarket Center Open Price
US_SELLERUSSeller
US_FORM_TUSExtended Hours Trade (Form T)
US_EXTENDED_TRADING_HOURSUSExtended Trading Hours – Sold out of Sequence
US_CONTINGENT_TRADEUSContingent Trade
US_AVERAGE_PRICE_TRADEUSAverage Price Trade
US_CROSS_TRADEUSUS_CROSS_TRADE
US_SOLD_OUT_OF_SEQUENCEUSSold out of Sequence
US_ODD_LOST_CROSS_TRADEUSOdd Lost Cross Trade
US_DERIVATIVELY_PRICEDUSDerivatively Priced
US_MARKET_CENTER_RE_OPENING_TRADEUSMarket center re-opening trade
US_MARKET_CENTER_CLOSING_TRADEUSMarket center closing trade
US_QUALIFIED_CONTINGENT_TRADEUSQualified contingent trade
US_CONSOLIDATED_LAST_PRICE_PER_LISTING_PACKETUSConsolidated last price per listing packet
HK_AUTOMATCH_NORMALHKAutomatch Normal
HK_ODD_LOT_TRADEHKOdd Lot Trade
HK_AUCTION_TRADEHKAuction Trade
HK_OVERSEAS_TRADEHKOverseas Trade
HK_LATE_TRADE_OFF_EXCHGHKLate trade off exchange
HK_NON_DIRECT_OFF_EXCHG_TRADEHKNon direct off exchange trade
HK_DIRECT_OFF_EXCHG_TRADEHKDirect off exchange trade
HK_AUTOMATIC_INTERNALIZEDHKAutomatic internalized
Last update: