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
| Parameter | Type | Required | Description |
|---|---|---|---|
| symbols | list[str] | Yes | Fund symbol list e.g.: "IE00B11XZ988.USD" / "LU0790902711.USD" |
Returns
pandas.DataFrame
The data fields are as follows:
| Name | Example | Description |
|---|---|---|
| symbol | IE00B464Q616.USD | Fund symbol, suffix is currency |
| name | ASIA STRATEGIC INTEREST BOND FUND "E" (USD) INC MONTHLY | Fund name |
| company_name | PIMCO Global Advisors (Ireland) Limited | Fund company name |
| market | US | Market /US/HK/CN |
| sec_type | FUND | Contract type |
| currency | USD | USD/HKD/CNH |
| tradeable | true | Whether tradeable |
| sub_type | Fixed Income | Sub category |
| dividend_type | INC | Dividend type |
| tiger_vault | false | Whether 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
| Parameter | Type | Required | Description |
|---|---|---|---|
| symbols | list[str] | yes | Fund symbols, maximum limit 500 |
Returns
pandas.DataFrame
| Field | Type | Description |
|---|---|---|
| symbol | str | Symbol code |
| close | float | Closing price |
| timestamp | int | Timestamp 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
| Parameter | Type | Required | Description |
|---|---|---|---|
| symbols | list[str] | Yes | Fund symbols, maximum limit 500 |
| begin_time | int | Yes | Start timestamp in milliseconds(ms) |
| end_time | int | Yes | End timestamp in milliseconds(ms) |
| limit | int | No | Data volume limit per symbol |
Returns
pandas.DataFrame
| Field | Type | Description |
|---|---|---|
| symbol | str | Symbol code |
| nav | float | Net value |
| time | int | Timestamp |
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
Updated 9 days ago
