investfly.models.marketdata
Market data models
Class representing a security instrument that is traded in the market
Enum representing Security Type (STOCK, ETF, CRYPTO, FOREX, FUTURE, OPTION)
Class representing Price Quote
Enum of all valid fields on Quote object
Enum to represent BarInterval
Financial Fields supported by Invesfly
Future Product Enum. A few commented out since their contracts are not available.
Return (month_code, month_number) pairs in listed order.
Enum representing high-level future product categories.
A specific futures contract (e.g., ESM25) for product ES expiring June 2025.
Extends Security with contract-specific metadata. Instances are created
by the platform via StrategyDataService.listFutures(); strategy
developers do not construct these directly.
Since Future is a Security, it can be used anywhere a concrete
contract security is accepted, such as getQuote(future) and
TradeOrder(security=future, ...). Historical strategy bars are
exposed at the product level as continuous futures series, not as
individual contract bars.
Return the last two digits of the expiry year, e.g. expiry 2026-03-20 -> 26.
Return the futures month code character from the symbol.
Handles both one-digit and two-digit year formats:
'ESU3'->'U''ESU23'->'U'
Inherited Members
Right of an option contract: CALL or PUT
Calendar date when an option contract expires (1-indexed month and day)
OCC-style listed equity/ETF option contract.
OCC option symbol: TICKER + YYMMDD + C/P + strike*1000 (8 digits, zero-padded). Example: AAPL260117C00200000 => AAPL call expiring 2026-01-17 with $200 strike.
Snapshot of an option contract quote with optional Greeks.
Greeks may be vendor-provided (Tradier/TastyTrade) or computed locally via the synthetic Black-Scholes pricer. Consumers should treat None as "not available" rather than zero.
Option chain snapshot for a single underlying + expiration date.
Calls and puts are stored separately so consumers can iterate one side without filtering. The underlyingPrice/asOfTimestamp pair is preserved for IV/Greeks recomputation when those are not vendor-provided.