Fund

About 2 min

Get Fund Symbol List

request: QuoteClient.get_fund_symbols()

Description

Get a list of all symbols

Argument

ArgumentTypeRequiredDescription
----

Response

list[str]

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)

result = quote_client.get_fund_symbols()
print(result)

Response Example

[
        "IE00B11XZ988.USD",
        "IE00B7SZLL34.SGD",
        "LU0790902711.USD",
        "LU0476943708.HKD",
        "LU0098860793.USD",
        "SG9999014039.USD"
    ]

Get Fund Contracts

request: QuoteClient.get_fund_contracts(symbols: list[str])

Description

Get fund contracts in batches.

Argument

ArgumentTypeoptionalDescription
symbolslist[str]YesTicker symbol of the fund, example: "IE00B11XZ988.USD" / "LU0790902711.USD"
langstrNoLanguage: zh_CN,zh_TW,en_US. en_US by default

Response

pandas.DataFrame

NameExampleDescription
symbolIE00B464Q616.USDfund symbol, suffix for currency
nameASIA STRATEGIC INTEREST BOND FUND "E" (USD) INC MONTHLYname of the asset
company_namePIMCO Global Advisors (Ireland) Limitedcompany name
marketUSmarket /US/HK/CN
sec_typeFUNDsecurity type
currencyUSDUSD/HKD/CNH
tradeabletrueif available for trading
subTypeFixed Incomesub type
dividend_typeINCdividend type
tigerVaultfalseis tiger vault

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)

result = quote_client.get_fund_contracts(symbols=['IE00B11XZ988.USD'])
print(result)

Response Example

             symbol                                name      company_name market sec_type currency  tradeable      sub_type dividend_type  tiger_vault
0  IE00B11XZ988.USD                  PIMCO E Acc  xxx     MF     FUND      USD       True  Fixed Income           ACC        False
1  LU0476943708.HKD               A (Mdis)HKD         xxx     MF     FUND      HKD       True  Fixed Income           INC        False
2  SG9999017602.SGD  United Asian Bond Fund A Acc SGD-H          xxx     MF     FUND      SGD       True  Fixed Income           ACC        False

Get Latest Quotes

request: QuoteClient.get_fund_quote(symbols: list[str])

Description

Get Fund latest Quotes

Argument

ArgumentTypeRequiredDescription
symbolslist[str]yessymbol, maximum number per request is 500

Response

pandas.DataFrame

NameTypeDescription
symbolstrfund symbol
closefloatclose price
timestampinttimestamp

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)
result = quote_client.get_fund_quote(['IE00B11XZ988.USD', 'LU0476943708.HKD'])
print(result)
print(result.iloc[0]['close'])
# to python type
close = float(result.iloc[0]['close'])

Response Example

             symbol  close      timestamp
0  IE00B11XZ988.USD  25.10  1691596800000
1  LU0476943708.HKD   5.22  1691596800000

Get Historical Quotes

request: QuoteClient.get_fund_history_quote(symbols: list[str], begin_time: int, end_time: int = None, limit: int = None)

Description

Get Fund historical quotes

Argument

ArgumentTypeRequiredDescription
symbolslist[str]Yessymbol, maximum number per request is 500
begin_timeintYesBegin time. Unix time stamp in millisecond or a date string. Example: 1639371600000
end_timeintYesEnd time. Unix time stamp in millisecond or a date string. Example: 1639371600000
limitintNoThe number of bars returned

Response pandas.DataFrame

NameTypeDescription
symbolstrfund symbol
navfloatnet value
timeinttimestamp

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)

result = quote_client.get_fund_history_quote(['LU0476943708.HKD', 'LU0476943708.HKD'], begin_time=1691337600000, end_time=1691596800000)
print(result)
if not result.empty:
    print(result.loc[result['symbol']=='LU0476943708.HKD'].iloc[0]['nav'])

Response Example

               symbol           time   nav
0    LU0476943708.HKD  1691596800000  5.22
1    LU0476943708.HKD  1691510400000  5.22
2    LU0476943708.HKD  1691424000000  5.20
3    LU0476943708.HKD  1691337600000  5.25

Last update: