Skip to content

Get the live options chain for a symbol from Unusual Whales (REQ-12.4).

GET
/api/advisor/options-chain
curl --request GET \
--url 'https://api.tradr.cloud/api/advisor/options-chain?symbol=example'

Backs the options-tools page chain viewer. Shares the Unusual Whales client and the market_data_options_chain tool’s parsing (REQ-12.4 — no duplicate fetch logic). When the authenticated user has no Unusual Whales key the response is { configured: false } (200) so the viewer shows an empty-state CTA to Settings, not an error (REQ-12.2). With a key the response is { configured: true, chain } where chain is the compact projection { symbol, expiration?, count, contracts[] }. Upstream failures are mapped to their REQ-6.5 reason codes on the matching HTTP status (REQ-12.3): 400 MARKET_DATA_KEY_INVALID, 429 MARKET_DATA_RATE_LIMITED / PLATFORM_RATE_LIMITED, 404 SYMBOL_NOT_FOUND, 503 MARKET_DATA_UNAVAILABLE. The plaintext key is never returned or logged.

symbol
required
string
/^[A-Z.]{1,6}$/
expiration
string
/^\d{4}-\d{2}-\d{2}$/

{ configured: false } or { configured: true, chain }.

Validation error or MARKET_DATA_KEY_INVALID.

SYMBOL_NOT_FOUND.

MARKET_DATA_RATE_LIMITED or PLATFORM_RATE_LIMITED.

MARKET_DATA_UNAVAILABLE.