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 shape | Item fields | Nested fields |
|---|---|---|
List<KlineItem> | KlineItem | Items: 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 shape | Item fields | Nested fields |
|---|---|---|
List<TimelineItem> | TimelineItem | Intraday, 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
TigerResponse| Field | C# type |
|---|---|
Code | int |
Message | string |
Timestamp | long |
Sign | string |
Response Data
Data| Response type | Data C# type |
|---|---|
QuoteKlineResponse | List<KlineItem> |
QuoteTimelineResponse | List<TimelineItem> |
KlineItem
KlineItem| Field | C# type |
|---|---|
Symbol | string |
Period | string |
NextPageToken | string |
Items | List<KlinePoint> |
KlinePoint
KlinePoint| Field | C# type | Description |
|---|---|---|
Time | long | Timestamp |
Open, High, Low, Close, Amount | double | — |
Volume | long | Integer volume; use when VolumeDecimal is absent or null |
VolumeDecimal | double? | 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
TimelineItem| Field | C# type |
|---|---|
Symbol | string |
Period | string |
PreClose | double |
Intraday | TimelineRange |
PreMarket | TimelineRange |
AfterHours | TimelineRange |
TimelineRange
TimelineRange| Field | C# type |
|---|---|
BeginTime | long |
EndTime | long |
Items | List<TimelinePoint> |
TimelinePoint
TimelinePoint| Field | C# type | Description |
|---|---|---|
Time | long | Timestamp |
Price | double | Latest price |
AvgPrice | double | Average price |
Volume | long | Integer volume; use when VolumeDecimal is absent or null |
VolumeDecimal | double? | 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 |
Updated about 13 hours ago
