Market Data
The C# SDK provides all market data APIs through QuoteClient. All requests use the TigerRequest<TResponse> generic wrapper and are called asynchronously via await quoteClient.ExecuteAsync(request). Full runnable example:
using TigerOpenAPI.Common;
using TigerOpenAPI.Quote;
using TigerOpenAPI.Quote.Response;
using TigerOpenAPI.Quote.Model;
TigerConfig config = new TigerConfig()
{
ConfigFilePath = "/path/to/tiger_openapi_config.properties"
};
QuoteClient quoteClient = new QuoteClient(config);
// Get market status
TigerRequest<MarketStateResponse> request = new TigerRequest<MarketStateResponse>()
{
ApiMethodName = QuoteApiService.MARKET_STATE,
ModelValue = new QuoteMarketModel() { Market = Market.US }
};
MarketStateResponse response = await quoteClient.ExecuteAsync(request);
Console.WriteLine(response);Basic Quotes
marketState Get Market Status
Description
Query the current trading status of a market, including whether it is open and the next open time.
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| Market | Market | Yes | Market code: Market.US (US stocks) / Market.HK (HK stocks) / Market.CN (A shares) |
Returns
MarketStateResponse containing an array of market status items, each with Market, Status (trading / closed etc.), OpenTime, etc.
Example
TigerRequest<MarketStateResponse> request = new TigerRequest<MarketStateResponse>()
{
ApiMethodName = QuoteApiService.MARKET_STATE,
ModelValue = new QuoteMarketModel() { Market = Market.US }
};
MarketStateResponse response = await quoteClient.ExecuteAsync(request);Data Sample
Request:
{ "market": "US" }Response:
[
{
"market": "US",
"status": "trading",
"openTime": 1735020600000,
"closeTime": 1735044000000,
"timezone": "America/New_York"
}
]tradingCalendar Get Trading Calendar
Description
Query the list of trading days for a market within a date range.
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| Market | Market | Yes | Market code |
| BeginTime | string | No | Start date in 'YYYY-MM-DD' format |
| EndTime | string | No | End date in 'YYYY-MM-DD' format |
Returns
TradingCalendarResponse containing a list of dates, each with Date and TradingDay (boolean).
Example
TigerRequest<TradingCalendarResponse> request = new TigerRequest<TradingCalendarResponse>()
{
ApiMethodName = QuoteApiService.TRADING_CALENDAR,
ModelValue = new QuoteTradingCalendarModel()
{
Market = Market.US,
BeginTime = "2025-01-01",
EndTime = "2025-01-31"
}
};
TradingCalendarResponse response = await quoteClient.ExecuteAsync(request);stockDetail Get Stock Details
Description
Query basic information for specified stock symbols including name, market, currency, and exchange.
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| Symbols | List<string> | Yes | List of stock symbols, e.g. ["AAPL", "TSLA"] |
Returns
StockDetailResponse containing a list of stock details, each with Symbol, Name, Currency, Exchange, LotSize, etc.
Example
TigerRequest<StockDetailResponse> request = new TigerRequest<StockDetailResponse>()
{
ApiMethodName = QuoteApiService.STOCK_DETAIL,
ModelValue = new QuoteContractModel()
{
Symbols = new List<string> { "AAPL", "TSLA" }
}
};
StockDetailResponse response = await quoteClient.ExecuteAsync(request);quoteRealTime Get Real-Time Quotes
Description
Get real-time snapshot quotes for multiple stocks, including latest price, change percentage, and volume.
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| Symbols | List<string> | Yes | List of stock symbols, e.g. ["AAPL", "TSLA"]; HK stocks e.g. ["00700"] |
Returns
QuoteBriefResponse containing an array of quote snapshots, each with Symbol, LatestPrice, PreClose, Change, ChangePercentage, Volume, Amount, etc.
Example
TigerRequest<QuoteBriefResponse> request = new TigerRequest<QuoteBriefResponse>()
{
ApiMethodName = QuoteApiService.BRIEF,
ModelValue = new QuoteContractModel()
{
Symbols = new List<string> { "AAPL", "TSLA", "00700" }
}
};
QuoteBriefResponse response = await quoteClient.ExecuteAsync(request);Data Sample
Response:
[
{
"symbol": "AAPL",
"latestPrice": 227.52,
"preClose": 225.01,
"change": 2.51,
"changePercentage": 1.115,
"volume": 62345678,
"amount": 14189233280.0,
"open": 225.50,
"high": 228.10,
"low": 224.80,
"timestamp": 1735042800000
}
]timeline Get Intraday Timeline
Description
Get intraday minute-by-minute price and volume data for charting.
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| Symbols | List<string> | Yes | List of stock symbols |
Returns
QuoteTimelineResponse, per symbol, containing an array of timeline items with Time, Price, Volume, AvgPrice, etc.
Example
TigerRequest<QuoteTimelineResponse> request = new TigerRequest<QuoteTimelineResponse>()
{
ApiMethodName = QuoteApiService.TIMELINE,
ModelValue = new QuoteContractModel()
{
Symbols = new List<string> { "AAPL" }
}
};
QuoteTimelineResponse response = await quoteClient.ExecuteAsync(request);Data Sample
Response:
{
"symbol": "AAPL",
"items": [
{ "time": 1735020600000, "price": 225.50, "volume": 3021456, "avgPrice": 225.48 },
{ "time": 1735020660000, "price": 225.80, "volume": 1234567, "avgPrice": 225.55 }
]
}kline Get K-Line (Candlestick) Data
Description
Get historical candlestick data for a stock, supporting daily, weekly, monthly, and minute intervals.
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| Symbol | string | Yes | Stock symbol |
| Period | BarPeriod | Yes | Bar period: BarPeriod.Day / BarPeriod.Week / BarPeriod.Month / BarPeriod.min1 / BarPeriod.min5 / BarPeriod.min15 / BarPeriod.min30 / BarPeriod.min60 |
| BeginTime | long | No | Start timestamp in milliseconds |
| EndTime | long | No | End timestamp in milliseconds |
| Limit | int | No | Max bars to return, default 251 |
Returns
QuoteKlineResponse containing an array of bars, each with Time, Open, High, Low, Close, Volume.
Example
// Daily bars
TigerRequest<QuoteKlineResponse> request = new TigerRequest<QuoteKlineResponse>()
{
ApiMethodName = QuoteApiService.KLINE,
ModelValue = new QuoteKlineModel()
{
Symbol = "AAPL",
Period = BarPeriod.Day,
Limit = 60
}
};
QuoteKlineResponse response = await quoteClient.ExecuteAsync(request);
// 5-minute bars
TigerRequest<QuoteKlineResponse> request5min = new TigerRequest<QuoteKlineResponse>()
{
ApiMethodName = QuoteApiService.KLINE,
ModelValue = new QuoteKlineModel()
{
Symbol = "AAPL",
Period = BarPeriod.min5
}
};Data Sample
Response:
{
"symbol": "AAPL",
"period": "day",
"items": [
{ "time": 1734912000000, "open": 222.56, "high": 225.72, "low": 222.11, "close": 225.01, "volume": 55234100 },
{ "time": 1734998400000, "open": 225.50, "high": 228.10, "low": 224.80, "close": 227.52, "volume": 62345678 }
]
}quoteDepth Get Order Book Depth
Description
Get the top 5 bid/ask order book depth data.
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| Symbols | List<string> | Yes | List of stock symbols |
Returns
QuoteDepthResponse containing AskList (sell side) and BidList (buy side), each level with Price, Volume, OrderCount.
Example
TigerRequest<QuoteDepthResponse> request = new TigerRequest<QuoteDepthResponse>()
{
ApiMethodName = QuoteApiService.DEPTH_QUOTE,
ModelValue = new QuoteContractModel()
{
Symbols = new List<string> { "AAPL" }
}
};
QuoteDepthResponse response = await quoteClient.ExecuteAsync(request);Data Sample
Response:
{
"symbol": "AAPL",
"askList": [
{ "price": 227.53, "volume": 300, "orderCount": 2 },
{ "price": 227.55, "volume": 500, "orderCount": 4 }
],
"bidList": [
{ "price": 227.52, "volume": 400, "orderCount": 3 },
{ "price": 227.50, "volume": 600, "orderCount": 5 }
]
}tradeTick Get Trade Ticks
Description
Get the latest individual trade records with price, volume, and direction.
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| Symbols | List<string> | Yes | List of stock symbols |
Returns
QuoteTradeTickResponse containing an array of ticks, each with Time, Price, Volume, Direction.
Example
TigerRequest<QuoteTradeTickResponse> request = new TigerRequest<QuoteTradeTickResponse>()
{
ApiMethodName = QuoteApiService.TRADE_TICK,
ModelValue = new QuoteContractModel()
{
Symbols = new List<string> { "AAPL" }
}
};
QuoteTradeTickResponse response = await quoteClient.ExecuteAsync(request);Data Sample
Response:
{
"symbol": "AAPL",
"items": [
{ "time": 1735042780000, "price": 227.52, "volume": 100, "direction": "BUY" },
{ "time": 1735042781000, "price": 227.50, "volume": 200, "direction": "SELL" }
]
}Options
optionExpiration Get Option Expirations
Description
Get all available option expiration dates for a given underlying symbol.
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| Symbol | string | Yes | Underlying symbol, e.g. "AAPL" |
Returns
OptionExpirationResponse containing a list of expiration date strings in 'YYYYMMDD' format.
Example
TigerRequest<OptionExpirationResponse> request = new TigerRequest<OptionExpirationResponse>()
{
ApiMethodName = QuoteApiService.OPTION_EXPIRATION,
ModelValue = new QuoteContractModel() { Symbol = "AAPL" }
};
OptionExpirationResponse response = await quoteClient.ExecuteAsync(request);Data Sample
Response:
["20250117", "20250221", "20250321", "20250620", "20250919", "20251219", "20260116"]optionChain Get Option Chain
Description
Get the complete option chain for a given underlying and expiration, with all strike prices for calls and puts.
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| Symbol | string | Yes | Underlying symbol |
| Expiry | string | Yes | Expiration date in 'YYYYMMDD' format, e.g. '20250117' |
Returns
OptionChainResponse containing a list of option chain rows, each with Strike, CallSymbol, PutSymbol, CallLatestPrice, PutLatestPrice, etc.
Example
TigerRequest<OptionChainResponse> request = new TigerRequest<OptionChainResponse>()
{
ApiMethodName = QuoteApiService.OPTION_CHAIN,
ModelValue = new QuoteOptionModel()
{
Symbol = "AAPL",
Expiry = "20250117"
}
};
OptionChainResponse response = await quoteClient.ExecuteAsync(request);Data Sample
Response:
[
{
"strike": 220.0,
"callSymbol": "AAPL 250117C00220000",
"putSymbol": "AAPL 250117P00220000",
"callLatestPrice": 9.50,
"putLatestPrice": 2.10,
"callImpliedVolatility": 0.285,
"putImpliedVolatility": 0.312
}
]optionBrief Get Option Quotes
Description
Get real-time quotes for option contracts, including Greeks (Delta, Gamma, Theta, Vega).
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| Symbols | List<string> | Yes | List of option identifiers, US format: "AAPL 250117C00150000" (note double space) |
Returns
OptionBriefResponse containing option quotes with LatestPrice, ImpliedVolatility, Delta, Gamma, Theta, Vega, etc.
Example
TigerRequest<OptionBriefResponse> request = new TigerRequest<OptionBriefResponse>()
{
ApiMethodName = QuoteApiService.OPTION_BRIEF,
ModelValue = new QuoteContractModel()
{
Symbols = new List<string> { "AAPL 250117C00150000" }
}
};
OptionBriefResponse response = await quoteClient.ExecuteAsync(request);Data Sample
Response:
[
{
"identifier": "AAPL 250117C00220000",
"latestPrice": 9.50,
"impliedVolatility": 0.285,
"delta": 0.612,
"gamma": 0.028,
"theta": -0.085,
"vega": 0.156,
"openInterest": 12540,
"volume": 3820
}
]Futures
futureExchange Get Futures Exchanges
Description
Get the list of all supported futures exchanges.
Returns
FutureExchangeResponse containing a list of exchanges, each with Exchange (e.g. "CME") and name.
Example
TigerRequest<FutureExchangeResponse> request = new TigerRequest<FutureExchangeResponse>()
{
ApiMethodName = QuoteApiService.FUTURE_EXCHANGE
};
FutureExchangeResponse response = await quoteClient.ExecuteAsync(request);Data Sample
Response:
[
{ "exchange": "CME", "name": "Chicago Mercantile Exchange" },
{ "exchange": "CBOT", "name": "Chicago Board of Trade" },
{ "exchange": "NYMEX", "name": "New York Mercantile Exchange" },
{ "exchange": "HKEX", "name": "Hong Kong Exchanges and Clearing" }
]futureContracts Get Futures Contracts
Description
Get all tradeable futures contracts for a specific exchange.
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| Exchange | string | Yes | Exchange code, e.g. "CME", "HKEX" |
Returns
FutureContractsResponse containing a list of futures contracts with Symbol, Name, ContractMultiplier, Currency, etc.
Example
TigerRequest<FutureContractsResponse> request = new TigerRequest<FutureContractsResponse>()
{
ApiMethodName = QuoteApiService.FUTURE_CONTRACTS,
ModelValue = new QuoteFutureModel() { Exchange = "CME" }
};
FutureContractsResponse response = await quoteClient.ExecuteAsync(request);futureRealTimeQuote Get Futures Real-Time Quotes
Description
Get real-time quote data for futures contracts.
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| Symbols | List<string> | Yes | List of futures contract codes, e.g. ["ES2506", "NQ2506"] |
Returns
FutureQuoteResponse containing futures quotes with Symbol, LatestPrice, Change, Volume, OpenInterest, etc.
Example
TigerRequest<FutureQuoteResponse> request = new TigerRequest<FutureQuoteResponse>()
{
ApiMethodName = QuoteApiService.FUTURE_REAL_TIME_QUOTE,
ModelValue = new QuoteContractModel()
{
Symbols = new List<string> { "ES2506", "NQ2506" }
}
};
FutureQuoteResponse response = await quoteClient.ExecuteAsync(request);Fundamental Data
capitalFlow Get Capital Flow
Description
Get capital flow data for a stock, breaking down large/medium/small order inflows and outflows.
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| Symbol | string | Yes | Stock symbol |
| Market | Market | Yes | Market code |
Returns
CapitalFlowResponse containing Inflow, Outflow, NetInflow, LargeOrderInflow, SmallOrderOutflow, etc.
Example
TigerRequest<CapitalFlowResponse> request = new TigerRequest<CapitalFlowResponse>()
{
ApiMethodName = QuoteApiService.CAPITAL_FLOW,
ModelValue = new QuoteMarketModel() { Symbol = "AAPL", Market = Market.US }
};
CapitalFlowResponse response = await quoteClient.ExecuteAsync(request);Data Sample
Response:
{
"symbol": "AAPL",
"inflow": 8234567890,
"outflow": 7123456789,
"netInflow": 1111111101,
"largeOrderInflow": 5123456789,
"timestamp": 1735042800000
}capitalDistribution Get Capital Distribution
Description
Get a snapshot of capital distribution by investor type (retail, institution, large holder).
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| Symbol | string | Yes | Stock symbol |
| Market | Market | Yes | Market code |
Returns
CapitalDistributionResponse containing BuyRatio, SellRatio, HoldRatio per investor type.
Example
TigerRequest<CapitalDistributionResponse> request = new TigerRequest<CapitalDistributionResponse>()
{
ApiMethodName = QuoteApiService.CAPITAL_DISTRIBUTION,
ModelValue = new QuoteMarketModel() { Symbol = "AAPL", Market = Market.US }
};
CapitalDistributionResponse response = await quoteClient.ExecuteAsync(request);Fundamental & Extended Data
stockFundamental Get Stock Fundamentals
Description
Query key fundamental data for one or more stocks, including PE ratio, PB ratio, ROE, market cap, EPS, and more.
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| Symbols | List<string> | Yes | List of stock symbols, e.g. ["AAPL", "TSLA"] |
| Market | Market | Yes | Market: Market.US / Market.HK |
Returns
QuoteStockFundamentalResponse → StockFundamentalData → List<StockFundamentalItem>
| Field | Type | Description |
|---|---|---|
| Symbol | string | Stock symbol |
| TtmPeRate | double | TTM P/E ratio |
| LyrPeRate | double | LYR P/E ratio |
| PbRate | double | P/B ratio |
| PsRate | double | P/S ratio |
| Roe | double | Return on equity |
| Roa | double | Return on assets |
| DivideRate | double | Dividend yield |
| TtmEps | double | TTM EPS |
| LyrEps | double | LYR EPS |
| MarketCap | double | Total market cap |
| FloatMarketCap | double | Float market cap |
| VolumeRatio | double | Volume ratio |
| TurnoverRate | double | Turnover rate |
| Week52High | double | 52-week high |
| Week52Low | double | 52-week low |
Example
TigerRequest<QuoteStockFundamentalResponse> request = new TigerRequest<QuoteStockFundamentalResponse>()
{
ApiMethodName = QuoteApiService.STOCK_FUNDAMENTAL,
ModelValue = new QuoteDepthModel() { Symbols = new List<string> { "AAPL", "TSLA" }, Market = Market.US }
};
QuoteStockFundamentalResponse response = await quoteClient.ExecuteAsync(request);quoteOvernight Get Overnight Quote
Description
Query pre-market and after-hours quote data for US stocks.
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| Symbols | List<string> | Yes | List of stock symbols |
Returns
QuoteOvernightResponse → List<QuoteOvernightItem>
| Field | Type | Description |
|---|---|---|
| Symbol | string | Stock symbol |
| LatestPrice | decimal | Latest price |
| AskPrice | decimal | Ask price |
| AskSize | long | Ask size |
| BidPrice | decimal | Bid price |
| BidSize | long | Bid size |
| PreClose | decimal | Previous close |
| Volume | long | Volume |
| Change | decimal | Price change |
| ChangeRate | double | Change rate |
| Timestamp | long | Data timestamp (ms) |
Example
TigerRequest<QuoteOvernightResponse> request = new TigerRequest<QuoteOvernightResponse>()
{
ApiMethodName = QuoteApiService.QUOTE_OVERNIGHT,
ModelValue = new QuoteSymbolModel() { Symbols = new List<string> { "AAPL", "TSLA" } }
};
QuoteOvernightResponse response = await quoteClient.ExecuteAsync(request);brokerHold Get Institutional Holdings
Description
Query institutional holding data for a market, supporting pagination and sorting.
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| Market | Market | Yes | Market: Market.US / Market.HK |
| Limit | int | No | Page size (default 20) |
| Page | int | No | Page number (default 1) |
| OrderBy | string | No | Sort field |
| Direction | string | No | Sort direction: "asc" / "desc" |
Returns
QuoteBrokerHoldResponse → BrokerHoldPageItem
| Field | Type | Description |
|---|---|---|
| Page | int | Current page |
| TotalPage | int | Total pages |
| TotalCount | int | Total records |
| Items | List<BrokerHoldItem> | Holdings list |
BrokerHoldItem fields: OrgId, OrgName, Date, SharesHold, MarketValue, BuyAmount, Buy5, Buy20, Buy60, Market
Example
TigerRequest<QuoteBrokerHoldResponse> request = new TigerRequest<QuoteBrokerHoldResponse>()
{
ApiMethodName = QuoteApiService.BROKER_HOLD,
ModelValue = new QuoteBrokerHoldModel(Market.US, limit: 20, page: 1)
};
QuoteBrokerHoldResponse response = await quoteClient.ExecuteAsync(request);futureDepth Get Futures Order Book Depth
Description
Query Level 2 order book depth data for futures contracts.
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| ContractCodes | List<string> | Yes | Futures contract codes, e.g. ["CL2506"] |
Returns
FutureDepthResponse → List<FutureDepthItem>
| Field | Type | Description |
|---|---|---|
| ContractCode | string | Contract code |
| Ask | List<FutureDepthAskBidItem> | Ask levels |
| Bid | List<FutureDepthAskBidItem> | Bid levels |
FutureDepthAskBidItem: Price (decimal), Volume (long)
Example
TigerRequest<FutureDepthResponse> request = new TigerRequest<FutureDepthResponse>()
{
ApiMethodName = QuoteApiService.FUTURE_DEPTH,
ModelValue = new FutureDepthModel(new List<string> { "CL2506" })
};
FutureDepthResponse response = await quoteClient.ExecuteAsync(request);optionAnalysis Get Option Analysis
Description
Query implied volatility, historical volatility, and call/put ratio for options.
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| Symbols | List<OptionAnalysisSymbolModel> | Yes | List of symbols with period and volatility flag |
| Market | Market | Yes | Market |
OptionAnalysisSymbolModel fields:
| Field | Type | Description |
|---|---|---|
| Symbol | string | Underlying symbol |
| Period | string | Period: "1M" / "3M" / "6M" / "1Y" |
| RequireVolatilityList | bool | Whether to return volatility time series |
Returns
OptionAnalysisResponse → List<OptionAnalysisItem>
| Field | Type | Description |
|---|---|---|
| Symbol | string | Symbol |
| ImpliedVol30Days | double | 30-day implied volatility |
| HisVolatility | double | Historical volatility |
| IvHisVRatio | double | IV/HV ratio |
| CallPutRatio | double | Call/put ratio |
| VolatilityList | List<object> | Volatility time series (if requested) |
Example
var symbols = new List<OptionAnalysisSymbolModel>
{
new OptionAnalysisSymbolModel("AAPL", "1M", requireVolatilityList: true)
};
TigerRequest<OptionAnalysisResponse> request = new TigerRequest<OptionAnalysisResponse>()
{
ApiMethodName = QuoteApiService.OPTION_ANALYSIS,
ModelValue = new OptionAnalysisModel(symbols, Market.US),
ApiVersion = "2.0"
};
OptionAnalysisResponse response = await quoteClient.ExecuteAsync(request);Updated 4 days ago
