Market Data Models

class lime_trader.models.market.CurrentSchedule(session: TradingSchedule)[source]

Bases: object

Trading session info depending on current date and time

session

Current session info

Type:

lime_trader.models.market.TradingSchedule

class lime_trader.models.market.OptionChain(contract_size: Decimal, style: OptionStyle, settlement: OptionSettlementType, chain: list[OptionContract])[source]

Bases: object

Option contracts for specified symbol, expiration date and series

contract_size

Contract size value

Type:

decimal.Decimal

style

Option style

Type:

lime_trader.models.market.OptionStyle

settlement

Settlement type

Type:

lime_trader.models.market.OptionSettlementType

chain

Array of option contracts

Type:

list[lime_trader.models.market.OptionContract]

class lime_trader.models.market.OptionContract(symbol: str, type: OptionType, strike: Decimal)[source]

Bases: object

Single option contract for the security

symbol

Option symbol

Type:

str

type

Option type

Type:

lime_trader.models.market.OptionType

strike

Option strike value

Type:

decimal.Decimal

class lime_trader.models.market.OptionSeries(series: str, expirations: list[date], contract_size: Decimal)[source]

Bases: object

Represents option series for the security

series

Option series

Type:

str

expirations

Array of expiration dates

Type:

list[datetime.date]

contract_size

Contract size value

Type:

decimal.Decimal

class lime_trader.models.market.OptionSettlementType(value, names=None, *, module=None, qualname=None, type=None, start=1, boundary=None)[source]

Bases: Enum

class lime_trader.models.market.OptionStyle(value, names=None, *, module=None, qualname=None, type=None, start=1, boundary=None)[source]

Bases: Enum

class lime_trader.models.market.OptionType(value, names=None, *, module=None, qualname=None, type=None, start=1, boundary=None)[source]

Bases: Enum

class lime_trader.models.market.Period(value, names=None, *, module=None, qualname=None, type=None, start=1, boundary=None)[source]

Bases: Enum

class lime_trader.models.market.Quote(symbol: str, ask: Decimal, ask_size: Decimal, bid: Decimal, bid_size: Decimal, last: Decimal, last_size: Decimal, volume: int, date: datetime, high: Decimal, low: Decimal, open: Decimal, close: Decimal, week52_high: Decimal, week52_low: Decimal, change: Decimal, change_pc: Decimal, implied_volatility: Decimal | None = None, open_interest: Decimal | None = None, theoretical_price: Decimal | None = None, delta: Decimal | None = None, gamma: Decimal | None = None, theta: Decimal | None = None, vega: Decimal | None = None, rho: Decimal | None = None)[source]

Bases: object

Quote for the specified symbol.

symbol

The security symbol

Type:

str

ask

Ask price

Type:

decimal.Decimal

ask_size

Ask size

Type:

decimal.Decimal

bid

Bid price

Type:

decimal.Decimal

bid_size

Bid size

Type:

decimal.Decimal

last

Last price

Type:

decimal.Decimal

last_size

Last trade size

Type:

decimal.Decimal

volume

Today total volume

Type:

int

date

Last trade time

Type:

datetime.datetime

high

Today’s high price

Type:

decimal.Decimal

low

Today’s low price

Type:

decimal.Decimal

open

Open price

Type:

decimal.Decimal

close

Yesterday’s close price

Type:

decimal.Decimal

week52_high

52-week high

Type:

decimal.Decimal

week52_low

52-week low

Type:

decimal.Decimal

change

Today’s price change

Type:

decimal.Decimal

change_pc

Today’s percent price change

Type:

decimal.Decimal

open_interest

Open interest (options)

Type:

decimal.Decimal | None

implied_volatility

Implied volatility (options)

Type:

decimal.Decimal | None

theoretical_price

Theoretical price (options)

Type:

decimal.Decimal | None

delta

Delta value (options)

Type:

decimal.Decimal | None

gamma

Gamma value (options)

Type:

decimal.Decimal | None

theta

Theta value (options)

Type:

decimal.Decimal | None

vega

Vega value (options)

Type:

decimal.Decimal | None

rho

Rho value (options)

Type:

decimal.Decimal | None

class lime_trader.models.market.QuoteHistory(timestamp: datetime.datetime, period: lime_trader.models.market.Period, open: decimal.Decimal, high: decimal.Decimal, low: decimal.Decimal, close: decimal.Decimal, volume: int)[source]

Bases: object

class lime_trader.models.market.SecuritiesPage(trades: list[Security], count: int)[source]

Bases: object

Page of securities

trades

List of securities

Type:

list[lime_trader.models.market.Security]

count

Total count of securities

Type:

int

property securities: list[Security]

Alias for returned list as API returns it as “trades”. Should be used instead of “trades” attribute.

Returns:

List of securities

class lime_trader.models.market.Security(symbol: str, description: str)[source]

Bases: object

Represents security

symbol

Security symbol

Type:

str

description

Description of security

Type:

str

class lime_trader.models.market.Trade(timestamp: int, quantity: int, price: decimal.Decimal, market: str)[source]

Bases: object

class lime_trader.models.market.TradesPage(trades: list[Trade], count: int)[source]

Bases: object

Represents one page of trades

trades

List of trades

Type:

list[lime_trader.models.market.Trade]

count

Total count of trades

Type:

int

class lime_trader.models.market.TradingSchedule(value, names=None, *, module=None, qualname=None, type=None, start=1, boundary=None)[source]

Bases: Enum