Options
Example context
import { createClientConfig, QuoteClient } from '@tigeropenapi/tigeropen';
const config = createClientConfig();
const quoteClient = QuoteClient.fromConfig(config);getOptionExpiration
getOptionExpirationSignature
async getOptionExpiration(symbols: string[], market?: string): Promise<OptionExpiration[]>Purpose
Gets option expiration.
Parameters, defaults, and constraints
| Parameter | Type | Required | SDK default | Constraints |
|---|---|---|---|---|
symbols | string[] | Yes | None | No client-side validation is declared. |
market | string | No | None | No client-side validation is declared. |
Returns
Promise<OptionExpiration[]>
| Field | Type | Description |
|---|---|---|
| symbol | string | Symbol code |
| optionSymbols | string[] | Option symbols list |
| dates | string[] | Expiration date list |
| timestamps | number[] | Expiration timestamps |
| periods | string[] | Periods list |
| counts | number[] | Counts per expiration |
Type-checked example
const result = await quoteClient.getOptionExpiration(['AAPL'], 'US');
console.log(result);Response example
[
{
"symbol": "string",
"optionSymbols": [
"string"
],
"dates": [
"string"
],
"timestamps": [
0
],
"periods": [
"string"
],
"counts": [
0
]
}
]Special option symbols for indices
- S&P 500 (
.SPX): monthly options useSPX; weekly and quarterly options useSPXW. - Nasdaq-100: monthly options use
NDX; weekly options useNDXP. - VIX: monthly options use
VIX; weekly options useVIXW.
getOptionChain
getOptionChainSignature
async getOptionChain(items: Array<[string, string]>, timezone?: string, returnGreekValue?: boolean, optionFilter?: OptionChainFilter): Promise<OptionChain[]>Purpose
Gets option chain.
Parameters, defaults, and constraints
| Parameter | Type | Required | SDK default | Constraints |
|---|---|---|---|---|
items | Array<[string, string]> | Yes | None | No client-side validation is declared. |
timezone | string | No | None | No client-side validation is declared. |
returnGreekValue | boolean | No | None | No client-side validation is declared. |
optionFilter | OptionChainFilter | No | None | No client-side validation is declared. |
optionFilter.inTheMoney | boolean | undefined | No | None | No client-side validation is declared. |
optionFilter.impliedVolatility | Range | undefined | No | None | No client-side validation is declared. |
optionFilter.openInterest | Range | undefined | No | None | No client-side validation is declared. |
optionFilter.greeks | OptionChainFilterGreeks | undefined | No | None | No client-side validation is declared. |
Returns
Promise<OptionChain[]>
| Field | Type | Description |
|---|---|---|
| symbol | string | Symbol code |
| expiry | number | Expiration date |
| items | OptionChainRow[] | Data items array |
Type-checked example
const result = await quoteClient.getOptionChain([], 'America/New_York', false, { inTheMoney: true });
console.log(result);Response example
[
{
"symbol": "string",
"expiry": 0,
"items": [
"OptionChainRow"
]
}
]getOptionKline
getOptionKlineSignature
async getOptionKline(identifiers: string[], period: string, beginTime: number = -1, endTime: number = -1, timezone?: string, limit?: number, sortDir?: string): Promise<Kline[]>Purpose
Gets option kline.
Parameters, defaults, and constraints
| Parameter | Type | Required | SDK default | Constraints |
|---|---|---|---|---|
identifiers | string[] | Yes | None | No client-side validation is declared. |
period | string | Yes | None | No client-side validation is declared. |
beginTime | number | No | -1 | No client-side validation is declared. |
endTime | number | No | -1 | No client-side validation is declared. |
timezone | string | No | None | No client-side validation is declared. |
limit | number | No | None | No client-side validation is declared. |
sortDir | string | No | None | No client-side validation is declared. |
Returns
Promise<Kline[]>
| Field | Type | Description |
|---|---|---|
| symbol | string | Symbol code |
| period | string | K-line period |
| nextPageToken | string | Next page token |
| items | KlineItem[] | Data items array |
Type-checked example
const result = await quoteClient.getOptionKline(['AAPL 260619C00150000'], 'day', -1, -1, 'America/New_York', 1, 'value');
console.log(result);Response example
[
{
"symbol": "string",
"period": "string",
"nextPageToken": "string",
"items": [
"KlineItem"
]
}
]getOptionQuote
getOptionQuoteSignature
async getOptionQuote(identifiers: string[], timezone?: string): Promise<Brief[]>Purpose
Gets option quote.
Parameters, defaults, and constraints
| Parameter | Type | Required | SDK default | Constraints |
|---|---|---|---|---|
identifiers | string[] | Yes | None | No client-side validation is declared. |
timezone | string | No | None | No client-side validation is declared. |
Returns
Promise<Brief[]>
| Field | Type | Description |
|---|---|---|
| symbol | string | Symbol code |
| open | number | Open price |
| high | number | High price |
| low | number | Low price |
| close | number | Close price |
| preClose | number | Previous close price |
| latestPrice | number | Latest price |
| latestTime | number | Latest trade time (ms timestamp) |
| askPrice | number | Ask price (best offer) |
| askSize | number | Ask size |
| bidPrice | number | Bid price (best bid) |
| bidSize | number | Bid size |
| volume | number | Trading volume |
| status | string | Trading status |
| adjPreClose | number | Adjusted previous close |
| change | number | Price change |
| changeRate | number | Price change rate |
| amplitude | number | Amplitude |
| expiry | string | Expiration date |
| strike | string | Strike price |
| right | string | Option right (CALL/PUT) |
| multiplier | number | Contract multiplier |
| openInterest | number | Open interest |
Type-checked example
const result = await quoteClient.getOptionQuote(['AAPL 260619C00150000'], 'America/New_York');
console.log(result);Response example
[
{
"symbol": "string",
"open": 0,
"high": 0,
"low": 0,
"close": 0,
"preClose": 0,
"latestPrice": 0,
"latestTime": 0,
"askPrice": 0,
"askSize": 0,
"bidPrice": 0,
"bidSize": 0,
"volume": 0,
"status": "string",
"adjPreClose": 0,
"change": 0,
"changeRate": 0,
"amplitude": 0,
"expiry": "string",
"strike": "string",
"right": "string",
"multiplier": 0,
"openInterest": 0
}
]getOptionTradeTicks
getOptionTradeTicksSignature
async getOptionTradeTicks(req: OptionTradeTicksRequest): Promise<TradeTick[]>Purpose
Gets option trade ticks.
Parameters, defaults, and constraints
| Parameter | Type | Required | SDK default | Constraints |
|---|---|---|---|---|
req | OptionTradeTicksRequest | Yes | None | No client-side validation is declared. |
req.contracts | OptionQueryItem[] | undefined | No | None | No client-side validation is declared. |
req.lang | string | undefined | No | None | No client-side validation is declared. |
Returns
Promise<TradeTick[]>
| Field | Type | Description |
|---|---|---|
| symbol | string | Symbol code |
| beginIndex | number | Begin index |
| endIndex | number | End index |
| items | TradeTickItem[] | Data items array |
Type-checked example
const result = await quoteClient.getOptionTradeTicks({ contracts: [{ symbol: 'AAPL', expiry: Date.UTC(2026, 5, 19), strike: '150', right: 'CALL' }] });
console.log(result);Response example
[
{
"symbol": "string",
"beginIndex": 0,
"endIndex": 0,
"items": [
"TradeTickItem"
]
}
]getOptionTimeline
getOptionTimelineSignature
async getOptionTimeline(req: OptionTimelineRequest): Promise<Timeline[]>Purpose
Gets option timeline.
Parameters, defaults, and constraints
| Parameter | Type | Required | SDK default | Constraints |
|---|---|---|---|---|
req | OptionTimelineRequest | Yes | None | No client-side validation is declared. |
req.optionQuery | OptionQueryItem[] | undefined | No | None | No client-side validation is declared. |
req.market | string | undefined | No | None | No client-side validation is declared. |
req.lang | string | undefined | No | None | No client-side validation is declared. |
Returns
Promise<Timeline[]>
| Field | Type | Description |
|---|---|---|
| symbol | string | Symbol code |
| period | string | K-line period |
| preClose | number | Previous close price |
| intraday | TimelineBucket | Intraday timeline data |
| preHours | TimelineBucket | Pre-market timeline data |
| afterHours | TimelineBucket | After-hours timeline data |
Type-checked example
const result = await quoteClient.getOptionTimeline({ optionQuery: [{ symbol: 'AAPL', expiry: Date.UTC(2026, 5, 19), strike: '150', right: 'CALL' }], market: 'US' });
console.log(result);Response example
[
{
"symbol": "string",
"period": "string",
"preClose": 0,
"intraday": {
"items": [
"TimelineItem"
]
},
"preHours": {
"items": [
"TimelineItem"
]
},
"afterHours": {
"items": [
"TimelineItem"
]
}
}
]getOptionDepth
getOptionDepthSignature
async getOptionDepth(req: OptionDepthRequest): Promise<Depth[]>Purpose
Gets option depth.
Parameters, defaults, and constraints
| Parameter | Type | Required | SDK default | Constraints |
|---|---|---|---|---|
req | OptionDepthRequest | Yes | None | No client-side validation is declared. |
req.optionBasic | OptionQueryItem[] | undefined | No | None | No client-side validation is declared. |
req.market | string | undefined | No | None | No client-side validation is declared. |
req.lang | string | undefined | No | None | No client-side validation is declared. |
Returns
Promise<Depth[]>
| Field | Type | Description |
|---|---|---|
| symbol | string | Symbol code |
| asks | DepthLevel[] | Ask order queue |
| bids | DepthLevel[] | Bid order queue |
Type-checked example
const result = await quoteClient.getOptionDepth({ optionBasic: [{ symbol: 'AAPL', expiry: Date.UTC(2026, 5, 19), strike: '150', right: 'CALL' }], market: 'US' });
console.log(result);Response example
[
{
"symbol": "string",
"asks": [
"DepthLevel"
],
"bids": [
"DepthLevel"
]
}
]getOptionSymbols
getOptionSymbolsSignature
async getOptionSymbols(req: OptionSymbolsRequest): Promise<OptionSymbol[]>Purpose
Gets option symbols.
Parameters, defaults, and constraints
| Parameter | Type | Required | SDK default | Constraints |
|---|---|---|---|---|
req | OptionSymbolsRequest | Yes | None | No client-side validation is declared. |
req.market | string | undefined | No | None | No client-side validation is declared. |
req.lang | string | undefined | No | None | No client-side validation is declared. |
Returns
Promise<OptionSymbol[]>
| Field | Type | Description |
|---|---|---|
| symbol | string | Symbol code |
| market | string | Market |
| nameCN | string | Chinese name |
| nameEN | string | English name |
Type-checked example
const result = await quoteClient.getOptionSymbols({ market: 'US' });
console.log(result);Response example
[
{
"symbol": "string",
"market": "string",
"nameCN": "string",
"nameEN": "string"
}
]getOptionAnalysis
getOptionAnalysisSignature
async getOptionAnalysis(req: OptionAnalysisRequest): Promise<OptionAnalysis[]>Purpose
Gets option analysis.
Parameters, defaults, and constraints
| Parameter | Type | Required | SDK default | Constraints |
|---|---|---|---|---|
req | OptionAnalysisRequest | Yes | None | No client-side validation is declared. |
req.symbols | string[] | undefined | No | None | No client-side validation is declared. |
req.market | string | undefined | No | None | No client-side validation is declared. |
req.period | string | undefined | No | None | No client-side validation is declared. |
req.requireVolatilityList | boolean | undefined | No | None | No client-side validation is declared. |
req.lang | string | undefined | No | None | No client-side validation is declared. |
Returns
Promise<OptionAnalysis[]>
| Field | Type | Description |
|---|---|---|
| symbol | string | Symbol code |
| impliedVol30Days | number | 30-day implied volatility |
| hisVolatility | number | Historical volatility |
| ivHisVRatio | number | IV/HV ratio |
| callPutRatio | number | Call/put ratio |
| impliedVolMetric | ImpliedVolMetric | Implied volatility metric |
| volatilityList | OptionVolatilityPoint[] | Volatility list |
Type-checked example
const result = await quoteClient.getOptionAnalysis({ symbols: ['AAPL'], market: 'US', period: '26week' });
console.log(result);Response example
[
{
"symbol": "string",
"impliedVol30Days": 0,
"hisVolatility": 0,
"ivHisVRatio": 0,
"callPutRatio": 0,
"impliedVolMetric": {
"period": "string",
"percentile": 0,
"rank": 0
},
"volatilityList": [
"OptionVolatilityPoint"
]
}
]Updated about 13 hours ago
