Refer to this section for enumerations used in the SDK
Language tigeropen.common.consts.Language
sourceopen in new window
Name Lanuguage zh_CN Simplified Chinese zh_TW Traditional Chinese en_US English
Market tigeropen.common.consts.Market
sourceopen in new window
Name Market ALL All markets US US market HK Hong kong market CN A shares SG Singapore market AU Australia market NZ New zealand market
CapitalPeriod Name Market INTRADAY intraday DAY day WEEK week MONTH month YEAR year QUARTER quarter HALFAYEAR 6month
Account Segment tigeropen.common.consts.SegmentType
Name Type SEC Stock FUT Future
Contract Type tigeropen.common.consts.SecurityType
sourceopen in new window
Name Asset STK Stocks OPT Options WAR Warrants IOPT CBBC CASH FOREX FUT Futures FOP Future Options
Currency tigeropen.common.consts.Currency
sourceopen in new window
Name Currency ALL ALL USD U.S Dollar HKD Hongkong Dollar CNH Chinese Yuan SGD Singapore Dollar AUD Australia Dollar JPY Japanese Yuan EUR Euro GBP Pound Sterling CAD Canada Dollar NZD New 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
Identifier Status Value Status Code Description EXPIRED Invalid -2 Illegal state NEW Initial -1 Order initial status PENDING_CANCEL PendingCancel 3 Pending cancellation CANCELLED Cancelled 4 Cancelled HELD Submitted 5 Order Submitted PARTIALLY_FILLED PartiallyFilled 2, 5, 8 Partially filled FILLED Filled 6 Completed REJECTED Inactive 7 Inactive
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 Status Description New New account Funded Account has been funded Open Account has been opened Pending Pending confirmation Abandoned Abandoned account Rejected Rejected Closed Closed account Unknown Unkown
Order Types Type Description MKT Market Order LMT Limit Order STP Stop Order STP_LMT Stop Limit Order TRAIL Trailing Stop Order AM Auction Market Order(HK) AL Auction Limit Order(HK)
Additional Order Types Type Description PROFIT Additional Take Profit Order LOSS Additional Stop Loss Order BRACKETS Additional Bracket Order
Account Types Type Description CASH Cash Accout RegTMargin Reg T Margin Account PMGRN Portfolio Margin
Subscription Subject Subject Description OrderStatus Change of rrder status Asset Change of total asset Position Change of position Quote Stock quote Option Option quote Future Futures quote QuoteDepth Depth 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 Name Description id Global unique order number account User account type type timestamp Tiger server time order_id Account auto increment order number name stock name latest_price Latest price symbol stock symbol action buy/sell order_type order type sec_type contract type currency currency type local_symbol Stock code (Hong Kong stocks are used to identify warrants and CBBCs) origin_symbol Original stock symbol strike Underlying price_Options, warrants, CBBCs exclusive expiry Expiration Date_Options, Warrants, CBBCs Exclusive right Option direction_put/call_Options, warrants, CBBCs exclusive limit_price limit order price aux_price track amount trailing_percent tracing percentage time_in_force valid time good_till_date gtd time, format 2006050508:00:00est outside_rth true_Allow pre-market and after-hours trading (US stock exclusive) total_quantity order quantity filled_quantity Number of executions avg_fill_price average cost last_fill_price Last fill price open_time order creation time latest_time The last modification time of the order remaining Number of outstanding shares status Order Status source order source liquidation liquidation value error_code error code error_msg Error description error_msg_cn Error description error_msg_tw Error description
Postion Changes Name Description account User account symbol stock symbol name stock name type type timestamp Tiger server time local_symbol Stock code (Hong Kong stocks are used to identify warrants and CBBCs) origin_symbol Original stock symbol sec_type contract type market trading market currency currency type latest_price Latest price market_value market value position position average_cost average cost unrealized_pnl Floating profit and loss expiry Expiration Date_Options, Warrants, CBBCs Exclusive strike Underlying price_Options, warrants, CBBCs exclusive right Option direction_put/call_Options, warrants, CBBCs exclusive multiplier 1_lot_exclusive for options, warrants and CBBCs
Asset Changes Name Description account User account type type timestamp Tiger server time currency Currency type deposit Incoming and outgoing buying_power buying power cash_balance Account cash balance gross_position_value Market value of positions net_liquidation Net Liquidation Value equity_with_loan Equity with loan value (including loan value assets) init_margin_req Current initial margin maint_margin_req current maintenance margin available_funds Available funds (including loan equity_initial margin) excess_liquidity excess liquidity (loan value equity_maintenance margin)
Quote Change Name Description symbol ticker symbol type type timestamp tiger sever time latest_price latest price latest_time lastest time pre_close close price of last trading day volume trading volume open opening price close closing price high high price low low price market_status market status ask_price ask price ask_size ask size bid_price bid price hour_trading_tag if the trade happens after hours. hour_trading_latest_price latest price after hours hour_trading_latest_time last trading time after hours hour_trading_volume pre-market trading volume bid_size bid size p last price of the minute bar a average price of the minute bar t timestamp v trading volume of the minute bar
Market Data Permissions Data field Description usQuoteBasic Nasdaq Basic usStockQuoteLv2Totalview Nasdaq Basic+TotalView hkStockQuoteLv2 Honkong L2 market depth data usOptionQuote U.S. options L1 real time quote CMEFuturesQuoteLv2 CME futures L2 CBOTFuturesQuoteLv2 CBOT futures L2 COMEXFuturesQuoteLv2 COMEX futures L2 NYMEXFuturesQuoteLv2 NYMEX futures L2 HKEXFuturesQuoteLv2 HKEX futures L2 SGXFuturesQuoteLv2 SGX futures L2 OSEFuturesQuoteLv2 OSE futures L2 CBOEFuturesQuoteLv2 CBOE futures L2
Trade Condition Trade Condition Market Description US_REGULAR_SALE US Regular sale US_BUNCHED_TRADE US Bunched Trade US_CASH_TRADE US Cash Trade US_INTERMARKET_SWEEP US Intermarket Sweep Order US_BUNCHED_SOLD_TRADE US Bunched Sold Trade US_PRICE_VARIATION_TRADE US Price Variation Trade US_ODD_LOT_TRADE US Odd Lot Trade US_RULE_127_OR_155_TRADE US Rule 127 Trade (NYSE) or Rule 155 Trade (NYSE MKT) US_SOLD_LAST US Sold Last (Late Reporting) US_MARKET_CENTER_CLOSE_PRICE US Market Center Close Price US_NEXT_DAY_TRADE US Next Day Trade US_MARKET_CENTER_OPENING_TRADE US Market center opening trade US_PRIOR_REFERENCE_PRICE US Prior reference price US_MARKET_CENTER_OPEN_PRICE US Market Center Open Price US_SELLER US Seller US_FORM_T US Extended Hours Trade (Form T) US_EXTENDED_TRADING_HOURS US Extended Trading Hours – Sold out of Sequence US_CONTINGENT_TRADE US Contingent Trade US_AVERAGE_PRICE_TRADE US Average Price Trade US_CROSS_TRADE US US_CROSS_TRADE US_SOLD_OUT_OF_SEQUENCE US Sold out of Sequence US_ODD_LOST_CROSS_TRADE US Odd Lost Cross Trade US_DERIVATIVELY_PRICED US Derivatively Priced US_MARKET_CENTER_RE_OPENING_TRADE US Market center re-opening trade US_MARKET_CENTER_CLOSING_TRADE US Market center closing trade US_QUALIFIED_CONTINGENT_TRADE US Qualified contingent trade US_CONSOLIDATED_LAST_PRICE_PER_LISTING_PACKET US Consolidated last price per listing packet HK_AUTOMATCH_NORMAL HK Automatch Normal HK_ODD_LOT_TRADE HK Odd Lot Trade HK_AUCTION_TRADE HK Auction Trade HK_OVERSEAS_TRADE HK Overseas Trade HK_LATE_TRADE_OFF_EXCHG HK Late trade off exchange HK_NON_DIRECT_OFF_EXCHG_TRADE HK Non direct off exchange trade HK_DIRECT_OFF_EXCHG_TRADE HK Direct off exchange trade HK_AUTOMATIC_INTERNALIZED HK Automatic internalized