Fund

About 3 min

Get Fund Symbol List

request: FundSymbolRequest

Description

Get a list of all symbols

Argument

ArgumentTypeRequiredDescription
----

Response

com.tigerbrokers.stock.openapi.client.https.response.fund.FundSymbolResponsesourceopen in new window

Structured as follows

public class FundSymbolResponse extends TigerResponse {
  @JSONField(name = "data")
  private List<String> symbols;
}

Use FundSymbolResponse.getSymbols() to get the data returned from the server. The result is a list that contains the fund symbols

Example

TigerHttpClient client = TigerHttpClient.getInstance().clientConfig(
      ClientConfig.DEFAULT_CONFIG);
FundSymbolResponse response = client.execute(FundSymbolRequest.newRequest());
if (response.isSuccess()) {
  ApiLogger.info(JSONObject.toJSONString(response));
} else {
  ApiLogger.info("response error:" + response.getMessage());
}

Return Example

{
    "code":0,
    "data":[
        "IE00B11XZ988.USD",
        "IE00B7SZLL34.SGD",
        "LU0790902711.USD",
        "LU0476943708.HKD",
        "LU0098860793.USD",
        "SG9999014039.USD"
        // ....
    ],
    "message":"success",
    "sign":"zCIL+uNR083O4FoEUYKudVcstKCzMlZQD2WxRLhjf7pj2qaxhGCaJUtFY95zsmvK0kEI7YL/MyyTMsQU8dfd4/oF9FdDQdWWZRQxAiyJe8+aQuBdRg+BxN8xOl3TahTx2pPklyAxQIMKRJBU3ZgY9OPb040kucXTWgNyP8O643w=",
    "success":true,
    "timestamp":1690858442132
}

Get Fund Contracts

request: FundContractsRequest

Description

Get fund contracts in batches.

Argument

com.tigerbrokers.stock.openapi.client.https.request.fund.FundContractsRequest

ArgumentTypeoptionalDescription
symbolsList<string>YesTicker symbol of the fund, example: "IE00B11XZ988.USD" / "LU0790902711.USD"
langstringNoLanguage: zh_CN,zh_TW,en_US. en_US by default

Response

com.tigerbrokers.stock.openapi.client.https.response.fund.FundContractsResponse

Use FundContractsResponse.getFundContractItems() to access returned data. This method will return FundContractItem objects, wherecom.tigerbrokers.stock.openapi.client.https.domain.fund.item.FundContractItem has the following attributes:

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

Example

List<String> symbols = new ArrayList<>();
symbols.add("IE00B11XZ988.USD");
symbols.add("LU0476943708.HKD");
FundContractsRequest request = FundContractsRequest.newRequest(symbols, Language.zh_CN);
FundContractsResponse response = client.execute(request);
if (response.isSuccess()) {
  System.out.println(JSONObject.toJSONString(response));
} else {
  System.out.println("response error:" + response.getMessage());
}

Response Example

{
    "code":0,
    "data":[
        {
            "companyName":"PIMCO Global Advisors (Ireland) Limited",
            "currency":"USD",
            "dividendType":"ACC",
            "market":"MF",
            "name":"PIMCO TOTAL RETURN BOND \"E\" ACC",
            "secType":"FUND",
            "subType":"Fixed Income",
            "symbol":"IE00B11XZ988.USD",
            "tigerVault":false,
            "tradeable":true
        },
        {
            "companyName":"Franklin Templeton International Services S.à r.l.",
            "currency":"HKD",
            "dividendType":"INC",
            "market":"MF",
            "name":"TEMPLETON GLOBAL TOTAL RETURN \"A\" (HKD) INC (M)",
            "secType":"FUND",
            "subType":"Fixed Income",
            "symbol":"LU0476943708.HKD",
            "tigerVault":false,
            "tradeable":true
        }
    ],
    "message":"success",
    "sign":"UHNDqKyTR4MRAAS+TQhgri5FOHyshxuxDqbt8hv8RYnWoOHfHZVZfWo6Vx9/BE3nA9OioRq8mbeLj3FFGihHAvFPUXGval5qqiHty8rYkNeL/6wCjklkAHF9WremAEhwJ9jT3T4wBFX9AueE2Vpqe/fUF4F8VFUJrAKHNZHu9lk=",
    "success":true,
    "timestamp":1690871679616
}

Get Latest Quotes

request: FundQuoteRequest

Description

Get Fund latest Quotes

Argument

ArgumentTypeRequiredDescription
symbolsList<String>yessymbol, maximum number per request is 500

Responsecom.tigerbrokers.stock.openapi.client.https.response.fund.FundQuoteResponsesourceopen in new window

Structured as follows:

public class FundQuoteResponse extends TigerResponse {
  @JSONField(name = "data")
  private List<FundQuoteItem> quoteItems;
}

Use FundQuoteResponse.getQuoteItems() to access returned data. This method will return a list of FundQuoteItem object, wherecom.tigerbrokers.stock.openapi.client.https.domain.fund.item.FundQuoteItem has the following attributes:

NameTypeDescription
symbolstringfund symbol
closefloatclose price
timestamplongtimestamp

Use the get methods, such asgetSymbol() to access data

Example

    List<String> symbols = new ArrayList<>();
    symbols.add("IE00B11XZ988.USD");
    symbols.add("LU0476943708.HKD");

    FundQuoteRequest request = FundQuoteRequest.newRequest(symbols);
    FundQuoteResponse response = client.execute(request);
    if (response.isSuccess()) {
      System.out.println(JSONObject.toJSONString(response));
    } else {
      System.out.println("response error:" + response.getMessage());
    }

Response Example

{
    "code":0,
    "data":[
        {
            "close":25.33,
            "symbol":"IE00B11XZ988.USD",
            "timestamp":1690732800000
        },
        {
            "close":5.36,
            "symbol":"LU0476943708.HKD",
            "timestamp":1690732800000
        }
    ],
    "message":"success",
    "sign":"lRsJPcIf/NfEoTAKH+cR0S1F3dSNuxntCBZ13BaZKVjrjSbUZEg2epbeaqWrxzxnnoXSl66dbrHuQ7+F3TKmYIjjpO0ZcZbhLMdclO0AQWRrrCtpmytMIQSuLsGWqhO+N0mNAVgMCBGWB8Af4kZOZw3K6IPP9abTLKeteDH5zNk=",
    "success":true,
    "timestamp":1690873154646
}

Get Historical Quotes

request: FundHistoryQuoteRequest

Description

Get Fund historical quotes

Argument

ArgumentTypeRequiredDescription
symbolsList<String>Yessymbol, maximum number per request is 500
begin_timeLongYesBegin time. Unix time stamp in millisecond or a date string. Example: 1639371600000
end_timeLongYesEnd time. Unix time stamp in millisecond or a date string. Example: 1639371600000
limitintegerNoThe number of bars returned

Responsecom.tigerbrokers.stock.openapi.client.https.response.fund.FundHistoryQuoteResponsesourceopen in new window

Structured as follows:

public class FundHistoryQuoteResponse extends TigerResponse {
  @JSONField(name = "data")
  private List<FundHistoryQuoteItem> quoteItems;
}

Use FundHistoryQuoteResponse.getQuoteItems() to access returned data. This method will return a list of FundHistoryQuoteItem object, wherecom.tigerbrokers.stock.openapi.client.https.domain.fund.item.FundHistoryQuoteItem has the following attributes:

NameTypeDescription
symbolstringfund symbol
itemsList<FundQuotePoint>list of historical quote data

FundQuotePointhas the following attributes:

NameTypeDescription
navdoublenet value
timelongtimestamp

Use the get methods, such asgetNav() to access data

Example

    List<String> symbols = new ArrayList<>();
    symbols.add("IE00B11XZ988.USD");
    symbols.add("LU0476943708.HKD");

    FundHistoryQuoteRequest request = FundHistoryQuoteRequest.newRequest(symbols);
    request.beginTime(DateUtils.getTimestamp("2023-07-01", TimeZoneId.Shanghai));
    request.endTime(DateUtils.getTimestamp("2023-07-26", TimeZoneId.Shanghai));
    request.limit(5);
    FundHistoryQuoteResponse response = client.execute(request);
    if (response.isSuccess()) {
      System.out.println(JSONObject.toJSONString(response));
    } else {
      System.out.println("response error:" + response.getMessage());
    }

Response Example

{
    "code":0,
    "data":[
        {
            "items":[
                {
                    "nav":25.38,
                    "time":1690300800000
                },
                {
                    "nav":25.31,
                    "time":1690214400000
                },
                {
                    "nav":25.34,
                    "time":1690128000000
                },
                {
                    "nav":25.37,
                    "time":1689868800000
                },
                {
                    "nav":25.36,
                    "time":1689782400000
                }
            ],
            "symbol":"IE00B11XZ988.USD"
        },
        {
            "items":[
                {
                    "nav":5.39,
                    "time":1690300800000
                },
                {
                    "nav":5.38,
                    "time":1690214400000
                },
                {
                    "nav":5.39,
                    "time":1690128000000
                },
                {
                    "nav":5.38,
                    "time":1689868800000
                },
                {
                    "nav":5.4,
                    "time":1689782400000
                }
            ],
            "symbol":"LU0476943708.HKD"
        }
    ],
    "message":"success",
    "sign":"uG/+KZ4w5Rzroex9jQECO57WH5rv0HlkRY3O+otB3nyAS3+L3+owhfBsowNkKABJn7GdIw8VvBgBnMZXW2BdfLaq50S99QwZ4OAW0oxeA708QMdoB/BN3O0CReo+ztgDVpJVyImQDJnOHgsOaqyqzc7cNoDwnc0e2h1ETv6JZtw=",
    "success":true,
    "timestamp":1690875443405
}
Last update: