Fund
About 2 min
Get Fund Symbol List
request: QuoteClient.get_fund_symbols()
Description
Get a list of all symbols
Argument
Argument | Type | Required | Description |
---|---|---|---|
- | - | - | - |
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
Argument | Type | optional | Description |
---|---|---|---|
symbols | list[str] | Yes | Ticker symbol of the fund, example: "IE00B11XZ988.USD" / "LU0790902711.USD" |
lang | str | No | Language: zh_CN,zh_TW,en_US. en_US by default |
Response
pandas.DataFrame
Name | Example | Description |
---|---|---|
symbol | IE00B464Q616.USD | fund symbol, suffix for currency |
name | ASIA STRATEGIC INTEREST BOND FUND "E" (USD) INC MONTHLY | name of the asset |
company_name | PIMCO Global Advisors (Ireland) Limited | company name |
market | US | market /US/HK/CN |
sec_type | FUND | security type |
currency | USD | USD/HKD/CNH |
tradeable | true | if available for trading |
subType | Fixed Income | sub type |
dividend_type | INC | dividend type |
tigerVault | false | is 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
Argument | Type | Required | Description |
---|---|---|---|
symbols | list[str] | yes | symbol, maximum number per request is 500 |
Response
pandas.DataFrame
Name | Type | Description |
---|---|---|
symbol | str | fund symbol |
close | float | close price |
timestamp | int | timestamp |
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
Argument | Type | Required | Description |
---|---|---|---|
symbols | list[str] | Yes | symbol, maximum number per request is 500 |
begin_time | int | Yes | Begin time. Unix time stamp in millisecond or a date string. Example: 1639371600000 |
end_time | int | Yes | End time. Unix time stamp in millisecond or a date string. Example: 1639371600000 |
limit | int | No | The number of bars returned |
Response pandas.DataFrame
Name | Type | Description |
---|---|---|
symbol | str | fund symbol |
nav | float | net value |
time | int | timestamp |
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