Futures

About 13 min

get_future_exchanges Get a List of Future Exchanges

QuoteClient.get_future_exchanges(sec_type=SecurityType.FUT, lang=None)

Description

Get a List of Supported Future Exchanges

Frequency Limit

Please see:Rate Limit for details

Parameters

ParameterTypeRequiredDescription
sec_typeSecurityTypeYesYou can use the enums defined in tigeropen.common.consts.SecurityType, FUT stands for futures,FOP stands for options.
default: SecurityType.FUT
langLanguageNozh_CN,zh_TW,en_US.
default: client_config.language

Response

pandas.DataFrame

The DataFrame contains the following fields:

ColumnTypeDescription
codestrCode of the exchange
namestrName of the exchange
zonestrTime zone of the location of the exchange

Example

from tigeropen.quote.quote_client import QuoteClient
from tigeropen.tiger_open_config import get_client_config
client_config = get_client_config(private_key_path='private key file path', tiger_id='your tiger id', account='your account')
quote_client = QuoteClient(client_config)

exchanges = quote_client.get_future_exchanges()

Response Example

    code   name              zone
0    CME    CME   America/Chicago
1  NYMEX  NYMEX  America/New_York
2  COMEX  COMEX  America/New_York
3    SGX    SGX         Singapore
4   HKEX   HKEX    Asia/Hong_Kong
5   CBOT   CBOT   America/Chicago
6    OSE    OSE        Asia/Tokyo
7   CBOE   CBOE   America/Chicago
8  EUREX  EUREX     Europe/Berlin

get_future_contracts Get Contracts Available for Trade

QuoteClient.get_future_contracts(exchange, lang=None)

Description

Get Contracts Available for Trade Listed in Certain Exchange

Frequency Limitation

Please see:Rate Limit for details

Parameters

ParameterTypeRequiredDescription
exchangestrYescode of an exchange,e.g. 'CBOE'
langLanguageNozh_CN,zh_TW,en_US.
default: client_config.language

Response

pandas.DataFrame

The DataFrame contains the following fields:

ColumnTypeDescription
contract_codestrFull contract code. e.g. VIX2208
continuousboolIf the contract is continuous
contract_monthstrMonth of delivery, in month code. Example: 202208 - 2022/08
currencystrCurrency of the contract
exchangestrExchange code
first_notice_datestrThe first notification day refers to the date when the physical delivery contract can be delivered physically, and the contract cannot open long positions after the first notification day. Existing long positions will be forced to close before the first notice day (usually the first three trading days). This field is empty for non-physical delivery contracts (such as index contracts)
last_bidding_close_timestrLast bidding time
last_trading_datestrRefers to the last trading date of the contract expiration month. Futures contracts that have not been cleared after the last trading day must be closed through the relevant "spot commodity" or "cash settlement". At present, the last trading day of most futures commodities is usually the settlement day. The first notification day of some commodities is the same day as the last trading day, such as the euro.For cash-settled futures, positions can be opened normally as long as the last trading time has not passed. Non-cash-settled futures are restricted from opening positions from the first three trading days according to the lesser of the last trading time and the first notice day.
min_tickfloatThe minimum quotation unit for futures price changes. For example, if the current futures price is 2000 and minTick is 100, the correct quotation includes 2100, 2200, and 2005 does not meet the requirements
multiplierfloatMultiplier of the contract
namestrname of the contract
symbolstrib symbol of the contract
tradeboolIf the contract is still open for trading
typestrContract code. Example: CL

Example

from tigeropen.quote.quote_client import QuoteClient
from tigeropen.tiger_open_config import get_client_config
client_config = get_client_config(private_key_path='private key file path', tiger_id='your tiger id', account='your account')
quote_client = QuoteClient(client_config)

contracts = quote_client.get_future_contracts('CME')
print(contracts.head().to_string())

# Transfer contact as pandas DataFrame as index,and search
# contract_nq2309 = contracts.set_index('contract_code').loc['NQ2309']
# print(contract_nq2309.name)  # Contract name
# print(contract_nq2309.multiplier)  # Multiplier
# print(contract_nq2309.last_trading_date)  # Last trading date

Response Example

  contract_code  continuous contract_month currency  display_multiplier exchange exchange_code first_notice_date  \last_bidding_close_time last_trading_date  min_tick  multiplier     name symbol  trade  type
0      MEURmain       False                     USD                 1.0      CME        GLOBEX                                          0                     0.00010     12500.0    微欧元主连    M6E   True  MEUR
1      MEUR2506       False         202506      USD                 1.0      CME        GLOBEX                                          0          20250616   0.00010     12500.0  微欧元2506    M6E   True  MEUR
2      MEUR2503       False         202503      USD                 1.0      CME        GLOBEX                                          0          20250317   0.00010     12500.0  微欧元2503    M6E   True  MEUR
3       CHF2512       False         202512      USD                 1.0      CME        GLOBEX                                          0          20251215   0.00005    125000.0   瑞朗2512    CHF   True   CHF
4       CHF2506       False         202506      USD                 1.0      CME        GLOBEX                                          0          20250616   0.00005    125000.0   瑞朗2506    CHF   True   CHF

get_future_contract Get future contract by code

QuoteClient.get_future_contract(contract_code, lang=None)

Description

Get future contract by contract code.

Frequency Limit

Refer to Rate Limitopen in new window

Parameters

ParameterTypeRequiredDescription
contract_codestrYesfuture contract code, e.g. CL2206
langLanguageNozh_CN,zh_TW,en_US.
default: client_config.language

Response

`pandas.DataFrame

ParameterTypeDescription
contract_codestrFull contract code. e.g. VIX2208
continuousboolIf the contract is continuous
contract_monthstrMonth of delivery, in month code. Example: 202208 - 2022/08
currencystrCurrency of the contract
exchangestrExchange code
first_notice_datestrThe first notification day refers to the date when the physical delivery contract can be delivered physically, and the contract cannot open long positions after the first notification day. Existing long positions will be forced to close before the first notice day (usually the first three trading days). This field is empty for non-physical delivery contracts (such as index contracts)
last_bidding_close_timestrLast bidding time
last_trading_datestrRefers to the last trading date of the contract expiration month. Futures contracts that have not been cleared after the last trading day must be closed through the relevant "spot commodity" or "cash settlement". At present, the last trading day of most futures commodities is usually the settlement day. The first notification day of some commodities is the same day as the last trading day, such as the euro.For cash-settled futures, positions can be opened normally as long as the last trading time has not passed. Non-cash-settled futures are restricted from opening positions from the first three trading days according to the lesser of the last trading time and the first notice day.
min_tickfloatThe minimum quotation unit for futures price changes. For example, if the current futures price is 2000 and minTick is 100, the correct quotation includes 2100, 2200, and 2005 does not meet the requirements
multiplierfloatMultiplier of the contract
namestrname of the contract
symbolstrib symbol of the contract
tradeboolIf the contract is still open for trading
typestrContract code. Example: CL

Example

from tigeropen.quote.quote_client import QuoteClient
from tigeropen.tiger_open_config import get_client_config
client_config = get_client_config(private_key_path='private key path', tiger_id='your tiger id', account='your account')
quote_client = QuoteClient(client_config)

contract = quote_client.get_future_contract('CHF2512')
print(contract.to_string())

Response Example

  contract_code  continuous contract_month currency  display_multiplier exchange exchange_code first_notice_date  last_bidding_close_time last_trading_date  min_tick  multiplier    name symbol  trade type
0       CHF2512       False         202512      USD                   1      CME        GLOBEX                                          0          20251215   0.00005    125000.0  瑞朗2512    CHF   True  CHF


get_current_future_contract Identify Front Month Contract

QuoteClient.get_current_future_contract(future_type, lang=None)

Description

Identify the Front month contract of a given futures product

Frequency Limit

Refer to Rate Limitopen in new window

Parameters

ParameterTypeRequiredDescription
future_typestrYesThe contract code of the future contract, excluding month code. Example: CL, ES
langLanguageNozh_CN,zh_TW,en_US.
default: client_config.language

Response

pandas.DataFrame

Structured as follows:

ColumnTypeDescription
contract_codestrFull contract code. e.g. VIX2208
continuousboolIf the contract is continuous
contract_monthstrMonth of delivery, in month code. Example: 202208 - 2022/08
currencystrCurrency of the contract
exchangestrExchange code
first_notice_datestrThe first notification day refers to the date when the physical delivery contract can be delivered physically, and the contract cannot open long positions after the first notification day. Existing long positions will be forced to close before the first notice day (usually the first three trading days). This field is empty for non-physical delivery contracts (such as index contracts)
last_bidding_close_timestrLast bidding time
last_trading_datestrRefers to the last trading date of the contract expiration month. Futures contracts that have not been cleared after the last trading day must be closed through the relevant "spot commodity" or "cash settlement". At present, the last trading day of most futures commodities is usually the settlement day. The first notification day of some commodities is the same day as the last trading day, such as the euro.For cash-settled futures, positions can be opened normally as long as the last trading time has not passed. Non-cash-settled futures are restricted from opening positions from the first three trading days according to the lesser of the last trading time and the first notice day.
min_tickfloatThe minimum quotation unit for futures price changes. For example, if the current futures price is 2000 and minTick is 100, the correct quotation includes 2100, 2200, and 2005 does not meet the requirements
multiplierfloatMultiplier of the contract
namestrname of the contract
symbolstrib symbol of the contract
tradeboolIf the contract is still open for trading
typestrContract code. Example: CL

Example

from tigeropen.quote.quote_client import QuoteClient
from tigeropen.tiger_open_config import get_client_config
client_config = get_client_config(private_key_path='private key path', tiger_id='your tiger id', account='your account')
quote_client = QuoteClient(client_config)

contract = quote_client.get_current_future_contract('ES')
print(contract.to_string())

Response Example

  contract_code  continuous contract_month currency  display_multiplier exchange exchange_code first_notice_date  last_bidding_close_time last_trading_date  min_tick  multiplier         name symbol  trade type

0        ES2503       False         202503      USD                   1      CME        GLOBEX                                          0          20250321      0.25        50.0  SP500指数2503     ES   True   ES


get_all_future_contracts

QuoteClient.get_all_future_contracts(future_type, lang=None)

Description

Get all contracts of a given future type, like 'CL'

Frequency Limit

Refer to Rate Limitopen in new window

Parameters

ParameterTypeRequiredDescription
future_typestrYesThe contract code of the future contract, excluding month code. Example: CL, ES
langLanguageNozh_CN,zh_TW,en_US.
default: client_config.language

Response

pandas.DataFrame

Structured as follows:

ColumnTypeDescription
contract_codestrFull contract code. e.g. VIX2208
continuousboolIf the contract is continuous
contract_monthstrMonth of delivery, in month code. Example: 202208 - 2022/08
currencystrCurrency of the contract
exchangestrExchange code
first_notice_datestrThe first notification day refers to the date when the physical delivery contract can be delivered physically, and the contract cannot open long positions after the first notification day. Existing long positions will be forced to close before the first notice day (usually the first three trading days). This field is empty for non-physical delivery contracts (such as index contracts)
last_bidding_close_timestrLast bidding time
last_trading_datestrRefers to the last trading date of the contract expiration month. Futures contracts that have not been cleared after the last trading day must be closed through the relevant "spot commodity" or "cash settlement". At present, the last trading day of most futures commodities is usually the settlement day. The first notification day of some commodities is the same day as the last trading day, such as the euro.For cash-settled futures, positions can be opened normally as long as the last trading time has not passed. Non-cash-settled futures are restricted from opening positions from the first three trading days according to the lesser of the last trading time and the first notice day.
min_tickfloatThe minimum quotation unit for futures price changes. For example, if the current futures price is 2000 and minTick is 100, the correct quotation includes 2100, 2200, and 2005 does not meet the requirements
multiplierfloatMultiplier of the contract
namestrname of the contract
symbolstrib symbol of the contract
tradeboolIf the contract is still open for trading
typestrContract code. Example: CL

Example

from tigeropen.quote.quote_client import QuoteClient
from tigeropen.tiger_open_config import get_client_config
client_config = get_client_config(private_key_path='private key path', tiger_id='your tiger id', account='your account')
quote_client = QuoteClient(client_config)

contracts = quote_client.get_all_future_contracts('CL')
print(contracts.head().to_string())

Response Example

  contract_code  continuous contract_month currency  display_multiplier exchange exchange_code first_notice_date  last_bidding_close_time last_trading_date  min_tick  multiplier       name symbol  trade type
0        CL2504       False         202504      USD                   1    NYMEX         NYMEX          20250324                        0          20250320      0.01      1000.0  WTI原油2504     CL   True   CL
1        CL2505       False         202505      USD                   1    NYMEX         NYMEX          20250424                        0          20250422      0.01      1000.0  WTI原油2505     CL   True   CL
2        CL2506       False         202506      USD                   1    NYMEX         NYMEX          20250522                        0          20250520      0.01      1000.0  WTI原油2506     CL   True   CL
3        CL2507       False         202507      USD                   1    NYMEX         NYMEX          20250624                        0          20250620      0.01      1000.0  WTI原油2507     CL   True   CL
4        CL2508       False         202508      USD                   1    NYMEX         NYMEX          20250724                        0          20250722      0.01      1000.0  WTI原油2508     CL   True   CL  

get_future_continuous_contracts

QuoteClient.get_future_continuous_contracts(future_type, lang=None)

Description

Get the continuous contracts of a given future type, like 'CL'

Rate Limit

Refer to Rate Limitopen in new window

Parameters

ParameterTypeRequiredDescription
future_typestrYesThe contract code of the future contract, excluding month code. Example: CL, ES
langLanguageNozh_CN,zh_TW,en_US.
default: client_config.language

Response

pandas.DataFrame

Example

from tigeropen.quote.quote_client import QuoteClient
from tigeropen.tiger_open_config import get_client_config
client_config = get_client_config(private_key_path='private key path', tiger_id='your tiger id', account='your account')
quote_client = QuoteClient(client_config)

contracts = quote_client.get_future_continuous_contracts('CL')
print(contracts.to_string())

Response Example

  contract_code  continuous contract_month currency  display_multiplier exchange exchange_code first_notice_date  last_bidding_close_time last_trading_date  min_tick  multiplier     name symbol  trade type
0        CLmain       False                     USD                   1    NYMEX         NYMEX                                          0                        0.01      1000.0  WTI原油主连     CL   True   CL


get_future_trading_times Get Trading Times of a Future Contract

get_future_trading_times(identifier, trading_date=None)

Description

Get Trading Times of a selected future contract

Rate Limit

Refer to Rate Limitopen in new window

Parameters

ParameterTypeRequiredDescription
identifierstrYesContract code. Example CL1901
trading_dateintNoThe specified trading date. If using a timestamp, it must be a 13-digit integer with millisecond precision. Alternatively, it can be a date-time formatted string, such as "2019-01-01" or "2019-01-01 12:00:00".

Response

pandas.DataFrame

Structured as follows:

ColumnTypeDescription
startintTime when trading starts
endintTime when trading ends
tradingboolIf it's a continuous trading session
biddingboolIf it's a bidding session
zonestrTime zone

Example

import pandas as pd
from tigeropen.quote.quote_client import QuoteClient
from tigeropen.tiger_open_config import get_client_config
client_config = get_client_config(private_key_path='private key file path', tiger_id='your tiger id', account='your account')
quote_client = QuoteClient(client_config)

times = quote_client.get_future_trading_times('CN1901', trading_date=1545049282852)
# Format start、end
times['zone_start'] = pd.to_datetime(times['start'], unit='ms').dt.tz_localize('UTC').dt.tz_convert(times['zone'][0])
times['zone_end'] = pd.to_datetime(times['end'], unit='ms').dt.tz_localize('UTC').dt.tz_convert(times['zone'][0])
print(times.to_string())

Response Example

           start            end  trading  bidding       zone                zone_start                  zone_end
0  1545036600000  1545037200000    False     True  Singapore 2018-12-17 16:50:00+08:00 2018-12-17 17:00:00+08:00
1  1545093900000  1545094800000    False     True  Singapore 2018-12-18 08:45:00+08:00 2018-12-18 09:00:00+08:00
2  1545121800000  1545122100000    False     True  Singapore 2018-12-18 16:30:00+08:00 2018-12-18 16:35:00+08:00
3  1545037200000  1545081300000     True    False  Singapore 2018-12-17 17:00:00+08:00 2018-12-18 05:15:00+08:00
4  1545094800000  1545121800000     True    False  Singapore 2018-12-18 09:00:00+08:00 2018-12-18 16:30:00+08:00 

get_future_bars Get Futures Bars

QuoteClient.get_future_bars(identifiers, period=BarPeriod.DAY, begin_time=-1, end_time=-1, limit=1000, page_token=None):

Description

It provides daily K-line data of popular contracts in the past 10 years, as well as minute-level data of all contracts from August 2017 to the present.

The returned result is a collection of data in reverse chronological order starting from endTime.

For the 1-minute K-line, if there is no transaction within this 1 minute, the K-line data of this minute will be blank; the interface can only pull the K-line data of this 1 minute after there is a transaction within the latest minute. The first transaction is generated at 50 seconds, and the latest data cannot be pulled before 50 seconds.

Frequency Limit

Refer to Rate Limitopen in new window

Parameters

NameTypeRequiredDescription
identifierslistYesFuture symbol list
periodBarPeriodNoThe obtained K-line period. You can use the enumeration constant provided under tigeropen.common.consts.BarPeriod, such as BarPeriod.DAY. 'day'/'week'/'month'/'year'/'1min'/'5min'/'15min'/'30min'/'60min'
default: BarPeriod.DAY
begin_timeintNoStart time, timestamp in milliseconds, the query result contains this time point,
default: -1,
end_timeintNoEnd time, timestamp in milliseconds, the query result does not include this time point,
default: -1
limitintNoLimit on the number of requests,
default 1000, maximum limit: 1000
page_tokenstrNoPaging token, which records the location of the paging. The next_page_token returned by the last request can be passed in as the start flag of the next request. When using pageToken to pull data by paging, other query conditions cannot be changed
begin_time and end_time both pass -1 by default, and will return according to the number of items set by limit

Response

pandas.DataFrame

Structured as follows:

columntypedescription
identifierstrFuture symbol
timeintThe timestamp corresponding to the Bar, that is, the end time of the Bar. The cutting method of the bar is consistent with that of the exchange. Taking CN1901 as an example, the data from 17:00 on T day to 16:30 on T+1 day will be synthesized into a daily bar.
latest_timeintBar Last time
openfloatOpen price
highfloatHigh price
lowfloatLow price
closefloatClose price
settlementfloatsettle price,returns 0 when no settlement price is generated
volumeintTrade volume
open_interestintOpen Interest Quantity
next_page_tokenstrpage token

Example

from tigeropen.quote.quote_client import QuoteClient
from tigeropen.tiger_open_config import get_client_config
client_config = get_client_config(private_key_path='private key path', tiger_id='your tiger id', account='your account')
quote_client = QuoteClient(client_config)

bars = quote_client.get_future_bars(['CN1901', 'MXP1903'],
                                          begin_time=-1,
                                          end_time=1545105097358)
print(bars.head().to_string())

Response

  identifier           time    latest_time     open     high      low    close  settlement  volume  open_interest next_page_token
0     CN1901  1545035400000  1545035700002  11022.5  11097.5  10935.0  10940.0     10935.0    3872          15148            None
1     CN1901  1544776200000  1544776168000  11182.5  11197.5  11002.5  11030.0     11042.5    1379          14895            None
2     CN1901  1544689800000  1544689765000  11012.5  11252.5  11012.5  11212.5     11202.5    4586          12870            None
3     CN1901  1544603400000  1544603321185  10940.0  11070.0  10940.0  11035.0     11032.5    3514          12237            None
4     CN1901  1544517000000  1544516945000  10895.0  10962.5  10815.0  10942.5     10927.5    2378          10575            None

get_future_bars_by_page Get future bars by page

QuoteClient.get_future_bars_by_page(identifier, period=BarPeriod.DAY, begin_time=-1, end_time=-1, total=10000, page_size=1000, time_interval=2)

Description Get Futures Bars

Frequency Limit

Refer to Rate Limitopen in new window

Parameters

ParameterTypeRequiredDescription
identifierstrYesfuture contract code
periodBarPeriodNoThe obtained K-line period. You can use the enumeration constant provided under tigeropen.common.consts.BarPeriod, such as BarPeriod.DAY. 'day'/'week'/'month'/'year'/'1min'/'5min'/'15min'/'30min'/'60min'
default: BarPeriod.DAY
begin_timeintNoStart time, timestamp in milliseconds, the query result contains this time point,
default: -1,
end_timeintNoEnd time, timestamp in milliseconds, the query result does not include this time point,
default: -1
totalintNorequest bar total count,
default: 10000
page_sizeintNoBar per page size,
default: 1000
time_intervalintNotime interval secondes,
default: 2 seconds
begin_time and end_time both pass -1 by default, and will return according to the number of items set by limit

Responsepandas.DataFrame

ParameterTypeDescription
identifierstrfuture contract code
timeintBar timestamp is bar finish time. The Bar is cut in the same way as the exchange, using CN1901 as an example, the data from 17:00 on day T to 16:30 on day T+1 will be synthesized into a daily Bar.
latest_timeintBar latest time
openfloatopen price
highfloathighest price
lowfloatlowest price
closefloatclose price
settlementfloatsettlement price
volumeintvolume
open_interestintopen interest
next_page_tokenstrnext page token

Example

from tigeropen.quote.quote_client import QuoteClient
from tigeropen.tiger_open_config import get_client_config
client_config = get_client_config(private_key_path='private key path', tiger_id='your tiger id', account='your account')
quote_client = QuoteClient(client_config)

bars = quote_client.get_future_bars_by_page('CLmain',
                                            end_time=1648526400000,
                                            total=10,
                                            page_size=4)
print(bars.head().to_string())

Response

  identifier           time    latest_time    open    high     low   close  settlement  volume  open_interest                                                       next_page_token
0     CLmain  1647378000000  1647377999000  102.28  102.58   93.53   95.18       96.44  297127         141240  ZnV0dXJlX2tsaW5lfENMbWFpbnxkYXl8MTY0ODUyNjQwMDAwMHwxNjQ3Mzc3OTcwMDAw
1     CLmain  1647464400000  1647464399000   95.23   99.22   94.07   95.36       95.04  220577         119614  ZnV0dXJlX2tsaW5lfENMbWFpbnxkYXl8MTY0ODUyNjQwMDAwMHwxNjQ3Mzc3OTcwMDAw
2     CLmain  1647550800000  1647550797000   95.34  104.24   94.85  103.62      102.98  129667          97283  ZnV0dXJlX2tsaW5lfENMbWFpbnxkYXl8MTY0ODUyNjQwMDAwMHwxNjQ3NTUwNzcwMDAw
3     CLmain  1647637200000  1647637192000  103.62  106.28  102.30  105.10      104.70   32312         280113  ZnV0dXJlX2tsaW5lfENMbWFpbnxkYXl8MTY0ODUyNjQwMDAwMHwxNjQ3NTUwNzcwMDAw
4     CLmain  1647896400000  1647896399000  103.62  111.08  102.47  110.93      109.97  187356         280043  ZnV0dXJlX2tsaW5lfENMbWFpbnxkYXl8MTY0ODUyNjQwMDAwMHwxNjQ3NTUwNzcwMDAw

get_future_trade_ticks Get Futures Trade Ticks

QuoteClient.get_future_trade_ticks(identifier, begin_index=0, end_index=30, limit=1000)

Description Obtain futures transaction data by ticks. The index resets to 0 every day at 6:00 AM China Standard Time. The previous day's tick data is cleared one minute before the earliest session (auction or trading). New tick data is registered after the new trading session starts. This reset only occurs once per trading day, i.e. multiple trading sessions within the same trading day do not trigger additional resets.

Note: Once the previous day's tick data is cleared, it is no longer accessible via the API.
For example: The GC2504 tick data will be accessible up until 5:59 AM but will be reset to index 0 at 6:00 AM.

Frequency Limit

Refer to Rate Limitopen in new window

Parameters

ParameterTypeRequiredDescription
identifierstrYesFuture symbol
begin_indexintNobegin index
default: 0
end_indexintNoend index
default:30
limitintNoreturn limit,
default: 1000, Maximum 1000 trade ticks

Response

pandas.DataFrame

Structured as follows:

nametypedescription
indexintindex
timeintTransaction time, timestamp accurate to milliseconds
pricefloattrade price
volumeinttrade volume

Example

from tigeropen.quote.quote_client import QuoteClient
from tigeropen.tiger_open_config import get_client_config
client_config = get_client_config(private_key_path='private key path', tiger_id='your tiger id', account='your account')
quote_client = QuoteClient(client_config)

ticks = quote_client.get_future_trade_ticks('CN1901')
print(ticks)

Response

   identifier  index           time        price  volume
0      CN1901      0  1547456400000  10607.50000       5
1      CN1901      1  1547456402000  10605.00000       6
2      CN1901      2  1547456407000  10602.50000       4
3      CN1901      3  1547456407000  10605.00000       2
4      CN1901      4  1547456424000  10602.50000       5

get_future_brief Get The Latest Futures Quotes

QuoteClient.get_future_brief(identifiers)

Description Get the latest futures quotes, Including ask-bid data, latest transaction data, etc.

Frequency Limit

Refer to Rate Limitopen in new window

Parameters

ParameterTypeRequiredDescription
identifierslistYesfutures code name list,such as ['CL2201']

Response

pandas.DataFrame

Structured as follows:

columntypedescription
identifierstrfuture symbol
ask_pricefloatask price
ask_sizeintask quantity
bid_pricefloatbid price
bid_sizeintbid quantity
pre_closefloatPre closing price
latest_pricefloatlast price
latest_sizeintlast quantity
latest_timeintlast time
volumeintintraday cumulative volume
open_interestintopen Interest Quantity
openfloatopen price
highfloathigh price
lowfloatlow price
limit_upfloatlimit up
limit_downfloatlimit down

Example

from tigeropen.quote.quote_client import QuoteClient
from tigeropen.tiger_open_config import get_client_config
client_config = get_client_config(private_key_path='private key path', tiger_id='your tiger id', account='your account')
quote_client = QuoteClient(client_config)

briefs = quote_client.get_future_brief(['CN1901', 'MXP1903'])
print(briefs.to_string)


Response

  identifier    ask_price  ask_size    bid_price  bid_size pre_close  \
0     CN1901  10677.50000        13  10675.00000       145      None   
1    MXP1903      0.05219         9      0.05218         3      None   

   latest_price  latest_size    latest_time  volume  open_interest  \
0   10677.50000            2  1547519736000  111642         863308   
1       0.05219            4  1547519636000    1706         190126   

          open         high          low    limit_up  limit_down  
0  10607.50000  10707.50000  10572.50000  11670.0000   9550.0000  
1      0.05223      0.05223      0.05216      0.0562      0.0482  

Last update: