中文

Funds

get_fund_symbols Get Fund Symbol List

QuoteClient.get_fund_symbols()

Description

Get all fund symbol list

Parameters

None

Returns

list[str]

Example

from tigeropen.quote.quote_client import QuoteClient
from tigeropen.tiger_open_config import TigerOpenClientConfig
client_config = TigerOpenClientConfig(props_path='/path/to/your/properties/file/')

quote_client = QuoteClient(client_config)

result = quote_client.get_fund_symbols()
print(result)

Return Example

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

get_fund_contracts Get Fund Contract Information

QuoteClient.get_fund_contracts(symbols)

Description

Batch retrieve fund contract information

Parameters

ParameterTypeRequiredDescription
symbolslist[str]YesFund symbol list e.g.: "IE00B11XZ988.USD" / "LU0790902711.USD"

Returns

pandas.DataFrame

The data fields are as follows:

NameExampleDescription
symbolIE00B464Q616.USDFund symbol, suffix is currency
nameASIA STRATEGIC INTEREST BOND FUND "E" (USD) INC MONTHLYFund name
company_namePIMCO Global Advisors (Ireland) LimitedFund company name
marketUSMarket /US/HK/CN
sec_typeFUNDContract type
currencyUSDUSD/HKD/CNH
tradeabletrueWhether tradeable
sub_typeFixed IncomeSub category
dividend_typeINCDividend type
tiger_vaultfalseWhether Tiger Vault

Example

from tigeropen.quote.quote_client import QuoteClient
from tigeropen.tiger_open_config import TigerOpenClientConfig
client_config = TigerOpenClientConfig(props_path='/path/to/your/properties/file/')

quote_client = QuoteClient(client_config)

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

Return Example

             symbol                                name         company_name    market  \
0  IE00B11XZ988.USD        PIMCO Total Return Bond Fund E Acc   Pacific Global Advisors Ltd        MF   \  
1  LU0476943708.HKD    Templeton Global Total Return Fund A (Mdis)HKD    Franklin Templeton Investment      MF  \   
2  SG9999017602.SGD  United Asian Bond Fund A Acc SGD-H          UOB Asset Management      MF   \       

sec_type     currency  tradeable      sub_type dividend_type  tiger_vault
    FUND          USD       True  Fixed Income           ACC        False
    FUND          HKD       True  Fixed Income           INC        False
    FUND          SGD       True  Fixed Income           ACC        False

get_fund_quote Get Latest Fund Quotes

QuoteClient.get_fund_quote(symbols: list[str])

Description

Get latest fund quotes

Parameters

ParameterTypeRequiredDescription
symbolslist[str]yesFund symbols, maximum limit 500

Returns

pandas.DataFrame

FieldTypeDescription
symbolstrSymbol code
closefloatClosing price
timestampintTimestamp in milliseconds

Example

from tigeropen.quote.quote_client import QuoteClient
from tigeropen.tiger_open_config import TigerOpenClientConfig
client_config = TigerOpenClientConfig(props_path='/path/to/your/properties/file/')


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'])

Return Example

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

get_fund_history_quote Get Historical Fund Quotes

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

Description

Get historical fund quotes

Parameters

ParameterTypeRequiredDescription
symbolslist[str]YesFund symbols, maximum limit 500
begin_timeintYesStart timestamp in milliseconds(ms)
end_timeintYesEnd timestamp in milliseconds(ms)
limitintNoData volume limit per symbol

Returns

pandas.DataFrame

FieldTypeDescription
symbolstrSymbol code
navfloatNet value
timeintTimestamp

Example

from tigeropen.quote.quote_client import QuoteClient
from tigeropen.tiger_open_config import TigerOpenClientConfig
client_config = TigerOpenClientConfig(props_path='/path/to/your/properties/file/')

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'])

Return 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