Funds
get_fund_symbols Get Fund Symbol List
value QuoteClient::get_fund_symbols()
Description
Get the list of all fund symbol codes
Parameters
None
Return
web::json::value JSON object
Example
#include "tigerapi/quote_client.h"
#include "tigerapi/client_config.h"
using namespace TIGER_API;
ClientConfig config(false, U("/path/to/your/properties/"));
QuoteClient quote_client(config);
value result = quote_client.get_fund_symbols();
ucout << result.serialize() << std::endl;Return Example
[
"IE00B11XZ988.USD",
"IE00B7SZLL34.SGD",
"LU0790902711.USD",
"LU0476943708.HKD",
"LU0098860793.USD",
"SG9999014039.USD"
]
get_fund_contracts Get Fund Contract Information
value QuoteClient::get_fund_contracts(const value &symbols)
Description
Batch get fund contract information
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| symbols | value | Yes | Fund symbol code array, e.g., value::array({value::string(U("IE00B11XZ988.USD"))}) |
Return
web::json::value JSON object
Data item fields:
| Name | Example | Description |
|---|---|---|
| symbol | IE00B464Q616.USD | Fund symbol code, 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 | Security type |
| currency | USD | USD/HKD/CNH |
| tradeable | true | Whether tradeable |
| sub_type | Fixed Income | Sub type |
| dividend_type | INC | Dividend type |
| tiger_vault | false | Whether Tiger Vault fund |
Example
#include "tigerapi/quote_client.h"
#include "tigerapi/client_config.h"
using namespace TIGER_API;
ClientConfig config(false, U("/path/to/your/properties/"));
QuoteClient quote_client(config);
value symbols = value::array();
symbols[0] = value::string(U("IE00B11XZ988.USD"));
value result = quote_client.get_fund_contracts(symbols);
ucout << result.serialize() << std::endl;get_fund_quote Get Fund Latest Quote
value QuoteClient::get_fund_quote(const value &symbols)
Description
Get the latest fund quotes
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| symbols | value | Yes | Fund symbol code array, max 500 |
Return
web::json::value JSON object
| Field | Type | Description |
|---|---|---|
| symbol | string | Symbol code |
| close | float | Close price |
| timestamp | int | Millisecond timestamp |
Example
#include "tigerapi/quote_client.h"
#include "tigerapi/client_config.h"
using namespace TIGER_API;
ClientConfig config(false, U("/path/to/your/properties/"));
QuoteClient quote_client(config);
value symbols = value::array();
symbols[0] = value::string(U("IE00B11XZ988.USD"));
symbols[1] = value::string(U("LU0476943708.HKD"));
value result = quote_client.get_fund_quote(symbols);
ucout << result.serialize() << std::endl;Return Example
symbol close timestamp
0 IE00B11XZ988.USD 25.10 1691596800000
1 LU0476943708.HKD 5.22 1691596800000
get_fund_history_quote Get Fund Historical Quote
value QuoteClient::get_fund_history_quote(const value &symbols, time_t begin_time, time_t end_time, int limit)
Description
Get fund historical quotes
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| symbols | value | Yes | Fund symbol code array, max 500 |
| begin_time | time_t | Yes | Start timestamp, unit: milliseconds (ms) |
| end_time | time_t | Yes | End timestamp, unit: milliseconds (ms) |
| limit | int | No | Number of records per symbol to return |
Return
web::json::value JSON object
| Field | Type | Description |
|---|---|---|
| symbol | string | Symbol code |
| nav | float | Net asset value |
| time | int | Timestamp |
Example
#include "tigerapi/quote_client.h"
#include "tigerapi/client_config.h"
using namespace TIGER_API;
ClientConfig config(false, U("/path/to/your/properties/"));
QuoteClient quote_client(config);
value symbols = value::array();
symbols[0] = value::string(U("LU0476943708.HKD"));
value result = quote_client.get_fund_history_quote(symbols, 1691337600000, 1691596800000);
ucout << result.serialize() << std::endl;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 1 day ago
