Crypto

Get Symbol List

Request Class:QuoteSymbolRequest

Description

Retrieve the list of all cryptocurrency symbols.

Parameters

ParameterTypeRequiredDescription
sec_typestringYesMust be CC

Response

com.tigerbrokers.stock.openapi.client.https.response.quote.QuoteSymbolResponse source

Structure

public class QuoteSymbolResponse extends TigerResponse {

  @JSONField(name = "data")
  private List<String> symbols;
}

The returned data can be accessed via QuoteSymbolResponse.getSymbols(), which returns a List containing cryptocurrency symbols.

Example Request

TigerHttpClient client = TigerHttpClient.getInstance().clientConfig(
  ClientConfig.DEFAULT_CONFIG);

QuoteSymbolRequest request = QuoteSymbolRequest.newCcRequest();

QuoteSymbolResponse response = client.execute(request);
if (response.isSuccess()) {
  System.out.println(Arrays.toString(response.getSymbols().toArray()));
} else {
  System.out.println("response error:" + response.getMessage());
}

Example Response

{
  "code" : 0,
  "message" : "success",
  "timestamp" : 1770033519398,
  "symbols" : [ "APT.USD", "IOTX.USD", "USDT.USD", "DYDX.USD", "DOGE.USD", "KAIA.USD", "ATOM.USD", "COMP.USD", "UNI.USD", "AAVE.USD", "LDO.USD", "LINK.USD", "SNX.USD", "OP.USD", "DOT.USD", "POL.USD", "BTC.USD", "SOL.USD", "ARB.USD", "TON.USD", "AVAX.USD", "MKR.USD", "IMX.USD", "ETH.USD", "LTC.USD" ],
  "success" : true
}

Get Real-Time Quotes

Request Class:QuoteRealTimeQuoteRequest

Description

Retrieve real-time quotes for cryptocurrencies.

Parameters

ParameterTypeRequiredDescription
symbolslistYesList of cryptocurrency symbols (max 50)
sec_typestringYesMust be CC

Response

com.tigerbrokers.stock.openapi.client.https.response.quote.QuoteRealTimeQuoteResponsesource

Data can be accessed via: QuoteRealTimeQuoteResponse.getRealTimeQuoteItems()

Returns a list of RealTimeQuoteItem.

FieldTypeDescription
symbolstringCryptocurrency symbol
opendoubleOpen price
highdoubleHigh price
lowdoubleLow price
closedoubleClose price
preClosedoublePrevious close price
latestPricedoubleLatest traded price
latestTimelongLatest trade timestamp
volumeDecimaldoubleTrading volume (original precision)
changedoublePrice change
changeRatedoubleChange rate

Example Request

List<String> symbols = new ArrayList<>();
symbols.add("BTC.USD");
symbols.add("ETH.USD");
QuoteRealTimeQuoteRequest request = QuoteRealTimeQuoteRequest.newCcRequest(symbols);

QuoteRealTimeQuoteResponse response = client.execute(request);
if (response.isSuccess()) {
  System.out.println(Arrays.toString(response.getRealTimeQuoteItems().toArray()));
} else {
  System.out.println("response error:" + response.getMessage());
}

Example Response


{
  "code" : 0,
  "message" : "success",
  "timestamp" : 1770032332142,
  "realTimeQuoteItems" : [ {
    "symbol" : "BTC.USD",
    "open" : 77517.15,
    "high" : 78366.03,
    "low" : 74550.0,
    "close" : 77517.15,
    "preClose" : 77517.15,
    "latestPrice" : 77839.45,
    "latestTime" : 1770032330750,
    "volumeDecimal" : 697.55996,
    "change" : 322.3,
    "changeRate" : 0.004157789598817811
  }, {
    "symbol" : "ETH.USD",
    "open" : 2314.18,
    "high" : 2374.87,
    "low" : 2156.8,
    "close" : 2313.05,
    "preClose" : 2313.05,
    "latestPrice" : 2286.79,
    "latestTime" : 1770032330750,
    "volumeDecimal" : 25668.0994,
    "change" : -26.26,
    "changeRate" : -0.011352975508527702
  } ],
  "success" : true
}

Get K-Line Quotes

Request Class:QuoteKlineRequest

Description

Retrieve cryptocurrency K-line (candlestick) data.

Supported intervals:

  • 1min
  • 60min
  • day
  • week
  • month

Each request returns up to 1200 records. For longer historical ranges, use multiple requests.

Historical Data Availability:

  • Minute-level K-line: BTC available from March 27, 2024
  • Daily and above (day/week/month/year): BTC available from July 13, 2010

Parameters

ParameterTypeDescription
symbolslistCryptocurrency symbols (max 10)
periodstringK-line type: 1min, 60min, day, week, month
begin_timelongStart timestamp
end_timelongEnd timestamp
limitintMax records (default 300, max 1200)

Response

com.tigerbrokers.stock.openapi.client.https.response.quote.QuoteKlineResponsesource

Returns a list of KlineItem:

FieldTypeDescription
symbolstringCryptocurrency symbol
periodstringK-line interval
itemsarrayArray of K-line objects (KlinePoint). See fields below.

KlinePoint Fields:

FieldTypeDescription
closedoubleClose price
highdoubleHigh price
lowdoubleLow price
opendoubleOpen price
timelongTimestamp
volumeDecimaldoubleTrading volume (original precision)

The specific fields can be accessed via the object's getter methods, such as getSymbol().

Example Request

TigerHttpClient client = TigerHttpClient.getInstance().clientConfig(
      ClientConfig.DEFAULT_CONFIG);

List<String> symbols = Arrays.asList("BTC.USD", "ETH.USD");
KType kType = KType.min1;
String startTime = "2026-01-29";
String endTime = "2026-01-30";
TimeZoneId timeZoneId = TimeZoneId.NewYork;
int limit = 200;
QuoteKlineRequest request = QuoteKlineRequest.newRequest(symbols, kType, startTime, endTime, timeZoneId)
        .withLimit(limit)
        .withSecType(SecType.CC);
QuoteKlineResponse response = client.execute(request);
if (response.isSuccess()) {
  System.out.println(JSONObject.toJSONString(response));
} else {
  System.out.println("response error:" + response.getMessage());
}

Example Response

{
  "code" : 0,
  "message" : "success",
  "timestamp" : 1770037196690,
  "klineItems" : [ {
    "symbol" : "BTC.USD",
    "period" : "1min",
    "items" : [ {
      "open" : 82808.12,
      "close" : 82780.21,
      "high" : 82808.12,
      "low" : 82772.25,
      "time" : 1769749140000,
      "volumeDouble" : 0.29135
    }, {
      "open" : 82810.81,
      "close" : 82803.37,
      "high" : 82810.81,
      "low" : 82803.37,
      "time" : 1769749080000,
      "volumeDouble" : 0.04455
    }, {
      "open" : 82823.91,
      "close" : 82810.17,
      "high" : 82823.91,
      "low" : 82791.82,
      "time" : 1769749020000,
      "volumeDecimal" : 0.0493
    } ],
  }, {
    "symbol" : "ETH.USD",
    "period" : "1min",
    "items" : [ {
      "open" : 2751.48,
      "close" : 2748.85,
      "high" : 2751.75,
      "low" : 2746.08,
      "time" : 1769749140000,
      "volumeDecimal" : 21.495
    }, {
      "open" : 2751.84,
      "close" : 2751.83,
      "high" : 2751.84,
      "low" : 2751.83,
      "time" : 1769749080000,
      "volumeDecimal" : 0.022
    }, {
      "open" : 2753.08,
      "close" : 2753.07,
      "high" : 2753.08,
      "low" : 2753.07,
      "time" : 1769749020000,
      "volumeDecimal" : 0.4104
    } ],
  } ],
  "success" : true
}

Get Intraday Timeline Quotes

Request Class:QuoteTimelineRequest

Description

Retrieve intraday timeline data for the most recent trading day. The timeline data is similar to minute-level K-line data, where one record is generated per minute.

Only the most recent trading day's data is supported.

Parameters

ParameterTypeRequiredDescription
symbolsarrayYesList of cryptocurrency symbols
periodstringYesTimeline period. Supported values: day and day5
begin_timelongNoStart timestamp (in milliseconds). Defaults to the current trading day

Response

com.tigerbrokers.stock.openapi.client.https.response.quote.QuoteTimelineResponsesource

The returned data can be accessed via: QuoteTimelineResponse.getTimelineItems()

TimelineItem Fields:

FieldTypeDescription
symbolstringCryptocurrency symbol
periodstringPeriod (day or 5day)
preClosedoublePrevious close price
intradayobjectIntraday data array (see below)

TimelineItem的具体字段可通过对象的get方法,如getSymbol(),进行访问

The specific fields of TimelineItem can be accessed using getter methods such as getSymbol().

Intraday Fields:

FieldDescription
avgPriceAverage trade price
priceLatest price
timeTimestamp
volumeDecimalTrading volume (original precision retained)

Example Request

TigerHttpClient client = TigerHttpClient.getInstance().clientConfig(
  ClientConfig.DEFAULT_CONFIG);

List<String> symbols = new ArrayList<>();
symbols.add("BTC.USD");
symbols.add("ETH.USD");
QuoteTimelineRequest request =
        QuoteTimelineRequest.newCcRequest(symbols, System.currentTimeMillis() - 60 * 60 * 1000);

QuoteTimelineResponse response = client.execute(request);
if (response.isSuccess()) {
  System.out.println(Arrays.toString(response.getTimelineItems().toArray()));
} else {
  System.out.println("response error:" + response.getMessage());
}

Example Response

{
  "code" : 0,
  "message" : "success",
  "timestamp" : 1770040737146,
  "timelineItems" : [ {
    "symbol" : "BTC.USD",
    "period" : "day",
    "preClose" : 77517.15,
    "intraday" : {
      "items" : [ {
        "price" : 77917.75,
        "avgPrice" : null,
        "time" : 1770040440000,
        "volumeDecimal" : 0.01902
      }, {
        "price" : 77999.83,
        "avgPrice" : null,
        "time" : 1770040500000,
        "volumeDecimal" : 0.06813
      }, {
        "price" : 78150.0,
        "avgPrice" : null,
        "time" : 1770040560000,
        "volumeDecimal" : 0.06568
      }, {
        "price" : 78159.46,
        "avgPrice" : null,
        "time" : 1770040620000,
        "volumeDecimal" : 0.07281
      } ],
      "beginTime" : 1770040435799,
      "endTime" : 1770040737143
    }
  }, {
    "symbol" : "ETH.USD",
    "period" : "day",
    "preClose" : 2313.05,
    "intraday" : {
      "items" : [ {
        "price" : 2321.92,
        "avgPrice" : null,
        "time" : 1770040440000,
        "volumeDecimal" : 8.9763
      }, {
        "price" : 2322.16,
        "avgPrice" : null,
        "time" : 1770040500000,
        "volumeDecimal" : 1.1757
      }, {
        "price" : 2325.55,
        "avgPrice" : null,
        "time" : 1770040560000,
        "volumeDecimal" : 25.7984
      }, {
        "price" : 2326.31,
        "avgPrice" : null,
        "time" : 1770040620000,
        "volumeDecimal" : 13.1475
      } ],
      "beginTime" : 1770040435799,
      "endTime" : 1770040737143
    }
  "success" : true
}