Appearance
Options
Option Contract Lookup
python
contracts = client.get_option_contract(
symbol="SPX",
expiry="20260126",
strike=6900,
right="C",
trading_class="SPXW"
)Returns: List[Dict] - Multiple contracts across expiries
python
{
'conid': 843637708,
'symbol': 'SPX',
'secType': 'OPT',
'right': 'C',
'strike': 6955.0,
'currency': 'USD',
'maturityDate': '20260126',
'multiplier': '100',
'tradingClass': 'SPXW',
'exchange': 'SMART',
'validExchanges': 'SMART,CBOE,IBUSOPT',
'desc2': "(SPXW) JAN 26 '26 6955 Call"
}| Field | Type | Description |
|---|---|---|
conid | int | Contract ID for orders |
symbol | str | Underlying symbol |
right | str | 'C' (call) or 'P' (put) |
strike | float | Strike price |
maturityDate | str | Expiry YYYYMMDD |
tradingClass | str | Trading class (SPXW, SPX, etc.) |
multiplier | str | Contract multiplier |
Important
Returns ALL strikes matching your query across multiple expiries. Filter by maturityDate for 0DTE:
python
today = "20260126"
matches = [c for c in contracts if c.get("maturityDate") == today]
contract = matches[0]Option Quote
python
quote = client.get_option_quote(conid)Returns: Dict with bid/ask/last/greeks when available.
Market Depth for Options
python
depth = client.get_market_depth(opt_conid, rows=1)Returns: Dict
python
{
'conid': 837287645,
'bid': 10.2,
'ask': 10.3,
'bid_size': 19.0,
'ask_size': 32.0,
'rows': 1
}Last Trade for Options
python
last = client.get_last_trade(opt_conid)Returns: Dict
python
{
'conid': 837287645,
'last': 10.3,
'last_size': 1.0,
'volume': 12091.0
}Placing Option Orders
Always use conid for option orders:
python
# 1. Lookup contract
contracts = client.get_option_contract(
symbol="SPX", expiry="20260126", strike=6900, right="P", trading_class="SPXW"
)
today_contracts = [c for c in contracts if c.get("maturityDate") == "20260126"]
opt_conid = today_contracts[0]["conid"]
# 2. Get quote
depth = client.get_market_depth(opt_conid, rows=1)
bid, ask = depth.get("bid"), depth.get("ask")
# 3. Place order
result = client.buy_limit("SPX", 1, price=ask, conid=opt_conid, tif="DAY")Trading Classes
| Underlying | Trading Class | Description |
|---|---|---|
| SPX | SPXW | Weekly SPX options (0DTE) |
| SPX | SPX | Monthly SPX options |
| SPY | SPY | SPY ETF options |
| QQQ | QQQ | QQQ ETF options |