Cryptocurrency Market Data

HTTP cryptocurrency market data supports 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 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

Data shapeItem fieldsNested fields
List<KlineItem>KlineItemItems: List<[KlinePoint](#klinepoint)>

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

Data shapeItem fieldsNested fields
List<TimelineItem>TimelineItemIntraday, PreMarket, and AfterHours: TimelineRange, whose Items is List<[TimelinePoint](#timelinepoint)>

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;

Return-Model Field Tables

Inherited fields on every response: TigerResponse

FieldC# type
Codeint
Messagestring
Timestamplong
Signstring

Response Data

Response typeData C# type
QuoteKlineResponseList<KlineItem>
QuoteTimelineResponseList<TimelineItem>

KlineItem

FieldC# type
Symbolstring
Periodstring
NextPageTokenstring
ItemsList<KlinePoint>

KlinePoint

FieldC# typeDescription
TimelongTimestamp
Open, High, Low, Close, Amountdouble
VolumelongInteger volume; use when VolumeDecimal is absent or null
VolumeDecimaldouble?Optional decimal volume; CC cryptocurrency Kline uses it to preserve fractional volume. It may be absent or null in any response; use Volume when absent

TimelineItem

FieldC# type
Symbolstring
Periodstring
PreClosedouble
IntradayTimelineRange
PreMarketTimelineRange
AfterHoursTimelineRange

TimelineRange

FieldC# type
BeginTimelong
EndTimelong
ItemsList<TimelinePoint>

TimelinePoint

FieldC# typeDescription
TimelongTimestamp
PricedoubleLatest price
AvgPricedoubleAverage price
VolumelongInteger volume; use when VolumeDecimal is absent or null
VolumeDecimaldouble?Optional decimal volume; a current CC cryptocurrency timeline uses it to preserve fractional volume. It may be absent or null in any response; use Volume when absent

Did this page help you?