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>.
| Field | C# type | Description |
|---|---|---|
Symbol | string | Cryptocurrency symbol. |
Open | double | Opening price. |
High | double | High price. |
Low | double | Low price. |
Close | double | Closing price. |
PreClose | double | Previous close price. |
LatestPrice | double | Latest price. |
AskPrice | double | Best ask price. |
BidPrice | double | Best bid price. |
Amount | double | Turnover. |
AskSize | long | Best ask size. |
BidSize | long | Best bid size. |
Volume | long | Trading volume. |
LatestTime | long | Latest trade timestamp. |
Status | StockStatus | Trading 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
| Field | C# type | Description |
|---|---|---|
Symbol | string | Cryptocurrency symbol. |
Period | string | K-line period. |
NextPageToken | string | Next-page token. |
Items | List<KlinePoint> | K-line records. |
KlinePoint fields
| Field | C# type | Description |
|---|---|---|
Time | long | K-line timestamp. |
Open | double | Opening price. |
High | double | High price. |
Low | double | Low price. |
Close | double | Closing price. |
Amount | double | Turnover. |
Volume | long | Integer trading volume. |
VolumeDecimal | double? | 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
| Field | C# type | Description |
|---|---|---|
Symbol | string | Cryptocurrency symbol. |
Period | string | Timeline period. |
PreClose | double | Previous close price. |
Intraday | TimelineRange | Regular-session timeline data. |
PreMarket | TimelineRange | Pre-market timeline data. |
AfterHours | TimelineRange | After-hours timeline data. |
TimelineRange fields
| Field | C# type | Description |
|---|---|---|
BeginTime | long | Session start timestamp. |
EndTime | long | Session end timestamp. |
Items | List<TimelinePoint> | Timeline records. |
TimelinePoint fields
| Field | C# type | Description |
|---|---|---|
Time | long | Timeline point timestamp. |
Price | double | Latest price. |
AvgPrice | double | Average price. |
Volume | long | Integer trading volume. |
VolumeDecimal | double? | 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;Updated about 1 month ago
