Cryptocurrency Market Data

HTTP cryptocurrency market data supports real-time quotes, bars, and the current-day timeline. Use symbols such as BTC.USD and set SecType = SecType.CC on the request model. Historical cryptocurrency timelines are not supported.

Get Cryptocurrency Real-Time Quotes

Use TigerRequest<QuoteRealTimeQuoteResponse>, QuoteApiService.QUOTE_REAL_TIME, and QuoteSymbolModel with SecType = SecType.CC.

Response data type: List<RealTimeQuoteItem>.

FieldC# typeDescription
SymbolstringCryptocurrency symbol.
OpendoubleOpening price.
HighdoubleHigh price.
LowdoubleLow price.
ClosedoubleClosing price.
PreClosedoublePrevious close price.
LatestPricedoubleLatest price.
AskPricedoubleBest ask price.
BidPricedoubleBest bid price.
AmountdoubleTurnover.
AskSizelongBest ask size.
BidSizelongBest bid size.
VolumelongTrading volume.
LatestTimelongLatest trade timestamp.
StatusStockStatusTrading status.
TigerRequest<QuoteRealTimeQuoteResponse> request = new()
{
    ApiMethodName = QuoteApiService.QUOTE_REAL_TIME,
    ModelValue = new QuoteSymbolModel
    {
        Symbols = new List<string> { "BTC.USD" },
        SecType = SecType.CC
    }
};
QuoteRealTimeQuoteResponse? response = await quoteClient.ExecuteAsync(request);

Get Cryptocurrency Bars

Use TigerRequest<QuoteKlineResponse>, QuoteApiService.KLINE, and QuoteKlineModel. Set QuoteKlineModel.SecType to SecType.CC for cryptocurrency.

For pagination, read KlineItem.NextPageToken, set it as QuoteKlineModel.PageToken on the next request, and keep SecType.CC set.

KlinePoint.VolumeDecimal is a nullable double? mapped from JSON volumeDecimal. Cryptocurrency Kline requested with SecType.CC uses it to preserve fractional volume; it may be absent or null in any response, in which case use integer KlinePoint.Volume.

Return

Response data structure: List<KlineItem>; each Items value is List<KlinePoint>.

KlineItem fields

FieldC# typeDescription
SymbolstringCryptocurrency symbol.
PeriodstringK-line period.
NextPageTokenstringNext-page token.
ItemsList<KlinePoint>K-line records.

KlinePoint fields

FieldC# typeDescription
TimelongK-line timestamp.
OpendoubleOpening price.
HighdoubleHigh price.
LowdoubleLow price.
ClosedoubleClosing price.
AmountdoubleTurnover.
VolumelongInteger trading volume.
VolumeDecimaldouble?Fractional trading volume.

Example

TigerRequest<QuoteKlineResponse> request = new()
{
    ApiMethodName = QuoteApiService.KLINE,
    ModelValue = new QuoteKlineModel
    {
        Symbols = new List<string> { "BTC.USD" },
        Period = KLineType.day.Value,
        Limit = 300,
        SecType = SecType.CC
    }
};

QuoteKlineResponse? response = await quoteClient.ExecuteAsync(request);
double? volume = response?.Data?[0].Items?[0].VolumeDecimal;

Get the Current-Day Cryptocurrency Timeline

Use TigerRequest<QuoteTimelineResponse>, QuoteApiService.TIMELINE, and QuoteTimelineModel. Set QuoteTimelineModel.SecType to SecType.CC for cryptocurrency.

TimelinePoint.VolumeDecimal is a nullable double? mapped from JSON volumeDecimal. A current CC cryptocurrency timeline uses it to preserve fractional volume; it may be absent or null in any response, in which case use integer TimelinePoint.Volume. This support applies only to the current-day timeline request, not the historical history_timeline request.

Return

Response data structure: List<TimelineItem>; Intraday, PreMarket, and AfterHours are TimelineRange values whose Items are List<TimelinePoint>.

TimelineItem fields

FieldC# typeDescription
SymbolstringCryptocurrency symbol.
PeriodstringTimeline period.
PreClosedoublePrevious close price.
IntradayTimelineRangeRegular-session timeline data.
PreMarketTimelineRangePre-market timeline data.
AfterHoursTimelineRangeAfter-hours timeline data.

TimelineRange fields

FieldC# typeDescription
BeginTimelongSession start timestamp.
EndTimelongSession end timestamp.
ItemsList<TimelinePoint>Timeline records.

TimelinePoint fields

FieldC# typeDescription
TimelongTimeline point timestamp.
PricedoubleLatest price.
AvgPricedoubleAverage price.
VolumelongInteger trading volume.
VolumeDecimaldouble?Fractional trading volume.

Example

TigerRequest<QuoteTimelineResponse> request = new()
{
    ApiMethodName = QuoteApiService.TIMELINE,
    ModelValue = new QuoteTimelineModel
    {
        Symbols = new List<string> { "BTC.USD" },
        SecType = SecType.CC
    }
};

QuoteTimelineResponse? response = await quoteClient.ExecuteAsync(request);
double? volume = response?.Data?[0].Intraday?.Items?[0].VolumeDecimal;

Did this page help you?