# This file is automatically generated by pyo3_stub_gen
# ruff: noqa: E501

import datetime
import decimal
import enum
import typing
from enum import Enum

from nautilus_trader import _libnautilus
from nautilus_trader import core

__all__ = [
    "FIXED_PRECISION",
    "FIXED_SCALAR",
    "HIGH_PRECISION",
    "PRECISION_BYTES",
    "AmmType",
    "Blockchain",
    "Chain",
    "DataType",
    "Dex",
    "DexType",
]

HIGH_PRECISION: int
FIXED_SCALAR: float
FIXED_PRECISION: int
PRECISION_BYTES: int

@typing.final
class AccountBalance:
    @property
    def total(self) -> Money: ...
    @property
    def locked(self) -> Money: ...
    @property
    def free(self) -> Money: ...
    @property
    def currency(self) -> Currency: ...
    def __new__(cls, total: Money, locked: Money, free: Money) -> AccountBalance: ...
    def __hash__(self) -> int: ...
    def copy(self) -> AccountBalance: ...
    @staticmethod
    def from_dict(values: dict) -> AccountBalance: ...
    def to_dict(self) -> typing.Any: ...

@typing.final
class AccountId:
    def __init__(self, value: str) -> None: ...
    def __setstate__(self, state: typing.Any) -> None: ...
    def __getstate__(self) -> typing.Any: ...
    def __reduce__(self) -> typing.Any: ...
    def __hash__(self) -> int: ...
    @property
    def value(self) -> str: ...
    @staticmethod
    def from_str(value: str) -> AccountId: ...

@typing.final
class AccountState:
    @property
    def account_id(self) -> AccountId: ...
    @property
    def account_type(self) -> AccountType: ...
    @property
    def base_currency(self) -> Currency | None: ...
    @property
    def balances(self) -> list[AccountBalance]: ...
    @property
    def margins(self) -> list[MarginBalance]: ...
    @property
    def is_reported(self) -> bool: ...
    @property
    def event_id(self) -> core.UUID4: ...
    @property
    def ts_event(self) -> int: ...
    @property
    def ts_init(self) -> int: ...
    @property
    def info(self) -> dict: ...
    def __new__(
        cls,
        account_id: AccountId,
        account_type: AccountType,
        balances: typing.Sequence[AccountBalance],
        margins: typing.Sequence[MarginBalance],
        is_reported: bool,
        event_id: core.UUID4,
        ts_event: int,
        ts_init: int,
        base_currency: Currency | None = None,
        info: dict | None = None,
    ) -> AccountState: ...
    @staticmethod
    def from_dict(values: dict) -> AccountState: ...
    def to_dict(self) -> typing.Any: ...

@typing.final
class ActorId:
    def __init__(self, value: str) -> None: ...
    def __setstate__(self, state: typing.Any) -> None: ...
    def __getstate__(self) -> typing.Any: ...
    def __reduce__(self) -> typing.Any: ...
    def __hash__(self) -> int: ...
    @property
    def value(self) -> str: ...
    @staticmethod
    def from_str(value: str) -> ActorId: ...

@typing.final
class Bar:
    def __init__(
        self,
        bar_type: BarType,
        open: Price,
        high: Price,
        low: Price,
        close: Price,
        volume: Quantity,
        ts_event: int,
        ts_init: int,
    ) -> None: ...
    def __hash__(self) -> int: ...
    @property
    def bar_type(self) -> BarType: ...
    @property
    def open(self) -> Price: ...
    @property
    def high(self) -> Price: ...
    @property
    def low(self) -> Price: ...
    @property
    def close(self) -> Price: ...
    @property
    def volume(self) -> Quantity: ...
    @property
    def ts_event(self) -> int: ...
    @property
    def ts_init(self) -> int: ...
    @staticmethod
    def fully_qualified_name() -> str: ...
    @staticmethod
    def get_metadata(
        bar_type: BarType, price_precision: int, size_precision: int
    ) -> dict[str, str]: ...
    @staticmethod
    def get_fields() -> dict: ...
    @staticmethod
    def from_dict(values: dict) -> Bar: ...
    def to_dict(self) -> dict: ...
    def to_json_bytes(self) -> typing.Any: ...
    def to_msgpack_bytes(self) -> typing.Any: ...
    def __setstate__(self, state: typing.Any) -> None: ...
    def __getstate__(self) -> typing.Any: ...
    def __reduce__(self) -> typing.Any: ...
    @staticmethod
    def from_json(data: typing.Any) -> Bar: ...
    @staticmethod
    def from_msgpack(data: typing.Any) -> Bar: ...

@typing.final
class BarSpecification:
    def __init__(self, step: int, aggregation: BarAggregation, price_type: PriceType) -> None: ...
    def __hash__(self) -> int: ...
    @property
    def step(self) -> int: ...
    @property
    def aggregation(self) -> BarAggregation: ...
    @property
    def price_type(self) -> PriceType: ...
    @staticmethod
    def fully_qualified_name() -> str: ...
    @property
    def timedelta(self) -> datetime.timedelta: ...
    def is_time_aggregated(self) -> bool: ...
    def is_threshold_aggregated(self) -> bool: ...
    def is_information_aggregated(self) -> bool: ...
    def get_interval_ns(self) -> int: ...
    @staticmethod
    def from_timedelta(duration: datetime.timedelta, price_type: PriceType) -> BarSpecification: ...
    @staticmethod
    def check_time_aggregated(aggregation: BarAggregation) -> bool: ...
    @staticmethod
    def check_threshold_aggregated(aggregation: BarAggregation) -> bool: ...
    @staticmethod
    def check_information_aggregated(aggregation: BarAggregation) -> bool: ...
    def __reduce__(self) -> typing.Any: ...
    @staticmethod
    def from_str(value: str) -> BarSpecification: ...

@typing.final
class Bet:
    def __init__(self, price: decimal.Decimal, stake: decimal.Decimal, side: BetSide) -> None: ...
    def __hash__(self) -> int: ...
    @staticmethod
    def from_stake_or_liability(
        price: decimal.Decimal, volume: decimal.Decimal, side: BetSide
    ) -> Bet: ...
    @staticmethod
    def from_stake(price: decimal.Decimal, stake: decimal.Decimal, side: BetSide) -> Bet: ...
    @staticmethod
    def from_liability(
        price: decimal.Decimal, liability: decimal.Decimal, side: BetSide
    ) -> Bet: ...
    @property
    def price(self) -> decimal.Decimal: ...
    @property
    def stake(self) -> decimal.Decimal: ...
    @property
    def side(self) -> BetSide: ...
    def exposure(self) -> decimal.Decimal: ...
    def liability(self) -> decimal.Decimal: ...
    def profit(self) -> decimal.Decimal: ...
    def outcome_win_payoff(self) -> decimal.Decimal: ...
    def outcome_lose_payoff(self) -> decimal.Decimal: ...
    def hedging_stake(self, price: decimal.Decimal) -> decimal.Decimal: ...
    def hedging_bet(self, price: decimal.Decimal) -> Bet: ...

@typing.final
class BetPosition:
    def __init__(self) -> None: ...
    @property
    def price(self) -> decimal.Decimal: ...
    @property
    def side(self) -> BetSide | None: ...
    @property
    def exposure(self) -> decimal.Decimal: ...
    @property
    def realized_pnl(self) -> decimal.Decimal: ...
    def add_bet(self, bet: Bet) -> None: ...
    def as_bet(self) -> Bet | None: ...
    def unrealized_pnl(self, price: decimal.Decimal) -> decimal.Decimal: ...
    def total_pnl(self, price: decimal.Decimal) -> decimal.Decimal: ...
    def flattening_bet(self, price: decimal.Decimal) -> Bet | None: ...
    def reset(self) -> None: ...

@typing.final
class BettingAccount:
    def __init__(self, event: AccountState, calculate_account_state: bool) -> None: ...
    @property
    def id(self) -> AccountId: ...
    @property
    def account_type(self) -> AccountType: ...
    @property
    def base_currency(self) -> Currency | None: ...
    @property
    def last_event(self) -> AccountState | None: ...
    @property
    def event_count(self) -> int: ...
    @property
    def events(self) -> list[AccountState]: ...
    @property
    def calculate_account_state(self) -> bool: ...
    def balance_total(self, currency: Currency | None = None) -> Money | None: ...
    def balances_total(self) -> dict[Currency, Money]: ...
    def balance_free(self, currency: Currency | None = None) -> Money | None: ...
    def balances_free(self) -> dict[Currency, Money]: ...
    def balance_locked(self, currency: Currency | None = None) -> Money | None: ...
    def balances_locked(self) -> dict[Currency, Money]: ...
    def balance(self, currency: Currency | None = None) -> AccountBalance | None: ...
    def balances(self) -> dict[Currency, AccountBalance]: ...
    def starting_balances(self) -> dict[Currency, Money]: ...
    def currencies(self) -> list[Currency]: ...
    def is_cash_account(self) -> bool: ...
    def is_margin_account(self) -> bool: ...
    def purge_account_events(self, ts_now: int, lookback_secs: int) -> None: ...
    def apply(self, event: AccountState) -> None: ...
    def calculate_balance_locked(
        self,
        instrument: typing.Any,
        side: OrderSide,
        quantity: Quantity,
        price: Price,
        use_quote_for_inverse: bool | None = None,
    ) -> Money: ...
    def calculate_commission(
        self,
        instrument: typing.Any,
        last_qty: Quantity,
        last_px: Price,
        liquidity_side: LiquiditySide,
        use_quote_for_inverse: bool | None = None,
    ) -> Money: ...
    def calculate_pnls(
        self, instrument: typing.Any, fill: OrderFilled, position: Position | None = None
    ) -> list[Money]: ...
    def balance_impact(
        self, instrument: typing.Any, quantity: Quantity, price: Price, order_side: OrderSide
    ) -> Money: ...
    def to_dict(self) -> typing.Any: ...

@typing.final
class BettingInstrument:
    @property
    def symbol(self) -> Symbol: ...
    @property
    def venue(self) -> Venue: ...
    @property
    def tick_scheme(self) -> str | None: ...
    @property
    def is_inverse(self) -> bool: ...
    @property
    def is_quanto(self) -> bool: ...
    @property
    def isin(self) -> str | None: ...
    @property
    def lot_size(self) -> Quantity | None: ...
    @property
    def margin_init(self) -> decimal.Decimal: ...
    @property
    def margin_maint(self) -> decimal.Decimal: ...
    @property
    def multiplier(self) -> Quantity: ...
    @property
    def quote_currency(self) -> Currency: ...
    def __init__(
        self,
        instrument_id: InstrumentId,
        raw_symbol: Symbol,
        event_type_id: int,
        event_type_name: str,
        competition_id: int,
        competition_name: str,
        event_id: int,
        event_name: str,
        event_country_code: str,
        event_open_date: int,
        betting_type: str,
        market_id: str,
        market_name: str,
        market_type: str,
        market_start_time: int,
        selection_id: int,
        selection_name: str,
        selection_handicap: float,
        currency: Currency,
        price_precision: int,
        size_precision: int,
        price_increment: Price,
        size_increment: Quantity,
        ts_event: int,
        ts_init: int,
        max_quantity: Quantity | None = None,
        min_quantity: Quantity | None = None,
        max_notional: Money | None = None,
        min_notional: Money | None = None,
        max_price: Price | None = None,
        min_price: Price | None = None,
        margin_init: decimal.Decimal | None = None,
        margin_maint: decimal.Decimal | None = None,
        maker_fee: decimal.Decimal | None = None,
        taker_fee: decimal.Decimal | None = None,
        tick_scheme: str | None = None,
        info: dict | None = None,
    ) -> None: ...
    def __hash__(self) -> int: ...
    @property
    def type_name(self) -> str: ...
    @property
    def id(self) -> InstrumentId: ...
    @property
    def raw_symbol(self) -> Symbol: ...
    @property
    def asset_class(self) -> AssetClass: ...
    @property
    def instrument_class(self) -> InstrumentClass: ...
    @property
    def event_type_id(self) -> int: ...
    @property
    def event_type_name(self) -> str: ...
    @property
    def competition_id(self) -> int: ...
    @property
    def competition_name(self) -> str: ...
    @property
    def event_id(self) -> int: ...
    @property
    def event_name(self) -> str: ...
    @property
    def event_country_code(self) -> str: ...
    @property
    def event_open_date(self) -> int: ...
    @property
    def betting_type(self) -> str: ...
    @property
    def market_id(self) -> str: ...
    @property
    def market_name(self) -> str: ...
    @property
    def market_type(self) -> str: ...
    @property
    def market_start_time(self) -> int: ...
    @property
    def selection_id(self) -> int: ...
    @property
    def selection_name(self) -> str: ...
    @property
    def selection_handicap(self) -> float: ...
    @property
    def currency(self) -> Currency: ...
    @property
    def price_precision(self) -> int: ...
    @property
    def size_precision(self) -> int: ...
    @property
    def price_increment(self) -> Price: ...
    @property
    def size_increment(self) -> Quantity: ...
    @property
    def max_quantity(self) -> Quantity | None: ...
    @property
    def min_quantity(self) -> Quantity | None: ...
    @property
    def max_notional(self) -> Money | None: ...
    @property
    def min_notional(self) -> Money | None: ...
    @property
    def max_price(self) -> Price | None: ...
    @property
    def min_price(self) -> Price | None: ...
    @property
    def maker_fee(self) -> decimal.Decimal: ...
    @property
    def taker_fee(self) -> decimal.Decimal: ...
    @property
    def info(self) -> dict: ...
    @property
    def ts_event(self) -> int: ...
    @property
    def ts_init(self) -> int: ...
    @staticmethod
    def from_dict(values: dict) -> BettingInstrument: ...
    def to_dict(self) -> typing.Any: ...
    def next_bid_price(self, value: float, num_ticks: int = ...) -> Price | None: ...
    def next_ask_price(self, value: float, num_ticks: int = ...) -> Price | None: ...
    def next_bid_prices(self, value: float, num_ticks: int = ...) -> list[decimal.Decimal]: ...
    def next_ask_prices(self, value: float, num_ticks: int = ...) -> list[decimal.Decimal]: ...
    def make_price(self, value: float) -> Price: ...
    def make_qty(self, value: float, round_down: bool = ...) -> Quantity: ...
    def notional_value(
        self, quantity: Quantity, price: Price, use_quote_for_inverse: bool = ...
    ) -> Money: ...

@typing.final
class BinaryOption:
    @property
    def symbol(self) -> Symbol: ...
    @property
    def venue(self) -> Venue: ...
    @property
    def tick_scheme(self) -> str | None: ...
    @property
    def activation_utc(self) -> datetime.datetime: ...
    @property
    def expiration_utc(self) -> datetime.datetime: ...
    @property
    def instrument_class(self) -> InstrumentClass: ...
    @property
    def is_inverse(self) -> bool: ...
    @property
    def is_quanto(self) -> bool: ...
    @property
    def isin(self) -> str | None: ...
    @property
    def lot_size(self) -> Quantity | None: ...
    @property
    def multiplier(self) -> Quantity: ...
    @property
    def quote_currency(self) -> Currency: ...
    def __init__(
        self,
        instrument_id: InstrumentId,
        raw_symbol: Symbol,
        asset_class: AssetClass,
        currency: Currency,
        activation_ns: int,
        expiration_ns: int,
        price_precision: int,
        size_precision: int,
        price_increment: Price,
        size_increment: Quantity,
        ts_event: int,
        ts_init: int,
        outcome: str | None = None,
        description: str | None = None,
        max_quantity: Quantity | None = None,
        min_quantity: Quantity | None = None,
        max_notional: Money | None = None,
        min_notional: Money | None = None,
        max_price: Price | None = None,
        min_price: Price | None = None,
        margin_init: decimal.Decimal | None = None,
        margin_maint: decimal.Decimal | None = None,
        maker_fee: decimal.Decimal | None = None,
        taker_fee: decimal.Decimal | None = None,
        tick_scheme: str | None = None,
        info: dict | None = None,
        event_id: str | None = None,
    ) -> None: ...
    def __hash__(self) -> int: ...
    @property
    def type_name(self) -> str: ...
    @property
    def id(self) -> InstrumentId: ...
    @property
    def raw_symbol(self) -> Symbol: ...
    @property
    def asset_class(self) -> AssetClass: ...
    @property
    def currency(self) -> Currency: ...
    @property
    def activation_ns(self) -> int: ...
    @property
    def expiration_ns(self) -> int: ...
    @property
    def price_precision(self) -> int: ...
    @property
    def size_precision(self) -> int: ...
    @property
    def price_increment(self) -> Price: ...
    @property
    def size_increment(self) -> Quantity: ...
    @property
    def event_id(self) -> str | None: ...
    @property
    def outcome(self) -> str | None: ...
    @property
    def description(self) -> str | None: ...
    @property
    def max_quantity(self) -> Quantity | None: ...
    @property
    def min_quantity(self) -> Quantity | None: ...
    @property
    def max_notional(self) -> Money | None: ...
    @property
    def min_notional(self) -> Money | None: ...
    @property
    def max_price(self) -> Price | None: ...
    @property
    def min_price(self) -> Price | None: ...
    @property
    def margin_init(self) -> decimal.Decimal: ...
    @property
    def margin_maint(self) -> decimal.Decimal: ...
    @property
    def maker_fee(self) -> decimal.Decimal: ...
    @property
    def taker_fee(self) -> decimal.Decimal: ...
    @property
    def info(self) -> dict: ...
    @property
    def ts_event(self) -> int: ...
    @property
    def ts_init(self) -> int: ...
    @staticmethod
    def from_dict(values: dict) -> BinaryOption: ...
    def to_dict(self) -> typing.Any: ...
    def next_bid_price(self, value: float, num_ticks: int = ...) -> Price | None: ...
    def next_ask_price(self, value: float, num_ticks: int = ...) -> Price | None: ...
    def next_bid_prices(self, value: float, num_ticks: int = ...) -> list[decimal.Decimal]: ...
    def next_ask_prices(self, value: float, num_ticks: int = ...) -> list[decimal.Decimal]: ...
    def make_price(self, value: float) -> Price: ...
    def make_qty(self, value: float, round_down: bool = ...) -> Quantity: ...
    def notional_value(
        self, quantity: Quantity, price: Price, use_quote_for_inverse: bool = ...
    ) -> Money: ...

@typing.final
class BlackScholesGreeksResult:
    @property
    def price(self) -> float: ...
    @property
    def vol(self) -> float: ...
    @property
    def delta(self) -> float: ...
    @property
    def gamma(self) -> float: ...
    @property
    def vega(self) -> float: ...
    @property
    def theta(self) -> float: ...
    @property
    def itm_prob(self) -> float: ...

@typing.final
class Block:
    def __init__(
        self,
        chain: Blockchain,
        hash: str,
        parent_hash: str,
        number: int,
        miner: str,
        gas_limit: int,
        gas_used: int,
        timestamp: int,
    ) -> None: ...
    @property
    def chain(self) -> Blockchain | None: ...
    @property
    def hash(self) -> str: ...
    @property
    def number(self) -> int: ...
    @property
    def parent_hash(self) -> str: ...
    @property
    def miner(self) -> str: ...
    @property
    def gas_limit(self) -> int: ...
    @property
    def gas_used(self) -> int: ...
    @property
    def base_fee_per_gas(self) -> str | None: ...
    @property
    def blob_gas_used(self) -> str | None: ...
    @property
    def excess_blob_gas(self) -> str | None: ...
    @property
    def l1_gas_price(self) -> str | None: ...
    @property
    def l1_gas_used(self) -> int | None: ...
    @property
    def l1_fee_scalar(self) -> int | None: ...
    @property
    def timestamp(self) -> int: ...
    @property
    def ts_event(self) -> int: ...
    @property
    def ts_init(self) -> int: ...
    def __hash__(self) -> int: ...

@typing.final
class BookLevel:
    def __hash__(self) -> int: ...
    @property
    def price(self) -> Price: ...
    @property
    def side(self) -> OrderSide: ...
    def len(self) -> int: ...
    def is_empty(self) -> bool: ...
    def size(self) -> float: ...
    def size_raw(self) -> int: ...
    def exposure(self) -> float: ...
    def exposure_raw(self) -> int: ...
    def first(self) -> BookOrder | None: ...
    def get_orders(self) -> list[BookOrder]: ...

@typing.final
class BookOrder:
    def __init__(
        self, side: OrderSide | None, price: Price, size: Quantity, order_id: int
    ) -> None: ...
    def __hash__(self) -> int: ...
    @property
    def side(self) -> OrderSide | None: ...
    @property
    def price(self) -> Price: ...
    @property
    def size(self) -> Quantity: ...
    @property
    def order_id(self) -> int: ...
    @staticmethod
    def fully_qualified_name() -> str: ...
    def exposure(self) -> float: ...
    def signed_size(self) -> float: ...
    @staticmethod
    def from_dict(values: dict) -> BookOrder: ...
    def to_dict(self) -> dict: ...
    def to_json_bytes(self) -> typing.Any: ...
    def to_msgpack_bytes(self) -> typing.Any: ...
    def __reduce__(self) -> typing.Any: ...
    @staticmethod
    def from_json(data: typing.Any) -> BookOrder: ...
    @staticmethod
    def from_msgpack(data: typing.Any) -> BookOrder: ...

@typing.final
class CashAccount:
    def __init__(
        self, event: AccountState, calculate_account_state: bool, allow_borrowing: bool = False
    ) -> None: ...
    @property
    def allow_borrowing(self) -> bool: ...
    @property
    def id(self) -> AccountId: ...
    @property
    def account_type(self) -> AccountType: ...
    @property
    def base_currency(self) -> Currency | None: ...
    @property
    def last_event(self) -> AccountState | None: ...
    @property
    def event_count(self) -> int: ...
    @property
    def events(self) -> list[AccountState]: ...
    @property
    def calculate_account_state(self) -> bool: ...
    def balance_total(self, currency: Currency | None = None) -> Money | None: ...
    def balances_total(self) -> dict[Currency, Money]: ...
    def balance_free(self, currency: Currency | None = None) -> Money | None: ...
    def balances_free(self) -> dict[Currency, Money]: ...
    def balance_locked(self, currency: Currency | None = None) -> Money | None: ...
    def balances_locked(self) -> dict[Currency, Money]: ...
    def balance(self, currency: Currency | None = None) -> AccountBalance | None: ...
    def balances(self) -> dict[Currency, AccountBalance]: ...
    def starting_balances(self) -> dict[Currency, Money]: ...
    def currencies(self) -> list[Currency]: ...
    def is_cash_account(self) -> bool: ...
    def is_margin_account(self) -> bool: ...
    def purge_account_events(self, ts_now: int, lookback_secs: int) -> None: ...
    def apply(self, event: AccountState) -> None: ...
    def calculate_balance_locked(
        self,
        instrument: typing.Any,
        side: OrderSide,
        quantity: Quantity,
        price: Price,
        use_quote_for_inverse: bool | None = None,
    ) -> Money: ...
    def calculate_commission(
        self,
        instrument: typing.Any,
        last_qty: Quantity,
        last_px: Price,
        liquidity_side: LiquiditySide,
        use_quote_for_inverse: bool | None = None,
    ) -> Money: ...
    def calculate_pnls(
        self, instrument: typing.Any, fill: OrderFilled, position: Position | None = None
    ) -> list[Money]: ...
    def to_dict(self) -> typing.Any: ...

@typing.final
class Cfd:
    @property
    def symbol(self) -> Symbol: ...
    @property
    def venue(self) -> Venue: ...
    @property
    def tick_scheme(self) -> str | None: ...
    @property
    def instrument_class(self) -> InstrumentClass: ...
    @property
    def is_inverse(self) -> bool: ...
    @property
    def is_quanto(self) -> bool: ...
    @property
    def isin(self) -> str | None: ...
    @property
    def multiplier(self) -> Quantity: ...
    def __init__(
        self,
        instrument_id: InstrumentId,
        raw_symbol: Symbol,
        asset_class: AssetClass,
        quote_currency: Currency,
        price_precision: int,
        size_precision: int,
        price_increment: Price,
        size_increment: Quantity,
        ts_event: int,
        ts_init: int,
        base_currency: Currency | None = None,
        lot_size: Quantity | None = None,
        max_quantity: Quantity | None = None,
        min_quantity: Quantity | None = None,
        max_notional: Money | None = None,
        min_notional: Money | None = None,
        max_price: Price | None = None,
        min_price: Price | None = None,
        margin_init: decimal.Decimal | None = None,
        margin_maint: decimal.Decimal | None = None,
        maker_fee: decimal.Decimal | None = None,
        taker_fee: decimal.Decimal | None = None,
        tick_scheme: str | None = None,
        info: dict | None = None,
    ) -> None: ...
    def __hash__(self) -> int: ...
    @property
    def type_name(self) -> str: ...
    @property
    def id(self) -> InstrumentId: ...
    @property
    def raw_symbol(self) -> Symbol: ...
    @property
    def asset_class(self) -> AssetClass: ...
    @property
    def base_currency(self) -> Currency | None: ...
    @property
    def quote_currency(self) -> Currency: ...
    @property
    def price_precision(self) -> int: ...
    @property
    def size_precision(self) -> int: ...
    @property
    def price_increment(self) -> Price: ...
    @property
    def size_increment(self) -> Quantity: ...
    @property
    def lot_size(self) -> Quantity | None: ...
    @property
    def max_quantity(self) -> Quantity | None: ...
    @property
    def min_quantity(self) -> Quantity | None: ...
    @property
    def max_notional(self) -> Money | None: ...
    @property
    def min_notional(self) -> Money | None: ...
    @property
    def max_price(self) -> Price | None: ...
    @property
    def min_price(self) -> Price | None: ...
    @property
    def margin_init(self) -> decimal.Decimal: ...
    @property
    def margin_maint(self) -> decimal.Decimal: ...
    @property
    def maker_fee(self) -> decimal.Decimal: ...
    @property
    def taker_fee(self) -> decimal.Decimal: ...
    @property
    def ts_event(self) -> int: ...
    @property
    def ts_init(self) -> int: ...
    @property
    def info(self) -> dict: ...
    @staticmethod
    def from_dict(values: dict) -> Cfd: ...
    def to_dict(self) -> typing.Any: ...
    def next_bid_price(self, value: float, num_ticks: int = ...) -> Price | None: ...
    def next_ask_price(self, value: float, num_ticks: int = ...) -> Price | None: ...
    def next_bid_prices(self, value: float, num_ticks: int = ...) -> list[decimal.Decimal]: ...
    def next_ask_prices(self, value: float, num_ticks: int = ...) -> list[decimal.Decimal]: ...
    def make_price(self, value: float) -> Price: ...
    def make_qty(self, value: float, round_down: bool = ...) -> Quantity: ...
    def notional_value(
        self, quantity: Quantity, price: Price, use_quote_for_inverse: bool = ...
    ) -> Money: ...

@typing.final
class ClientId:
    def __init__(self, value: str) -> None: ...
    def __setstate__(self, state: typing.Any) -> None: ...
    def __getstate__(self) -> typing.Any: ...
    def __reduce__(self) -> typing.Any: ...
    def __hash__(self) -> int: ...
    @property
    def value(self) -> str: ...
    @staticmethod
    def from_str(value: str) -> ClientId: ...

@typing.final
class ClientOrderId:
    def __init__(self, value: str) -> None: ...
    def __setstate__(self, state: typing.Any) -> None: ...
    def __getstate__(self) -> typing.Any: ...
    def __reduce__(self) -> typing.Any: ...
    def __hash__(self) -> int: ...
    @property
    def value(self) -> str: ...
    @staticmethod
    def from_str(value: str) -> ClientOrderId: ...

@typing.final
class Commodity:
    @property
    def symbol(self) -> Symbol: ...
    @property
    def venue(self) -> Venue: ...
    @property
    def tick_scheme(self) -> str | None: ...
    @property
    def instrument_class(self) -> InstrumentClass: ...
    @property
    def is_inverse(self) -> bool: ...
    @property
    def is_quanto(self) -> bool: ...
    @property
    def isin(self) -> str | None: ...
    @property
    def multiplier(self) -> Quantity: ...
    def __init__(
        self,
        instrument_id: InstrumentId,
        raw_symbol: Symbol,
        asset_class: AssetClass,
        quote_currency: Currency,
        price_precision: int,
        size_precision: int,
        price_increment: Price,
        size_increment: Quantity,
        ts_event: int,
        ts_init: int,
        lot_size: Quantity | None = None,
        max_quantity: Quantity | None = None,
        min_quantity: Quantity | None = None,
        max_notional: Money | None = None,
        min_notional: Money | None = None,
        max_price: Price | None = None,
        min_price: Price | None = None,
        margin_init: decimal.Decimal | None = None,
        margin_maint: decimal.Decimal | None = None,
        maker_fee: decimal.Decimal | None = None,
        taker_fee: decimal.Decimal | None = None,
        tick_scheme: str | None = None,
        info: dict | None = None,
    ) -> None: ...
    def __hash__(self) -> int: ...
    @property
    def type_name(self) -> str: ...
    @property
    def id(self) -> InstrumentId: ...
    @property
    def raw_symbol(self) -> Symbol: ...
    @property
    def asset_class(self) -> AssetClass: ...
    @property
    def quote_currency(self) -> Currency: ...
    @property
    def price_precision(self) -> int: ...
    @property
    def size_precision(self) -> int: ...
    @property
    def price_increment(self) -> Price: ...
    @property
    def size_increment(self) -> Quantity: ...
    @property
    def lot_size(self) -> Quantity | None: ...
    @property
    def max_quantity(self) -> Quantity | None: ...
    @property
    def min_quantity(self) -> Quantity | None: ...
    @property
    def max_notional(self) -> Money | None: ...
    @property
    def min_notional(self) -> Money | None: ...
    @property
    def max_price(self) -> Price | None: ...
    @property
    def min_price(self) -> Price | None: ...
    @property
    def margin_init(self) -> decimal.Decimal: ...
    @property
    def margin_maint(self) -> decimal.Decimal: ...
    @property
    def maker_fee(self) -> decimal.Decimal: ...
    @property
    def taker_fee(self) -> decimal.Decimal: ...
    @property
    def ts_event(self) -> int: ...
    @property
    def ts_init(self) -> int: ...
    @property
    def info(self) -> dict: ...
    @staticmethod
    def from_dict(values: dict) -> Commodity: ...
    def to_dict(self) -> typing.Any: ...
    def next_bid_price(self, value: float, num_ticks: int = ...) -> Price | None: ...
    def next_ask_price(self, value: float, num_ticks: int = ...) -> Price | None: ...
    def next_bid_prices(self, value: float, num_ticks: int = ...) -> list[decimal.Decimal]: ...
    def next_ask_prices(self, value: float, num_ticks: int = ...) -> list[decimal.Decimal]: ...
    def make_price(self, value: float) -> Price: ...
    def make_qty(self, value: float, round_down: bool = ...) -> Quantity: ...
    def notional_value(
        self, quantity: Quantity, price: Price, use_quote_for_inverse: bool = ...
    ) -> Money: ...

@typing.final
class ComponentId:
    def __init__(self, value: str) -> None: ...
    def __setstate__(self, state: typing.Any) -> None: ...
    def __getstate__(self) -> typing.Any: ...
    def __reduce__(self) -> typing.Any: ...
    def __hash__(self) -> int: ...
    @property
    def value(self) -> str: ...
    @staticmethod
    def from_str(value: str) -> ComponentId: ...

@typing.final
class CryptoFuture:
    @property
    def symbol(self) -> Symbol: ...
    @property
    def venue(self) -> Venue: ...
    @property
    def tick_scheme(self) -> str | None: ...
    @property
    def activation_utc(self) -> datetime.datetime: ...
    @property
    def expiration_utc(self) -> datetime.datetime: ...
    @property
    def asset_class(self) -> AssetClass: ...
    @property
    def instrument_class(self) -> InstrumentClass: ...
    @property
    def is_quanto(self) -> bool: ...
    @property
    def isin(self) -> str | None: ...
    def __init__(
        self,
        instrument_id: InstrumentId,
        raw_symbol: Symbol,
        underlying: Currency,
        quote_currency: Currency,
        settlement_currency: Currency,
        is_inverse: bool,
        activation_ns: int,
        expiration_ns: int,
        price_precision: int,
        size_precision: int,
        price_increment: Price,
        size_increment: Quantity,
        ts_event: int,
        ts_init: int,
        multiplier: Quantity | None = None,
        lot_size: Quantity | None = None,
        max_quantity: Quantity | None = None,
        min_quantity: Quantity | None = None,
        max_notional: Money | None = None,
        min_notional: Money | None = None,
        max_price: Price | None = None,
        min_price: Price | None = None,
        margin_init: decimal.Decimal | None = None,
        margin_maint: decimal.Decimal | None = None,
        maker_fee: decimal.Decimal | None = None,
        taker_fee: decimal.Decimal | None = None,
        tick_scheme: str | None = None,
        info: dict | None = None,
    ) -> None: ...
    def __hash__(self) -> int: ...
    @property
    def type_name(self) -> str: ...
    @property
    def id(self) -> InstrumentId: ...
    @property
    def raw_symbol(self) -> Symbol: ...
    @property
    def underlying(self) -> Currency: ...
    @property
    def quote_currency(self) -> Currency: ...
    @property
    def settlement_currency(self) -> Currency: ...
    @property
    def is_inverse(self) -> bool: ...
    @property
    def activation_ns(self) -> int: ...
    @property
    def expiration_ns(self) -> int: ...
    @property
    def price_precision(self) -> int: ...
    @property
    def size_precision(self) -> int: ...
    @property
    def price_increment(self) -> Price: ...
    @property
    def size_increment(self) -> Quantity: ...
    @property
    def multiplier(self) -> Quantity: ...
    @property
    def lot_size(self) -> Quantity: ...
    @property
    def max_quantity(self) -> Quantity | None: ...
    @property
    def min_quantity(self) -> Quantity | None: ...
    @property
    def max_notional(self) -> Money | None: ...
    @property
    def min_notional(self) -> Money | None: ...
    @property
    def max_price(self) -> Price | None: ...
    @property
    def min_price(self) -> Price | None: ...
    @property
    def margin_init(self) -> decimal.Decimal: ...
    @property
    def margin_maint(self) -> decimal.Decimal: ...
    @property
    def maker_fee(self) -> decimal.Decimal: ...
    @property
    def taker_fee(self) -> decimal.Decimal: ...
    @property
    def info(self) -> dict: ...
    @property
    def ts_event(self) -> int: ...
    @property
    def ts_init(self) -> int: ...
    @staticmethod
    def from_dict(values: dict) -> CryptoFuture: ...
    def to_dict(self) -> typing.Any: ...
    def next_bid_price(self, value: float, num_ticks: int = ...) -> Price | None: ...
    def next_ask_price(self, value: float, num_ticks: int = ...) -> Price | None: ...
    def next_bid_prices(self, value: float, num_ticks: int = ...) -> list[decimal.Decimal]: ...
    def next_ask_prices(self, value: float, num_ticks: int = ...) -> list[decimal.Decimal]: ...
    def make_price(self, value: float) -> Price: ...
    def make_qty(self, value: float, round_down: bool = ...) -> Quantity: ...
    def notional_value(
        self, quantity: Quantity, price: Price, use_quote_for_inverse: bool = ...
    ) -> Money: ...

@typing.final
class CryptoFuturesSpread:
    @property
    def symbol(self) -> Symbol: ...
    @property
    def venue(self) -> Venue: ...
    @property
    def tick_scheme(self) -> str | None: ...
    @property
    def activation_utc(self) -> datetime.datetime: ...
    @property
    def expiration_utc(self) -> datetime.datetime: ...
    @property
    def asset_class(self) -> AssetClass: ...
    @property
    def instrument_class(self) -> InstrumentClass: ...
    @property
    def is_quanto(self) -> bool: ...
    @property
    def isin(self) -> str | None: ...
    def __init__(
        self,
        instrument_id: InstrumentId,
        raw_symbol: Symbol,
        underlying: Currency,
        quote_currency: Currency,
        settlement_currency: Currency,
        is_inverse: bool,
        strategy_type: str,
        activation_ns: int,
        expiration_ns: int,
        price_precision: int,
        size_precision: int,
        price_increment: Price,
        size_increment: Quantity,
        ts_event: int,
        ts_init: int,
        multiplier: Quantity | None = None,
        lot_size: Quantity | None = None,
        max_quantity: Quantity | None = None,
        min_quantity: Quantity | None = None,
        max_notional: Money | None = None,
        min_notional: Money | None = None,
        max_price: Price | None = None,
        min_price: Price | None = None,
        margin_init: decimal.Decimal | None = None,
        margin_maint: decimal.Decimal | None = None,
        maker_fee: decimal.Decimal | None = None,
        taker_fee: decimal.Decimal | None = None,
        tick_scheme: str | None = None,
        info: dict | None = None,
    ) -> None: ...
    def __hash__(self) -> int: ...
    @property
    def type_name(self) -> str: ...
    @property
    def id(self) -> InstrumentId: ...
    @property
    def raw_symbol(self) -> Symbol: ...
    @property
    def underlying(self) -> Currency: ...
    @property
    def quote_currency(self) -> Currency: ...
    @property
    def settlement_currency(self) -> Currency: ...
    @property
    def is_inverse(self) -> bool: ...
    @property
    def strategy_type(self) -> str: ...
    @property
    def activation_ns(self) -> int: ...
    @property
    def expiration_ns(self) -> int: ...
    @property
    def price_precision(self) -> int: ...
    @property
    def size_precision(self) -> int: ...
    @property
    def price_increment(self) -> Price: ...
    @property
    def size_increment(self) -> Quantity: ...
    @property
    def multiplier(self) -> Quantity: ...
    @property
    def lot_size(self) -> Quantity: ...
    @property
    def max_quantity(self) -> Quantity | None: ...
    @property
    def min_quantity(self) -> Quantity | None: ...
    @property
    def max_notional(self) -> Money | None: ...
    @property
    def min_notional(self) -> Money | None: ...
    @property
    def max_price(self) -> Price | None: ...
    @property
    def min_price(self) -> Price | None: ...
    @property
    def margin_init(self) -> decimal.Decimal: ...
    @property
    def margin_maint(self) -> decimal.Decimal: ...
    @property
    def maker_fee(self) -> decimal.Decimal: ...
    @property
    def taker_fee(self) -> decimal.Decimal: ...
    @property
    def info(self) -> dict: ...
    @property
    def ts_event(self) -> int: ...
    @property
    def ts_init(self) -> int: ...
    @staticmethod
    def from_dict(values: dict) -> CryptoFuturesSpread: ...
    def to_dict(self) -> typing.Any: ...
    def next_bid_price(self, value: float, num_ticks: int = ...) -> Price | None: ...
    def next_ask_price(self, value: float, num_ticks: int = ...) -> Price | None: ...
    def next_bid_prices(self, value: float, num_ticks: int = ...) -> list[decimal.Decimal]: ...
    def next_ask_prices(self, value: float, num_ticks: int = ...) -> list[decimal.Decimal]: ...
    def make_price(self, value: float) -> Price: ...
    def make_qty(self, value: float, round_down: bool = ...) -> Quantity: ...
    def notional_value(
        self, quantity: Quantity, price: Price, use_quote_for_inverse: bool = ...
    ) -> Money: ...

@typing.final
class CryptoOption:
    @property
    def symbol(self) -> Symbol: ...
    @property
    def venue(self) -> Venue: ...
    @property
    def tick_scheme(self) -> str | None: ...
    @property
    def activation_utc(self) -> datetime.datetime: ...
    @property
    def expiration_utc(self) -> datetime.datetime: ...
    @property
    def asset_class(self) -> AssetClass: ...
    @property
    def instrument_class(self) -> InstrumentClass: ...
    @property
    def is_quanto(self) -> bool: ...
    @property
    def isin(self) -> str | None: ...
    def __init__(
        self,
        instrument_id: InstrumentId,
        raw_symbol: Symbol,
        underlying: Currency,
        quote_currency: Currency,
        settlement_currency: Currency,
        is_inverse: bool,
        option_kind: OptionKind,
        strike_price: Price,
        activation_ns: int,
        expiration_ns: int,
        price_precision: int,
        size_precision: int,
        price_increment: Price,
        size_increment: Quantity,
        ts_event: int,
        ts_init: int,
        multiplier: Quantity | None = None,
        lot_size: Quantity | None = None,
        max_quantity: Quantity | None = None,
        min_quantity: Quantity | None = None,
        max_notional: Money | None = None,
        min_notional: Money | None = None,
        max_price: Price | None = None,
        min_price: Price | None = None,
        margin_init: decimal.Decimal | None = None,
        margin_maint: decimal.Decimal | None = None,
        maker_fee: decimal.Decimal | None = None,
        taker_fee: decimal.Decimal | None = None,
        tick_scheme: str | None = None,
        info: dict | None = None,
    ) -> None: ...
    def __hash__(self) -> int: ...
    @property
    def type_name(self) -> str: ...
    @property
    def id(self) -> InstrumentId: ...
    @property
    def raw_symbol(self) -> Symbol: ...
    @property
    def underlying(self) -> Currency: ...
    @property
    def quote_currency(self) -> Currency: ...
    @property
    def settlement_currency(self) -> Currency: ...
    @property
    def is_inverse(self) -> bool: ...
    @property
    def option_kind(self) -> OptionKind: ...
    @property
    def strike_price(self) -> Price: ...
    @property
    def activation_ns(self) -> int: ...
    @property
    def expiration_ns(self) -> int: ...
    @property
    def price_precision(self) -> int: ...
    @property
    def size_precision(self) -> int: ...
    @property
    def price_increment(self) -> Price: ...
    @property
    def size_increment(self) -> Quantity: ...
    @property
    def multiplier(self) -> Quantity: ...
    @property
    def lot_size(self) -> Quantity: ...
    @property
    def max_quantity(self) -> Quantity | None: ...
    @property
    def min_quantity(self) -> Quantity | None: ...
    @property
    def max_notional(self) -> Money | None: ...
    @property
    def min_notional(self) -> Money | None: ...
    @property
    def max_price(self) -> Price | None: ...
    @property
    def min_price(self) -> Price | None: ...
    @property
    def margin_init(self) -> decimal.Decimal: ...
    @property
    def margin_maint(self) -> decimal.Decimal: ...
    @property
    def maker_fee(self) -> decimal.Decimal: ...
    @property
    def taker_fee(self) -> decimal.Decimal: ...
    @property
    def info(self) -> dict: ...
    @property
    def ts_event(self) -> int: ...
    @property
    def ts_init(self) -> int: ...
    @staticmethod
    def from_dict(values: dict) -> CryptoOption: ...
    def to_dict(self) -> typing.Any: ...
    def next_bid_price(self, value: float, num_ticks: int = ...) -> Price | None: ...
    def next_ask_price(self, value: float, num_ticks: int = ...) -> Price | None: ...
    def next_bid_prices(self, value: float, num_ticks: int = ...) -> list[decimal.Decimal]: ...
    def next_ask_prices(self, value: float, num_ticks: int = ...) -> list[decimal.Decimal]: ...
    def make_price(self, value: float) -> Price: ...
    def make_qty(self, value: float, round_down: bool = ...) -> Quantity: ...
    def notional_value(
        self, quantity: Quantity, price: Price, use_quote_for_inverse: bool = ...
    ) -> Money: ...

@typing.final
class CryptoOptionSpread:
    @property
    def symbol(self) -> Symbol: ...
    @property
    def venue(self) -> Venue: ...
    @property
    def tick_scheme(self) -> str | None: ...
    @property
    def activation_utc(self) -> datetime.datetime: ...
    @property
    def expiration_utc(self) -> datetime.datetime: ...
    @property
    def asset_class(self) -> AssetClass: ...
    @property
    def instrument_class(self) -> InstrumentClass: ...
    @property
    def is_quanto(self) -> bool: ...
    @property
    def isin(self) -> str | None: ...
    def __init__(
        self,
        instrument_id: InstrumentId,
        raw_symbol: Symbol,
        underlying: Currency,
        quote_currency: Currency,
        settlement_currency: Currency,
        is_inverse: bool,
        strategy_type: str,
        activation_ns: int,
        expiration_ns: int,
        price_precision: int,
        size_precision: int,
        price_increment: Price,
        size_increment: Quantity,
        ts_event: int,
        ts_init: int,
        multiplier: Quantity | None = None,
        lot_size: Quantity | None = None,
        max_quantity: Quantity | None = None,
        min_quantity: Quantity | None = None,
        max_notional: Money | None = None,
        min_notional: Money | None = None,
        max_price: Price | None = None,
        min_price: Price | None = None,
        margin_init: decimal.Decimal | None = None,
        margin_maint: decimal.Decimal | None = None,
        maker_fee: decimal.Decimal | None = None,
        taker_fee: decimal.Decimal | None = None,
        tick_scheme: str | None = None,
        info: dict | None = None,
    ) -> None: ...
    def __hash__(self) -> int: ...
    @property
    def type_name(self) -> str: ...
    @property
    def id(self) -> InstrumentId: ...
    @property
    def raw_symbol(self) -> Symbol: ...
    @property
    def underlying(self) -> Currency: ...
    @property
    def quote_currency(self) -> Currency: ...
    @property
    def settlement_currency(self) -> Currency: ...
    @property
    def is_inverse(self) -> bool: ...
    @property
    def strategy_type(self) -> str: ...
    @property
    def activation_ns(self) -> int: ...
    @property
    def expiration_ns(self) -> int: ...
    @property
    def price_precision(self) -> int: ...
    @property
    def size_precision(self) -> int: ...
    @property
    def price_increment(self) -> Price: ...
    @property
    def size_increment(self) -> Quantity: ...
    @property
    def multiplier(self) -> Quantity: ...
    @property
    def lot_size(self) -> Quantity: ...
    @property
    def max_quantity(self) -> Quantity | None: ...
    @property
    def min_quantity(self) -> Quantity | None: ...
    @property
    def max_notional(self) -> Money | None: ...
    @property
    def min_notional(self) -> Money | None: ...
    @property
    def max_price(self) -> Price | None: ...
    @property
    def min_price(self) -> Price | None: ...
    @property
    def margin_init(self) -> decimal.Decimal: ...
    @property
    def margin_maint(self) -> decimal.Decimal: ...
    @property
    def maker_fee(self) -> decimal.Decimal: ...
    @property
    def taker_fee(self) -> decimal.Decimal: ...
    @property
    def info(self) -> dict: ...
    @property
    def ts_event(self) -> int: ...
    @property
    def ts_init(self) -> int: ...
    @staticmethod
    def from_dict(values: dict) -> CryptoOptionSpread: ...
    def to_dict(self) -> typing.Any: ...
    def next_bid_price(self, value: float, num_ticks: int = ...) -> Price | None: ...
    def next_ask_price(self, value: float, num_ticks: int = ...) -> Price | None: ...
    def next_bid_prices(self, value: float, num_ticks: int = ...) -> list[decimal.Decimal]: ...
    def next_ask_prices(self, value: float, num_ticks: int = ...) -> list[decimal.Decimal]: ...
    def make_price(self, value: float) -> Price: ...
    def make_qty(self, value: float, round_down: bool = ...) -> Quantity: ...
    def notional_value(
        self, quantity: Quantity, price: Price, use_quote_for_inverse: bool = ...
    ) -> Money: ...

@typing.final
class CryptoPerpetual:
    @property
    def symbol(self) -> Symbol: ...
    @property
    def venue(self) -> Venue: ...
    @property
    def tick_scheme(self) -> str | None: ...
    @property
    def asset_class(self) -> AssetClass: ...
    @property
    def instrument_class(self) -> InstrumentClass: ...
    @property
    def is_quanto(self) -> bool: ...
    @property
    def isin(self) -> str | None: ...
    def __init__(
        self,
        instrument_id: InstrumentId,
        raw_symbol: Symbol,
        base_currency: Currency,
        quote_currency: Currency,
        settlement_currency: Currency,
        is_inverse: bool,
        price_precision: int,
        size_precision: int,
        price_increment: Price,
        size_increment: Quantity,
        ts_event: int,
        ts_init: int,
        multiplier: Quantity | None = None,
        lot_size: Quantity | None = None,
        max_quantity: Quantity | None = None,
        min_quantity: Quantity | None = None,
        max_notional: Money | None = None,
        min_notional: Money | None = None,
        max_price: Price | None = None,
        min_price: Price | None = None,
        margin_init: decimal.Decimal | None = None,
        margin_maint: decimal.Decimal | None = None,
        maker_fee: decimal.Decimal | None = None,
        taker_fee: decimal.Decimal | None = None,
        tick_scheme: str | None = None,
        info: dict | None = None,
    ) -> None: ...
    def __hash__(self) -> int: ...
    @property
    def type_name(self) -> str: ...
    @property
    def id(self) -> InstrumentId: ...
    @property
    def raw_symbol(self) -> Symbol: ...
    @property
    def base_currency(self) -> Currency: ...
    @property
    def quote_currency(self) -> Currency: ...
    @property
    def settlement_currency(self) -> Currency: ...
    @property
    def is_inverse(self) -> bool: ...
    @property
    def price_precision(self) -> int: ...
    @property
    def size_precision(self) -> int: ...
    @property
    def price_increment(self) -> Price: ...
    @property
    def size_increment(self) -> Quantity: ...
    @property
    def multiplier(self) -> Quantity: ...
    @property
    def lot_size(self) -> Quantity: ...
    @property
    def max_quantity(self) -> Quantity | None: ...
    @property
    def min_quantity(self) -> Quantity | None: ...
    @property
    def max_notional(self) -> Money | None: ...
    @property
    def min_notional(self) -> Money | None: ...
    @property
    def max_price(self) -> Price | None: ...
    @property
    def min_price(self) -> Price | None: ...
    @property
    def ts_event(self) -> int: ...
    @property
    def ts_init(self) -> int: ...
    @property
    def margin_init(self) -> decimal.Decimal: ...
    @property
    def margin_maint(self) -> decimal.Decimal: ...
    @property
    def maker_fee(self) -> decimal.Decimal: ...
    @property
    def taker_fee(self) -> decimal.Decimal: ...
    @property
    def info(self) -> dict: ...
    @staticmethod
    def from_dict(values: dict) -> CryptoPerpetual: ...
    def to_dict(self) -> typing.Any: ...
    def next_bid_price(self, value: float, num_ticks: int = ...) -> Price | None: ...
    def next_ask_price(self, value: float, num_ticks: int = ...) -> Price | None: ...
    def next_bid_prices(self, value: float, num_ticks: int = ...) -> list[decimal.Decimal]: ...
    def next_ask_prices(self, value: float, num_ticks: int = ...) -> list[decimal.Decimal]: ...
    def make_price(self, value: float) -> Price: ...
    def make_qty(self, value: float, round_down: bool = ...) -> Quantity: ...
    def notional_value(
        self, quantity: Quantity, price: Price, use_quote_for_inverse: bool = ...
    ) -> Money: ...

@typing.final
class Currency:
    def __init__(
        self, code: str, precision: int, iso4217: int, name: str, currency_type: CurrencyType
    ) -> None: ...
    def __reduce__(self) -> typing.Any: ...
    @staticmethod
    def _unpickle(
        code: str, precision: int, iso4217: int, name: str, currency_type_str: str
    ) -> Currency: ...
    @property
    def code(self) -> str: ...
    @property
    def precision(self) -> int: ...
    @property
    def iso4217(self) -> int: ...
    @property
    def name(self) -> str: ...
    @property
    def currency_type(self) -> CurrencyType: ...
    @staticmethod
    def is_fiat(code: str) -> bool: ...
    @staticmethod
    def is_crypto(code: str) -> bool: ...
    @staticmethod
    def is_commodity_backed(code: str) -> bool: ...
    @staticmethod
    def from_str(value: str, strict: bool = False) -> Currency: ...
    @staticmethod
    def register(currency: Currency, overwrite: bool = False) -> None: ...

@typing.final
class CurrencyPair:
    @property
    def symbol(self) -> Symbol: ...
    @property
    def venue(self) -> Venue: ...
    @property
    def tick_scheme(self) -> str | None: ...
    @property
    def asset_class(self) -> AssetClass: ...
    @property
    def instrument_class(self) -> InstrumentClass: ...
    @property
    def is_inverse(self) -> bool: ...
    @property
    def is_quanto(self) -> bool: ...
    @property
    def isin(self) -> str | None: ...
    def __init__(
        self,
        instrument_id: InstrumentId,
        raw_symbol: Symbol,
        base_currency: Currency,
        quote_currency: Currency,
        price_precision: int,
        size_precision: int,
        price_increment: Price,
        size_increment: Quantity,
        ts_event: int,
        ts_init: int,
        multiplier: Quantity | None = None,
        lot_size: Quantity | None = None,
        max_quantity: Quantity | None = None,
        min_quantity: Quantity | None = None,
        max_notional: Money | None = None,
        min_notional: Money | None = None,
        max_price: Price | None = None,
        min_price: Price | None = None,
        margin_init: decimal.Decimal | None = None,
        margin_maint: decimal.Decimal | None = None,
        maker_fee: decimal.Decimal | None = None,
        taker_fee: decimal.Decimal | None = None,
        tick_scheme: str | None = None,
        info: dict | None = None,
    ) -> None: ...
    def __hash__(self) -> int: ...
    @property
    def type_name(self) -> str: ...
    @property
    def id(self) -> InstrumentId: ...
    @property
    def raw_symbol(self) -> Symbol: ...
    @property
    def base_currency(self) -> Currency: ...
    @property
    def quote_currency(self) -> Currency: ...
    @property
    def price_precision(self) -> int: ...
    @property
    def size_precision(self) -> int: ...
    @property
    def price_increment(self) -> Price: ...
    @property
    def size_increment(self) -> Quantity: ...
    @property
    def multiplier(self) -> Quantity: ...
    @property
    def lot_size(self) -> Quantity | None: ...
    @property
    def max_quantity(self) -> Quantity | None: ...
    @property
    def min_quantity(self) -> Quantity | None: ...
    @property
    def max_notional(self) -> Money | None: ...
    @property
    def min_notional(self) -> Money | None: ...
    @property
    def max_price(self) -> Price | None: ...
    @property
    def min_price(self) -> Price | None: ...
    @property
    def maker_fee(self) -> decimal.Decimal: ...
    @property
    def taker_fee(self) -> decimal.Decimal: ...
    @property
    def margin_maint(self) -> decimal.Decimal: ...
    @property
    def margin_init(self) -> decimal.Decimal: ...
    @property
    def ts_event(self) -> int: ...
    @property
    def ts_init(self) -> int: ...
    @property
    def info(self) -> dict: ...
    @staticmethod
    def from_dict(values: dict) -> CurrencyPair: ...
    def to_dict(self) -> typing.Any: ...
    def next_bid_price(self, value: float, num_ticks: int = ...) -> Price | None: ...
    def next_ask_price(self, value: float, num_ticks: int = ...) -> Price | None: ...
    def next_bid_prices(self, value: float, num_ticks: int = ...) -> list[decimal.Decimal]: ...
    def next_ask_prices(self, value: float, num_ticks: int = ...) -> list[decimal.Decimal]: ...
    def make_price(self, value: float) -> Price: ...
    def make_qty(self, value: float, round_down: bool = ...) -> Quantity: ...
    def notional_value(
        self, quantity: Quantity, price: Price, use_quote_for_inverse: bool = ...
    ) -> Money: ...

@typing.final
class CustomData:
    def __init__(self, data_type: DataType, data: typing.Any) -> None: ...
    @property
    def data(self) -> typing.Any: ...
    @property
    def data_type(self) -> DataType: ...
    @property
    def ts_event(self) -> int: ...
    @property
    def ts_init(self) -> int: ...
    def to_json_bytes(self) -> list[int]: ...
    @classmethod
    def from_json_bytes(cls, bytes: typing.Any) -> CustomData: ...

@typing.final
class DataType:
    def __init__(
        self, type_name: str, metadata: dict | None = None, identifier: str | None = None
    ) -> None: ...
    def __hash__(self) -> int: ...
    @property
    def type_name(self) -> str: ...
    @property
    def metadata(self) -> typing.Any: ...
    @property
    def topic(self) -> str: ...
    @property
    def identifier(self) -> str | None: ...

@typing.final
class EnumIterator:
    def __iter__(self) -> EnumIterator: ...
    def __next__(self) -> typing.Any | None: ...

@typing.final
class Equity:
    @property
    def symbol(self) -> Symbol: ...
    @property
    def venue(self) -> Venue: ...
    @property
    def tick_scheme(self) -> str | None: ...
    @property
    def asset_class(self) -> AssetClass: ...
    @property
    def instrument_class(self) -> InstrumentClass: ...
    @property
    def is_inverse(self) -> bool: ...
    @property
    def is_quanto(self) -> bool: ...
    @property
    def max_notional(self) -> Money | None: ...
    @property
    def min_notional(self) -> Money | None: ...
    @property
    def multiplier(self) -> Quantity: ...
    def __init__(
        self,
        instrument_id: InstrumentId,
        raw_symbol: Symbol,
        currency: Currency,
        price_precision: int,
        price_increment: Price,
        ts_event: int,
        ts_init: int,
        isin: str | None = None,
        lot_size: Quantity | None = None,
        max_quantity: Quantity | None = None,
        min_quantity: Quantity | None = None,
        max_price: Price | None = None,
        min_price: Price | None = None,
        margin_init: decimal.Decimal | None = None,
        margin_maint: decimal.Decimal | None = None,
        maker_fee: decimal.Decimal | None = None,
        taker_fee: decimal.Decimal | None = None,
        tick_scheme: str | None = None,
        info: dict | None = None,
    ) -> None: ...
    def __hash__(self) -> int: ...
    @property
    def type_name(self) -> str: ...
    @property
    def id(self) -> InstrumentId: ...
    @property
    def raw_symbol(self) -> Symbol: ...
    @property
    def isin(self) -> str | None: ...
    @property
    def quote_currency(self) -> Currency: ...
    @property
    def price_precision(self) -> int: ...
    @property
    def size_precision(self) -> int: ...
    @property
    def price_increment(self) -> Price: ...
    @property
    def size_increment(self) -> Quantity: ...
    @property
    def lot_size(self) -> Quantity | None: ...
    @property
    def max_quantity(self) -> Quantity | None: ...
    @property
    def min_quantity(self) -> Quantity | None: ...
    @property
    def max_price(self) -> Price | None: ...
    @property
    def min_price(self) -> Price | None: ...
    @property
    def margin_init(self) -> decimal.Decimal: ...
    @property
    def margin_maint(self) -> decimal.Decimal: ...
    @property
    def maker_fee(self) -> decimal.Decimal: ...
    @property
    def taker_fee(self) -> decimal.Decimal: ...
    @property
    def ts_event(self) -> int: ...
    @property
    def ts_init(self) -> int: ...
    @property
    def info(self) -> dict: ...
    @staticmethod
    def from_dict(values: dict) -> Equity: ...
    def to_dict(self) -> typing.Any: ...
    def next_bid_price(self, value: float, num_ticks: int = ...) -> Price | None: ...
    def next_ask_price(self, value: float, num_ticks: int = ...) -> Price | None: ...
    def next_bid_prices(self, value: float, num_ticks: int = ...) -> list[decimal.Decimal]: ...
    def next_ask_prices(self, value: float, num_ticks: int = ...) -> list[decimal.Decimal]: ...
    def make_price(self, value: float) -> Price: ...
    def make_qty(self, value: float, round_down: bool = ...) -> Quantity: ...
    def notional_value(
        self, quantity: Quantity, price: Price, use_quote_for_inverse: bool = ...
    ) -> Money: ...

@typing.final
class ExecAlgorithmId:
    def __init__(self, value: str) -> None: ...
    def __setstate__(self, state: typing.Any) -> None: ...
    def __getstate__(self) -> typing.Any: ...
    def __reduce__(self) -> typing.Any: ...
    def __hash__(self) -> int: ...
    @property
    def value(self) -> str: ...
    @staticmethod
    def from_str(value: str) -> ExecAlgorithmId: ...

@typing.final
class ExecutionMassStatus:
    def __init__(
        self,
        client_id: ClientId,
        account_id: AccountId,
        venue: Venue,
        ts_init: int,
        report_id: core.UUID4 | None = None,
    ) -> None: ...
    @property
    def client_id(self) -> ClientId: ...
    @property
    def account_id(self) -> AccountId: ...
    @property
    def venue(self) -> Venue: ...
    @property
    def report_id(self) -> core.UUID4: ...
    @property
    def ts_init(self) -> int: ...
    @property
    def lookback_start(self) -> int | None: ...
    @property
    def reports_complete(self) -> bool: ...
    @property
    def order_reports(self) -> dict[VenueOrderId, OrderStatusReport]: ...
    @property
    def fill_reports(self) -> dict[VenueOrderId, list[FillReport]]: ...
    @property
    def position_reports(self) -> dict[InstrumentId, list[PositionStatusReport]]: ...
    def add_order_reports(self, reports: typing.Sequence[OrderStatusReport]) -> None: ...
    def add_fill_reports(self, reports: typing.Sequence[FillReport]) -> None: ...
    def add_position_reports(self, reports: typing.Sequence[PositionStatusReport]) -> None: ...
    @staticmethod
    def from_dict(values: dict) -> ExecutionMassStatus: ...
    def to_dict(self) -> typing.Any: ...

@typing.final
class FillReport:
    def __init__(
        self,
        account_id: AccountId,
        instrument_id: InstrumentId,
        venue_order_id: VenueOrderId,
        trade_id: TradeId,
        order_side: OrderSide,
        last_qty: Quantity,
        last_px: Price,
        commission: Money,
        liquidity_side: LiquiditySide,
        ts_event: int,
        ts_init: int,
        client_order_id: ClientOrderId | None = None,
        venue_position_id: PositionId | None = None,
        avg_px: decimal.Decimal | None = None,
        report_id: core.UUID4 | None = None,
    ) -> None: ...
    @property
    def account_id(self) -> AccountId: ...
    @property
    def instrument_id(self) -> InstrumentId: ...
    @property
    def venue_order_id(self) -> VenueOrderId: ...
    @property
    def trade_id(self) -> TradeId: ...
    @property
    def order_side(self) -> OrderSide: ...
    @property
    def last_qty(self) -> Quantity: ...
    @property
    def last_px(self) -> Price: ...
    @property
    def commission(self) -> Money: ...
    @property
    def liquidity_side(self) -> LiquiditySide: ...
    @property
    def avg_px(self) -> decimal.Decimal | None: ...
    @property
    def report_id(self) -> core.UUID4: ...
    @property
    def ts_event(self) -> int: ...
    @property
    def ts_init(self) -> int: ...
    @property
    def client_order_id(self) -> ClientOrderId | None: ...
    @property
    def venue_position_id(self) -> PositionId | None: ...
    @staticmethod
    def from_dict(values: dict) -> FillReport: ...
    def to_dict(self) -> typing.Any: ...

@typing.final
class FundingRateUpdate:
    def __init__(
        self,
        instrument_id: InstrumentId,
        rate: decimal.Decimal,
        ts_event: int,
        ts_init: int,
        interval: int | None = None,
        next_funding_ns: int | None = None,
    ) -> None: ...
    def __hash__(self) -> int: ...
    @property
    def instrument_id(self) -> InstrumentId: ...
    @property
    def rate(self) -> decimal.Decimal: ...
    @property
    def interval(self) -> int | None: ...
    @property
    def next_funding_ns(self) -> int | None: ...
    @property
    def ts_event(self) -> int: ...
    @property
    def ts_init(self) -> int: ...
    @staticmethod
    def fully_qualified_name() -> str: ...
    @staticmethod
    def get_metadata(instrument_id: InstrumentId) -> dict[str, str]: ...
    @staticmethod
    def get_fields() -> dict[str, str]: ...
    def to_dict(self) -> typing.Any: ...
    @staticmethod
    def from_dict(values: typing.Any) -> FundingRateUpdate: ...
    def to_json(self) -> list[int]: ...
    def to_msgpack(self) -> list[int]: ...
    def __setstate__(self, state: typing.Any) -> None: ...
    def __getstate__(self) -> typing.Any: ...
    def __reduce__(self) -> typing.Any: ...
    @staticmethod
    def from_json(data: typing.Any) -> FundingRateUpdate: ...
    @staticmethod
    def from_msgpack(data: typing.Any) -> FundingRateUpdate: ...

@typing.final
class FuturesContract:
    @property
    def symbol(self) -> Symbol: ...
    @property
    def venue(self) -> Venue: ...
    @property
    def tick_scheme(self) -> str | None: ...
    @property
    def activation_utc(self) -> datetime.datetime: ...
    @property
    def expiration_utc(self) -> datetime.datetime: ...
    @property
    def instrument_class(self) -> InstrumentClass: ...
    @property
    def is_inverse(self) -> bool: ...
    @property
    def is_quanto(self) -> bool: ...
    @property
    def isin(self) -> str | None: ...
    @property
    def max_notional(self) -> Money | None: ...
    @property
    def min_notional(self) -> Money | None: ...
    @property
    def quote_currency(self) -> Currency: ...
    def __init__(
        self,
        instrument_id: InstrumentId,
        raw_symbol: Symbol,
        asset_class: AssetClass,
        underlying: str,
        activation_ns: int,
        expiration_ns: int,
        currency: Currency,
        price_precision: int,
        price_increment: Price,
        multiplier: Quantity,
        lot_size: Quantity,
        ts_event: int,
        ts_init: int,
        max_quantity: Quantity | None = None,
        min_quantity: Quantity | None = None,
        max_price: Price | None = None,
        min_price: Price | None = None,
        margin_init: decimal.Decimal | None = None,
        margin_maint: decimal.Decimal | None = None,
        maker_fee: decimal.Decimal | None = None,
        taker_fee: decimal.Decimal | None = None,
        exchange: str | None = None,
        tick_scheme: str | None = None,
        info: dict | None = None,
    ) -> None: ...
    def __hash__(self) -> int: ...
    @property
    def type_name(self) -> str: ...
    @property
    def id(self) -> InstrumentId: ...
    @property
    def raw_symbol(self) -> Symbol: ...
    @property
    def asset_class(self) -> AssetClass: ...
    @property
    def exchange(self) -> str | None: ...
    @property
    def underlying(self) -> str: ...
    @property
    def activation_ns(self) -> int: ...
    @property
    def expiration_ns(self) -> int: ...
    @property
    def currency(self) -> Currency: ...
    @property
    def price_precision(self) -> int: ...
    @property
    def price_increment(self) -> Price: ...
    @property
    def multiplier(self) -> Quantity: ...
    @property
    def lot_size(self) -> Quantity: ...
    @property
    def max_quantity(self) -> Quantity | None: ...
    @property
    def min_quantity(self) -> Quantity | None: ...
    @property
    def max_price(self) -> Price | None: ...
    @property
    def min_price(self) -> Price | None: ...
    @property
    def size_increment(self) -> Quantity: ...
    @property
    def size_precision(self) -> int: ...
    @property
    def ts_event(self) -> int: ...
    @property
    def ts_init(self) -> int: ...
    @property
    def margin_init(self) -> decimal.Decimal: ...
    @property
    def margin_maint(self) -> decimal.Decimal: ...
    @property
    def maker_fee(self) -> decimal.Decimal: ...
    @property
    def taker_fee(self) -> decimal.Decimal: ...
    @property
    def info(self) -> dict: ...
    @staticmethod
    def from_dict(values: dict) -> FuturesContract: ...
    def to_dict(self) -> typing.Any: ...
    def next_bid_price(self, value: float, num_ticks: int = ...) -> Price | None: ...
    def next_ask_price(self, value: float, num_ticks: int = ...) -> Price | None: ...
    def next_bid_prices(self, value: float, num_ticks: int = ...) -> list[decimal.Decimal]: ...
    def next_ask_prices(self, value: float, num_ticks: int = ...) -> list[decimal.Decimal]: ...
    def make_price(self, value: float) -> Price: ...
    def make_qty(self, value: float, round_down: bool = ...) -> Quantity: ...
    def notional_value(
        self, quantity: Quantity, price: Price, use_quote_for_inverse: bool = ...
    ) -> Money: ...

@typing.final
class FuturesSpread:
    @property
    def symbol(self) -> Symbol: ...
    @property
    def venue(self) -> Venue: ...
    @property
    def tick_scheme(self) -> str | None: ...
    @property
    def activation_utc(self) -> datetime.datetime: ...
    @property
    def expiration_utc(self) -> datetime.datetime: ...
    @property
    def instrument_class(self) -> InstrumentClass: ...
    @property
    def is_inverse(self) -> bool: ...
    @property
    def is_quanto(self) -> bool: ...
    @property
    def isin(self) -> str | None: ...
    @property
    def max_notional(self) -> Money | None: ...
    @property
    def min_notional(self) -> Money | None: ...
    @property
    def quote_currency(self) -> Currency: ...
    def __init__(
        self,
        instrument_id: InstrumentId,
        raw_symbol: Symbol,
        asset_class: AssetClass,
        underlying: str,
        strategy_type: str,
        activation_ns: int,
        expiration_ns: int,
        currency: Currency,
        price_precision: int,
        price_increment: Price,
        multiplier: Quantity,
        lot_size: Quantity,
        ts_event: int,
        ts_init: int,
        max_quantity: Quantity | None = None,
        min_quantity: Quantity | None = None,
        max_price: Price | None = None,
        min_price: Price | None = None,
        margin_init: decimal.Decimal | None = None,
        margin_maint: decimal.Decimal | None = None,
        maker_fee: decimal.Decimal | None = None,
        taker_fee: decimal.Decimal | None = None,
        exchange: str | None = None,
        tick_scheme: str | None = None,
        info: dict | None = None,
    ) -> None: ...
    def __hash__(self) -> int: ...
    @property
    def type_name(self) -> str: ...
    @property
    def id(self) -> InstrumentId: ...
    @property
    def raw_symbol(self) -> Symbol: ...
    @property
    def asset_class(self) -> AssetClass: ...
    @property
    def exchange(self) -> str | None: ...
    @property
    def underlying(self) -> str: ...
    @property
    def strategy_type(self) -> str: ...
    @property
    def activation_ns(self) -> int: ...
    @property
    def expiration_ns(self) -> int: ...
    @property
    def currency(self) -> Currency: ...
    @property
    def price_precision(self) -> int: ...
    @property
    def price_increment(self) -> Price: ...
    @property
    def size_increment(self) -> Quantity: ...
    @property
    def size_precision(self) -> int: ...
    @property
    def multiplier(self) -> Quantity: ...
    @property
    def lot_size(self) -> Quantity: ...
    @property
    def max_quantity(self) -> Quantity | None: ...
    @property
    def min_quantity(self) -> Quantity | None: ...
    @property
    def max_price(self) -> Price | None: ...
    @property
    def min_price(self) -> Price | None: ...
    @property
    def margin_init(self) -> decimal.Decimal: ...
    @property
    def margin_maint(self) -> decimal.Decimal: ...
    @property
    def maker_fee(self) -> decimal.Decimal: ...
    @property
    def taker_fee(self) -> decimal.Decimal: ...
    @property
    def info(self) -> dict: ...
    @property
    def ts_event(self) -> int: ...
    @property
    def ts_init(self) -> int: ...
    @staticmethod
    def from_dict(values: dict) -> FuturesSpread: ...
    def to_dict(self) -> typing.Any: ...
    def next_bid_price(self, value: float, num_ticks: int = ...) -> Price | None: ...
    def next_ask_price(self, value: float, num_ticks: int = ...) -> Price | None: ...
    def next_bid_prices(self, value: float, num_ticks: int = ...) -> list[decimal.Decimal]: ...
    def next_ask_prices(self, value: float, num_ticks: int = ...) -> list[decimal.Decimal]: ...
    def make_price(self, value: float) -> Price: ...
    def make_qty(self, value: float, round_down: bool = ...) -> Quantity: ...
    def notional_value(
        self, quantity: Quantity, price: Price, use_quote_for_inverse: bool = ...
    ) -> Money: ...

@typing.final
class GreeksData:
    @classmethod
    def from_delta(
        cls, instrument_id: InstrumentId, delta: float, multiplier: float, ts_event: int = 0
    ) -> GreeksData: ...
    @property
    def ts_init(self) -> int: ...
    @property
    def ts_event(self) -> int: ...
    @property
    def instrument_id(self) -> InstrumentId: ...
    @property
    def is_call(self) -> bool: ...
    @property
    def strike(self) -> float: ...
    @property
    def expiry(self) -> int: ...
    @property
    def expiry_in_days(self) -> int: ...
    @property
    def expiry_in_years(self) -> float: ...
    @property
    def multiplier(self) -> float: ...
    @property
    def quantity(self) -> float: ...
    @property
    def underlying_price(self) -> float: ...
    @property
    def interest_rate(self) -> float: ...
    @property
    def cost_of_carry(self) -> float: ...
    @property
    def vol(self) -> float: ...
    @property
    def pnl(self) -> float: ...
    @property
    def price(self) -> float: ...
    @property
    def delta(self) -> float: ...
    @property
    def gamma(self) -> float: ...
    @property
    def vega(self) -> float: ...
    @property
    def theta(self) -> float: ...
    @property
    def rho(self) -> float: ...
    @property
    def itm_prob(self) -> float: ...

@typing.final
class IndexInstrument:
    @property
    def symbol(self) -> Symbol: ...
    @property
    def venue(self) -> Venue: ...
    @property
    def tick_scheme(self) -> str | None: ...
    @property
    def asset_class(self) -> AssetClass: ...
    @property
    def instrument_class(self) -> InstrumentClass: ...
    @property
    def is_inverse(self) -> bool: ...
    @property
    def is_quanto(self) -> bool: ...
    @property
    def isin(self) -> str | None: ...
    @property
    def lot_size(self) -> Quantity | None: ...
    @property
    def maker_fee(self) -> decimal.Decimal: ...
    @property
    def margin_init(self) -> decimal.Decimal: ...
    @property
    def margin_maint(self) -> decimal.Decimal: ...
    @property
    def max_notional(self) -> Money | None: ...
    @property
    def max_price(self) -> Price | None: ...
    @property
    def max_quantity(self) -> Quantity | None: ...
    @property
    def min_notional(self) -> Money | None: ...
    @property
    def min_price(self) -> Price | None: ...
    @property
    def min_quantity(self) -> Quantity | None: ...
    @property
    def multiplier(self) -> Quantity: ...
    @property
    def taker_fee(self) -> decimal.Decimal: ...
    def __init__(
        self,
        instrument_id: InstrumentId,
        raw_symbol: Symbol,
        currency: Currency,
        price_precision: int,
        size_precision: int,
        price_increment: Price,
        size_increment: Quantity,
        ts_event: int,
        ts_init: int,
        tick_scheme: str | None = None,
        info: dict | None = None,
    ) -> None: ...
    def __hash__(self) -> int: ...
    @property
    def type_name(self) -> str: ...
    @property
    def id(self) -> InstrumentId: ...
    @property
    def raw_symbol(self) -> Symbol: ...
    @property
    def quote_currency(self) -> Currency: ...
    @property
    def price_precision(self) -> int: ...
    @property
    def size_precision(self) -> int: ...
    @property
    def price_increment(self) -> Price: ...
    @property
    def size_increment(self) -> Quantity: ...
    @property
    def ts_event(self) -> int: ...
    @property
    def ts_init(self) -> int: ...
    @property
    def info(self) -> dict: ...
    @staticmethod
    def from_dict(values: dict) -> IndexInstrument: ...
    def to_dict(self) -> typing.Any: ...
    def next_bid_price(self, value: float, num_ticks: int = ...) -> Price | None: ...
    def next_ask_price(self, value: float, num_ticks: int = ...) -> Price | None: ...
    def next_bid_prices(self, value: float, num_ticks: int = ...) -> list[decimal.Decimal]: ...
    def next_ask_prices(self, value: float, num_ticks: int = ...) -> list[decimal.Decimal]: ...
    def make_price(self, value: float) -> Price: ...
    def make_qty(self, value: float, round_down: bool = ...) -> Quantity: ...
    def notional_value(
        self, quantity: Quantity, price: Price, use_quote_for_inverse: bool = ...
    ) -> Money: ...

@typing.final
class IndexPriceUpdate:
    def __init__(
        self, instrument_id: InstrumentId, value: Price, ts_event: int, ts_init: int
    ) -> None: ...
    def __setstate__(self, state: typing.Any) -> None: ...
    def __getstate__(self) -> typing.Any: ...
    def __reduce__(self) -> typing.Any: ...
    def __hash__(self) -> int: ...
    @property
    def instrument_id(self) -> InstrumentId: ...
    @property
    def value(self) -> Price: ...
    @property
    def ts_event(self) -> int: ...
    @property
    def ts_init(self) -> int: ...
    @staticmethod
    def fully_qualified_name() -> str: ...
    @staticmethod
    def get_metadata(instrument_id: InstrumentId, price_precision: int) -> dict[str, str]: ...
    @staticmethod
    def get_fields() -> dict: ...
    @staticmethod
    def from_dict(values: dict) -> IndexPriceUpdate: ...
    def to_dict(self) -> dict: ...
    def to_json_bytes(self) -> typing.Any: ...
    def to_msgpack_bytes(self) -> typing.Any: ...
    @staticmethod
    def from_json(data: typing.Any) -> IndexPriceUpdate: ...
    @staticmethod
    def from_msgpack(data: typing.Any) -> IndexPriceUpdate: ...

@typing.final
class InstrumentClose:
    def __init__(
        self,
        instrument_id: InstrumentId,
        close_price: Price,
        close_type: InstrumentCloseType,
        ts_event: int,
        ts_init: int,
    ) -> None: ...
    def __hash__(self) -> int: ...
    @property
    def instrument_id(self) -> InstrumentId: ...
    @property
    def close_price(self) -> Price: ...
    @property
    def close_type(self) -> InstrumentCloseType: ...
    @property
    def ts_event(self) -> int: ...
    @property
    def ts_init(self) -> int: ...
    @staticmethod
    def fully_qualified_name() -> str: ...
    @staticmethod
    def get_metadata(instrument_id: InstrumentId, price_precision: int) -> dict[str, str]: ...
    @staticmethod
    def get_fields() -> dict: ...
    @staticmethod
    def from_dict(values: dict) -> InstrumentClose: ...
    def to_dict(self) -> dict: ...
    def to_json_bytes(self) -> typing.Any: ...
    def to_msgpack_bytes(self) -> typing.Any: ...
    @staticmethod
    def from_json(data: typing.Any) -> InstrumentClose: ...
    @staticmethod
    def from_msgpack(data: typing.Any) -> InstrumentClose: ...

@typing.final
class InstrumentId:
    def __init__(self, symbol: Symbol, venue: Venue) -> None: ...
    def __setstate__(self, state: typing.Any) -> None: ...
    def __getstate__(self) -> typing.Any: ...
    def __reduce__(self) -> typing.Any: ...
    def __hash__(self) -> int: ...
    @property
    def symbol(self) -> Symbol: ...
    @property
    def venue(self) -> Venue: ...
    @property
    def value(self) -> str: ...
    @staticmethod
    def from_str(value: str) -> InstrumentId: ...
    def is_synthetic(self) -> bool: ...
    def parse_parent_components(self) -> tuple[str, InstrumentClass] | None: ...

@typing.final
class InstrumentStatus:
    def __init__(
        self,
        instrument_id: InstrumentId,
        action: MarketStatusAction,
        ts_event: int,
        ts_init: int,
        reason: str | None = None,
        trading_event: str | None = None,
        is_trading: bool | None = None,
        is_quoting: bool | None = None,
        is_short_sell_restricted: bool | None = None,
    ) -> None: ...
    def __hash__(self) -> int: ...
    @property
    def instrument_id(self) -> InstrumentId: ...
    @property
    def action(self) -> MarketStatusAction: ...
    @property
    def ts_event(self) -> int: ...
    @property
    def ts_init(self) -> int: ...
    @property
    def reason(self) -> str | None: ...
    @property
    def trading_event(self) -> str | None: ...
    @property
    def is_trading(self) -> bool | None: ...
    @property
    def is_quoting(self) -> bool | None: ...
    @property
    def is_short_sell_restricted(self) -> bool | None: ...
    @staticmethod
    def fully_qualified_name() -> str: ...
    @staticmethod
    def from_dict(values: dict) -> InstrumentStatus: ...
    @staticmethod
    def get_metadata(instrument_id: InstrumentId) -> dict[str, str]: ...
    def to_dict(self) -> dict: ...
    def to_json_bytes(self) -> typing.Any: ...
    def to_msgpack_bytes(self) -> typing.Any: ...
    @staticmethod
    def from_json(data: typing.Any) -> InstrumentStatus: ...
    @staticmethod
    def from_msgpack(data: typing.Any) -> InstrumentStatus: ...

@typing.final
class LeveragedMarginModel:
    def __init__(self) -> None: ...

@typing.final
class LimitIfTouchedOrder:
    @property
    def avg_px(self) -> decimal.Decimal | None: ...
    @property
    def event_count(self) -> int: ...
    @property
    def is_buy(self) -> bool: ...
    @property
    def is_canceled(self) -> bool: ...
    @property
    def is_inflight(self) -> bool: ...
    @property
    def is_pending_cancel(self) -> bool: ...
    @property
    def is_pending_update(self) -> bool: ...
    @property
    def is_sell(self) -> bool: ...
    @property
    def last_event(self) -> typing.Any: ...
    @property
    def leaves_qty(self) -> Quantity: ...
    @property
    def overfill_qty(self) -> Quantity: ...
    @property
    def slippage(self) -> decimal.Decimal | None: ...
    @property
    def trade_ids(self) -> list[TradeId]: ...
    @property
    def ts_accepted(self) -> int | None: ...
    @property
    def ts_closed(self) -> int | None: ...
    @property
    def ts_submitted(self) -> int | None: ...
    @property
    def venue_order_ids(self) -> list[VenueOrderId]: ...
    @property
    def filled_qty(self) -> Quantity: ...
    @property
    def is_active_local(self) -> bool: ...
    @property
    def is_emulated(self) -> bool: ...
    @property
    def is_primary(self) -> bool: ...
    @property
    def is_spawned(self) -> bool: ...
    @property
    def last_trade_id(self) -> TradeId | None: ...
    @property
    def liquidity_side(self) -> LiquiditySide | None: ...
    @property
    def position_id(self) -> PositionId | None: ...
    @property
    def ts_last(self) -> int: ...
    @property
    def venue_order_id(self) -> VenueOrderId | None: ...
    @property
    def is_triggered(self) -> bool: ...
    @property
    def ts_triggered(self) -> int | None: ...
    def __init__(
        self,
        trader_id: TraderId,
        strategy_id: StrategyId,
        instrument_id: InstrumentId,
        client_order_id: ClientOrderId,
        order_side: OrderSide,
        quantity: Quantity,
        price: Price,
        trigger_price: Price,
        trigger_type: TriggerType,
        time_in_force: TimeInForce,
        post_only: bool,
        reduce_only: bool,
        quote_quantity: bool,
        init_id: core.UUID4,
        ts_init: int,
        expire_time: int | None = None,
        display_qty: Quantity | None = None,
        emulation_trigger: TriggerType | None = None,
        trigger_instrument_id: InstrumentId | None = None,
        contingency_type: ContingencyType | None = None,
        order_list_id: OrderListId | None = None,
        linked_order_ids: typing.Sequence[ClientOrderId] | None = None,
        parent_order_id: ClientOrderId | None = None,
        exec_algorithm_id: ExecAlgorithmId | None = None,
        exec_algorithm_params: typing.Mapping[str, str] | None = None,
        exec_spawn_id: ClientOrderId | None = None,
        tags: typing.Sequence[str] | None = None,
    ) -> None: ...
    @staticmethod
    def create(init: OrderInitialized) -> LimitIfTouchedOrder: ...
    @staticmethod
    def opposite_side(side: OrderSide) -> OrderSide: ...
    @staticmethod
    def closing_side(side: PositionSide) -> OrderSide | None: ...
    @property
    def status(self) -> OrderStatus: ...
    @property
    def trader_id(self) -> TraderId: ...
    @property
    def strategy_id(self) -> StrategyId: ...
    @property
    def instrument_id(self) -> InstrumentId: ...
    @property
    def client_order_id(self) -> ClientOrderId: ...
    @property
    def side(self) -> OrderSide: ...
    @property
    def quantity(self) -> Quantity: ...
    @property
    def price(self) -> Price: ...
    @property
    def trigger_price(self) -> Price: ...
    @property
    def trigger_type(self) -> TriggerType: ...
    @property
    def order_type(self) -> OrderType: ...
    @property
    def time_in_force(self) -> TimeInForce: ...
    @property
    def expire_time(self) -> int | None: ...
    @property
    def init_id(self) -> core.UUID4: ...
    @property
    def ts_init(self) -> int: ...
    @property
    def init_event(self) -> typing.Any: ...
    @property
    def has_price(self) -> bool: ...
    @property
    def is_passive(self) -> bool: ...
    @property
    def is_aggressive(self) -> bool: ...
    @property
    def is_closed(self) -> bool: ...
    @property
    def is_open(self) -> bool: ...
    @property
    def has_trigger_price(self) -> bool: ...
    @property
    def is_post_only(self) -> bool: ...
    @property
    def is_reduce_only(self) -> bool: ...
    @property
    def is_quote_quantity(self) -> bool: ...
    @property
    def display_qty(self) -> Quantity | None: ...
    @property
    def emulation_trigger(self) -> TriggerType | None: ...
    @property
    def trigger_instrument_id(self) -> InstrumentId | None: ...
    @property
    def contingency_type(self) -> ContingencyType | None: ...
    @property
    def order_list_id(self) -> OrderListId | None: ...
    @property
    def linked_order_ids(self) -> list[ClientOrderId] | None: ...
    @property
    def parent_order_id(self) -> ClientOrderId | None: ...
    @property
    def exec_algorithm_id(self) -> ExecAlgorithmId | None: ...
    @property
    def exec_algorithm_params(self) -> dict[str, str] | None: ...
    @property
    def exec_spawn_id(self) -> ClientOrderId | None: ...
    @property
    def account_id(self) -> AccountId | None: ...
    @property
    def tags(self) -> list[str] | None: ...
    def commission(self, currency: Currency) -> Money | None: ...
    def commissions(self) -> dict[Currency, Money]: ...
    def events(self) -> list[typing.Any]: ...
    def signed_decimal_qty(self) -> decimal.Decimal: ...
    def would_reduce_only(self, side: PositionSide, position_qty: Quantity) -> bool: ...
    def apply(self, event: typing.Any) -> None: ...
    @staticmethod
    def from_dict(values: dict) -> LimitIfTouchedOrder: ...
    def to_dict(self) -> typing.Any: ...

@typing.final
class LimitOrder:
    @property
    def avg_px(self) -> decimal.Decimal | None: ...
    @property
    def event_count(self) -> int: ...
    @property
    def is_buy(self) -> bool: ...
    @property
    def is_canceled(self) -> bool: ...
    @property
    def is_inflight(self) -> bool: ...
    @property
    def is_pending_cancel(self) -> bool: ...
    @property
    def is_pending_update(self) -> bool: ...
    @property
    def is_sell(self) -> bool: ...
    @property
    def last_event(self) -> typing.Any: ...
    @property
    def leaves_qty(self) -> Quantity: ...
    @property
    def overfill_qty(self) -> Quantity: ...
    @property
    def slippage(self) -> decimal.Decimal | None: ...
    @property
    def trade_ids(self) -> list[TradeId]: ...
    @property
    def ts_accepted(self) -> int | None: ...
    @property
    def ts_closed(self) -> int | None: ...
    @property
    def ts_submitted(self) -> int | None: ...
    @property
    def venue_order_ids(self) -> list[VenueOrderId]: ...
    @property
    def init_event(self) -> typing.Any: ...
    def __init__(
        self,
        trader_id: TraderId,
        strategy_id: StrategyId,
        instrument_id: InstrumentId,
        client_order_id: ClientOrderId,
        order_side: OrderSide,
        quantity: Quantity,
        price: Price,
        time_in_force: TimeInForce,
        post_only: bool,
        reduce_only: bool,
        quote_quantity: bool,
        init_id: core.UUID4,
        ts_init: int,
        expire_time: int | None = None,
        display_qty: Quantity | None = None,
        emulation_trigger: TriggerType | None = None,
        trigger_instrument_id: InstrumentId | None = None,
        contingency_type: ContingencyType | None = None,
        order_list_id: OrderListId | None = None,
        linked_order_ids: typing.Sequence[ClientOrderId] | None = None,
        parent_order_id: ClientOrderId | None = None,
        exec_algorithm_id: ExecAlgorithmId | None = None,
        exec_algorithm_params: typing.Mapping[str, str] | None = None,
        exec_spawn_id: ClientOrderId | None = None,
        tags: typing.Sequence[str] | None = None,
    ) -> None: ...
    @staticmethod
    def create(init: OrderInitialized) -> LimitOrder: ...
    @staticmethod
    def opposite_side(side: OrderSide) -> OrderSide: ...
    @staticmethod
    def closing_side(side: PositionSide) -> OrderSide | None: ...
    @property
    def status(self) -> OrderStatus: ...
    @property
    def trader_id(self) -> TraderId: ...
    @property
    def strategy_id(self) -> StrategyId: ...
    @property
    def instrument_id(self) -> InstrumentId: ...
    @property
    def symbol(self) -> Symbol: ...
    @property
    def venue(self) -> Venue: ...
    @property
    def client_order_id(self) -> ClientOrderId: ...
    @property
    def venue_order_id(self) -> VenueOrderId | None: ...
    @property
    def position_id(self) -> PositionId | None: ...
    @property
    def account_id(self) -> AccountId | None: ...
    @property
    def last_trade_id(self) -> TradeId | None: ...
    @property
    def side(self) -> OrderSide: ...
    @property
    def order_type(self) -> OrderType: ...
    @property
    def quantity(self) -> Quantity: ...
    @property
    def time_in_force(self) -> TimeInForce: ...
    @property
    def expire_time(self) -> int | None: ...
    @property
    def price(self) -> Price: ...
    @property
    def is_post_only(self) -> bool: ...
    @property
    def is_reduce_only(self) -> bool: ...
    @property
    def is_quote_quantity(self) -> bool: ...
    def commission(self, currency: Currency) -> Money | None: ...
    def commissions(self) -> dict[Currency, Money]: ...
    @property
    def has_price(self) -> bool: ...
    @property
    def has_trigger_price(self) -> bool: ...
    @property
    def is_passive(self) -> bool: ...
    @property
    def is_open(self) -> bool: ...
    @property
    def is_closed(self) -> bool: ...
    @property
    def is_aggressive(self) -> bool: ...
    @property
    def is_emulated(self) -> bool: ...
    @property
    def is_active_local(self) -> bool: ...
    @property
    def is_primary(self) -> bool: ...
    @property
    def is_spawned(self) -> bool: ...
    @property
    def liquidity_side(self) -> LiquiditySide | None: ...
    @property
    def filled_qty(self) -> Quantity: ...
    @property
    def trigger_instrument_id(self) -> InstrumentId | None: ...
    @property
    def contingency_type(self) -> ContingencyType | None: ...
    @property
    def order_list_id(self) -> OrderListId | None: ...
    @property
    def linked_order_ids(self) -> list[ClientOrderId] | None: ...
    @property
    def parent_order_id(self) -> ClientOrderId | None: ...
    @property
    def exec_algorithm_id(self) -> ExecAlgorithmId | None: ...
    @property
    def exec_algorithm_params(self) -> dict[str, str] | None: ...
    @property
    def tags(self) -> list[str] | None: ...
    @property
    def emulation_trigger(self) -> TriggerType | None: ...
    @property
    def expire_time_ns(self) -> int | None: ...
    @property
    def exec_spawn_id(self) -> ClientOrderId | None: ...
    @property
    def display_qty(self) -> Quantity | None: ...
    @property
    def init_id(self) -> core.UUID4: ...
    @property
    def ts_init(self) -> int: ...
    @property
    def ts_last(self) -> int: ...
    def events(self) -> list[typing.Any]: ...
    def signed_decimal_qty(self) -> decimal.Decimal: ...
    def would_reduce_only(self, side: PositionSide, position_qty: Quantity) -> bool: ...
    def apply(self, event: typing.Any) -> None: ...
    @staticmethod
    def from_dict(values: dict) -> LimitOrder: ...
    def to_dict(self) -> typing.Any: ...

@typing.final
class MarginAccount:
    def __init__(self, event: AccountState, calculate_account_state: bool) -> None: ...
    @property
    def id(self) -> AccountId: ...
    @property
    def account_type(self) -> AccountType: ...
    @property
    def base_currency(self) -> Currency | None: ...
    @property
    def default_leverage(self) -> decimal.Decimal: ...
    @property
    def calculate_account_state(self) -> bool: ...
    @property
    def last_event(self) -> AccountState | None: ...
    @property
    def event_count(self) -> int: ...
    @property
    def events(self) -> list[AccountState]: ...
    def balance_total(self, currency: Currency | None = None) -> Money | None: ...
    def balances_total(self) -> dict[Currency, Money]: ...
    def balance_free(self, currency: Currency | None = None) -> Money | None: ...
    def balances_free(self) -> dict[Currency, Money]: ...
    def balance_locked(self, currency: Currency | None = None) -> Money | None: ...
    def balances_locked(self) -> dict[Currency, Money]: ...
    def balance(self, currency: Currency | None = None) -> AccountBalance | None: ...
    def balances(self) -> dict[Currency, AccountBalance]: ...
    def starting_balances(self) -> dict[Currency, Money]: ...
    def currencies(self) -> list[Currency]: ...
    def is_cash_account(self) -> bool: ...
    def is_margin_account(self) -> bool: ...
    def apply(self, event: AccountState) -> None: ...
    def purge_account_events(self, ts_now: int, lookback_secs: int) -> None: ...
    def calculate_balance_locked(
        self,
        instrument: typing.Any,
        side: OrderSide,
        quantity: Quantity,
        price: Price,
        use_quote_for_inverse: bool | None = None,
    ) -> Money: ...
    def calculate_commission(
        self,
        instrument: typing.Any,
        last_qty: Quantity,
        last_px: Price,
        liquidity_side: LiquiditySide,
        use_quote_for_inverse: bool | None = None,
    ) -> Money: ...
    def calculate_pnls(
        self, instrument: typing.Any, fill: OrderFilled, position: Position | None = None
    ) -> list[Money]: ...
    def set_default_leverage(self, default_leverage: decimal.Decimal) -> None: ...
    def leverages(self) -> typing.Any: ...
    def leverage(self, instrument_id: InstrumentId) -> decimal.Decimal: ...
    def set_leverage(self, instrument_id: InstrumentId, leverage: decimal.Decimal) -> None: ...
    def is_unleveraged(self, instrument_id: InstrumentId) -> bool: ...
    def margin(self, instrument_id: InstrumentId) -> MarginBalance | None: ...
    def margins(self) -> dict[InstrumentId, MarginBalance]: ...
    def initial_margins(self) -> dict[InstrumentId, Money]: ...
    def maintenance_margins(self) -> dict[InstrumentId, Money]: ...
    def account_margin(self, currency: Currency) -> MarginBalance | None: ...
    def account_margins(self) -> dict[Currency, MarginBalance]: ...
    def account_initial_margin(self, currency: Currency) -> Money | None: ...
    def account_initial_margins(self) -> dict[Currency, Money]: ...
    def account_maintenance_margin(self, currency: Currency) -> Money | None: ...
    def account_maintenance_margins(self) -> dict[Currency, Money]: ...
    def total_initial_margin(self, currency: Currency) -> Money: ...
    def total_maintenance_margin(self, currency: Currency) -> Money: ...
    def update_initial_margin(self, instrument_id: InstrumentId, initial_margin: Money) -> None: ...
    def initial_margin(self, instrument_id: InstrumentId) -> Money | None: ...
    def update_maintenance_margin(
        self, instrument_id: InstrumentId, maintenance_margin: Money
    ) -> None: ...
    def maintenance_margin(self, instrument_id: InstrumentId) -> Money | None: ...
    def calculate_initial_margin(
        self,
        instrument: typing.Any,
        quantity: Quantity,
        price: Price,
        use_quote_for_inverse: bool | None = None,
    ) -> Money: ...
    def calculate_maintenance_margin(
        self,
        instrument: typing.Any,
        quantity: Quantity,
        price: Price,
        use_quote_for_inverse: bool | None = None,
    ) -> Money: ...
    def to_dict(self) -> typing.Any: ...

@typing.final
class MarginBalance:
    @property
    def initial(self) -> Money: ...
    @property
    def maintenance(self) -> Money: ...
    @property
    def currency(self) -> Currency: ...
    @property
    def instrument_id(self) -> InstrumentId | None: ...
    def __new__(
        cls, initial: Money, maintenance: Money, instrument_id: InstrumentId | None = None
    ) -> MarginBalance: ...
    def __hash__(self) -> int: ...
    def copy(self) -> MarginBalance: ...
    @staticmethod
    def from_dict(values: dict) -> MarginBalance: ...
    def to_dict(self) -> typing.Any: ...

@typing.final
class MarkPriceUpdate:
    def __init__(
        self, instrument_id: InstrumentId, value: Price, ts_event: int, ts_init: int
    ) -> None: ...
    def __setstate__(self, state: typing.Any) -> None: ...
    def __getstate__(self) -> typing.Any: ...
    def __reduce__(self) -> typing.Any: ...
    def __hash__(self) -> int: ...
    @property
    def instrument_id(self) -> InstrumentId: ...
    @property
    def value(self) -> Price: ...
    @property
    def ts_event(self) -> int: ...
    @property
    def ts_init(self) -> int: ...
    @staticmethod
    def fully_qualified_name() -> str: ...
    @staticmethod
    def get_metadata(instrument_id: InstrumentId, price_precision: int) -> dict[str, str]: ...
    @staticmethod
    def get_fields() -> dict: ...
    @staticmethod
    def from_dict(values: dict) -> MarkPriceUpdate: ...
    def to_dict(self) -> dict: ...
    def to_json_bytes(self) -> typing.Any: ...
    def to_msgpack_bytes(self) -> typing.Any: ...
    @staticmethod
    def from_json(data: typing.Any) -> MarkPriceUpdate: ...
    @staticmethod
    def from_msgpack(data: typing.Any) -> MarkPriceUpdate: ...

@typing.final
class MarketIfTouchedOrder:
    @property
    def avg_px(self) -> decimal.Decimal | None: ...
    @property
    def event_count(self) -> int: ...
    @property
    def is_buy(self) -> bool: ...
    @property
    def is_canceled(self) -> bool: ...
    @property
    def is_inflight(self) -> bool: ...
    @property
    def is_pending_cancel(self) -> bool: ...
    @property
    def is_pending_update(self) -> bool: ...
    @property
    def is_sell(self) -> bool: ...
    @property
    def last_event(self) -> typing.Any: ...
    @property
    def leaves_qty(self) -> Quantity: ...
    @property
    def overfill_qty(self) -> Quantity: ...
    @property
    def slippage(self) -> decimal.Decimal | None: ...
    @property
    def trade_ids(self) -> list[TradeId]: ...
    @property
    def ts_accepted(self) -> int | None: ...
    @property
    def ts_closed(self) -> int | None: ...
    @property
    def ts_submitted(self) -> int | None: ...
    @property
    def venue_order_ids(self) -> list[VenueOrderId]: ...
    @property
    def filled_qty(self) -> Quantity: ...
    @property
    def is_active_local(self) -> bool: ...
    @property
    def is_emulated(self) -> bool: ...
    @property
    def is_primary(self) -> bool: ...
    @property
    def is_spawned(self) -> bool: ...
    @property
    def last_trade_id(self) -> TradeId | None: ...
    @property
    def liquidity_side(self) -> LiquiditySide | None: ...
    @property
    def position_id(self) -> PositionId | None: ...
    @property
    def ts_last(self) -> int: ...
    @property
    def venue_order_id(self) -> VenueOrderId | None: ...
    @property
    def account_id(self) -> AccountId | None: ...
    @property
    def is_triggered(self) -> bool: ...
    @property
    def ts_triggered(self) -> int | None: ...
    def __init__(
        self,
        trader_id: TraderId,
        strategy_id: StrategyId,
        instrument_id: InstrumentId,
        client_order_id: ClientOrderId,
        order_side: OrderSide,
        quantity: Quantity,
        trigger_price: Price,
        trigger_type: TriggerType,
        time_in_force: TimeInForce,
        reduce_only: bool,
        quote_quantity: bool,
        init_id: core.UUID4,
        ts_init: int,
        expire_time: int | None = None,
        emulation_trigger: TriggerType | None = None,
        trigger_instrument_id: InstrumentId | None = None,
        contingency_type: ContingencyType | None = None,
        order_list_id: OrderListId | None = None,
        linked_order_ids: typing.Sequence[ClientOrderId] | None = None,
        parent_order_id: ClientOrderId | None = None,
        exec_algorithm_id: ExecAlgorithmId | None = None,
        exec_algorithm_params: typing.Mapping[str, str] | None = None,
        exec_spawn_id: ClientOrderId | None = None,
        tags: typing.Sequence[str] | None = None,
    ) -> None: ...
    @staticmethod
    def create(init: OrderInitialized) -> MarketIfTouchedOrder: ...
    @staticmethod
    def opposite_side(side: OrderSide) -> OrderSide: ...
    @staticmethod
    def closing_side(side: PositionSide) -> OrderSide | None: ...
    @property
    def status(self) -> OrderStatus: ...
    @property
    def trader_id(self) -> TraderId: ...
    @property
    def strategy_id(self) -> StrategyId: ...
    @property
    def instrument_id(self) -> InstrumentId: ...
    @property
    def client_order_id(self) -> ClientOrderId: ...
    @property
    def side(self) -> OrderSide: ...
    @property
    def quantity(self) -> Quantity: ...
    @property
    def trigger_price(self) -> Price: ...
    @property
    def trigger_type(self) -> TriggerType: ...
    @property
    def order_type(self) -> OrderType: ...
    @property
    def time_in_force(self) -> TimeInForce: ...
    @property
    def expire_time(self) -> int | None: ...
    @property
    def init_id(self) -> core.UUID4: ...
    @property
    def ts_init(self) -> int: ...
    @property
    def init_event(self) -> typing.Any: ...
    @property
    def has_price(self) -> bool: ...
    @property
    def has_trigger_price(self) -> bool: ...
    @property
    def is_passive(self) -> bool: ...
    @property
    def is_aggressive(self) -> bool: ...
    @property
    def is_closed(self) -> bool: ...
    @property
    def is_open(self) -> bool: ...
    @property
    def is_reduce_only(self) -> bool: ...
    @property
    def is_quote_quantity(self) -> bool: ...
    @property
    def emulation_trigger(self) -> TriggerType | None: ...
    @property
    def trigger_instrument_id(self) -> InstrumentId | None: ...
    @property
    def contingency_type(self) -> ContingencyType | None: ...
    @property
    def order_list_id(self) -> OrderListId | None: ...
    @property
    def linked_order_ids(self) -> list[ClientOrderId] | None: ...
    @property
    def parent_order_id(self) -> ClientOrderId | None: ...
    @property
    def exec_algorithm_id(self) -> ExecAlgorithmId | None: ...
    @property
    def exec_algorithm_params(self) -> dict[str, str] | None: ...
    @property
    def exec_spawn_id(self) -> ClientOrderId | None: ...
    @property
    def tags(self) -> list[str] | None: ...
    def commission(self, currency: Currency) -> Money | None: ...
    def commissions(self) -> dict[Currency, Money]: ...
    def events(self) -> list[typing.Any]: ...
    def signed_decimal_qty(self) -> decimal.Decimal: ...
    def would_reduce_only(self, side: PositionSide, position_qty: Quantity) -> bool: ...
    def apply(self, event: typing.Any) -> None: ...
    @staticmethod
    def from_dict(values: dict) -> MarketIfTouchedOrder: ...
    def to_dict(self) -> typing.Any: ...

@typing.final
class MarketOrder:
    @property
    def avg_px(self) -> decimal.Decimal | None: ...
    @property
    def event_count(self) -> int: ...
    @property
    def is_buy(self) -> bool: ...
    @property
    def is_canceled(self) -> bool: ...
    @property
    def is_inflight(self) -> bool: ...
    @property
    def is_pending_cancel(self) -> bool: ...
    @property
    def is_pending_update(self) -> bool: ...
    @property
    def is_sell(self) -> bool: ...
    @property
    def last_event(self) -> typing.Any: ...
    @property
    def leaves_qty(self) -> Quantity: ...
    @property
    def overfill_qty(self) -> Quantity: ...
    @property
    def slippage(self) -> decimal.Decimal | None: ...
    @property
    def trade_ids(self) -> list[TradeId]: ...
    @property
    def ts_accepted(self) -> int | None: ...
    @property
    def ts_closed(self) -> int | None: ...
    @property
    def ts_submitted(self) -> int | None: ...
    @property
    def venue_order_ids(self) -> list[VenueOrderId]: ...
    @property
    def filled_qty(self) -> Quantity: ...
    @property
    def is_active_local(self) -> bool: ...
    @property
    def is_emulated(self) -> bool: ...
    @property
    def is_primary(self) -> bool: ...
    @property
    def is_spawned(self) -> bool: ...
    @property
    def last_trade_id(self) -> TradeId | None: ...
    @property
    def liquidity_side(self) -> LiquiditySide | None: ...
    @property
    def position_id(self) -> PositionId | None: ...
    @property
    def ts_last(self) -> int: ...
    @property
    def venue_order_id(self) -> VenueOrderId | None: ...
    @property
    def init_event(self) -> typing.Any: ...
    @property
    def is_open(self) -> bool: ...
    @property
    def is_closed(self) -> bool: ...
    def __init__(
        self,
        trader_id: TraderId,
        strategy_id: StrategyId,
        instrument_id: InstrumentId,
        client_order_id: ClientOrderId,
        order_side: OrderSide,
        quantity: Quantity,
        init_id: core.UUID4,
        ts_init: int,
        time_in_force: TimeInForce,
        reduce_only: bool,
        quote_quantity: bool,
        contingency_type: ContingencyType | None = None,
        order_list_id: OrderListId | None = None,
        linked_order_ids: typing.Sequence[ClientOrderId] | None = None,
        parent_order_id: ClientOrderId | None = None,
        exec_algorithm_id: ExecAlgorithmId | None = None,
        exec_algorithm_params: typing.Mapping[str, str] | None = None,
        exec_spawn_id: ClientOrderId | None = None,
        tags: typing.Sequence[str] | None = None,
    ) -> None: ...
    @staticmethod
    def create(init: OrderInitialized) -> MarketOrder: ...
    @staticmethod
    def opposite_side(side: OrderSide) -> OrderSide: ...
    @staticmethod
    def closing_side(side: PositionSide) -> OrderSide | None: ...
    @property
    def status(self) -> OrderStatus: ...
    def commission(self, currency: Currency) -> Money | None: ...
    def commissions(self) -> dict[Currency, Money]: ...
    @property
    def account_id(self) -> AccountId | None: ...
    @property
    def instrument_id(self) -> InstrumentId: ...
    @property
    def trader_id(self) -> TraderId: ...
    @property
    def strategy_id(self) -> StrategyId: ...
    @property
    def init_id(self) -> core.UUID4: ...
    @property
    def ts_init(self) -> int: ...
    @property
    def client_order_id(self) -> ClientOrderId: ...
    @property
    def order_list_id(self) -> OrderListId | None: ...
    @property
    def linked_order_ids(self) -> list[ClientOrderId] | None: ...
    @property
    def parent_order_id(self) -> ClientOrderId | None: ...
    @property
    def exec_algorithm_id(self) -> ExecAlgorithmId | None: ...
    @property
    def exec_algorithm_params(self) -> dict[str, str] | None: ...
    @property
    def exec_spawn_id(self) -> ClientOrderId | None: ...
    @property
    def is_reduce_only(self) -> bool: ...
    @property
    def is_quote_quantity(self) -> bool: ...
    @property
    def contingency_type(self) -> ContingencyType | None: ...
    @property
    def quantity(self) -> Quantity: ...
    @property
    def side(self) -> OrderSide: ...
    @property
    def order_type(self) -> OrderType: ...
    @property
    def emulation_trigger(self) -> str | None: ...
    @property
    def time_in_force(self) -> TimeInForce: ...
    @property
    def tags(self) -> list[str] | None: ...
    def events(self) -> list[typing.Any]: ...
    def signed_decimal_qty(self) -> decimal.Decimal: ...
    def would_reduce_only(self, side: PositionSide, position_qty: Quantity) -> bool: ...
    def apply(self, event: typing.Any) -> None: ...
    @staticmethod
    def from_dict(values: dict) -> MarketOrder: ...
    def to_dict(self) -> typing.Any: ...

@typing.final
class MarketToLimitOrder:
    @property
    def avg_px(self) -> decimal.Decimal | None: ...
    @property
    def event_count(self) -> int: ...
    @property
    def is_buy(self) -> bool: ...
    @property
    def is_canceled(self) -> bool: ...
    @property
    def is_inflight(self) -> bool: ...
    @property
    def is_pending_cancel(self) -> bool: ...
    @property
    def is_pending_update(self) -> bool: ...
    @property
    def is_sell(self) -> bool: ...
    @property
    def last_event(self) -> typing.Any: ...
    @property
    def leaves_qty(self) -> Quantity: ...
    @property
    def overfill_qty(self) -> Quantity: ...
    @property
    def slippage(self) -> decimal.Decimal | None: ...
    @property
    def trade_ids(self) -> list[TradeId]: ...
    @property
    def ts_accepted(self) -> int | None: ...
    @property
    def ts_closed(self) -> int | None: ...
    @property
    def ts_submitted(self) -> int | None: ...
    @property
    def venue_order_ids(self) -> list[VenueOrderId]: ...
    @property
    def filled_qty(self) -> Quantity: ...
    @property
    def is_active_local(self) -> bool: ...
    @property
    def is_emulated(self) -> bool: ...
    @property
    def is_primary(self) -> bool: ...
    @property
    def is_spawned(self) -> bool: ...
    @property
    def last_trade_id(self) -> TradeId | None: ...
    @property
    def liquidity_side(self) -> LiquiditySide | None: ...
    @property
    def position_id(self) -> PositionId | None: ...
    @property
    def ts_last(self) -> int: ...
    @property
    def venue_order_id(self) -> VenueOrderId | None: ...
    def __init__(
        self,
        trader_id: TraderId,
        strategy_id: StrategyId,
        instrument_id: InstrumentId,
        client_order_id: ClientOrderId,
        order_side: OrderSide,
        quantity: Quantity,
        time_in_force: TimeInForce,
        post_only: bool,
        reduce_only: bool,
        quote_quantity: bool,
        init_id: core.UUID4,
        ts_init: int,
        expire_time: int | None = None,
        display_qty: Quantity | None = None,
        contingency_type: ContingencyType | None = None,
        order_list_id: OrderListId | None = None,
        linked_order_ids: typing.Sequence[ClientOrderId] | None = None,
        parent_order_id: ClientOrderId | None = None,
        exec_algorithm_id: ExecAlgorithmId | None = None,
        exec_algorithm_params: typing.Mapping[str, str] | None = None,
        exec_spawn_id: ClientOrderId | None = None,
        tags: typing.Sequence[str] | None = None,
    ) -> None: ...
    @staticmethod
    def create(init: OrderInitialized) -> MarketToLimitOrder: ...
    @staticmethod
    def opposite_side(side: OrderSide) -> OrderSide: ...
    @staticmethod
    def closing_side(side: PositionSide) -> OrderSide | None: ...
    @property
    def status(self) -> OrderStatus: ...
    @property
    def trader_id(self) -> TraderId: ...
    @property
    def strategy_id(self) -> StrategyId: ...
    @property
    def instrument_id(self) -> InstrumentId: ...
    @property
    def client_order_id(self) -> ClientOrderId: ...
    @property
    def side(self) -> OrderSide: ...
    @property
    def quantity(self) -> Quantity: ...
    @property
    def price(self) -> Price | None: ...
    @property
    def order_type(self) -> OrderType: ...
    @property
    def time_in_force(self) -> TimeInForce: ...
    @property
    def expire_time(self) -> int | None: ...
    @property
    def init_id(self) -> core.UUID4: ...
    @property
    def ts_init(self) -> int: ...
    @property
    def init_event(self) -> typing.Any: ...
    @property
    def has_price(self) -> bool: ...
    @property
    def is_passive(self) -> bool: ...
    @property
    def is_aggressive(self) -> bool: ...
    @property
    def is_closed(self) -> bool: ...
    @property
    def is_open(self) -> bool: ...
    @property
    def is_post_only(self) -> bool: ...
    @property
    def is_reduce_only(self) -> bool: ...
    @property
    def is_quote_quantity(self) -> bool: ...
    @property
    def display_qty(self) -> Quantity | None: ...
    @property
    def emulation_trigger(self) -> str | None: ...
    @property
    def contingency_type(self) -> ContingencyType | None: ...
    @property
    def order_list_id(self) -> OrderListId | None: ...
    @property
    def linked_order_ids(self) -> list[ClientOrderId] | None: ...
    @property
    def parent_order_id(self) -> ClientOrderId | None: ...
    @property
    def exec_algorithm_id(self) -> ExecAlgorithmId | None: ...
    @property
    def exec_algorithm_params(self) -> dict[str, str] | None: ...
    @property
    def exec_spawn_id(self) -> ClientOrderId | None: ...
    @property
    def account_id(self) -> AccountId | None: ...
    @property
    def tags(self) -> list[str] | None: ...
    def commission(self, currency: Currency) -> Money | None: ...
    def commissions(self) -> dict[Currency, Money]: ...
    def events(self) -> list[typing.Any]: ...
    def signed_decimal_qty(self) -> decimal.Decimal: ...
    def would_reduce_only(self, side: PositionSide, position_qty: Quantity) -> bool: ...
    def apply(self, event: typing.Any) -> None: ...
    @staticmethod
    def from_dict(values: dict) -> MarketToLimitOrder: ...
    def to_dict(self) -> typing.Any: ...

@typing.final
class Money:
    def __init__(self, amount: float, currency: Currency) -> None: ...
    def __reduce__(self) -> typing.Any: ...
    def __hash__(self) -> int: ...
    def __add__(self, other: typing.Any) -> typing.Any: ...
    def __radd__(self, other: typing.Any) -> typing.Any: ...
    def __sub__(self, other: typing.Any) -> typing.Any: ...
    def __rsub__(self, other: typing.Any) -> typing.Any: ...
    def __mul__(self, other: typing.Any) -> typing.Any: ...
    def __rmul__(self, other: typing.Any) -> typing.Any: ...
    def __truediv__(self, other: typing.Any) -> typing.Any: ...
    def __rtruediv__(self, other: typing.Any) -> typing.Any: ...
    def __floordiv__(self, other: typing.Any) -> typing.Any: ...
    def __rfloordiv__(self, other: typing.Any) -> typing.Any: ...
    def __mod__(self, other: typing.Any) -> typing.Any: ...
    def __rmod__(self, other: typing.Any) -> typing.Any: ...
    def __neg__(self) -> Money: ...
    def __pos__(self) -> Money: ...
    def __abs__(self) -> Money: ...
    def __int__(self) -> int: ...
    def __float__(self) -> float: ...
    def __round__(self, ndigits: int | None = None) -> decimal.Decimal: ...
    @property
    def raw(self) -> int: ...
    @property
    def currency(self) -> Currency: ...
    @staticmethod
    def zero(currency: Currency) -> Money: ...
    @staticmethod
    def from_raw(raw: int, currency: Currency) -> Money: ...
    @staticmethod
    def from_decimal(value: decimal.Decimal, currency: Currency) -> Money: ...
    @staticmethod
    def from_str(value: str) -> Money: ...
    def is_zero(self) -> bool: ...
    def is_positive(self) -> bool: ...
    def as_decimal(self) -> decimal.Decimal: ...
    def as_double(self) -> float: ...
    def to_formatted_str(self) -> str: ...
    def checked_add(self, other: Money) -> Money | None: ...
    def checked_sub(self, other: Money) -> Money | None: ...

@typing.final
class OptionChainSlice:
    def __init__(
        self,
        series_id: OptionSeriesId,
        atm_strike: Price | None = None,
        ts_event: int = 0,
        ts_init: int = 0,
    ) -> None: ...
    @property
    def series_id(self) -> OptionSeriesId: ...
    @property
    def atm_strike(self) -> Price | None: ...
    @property
    def ts_event(self) -> int: ...
    @property
    def ts_init(self) -> int: ...
    def call_count(self) -> int: ...
    def put_count(self) -> int: ...
    def strike_count(self) -> int: ...
    def is_empty(self) -> bool: ...
    def strikes(self) -> list[Price]: ...
    def get_call(self, strike: Price) -> OptionStrikeData | None: ...
    def get_put(self, strike: Price) -> OptionStrikeData | None: ...
    def get_call_quote(self, strike: Price) -> QuoteTick | None: ...
    def get_put_quote(self, strike: Price) -> QuoteTick | None: ...
    def get_call_greeks(self, strike: Price) -> OptionGreeks | None: ...
    def get_put_greeks(self, strike: Price) -> OptionGreeks | None: ...

@typing.final
class OptionContract:
    @property
    def symbol(self) -> Symbol: ...
    @property
    def venue(self) -> Venue: ...
    @property
    def tick_scheme(self) -> str | None: ...
    @property
    def activation_utc(self) -> datetime.datetime: ...
    @property
    def expiration_utc(self) -> datetime.datetime: ...
    @property
    def instrument_class(self) -> InstrumentClass: ...
    @property
    def is_inverse(self) -> bool: ...
    @property
    def is_quanto(self) -> bool: ...
    @property
    def isin(self) -> str | None: ...
    @property
    def max_notional(self) -> Money | None: ...
    @property
    def min_notional(self) -> Money | None: ...
    @property
    def quote_currency(self) -> Currency: ...
    def next_bid_price(self, value: float, num_ticks: int = ...) -> Price | None: ...
    def next_ask_price(self, value: float, num_ticks: int = ...) -> Price | None: ...
    def next_bid_prices(self, value: float, num_ticks: int = ...) -> list[decimal.Decimal]: ...
    def next_ask_prices(self, value: float, num_ticks: int = ...) -> list[decimal.Decimal]: ...
    def make_price(self, value: float) -> Price: ...
    def make_qty(self, value: float, round_down: bool = ...) -> Quantity: ...
    def notional_value(
        self, quantity: Quantity, price: Price, use_quote_for_inverse: bool = ...
    ) -> Money: ...
    def __init__(
        self,
        instrument_id: InstrumentId,
        raw_symbol: Symbol,
        asset_class: AssetClass,
        underlying: str,
        option_kind: OptionKind,
        strike_price: Price,
        currency: Currency,
        activation_ns: int,
        expiration_ns: int,
        price_precision: int,
        price_increment: Price,
        multiplier: Quantity,
        lot_size: Quantity,
        ts_event: int,
        ts_init: int,
        max_quantity: Quantity | None = None,
        min_quantity: Quantity | None = None,
        max_price: Price | None = None,
        min_price: Price | None = None,
        margin_init: decimal.Decimal | None = None,
        margin_maint: decimal.Decimal | None = None,
        maker_fee: decimal.Decimal | None = None,
        taker_fee: decimal.Decimal | None = None,
        exchange: str | None = None,
        tick_scheme: str | None = None,
        info: dict | None = None,
    ) -> None: ...
    def __hash__(self) -> int: ...
    @property
    def type_name(self) -> str: ...
    @property
    def id(self) -> InstrumentId: ...
    @property
    def raw_symbol(self) -> Symbol: ...
    @property
    def asset_class(self) -> AssetClass: ...
    @property
    def exchange(self) -> str | None: ...
    @property
    def underlying(self) -> str: ...
    @property
    def option_kind(self) -> OptionKind: ...
    @property
    def activation_ns(self) -> int: ...
    @property
    def expiration_ns(self) -> int: ...
    @property
    def strike_price(self) -> Price: ...
    @property
    def currency(self) -> Currency: ...
    @property
    def price_precision(self) -> int: ...
    @property
    def price_increment(self) -> Price: ...
    @property
    def size_increment(self) -> Quantity: ...
    @property
    def size_precision(self) -> int: ...
    @property
    def multiplier(self) -> Quantity: ...
    @property
    def lot_size(self) -> Quantity: ...
    @property
    def max_quantity(self) -> Quantity | None: ...
    @property
    def min_quantity(self) -> Quantity | None: ...
    @property
    def max_price(self) -> Price | None: ...
    @property
    def min_price(self) -> Price | None: ...
    @property
    def margin_init(self) -> decimal.Decimal: ...
    @property
    def margin_maint(self) -> decimal.Decimal: ...
    @property
    def maker_fee(self) -> decimal.Decimal: ...
    @property
    def taker_fee(self) -> decimal.Decimal: ...
    @property
    def info(self) -> dict: ...
    @property
    def ts_event(self) -> int: ...
    @property
    def ts_init(self) -> int: ...
    @staticmethod
    def from_dict(values: dict) -> OptionContract: ...
    def to_dict(self) -> typing.Any: ...

@typing.final
class OptionGreekValues:
    @property
    def delta(self) -> float: ...
    @property
    def gamma(self) -> float: ...
    @property
    def vega(self) -> float: ...
    @property
    def theta(self) -> float: ...
    @property
    def rho(self) -> float: ...

@typing.final
class OptionGreeks:
    def __init__(
        self,
        instrument_id: InstrumentId,
        delta: float,
        gamma: float,
        vega: float,
        theta: float,
        rho: float = 0.0,
        mark_iv: float | None = None,
        bid_iv: float | None = None,
        ask_iv: float | None = None,
        underlying_price: float | None = None,
        open_interest: float | None = None,
        ts_event: int = 0,
        ts_init: int = 0,
        convention: GreeksConvention | None = None,
    ) -> None: ...
    @property
    def convention(self) -> GreeksConvention: ...
    @property
    def instrument_id(self) -> InstrumentId: ...
    @property
    def delta(self) -> float: ...
    @property
    def gamma(self) -> float: ...
    @property
    def vega(self) -> float: ...
    @property
    def theta(self) -> float: ...
    @property
    def rho(self) -> float: ...
    @property
    def mark_iv(self) -> float | None: ...
    @property
    def bid_iv(self) -> float | None: ...
    @property
    def ask_iv(self) -> float | None: ...
    @property
    def underlying_price(self) -> float | None: ...
    @property
    def open_interest(self) -> float | None: ...
    @property
    def ts_event(self) -> int: ...
    @property
    def ts_init(self) -> int: ...

@typing.final
class OptionSeriesId:
    def __init__(
        self, venue: str, underlying: str, settlement_currency: str, expiration_ns: int
    ) -> None: ...
    @staticmethod
    def from_expiry(
        venue: str, underlying: str, settlement_currency: str, date_str: str
    ) -> OptionSeriesId: ...
    @staticmethod
    def from_str(value: str) -> OptionSeriesId: ...
    @property
    def venue(self) -> Venue: ...
    @property
    def underlying(self) -> str: ...
    @property
    def settlement_currency(self) -> str: ...
    @property
    def expiration_ns(self) -> int: ...
    @property
    def value(self) -> str: ...
    def __hash__(self) -> int: ...

@typing.final
class OptionSpread:
    @property
    def symbol(self) -> Symbol: ...
    @property
    def venue(self) -> Venue: ...
    @property
    def tick_scheme(self) -> str | None: ...
    @property
    def activation_utc(self) -> datetime.datetime: ...
    @property
    def expiration_utc(self) -> datetime.datetime: ...
    @property
    def instrument_class(self) -> InstrumentClass: ...
    @property
    def is_inverse(self) -> bool: ...
    @property
    def is_quanto(self) -> bool: ...
    @property
    def isin(self) -> str | None: ...
    @property
    def max_notional(self) -> Money | None: ...
    @property
    def min_notional(self) -> Money | None: ...
    @property
    def quote_currency(self) -> Currency: ...
    def next_bid_price(self, value: float, num_ticks: int = ...) -> Price | None: ...
    def next_ask_price(self, value: float, num_ticks: int = ...) -> Price | None: ...
    def next_bid_prices(self, value: float, num_ticks: int = ...) -> list[decimal.Decimal]: ...
    def next_ask_prices(self, value: float, num_ticks: int = ...) -> list[decimal.Decimal]: ...
    def make_price(self, value: float) -> Price: ...
    def make_qty(self, value: float, round_down: bool = ...) -> Quantity: ...
    def notional_value(
        self, quantity: Quantity, price: Price, use_quote_for_inverse: bool = ...
    ) -> Money: ...
    def __init__(
        self,
        instrument_id: InstrumentId,
        raw_symbol: Symbol,
        asset_class: AssetClass,
        underlying: str,
        strategy_type: str,
        activation_ns: int,
        expiration_ns: int,
        currency: Currency,
        price_precision: int,
        price_increment: Price,
        multiplier: Quantity,
        lot_size: Quantity,
        ts_event: int,
        ts_init: int,
        max_quantity: Quantity | None = None,
        min_quantity: Quantity | None = None,
        max_price: Price | None = None,
        min_price: Price | None = None,
        margin_init: decimal.Decimal | None = None,
        margin_maint: decimal.Decimal | None = None,
        maker_fee: decimal.Decimal | None = None,
        taker_fee: decimal.Decimal | None = None,
        exchange: str | None = None,
        tick_scheme: str | None = None,
        info: dict | None = None,
    ) -> None: ...
    def __hash__(self) -> int: ...
    @property
    def type_name(self) -> str: ...
    @property
    def id(self) -> InstrumentId: ...
    @property
    def raw_symbol(self) -> Symbol: ...
    @property
    def asset_class(self) -> AssetClass: ...
    @property
    def exchange(self) -> str | None: ...
    @property
    def underlying(self) -> str: ...
    @property
    def strategy_type(self) -> str: ...
    @property
    def activation_ns(self) -> int: ...
    @property
    def expiration_ns(self) -> int: ...
    @property
    def currency(self) -> Currency: ...
    @property
    def price_precision(self) -> int: ...
    @property
    def price_increment(self) -> Price: ...
    @property
    def size_increment(self) -> Quantity: ...
    @property
    def size_precision(self) -> int: ...
    @property
    def multiplier(self) -> Quantity: ...
    @property
    def lot_size(self) -> Quantity: ...
    @property
    def max_quantity(self) -> Quantity | None: ...
    @property
    def min_quantity(self) -> Quantity | None: ...
    @property
    def max_price(self) -> Price | None: ...
    @property
    def min_price(self) -> Price | None: ...
    @property
    def margin_init(self) -> decimal.Decimal: ...
    @property
    def margin_maint(self) -> decimal.Decimal: ...
    @property
    def maker_fee(self) -> decimal.Decimal: ...
    @property
    def taker_fee(self) -> decimal.Decimal: ...
    @property
    def info(self) -> dict: ...
    @property
    def ts_event(self) -> int: ...
    @property
    def ts_init(self) -> int: ...
    @staticmethod
    def from_dict(values: dict) -> OptionSpread: ...
    def to_dict(self) -> typing.Any: ...

@typing.final
class OptionStrikeData:
    def __init__(self, quote: QuoteTick, greeks: OptionGreeks | None = None) -> None: ...
    @property
    def quote(self) -> QuoteTick: ...
    @property
    def greeks(self) -> OptionGreeks | None: ...

@typing.final
class OrderAccepted:
    def __init__(
        self,
        trader_id: TraderId,
        strategy_id: StrategyId,
        instrument_id: InstrumentId,
        client_order_id: ClientOrderId,
        venue_order_id: VenueOrderId,
        account_id: AccountId,
        event_id: core.UUID4,
        ts_event: int,
        ts_init: int,
        reconciliation: bool,
    ) -> None: ...
    @property
    def causation_id(self) -> core.UUID4 | None: ...
    @staticmethod
    def from_dict(values: dict) -> OrderAccepted: ...
    @property
    def trader_id(self) -> TraderId: ...
    @property
    def strategy_id(self) -> StrategyId: ...
    @property
    def instrument_id(self) -> InstrumentId: ...
    @property
    def client_order_id(self) -> ClientOrderId: ...
    @property
    def venue_order_id(self) -> VenueOrderId: ...
    @property
    def account_id(self) -> AccountId: ...
    @property
    def event_id(self) -> core.UUID4: ...
    @property
    def ts_event(self) -> int: ...
    @property
    def ts_init(self) -> int: ...
    @property
    def reconciliation(self) -> bool: ...
    def to_dict(self) -> typing.Any: ...

@typing.final
class OrderBook:
    def __init__(self, instrument_id: InstrumentId, book_type: BookType) -> None: ...
    def __getstate__(self) -> typing.Any: ...
    def __setstate__(self, state: typing.Any) -> None: ...
    def __reduce__(self) -> typing.Any: ...
    def __deepcopy__(self, _memo: typing.Any) -> OrderBook: ...
    @property
    def instrument_id(self) -> InstrumentId: ...
    @property
    def book_type(self) -> BookType: ...
    @property
    def sequence(self) -> int: ...
    @property
    def ts_event(self) -> int: ...
    @property
    def ts_init(self) -> int: ...
    @property
    def ts_last(self) -> int: ...
    @property
    def update_count(self) -> int: ...
    def reset(self) -> None: ...
    def add(self, order: BookOrder, flags: int, sequence: int, ts_event: int) -> None: ...
    def update(self, order: BookOrder, flags: int, sequence: int, ts_event: int) -> None: ...
    def delete(self, order: BookOrder, flags: int, sequence: int, ts_event: int) -> None: ...
    def clear(self, sequence: int, ts_event: int) -> None: ...
    def clear_bids(self, sequence: int, ts_event: int) -> None: ...
    def clear_asks(self, sequence: int, ts_event: int) -> None: ...
    def clear_stale_levels(self, side: OrderSide | None = None) -> list[BookLevel] | None: ...
    def apply_delta(self, delta: OrderBookDelta) -> None: ...
    def apply_deltas(self, deltas: OrderBookDeltas) -> None: ...
    def apply_depth(self, depth: OrderBookDepth10) -> None: ...
    def check_integrity(self) -> None: ...
    def bids(self, depth: int | None = None) -> list[BookLevel]: ...
    def asks(self, depth: int | None = None) -> list[BookLevel]: ...
    def bids_to_dict(self, depth: int | None = None) -> dict[decimal.Decimal, decimal.Decimal]: ...
    def asks_to_dict(self, depth: int | None = None) -> dict[decimal.Decimal, decimal.Decimal]: ...
    def group_bids(
        self, group_size: decimal.Decimal, depth: int | None = None
    ) -> dict[decimal.Decimal, decimal.Decimal]: ...
    def group_asks(
        self, group_size: decimal.Decimal, depth: int | None = None
    ) -> dict[decimal.Decimal, decimal.Decimal]: ...
    def bids_filtered_to_dict(
        self,
        depth: int | None = None,
        own_book: OwnOrderBook | None = None,
        status: set[OrderStatus] | None = None,
        accepted_buffer_ns: int | None = None,
        ts_now: int | None = None,
    ) -> dict[decimal.Decimal, decimal.Decimal]: ...
    def asks_filtered_to_dict(
        self,
        depth: int | None = None,
        own_book: OwnOrderBook | None = None,
        status: set[OrderStatus] | None = None,
        accepted_buffer_ns: int | None = None,
        ts_now: int | None = None,
    ) -> dict[decimal.Decimal, decimal.Decimal]: ...
    def group_bids_filtered(
        self,
        group_size: decimal.Decimal,
        depth: int | None = None,
        own_book: OwnOrderBook | None = None,
        status: set[OrderStatus] | None = None,
        accepted_buffer_ns: int | None = None,
        ts_now: int | None = None,
    ) -> dict[decimal.Decimal, decimal.Decimal]: ...
    def group_asks_filtered(
        self,
        group_size: decimal.Decimal,
        depth: int | None = None,
        own_book: OwnOrderBook | None = None,
        status: set[OrderStatus] | None = None,
        accepted_buffer_ns: int | None = None,
        ts_now: int | None = None,
    ) -> dict[decimal.Decimal, decimal.Decimal]: ...
    def filtered_view(
        self,
        own_book: OwnOrderBook | None = None,
        depth: int | None = None,
        status: set[OrderStatus] | None = None,
        accepted_buffer_ns: int | None = None,
        ts_now: int | None = None,
    ) -> OrderBook: ...
    def best_bid_price(self) -> Price | None: ...
    def best_ask_price(self) -> Price | None: ...
    def best_bid_size(self) -> Quantity | None: ...
    def best_ask_size(self) -> Quantity | None: ...
    def spread(self) -> float | None: ...
    def midpoint(self) -> float | None: ...
    def get_avg_px_for_quantity(self, qty: Quantity, order_side: OrderSide) -> float: ...
    def get_worst_px_for_quantity(self, qty: Quantity, order_side: OrderSide) -> Price | None: ...
    def get_avg_px_qty_for_exposure(
        self, qty: Quantity, order_side: OrderSide
    ) -> tuple[float, float, float]: ...
    def get_quantity_for_price(self, price: Price, order_side: OrderSide) -> float: ...
    def get_quantity_at_level(
        self, price: Price, order_side: OrderSide, size_precision: int
    ) -> Quantity: ...
    def get_all_crossed_levels(
        self, order_side: OrderSide, price: Price, size_precision: int
    ) -> list[tuple[Price, Quantity]]: ...
    def simulate_fills(self, order: BookOrder) -> list[tuple[Price, Quantity]]: ...
    def to_deltas(self, ts_event: int, ts_init: int) -> OrderBookDeltas: ...
    def pprint(self, num_levels: int = 3, group_size: decimal.Decimal | None = None) -> str: ...

@typing.final
class OrderBookDelta:
    def __init__(
        self,
        instrument_id: InstrumentId,
        action: BookAction,
        order: BookOrder,
        flags: int,
        sequence: int,
        ts_event: int,
        ts_init: int,
    ) -> None: ...
    @staticmethod
    def clear(
        instrument_id: InstrumentId, sequence: int, ts_event: int, ts_init: int
    ) -> OrderBookDelta: ...
    def __hash__(self) -> int: ...
    @property
    def instrument_id(self) -> InstrumentId: ...
    @property
    def action(self) -> BookAction: ...
    @property
    def is_add(self) -> bool: ...
    @property
    def is_update(self) -> bool: ...
    @property
    def is_delete(self) -> bool: ...
    @property
    def is_clear(self) -> bool: ...
    @property
    def order(self) -> BookOrder: ...
    @property
    def flags(self) -> int: ...
    @property
    def sequence(self) -> int: ...
    @property
    def ts_event(self) -> int: ...
    @property
    def ts_init(self) -> int: ...
    @staticmethod
    def fully_qualified_name() -> str: ...
    @staticmethod
    def get_metadata(
        instrument_id: InstrumentId, price_precision: int, size_precision: int
    ) -> dict[str, str]: ...
    @staticmethod
    def get_fields() -> dict: ...
    @staticmethod
    def from_dict(values: dict) -> OrderBookDelta: ...
    def to_dict(self) -> dict: ...
    def to_json_bytes(self) -> typing.Any: ...
    def to_msgpack_bytes(self) -> typing.Any: ...
    def __reduce__(self) -> typing.Any: ...
    @staticmethod
    def from_json(data: typing.Any) -> OrderBookDelta: ...
    @staticmethod
    def from_msgpack(data: typing.Any) -> OrderBookDelta: ...

@typing.final
class OrderBookDeltas:
    def __init__(
        self, instrument_id: InstrumentId, deltas: typing.Sequence[OrderBookDelta]
    ) -> None: ...
    def __hash__(self) -> int: ...
    @property
    def instrument_id(self) -> InstrumentId: ...
    @property
    def deltas(self) -> list[OrderBookDelta]: ...
    @property
    def flags(self) -> int: ...
    @property
    def is_snapshot(self) -> bool: ...
    @property
    def sequence(self) -> int: ...
    @property
    def ts_event(self) -> int: ...
    @property
    def ts_init(self) -> int: ...
    @staticmethod
    def fully_qualified_name() -> str: ...
    def __reduce__(self) -> typing.Any: ...
    @staticmethod
    def _from_dicts(
        instrument_id: InstrumentId, delta_dicts: typing.Sequence[dict]
    ) -> OrderBookDeltas: ...

@typing.final
class OrderBookDepth10:
    def __init__(
        self,
        instrument_id: InstrumentId,
        bids: typing.Sequence[BookOrder],
        asks: typing.Sequence[BookOrder],
        bid_counts: typing.Sequence[int],
        ask_counts: typing.Sequence[int],
        flags: int,
        sequence: int,
        ts_event: int,
        ts_init: int,
    ) -> None: ...
    def __hash__(self) -> int: ...
    @property
    def instrument_id(self) -> InstrumentId: ...
    @property
    def bids(self) -> list[BookOrder]: ...
    @property
    def asks(self) -> list[BookOrder]: ...
    @property
    def bid_counts(self) -> list[int]: ...
    @property
    def ask_counts(self) -> list[int]: ...
    @property
    def flags(self) -> int: ...
    @property
    def sequence(self) -> int: ...
    @property
    def ts_event(self) -> int: ...
    @property
    def ts_init(self) -> int: ...
    @staticmethod
    def fully_qualified_name() -> str: ...
    @staticmethod
    def get_metadata(
        instrument_id: InstrumentId, price_precision: int, size_precision: int
    ) -> dict[str, str]: ...
    @staticmethod
    def get_fields() -> dict: ...
    @staticmethod
    def get_stub() -> OrderBookDepth10: ...
    @staticmethod
    def from_dict(values: dict) -> OrderBookDepth10: ...
    def to_dict(self) -> dict: ...
    def to_json_bytes(self) -> typing.Any: ...
    def to_msgpack_bytes(self) -> typing.Any: ...
    @staticmethod
    def from_json(data: typing.Any) -> OrderBookDepth10: ...
    @staticmethod
    def from_msgpack(data: typing.Any) -> OrderBookDepth10: ...

@typing.final
class OrderCancelRejected:
    def __init__(
        self,
        trader_id: TraderId,
        strategy_id: StrategyId,
        instrument_id: InstrumentId,
        client_order_id: ClientOrderId,
        reason: str,
        event_id: core.UUID4,
        ts_event: int,
        ts_init: int,
        reconciliation: bool,
        venue_order_id: VenueOrderId | None = None,
        account_id: AccountId | None = None,
    ) -> None: ...
    @property
    def causation_id(self) -> core.UUID4 | None: ...
    @staticmethod
    def from_dict(values: dict) -> OrderCancelRejected: ...
    @property
    def trader_id(self) -> TraderId: ...
    @property
    def strategy_id(self) -> StrategyId: ...
    @property
    def instrument_id(self) -> InstrumentId: ...
    @property
    def client_order_id(self) -> ClientOrderId: ...
    @property
    def venue_order_id(self) -> VenueOrderId | None: ...
    @property
    def account_id(self) -> AccountId | None: ...
    @property
    def reason(self) -> str: ...
    @property
    def event_id(self) -> core.UUID4: ...
    @property
    def ts_event(self) -> int: ...
    @property
    def ts_init(self) -> int: ...
    @property
    def reconciliation(self) -> bool: ...
    def to_dict(self) -> typing.Any: ...

@typing.final
class OrderCanceled:
    def __init__(
        self,
        trader_id: TraderId,
        strategy_id: StrategyId,
        instrument_id: InstrumentId,
        client_order_id: ClientOrderId,
        event_id: core.UUID4,
        ts_event: int,
        ts_init: int,
        reconciliation: bool,
        venue_order_id: VenueOrderId | None = None,
        account_id: AccountId | None = None,
        reason: str | None = None,
    ) -> None: ...
    @property
    def causation_id(self) -> core.UUID4 | None: ...
    @staticmethod
    def from_dict(values: dict) -> OrderCanceled: ...
    @property
    def trader_id(self) -> TraderId: ...
    @property
    def strategy_id(self) -> StrategyId: ...
    @property
    def instrument_id(self) -> InstrumentId: ...
    @property
    def client_order_id(self) -> ClientOrderId: ...
    @property
    def venue_order_id(self) -> VenueOrderId | None: ...
    @property
    def account_id(self) -> AccountId | None: ...
    @property
    def reason(self) -> str | None: ...
    @property
    def event_id(self) -> core.UUID4: ...
    @property
    def ts_event(self) -> int: ...
    @property
    def ts_init(self) -> int: ...
    @property
    def reconciliation(self) -> bool: ...
    def to_dict(self) -> typing.Any: ...

@typing.final
class OrderDenied:
    def __init__(
        self,
        trader_id: TraderId,
        strategy_id: StrategyId,
        instrument_id: InstrumentId,
        client_order_id: ClientOrderId,
        reason: str,
        event_id: core.UUID4,
        ts_event: int,
        ts_init: int,
    ) -> None: ...
    @property
    def causation_id(self) -> core.UUID4 | None: ...
    @staticmethod
    def from_dict(values: dict) -> OrderDenied: ...
    @property
    def trader_id(self) -> TraderId: ...
    @property
    def strategy_id(self) -> StrategyId: ...
    @property
    def instrument_id(self) -> InstrumentId: ...
    @property
    def client_order_id(self) -> ClientOrderId: ...
    @property
    def reason(self) -> str: ...
    @property
    def event_id(self) -> core.UUID4: ...
    @property
    def ts_event(self) -> int: ...
    @property
    def ts_init(self) -> int: ...
    def to_dict(self) -> typing.Any: ...

@typing.final
class OrderEmulated:
    def __init__(
        self,
        trader_id: TraderId,
        strategy_id: StrategyId,
        instrument_id: InstrumentId,
        client_order_id: ClientOrderId,
        event_id: core.UUID4,
        ts_event: int,
        ts_init: int,
    ) -> None: ...
    @property
    def causation_id(self) -> core.UUID4 | None: ...
    @staticmethod
    def from_dict(values: dict) -> OrderEmulated: ...
    @property
    def trader_id(self) -> TraderId: ...
    @property
    def strategy_id(self) -> StrategyId: ...
    @property
    def instrument_id(self) -> InstrumentId: ...
    @property
    def client_order_id(self) -> ClientOrderId: ...
    @property
    def event_id(self) -> core.UUID4: ...
    @property
    def ts_event(self) -> int: ...
    @property
    def ts_init(self) -> int: ...
    def to_dict(self) -> typing.Any: ...

@typing.final
class OrderExpired:
    def __init__(
        self,
        trader_id: TraderId,
        strategy_id: StrategyId,
        instrument_id: InstrumentId,
        client_order_id: ClientOrderId,
        event_id: core.UUID4,
        ts_event: int,
        ts_init: int,
        reconciliation: bool,
        venue_order_id: VenueOrderId | None = None,
        account_id: AccountId | None = None,
    ) -> None: ...
    @property
    def causation_id(self) -> core.UUID4 | None: ...
    @staticmethod
    def from_dict(values: dict) -> OrderExpired: ...
    @property
    def trader_id(self) -> TraderId: ...
    @property
    def strategy_id(self) -> StrategyId: ...
    @property
    def instrument_id(self) -> InstrumentId: ...
    @property
    def client_order_id(self) -> ClientOrderId: ...
    @property
    def venue_order_id(self) -> VenueOrderId | None: ...
    @property
    def account_id(self) -> AccountId | None: ...
    @property
    def event_id(self) -> core.UUID4: ...
    @property
    def ts_event(self) -> int: ...
    @property
    def ts_init(self) -> int: ...
    @property
    def reconciliation(self) -> bool: ...
    def to_dict(self) -> typing.Any: ...

@typing.final
class OrderFillVoided:
    def __init__(
        self,
        trader_id: TraderId,
        strategy_id: StrategyId,
        instrument_id: InstrumentId,
        client_order_id: ClientOrderId,
        venue_order_id: VenueOrderId,
        account_id: AccountId,
        correction_id: str,
        trade_id: TradeId,
        voided_qty: Quantity,
        order_side: OrderSide,
        order_type: OrderType,
        last_px: Price,
        currency: Currency,
        liquidity_side: LiquiditySide,
        event_id: core.UUID4,
        ts_event: int,
        ts_init: int,
        reconciliation: bool,
        is_reopened: bool = False,
        commission_voided: Money | None = None,
        position_id: PositionId | None = None,
        reason: str | None = None,
        info: typing.Mapping[str, str] | None = None,
    ) -> None: ...
    @property
    def trader_id(self) -> TraderId: ...
    @property
    def strategy_id(self) -> StrategyId: ...
    @property
    def instrument_id(self) -> InstrumentId: ...
    @property
    def client_order_id(self) -> ClientOrderId: ...
    @property
    def venue_order_id(self) -> VenueOrderId: ...
    @property
    def account_id(self) -> AccountId: ...
    @property
    def correction_id(self) -> str: ...
    @property
    def trade_id(self) -> TradeId: ...
    @property
    def voided_qty(self) -> Quantity: ...
    @property
    def commission_voided(self) -> Money | None: ...
    @property
    def order_side(self) -> OrderSide: ...
    @property
    def order_type(self) -> OrderType: ...
    @property
    def last_px(self) -> Price: ...
    @property
    def currency(self) -> Currency: ...
    @property
    def liquidity_side(self) -> LiquiditySide: ...
    @property
    def position_id(self) -> PositionId | None: ...
    @property
    def reason(self) -> str | None: ...
    @property
    def event_id(self) -> core.UUID4: ...
    @property
    def ts_event(self) -> int: ...
    @property
    def ts_init(self) -> int: ...
    @property
    def reconciliation(self) -> bool: ...
    @property
    def is_reopened(self) -> bool: ...
    @property
    def causation_id(self) -> core.UUID4 | None: ...
    @property
    def info(self) -> dict[str, str] | None: ...
    @staticmethod
    def from_dict(values: dict) -> OrderFillVoided: ...
    def to_dict(self) -> dict: ...

@typing.final
class OrderFilled:
    def __init__(
        self,
        trader_id: TraderId,
        strategy_id: StrategyId,
        instrument_id: InstrumentId,
        client_order_id: ClientOrderId,
        venue_order_id: VenueOrderId,
        account_id: AccountId,
        trade_id: TradeId,
        order_side: OrderSide,
        order_type: OrderType,
        last_qty: Quantity,
        last_px: Price,
        currency: Currency,
        liquidity_side: LiquiditySide,
        event_id: core.UUID4,
        ts_event: int,
        ts_init: int,
        reconciliation: bool,
        position_id: PositionId | None = None,
        commission: Money | None = None,
        info: typing.Mapping[str, str] | None = None,
    ) -> None: ...
    @property
    def is_buy(self) -> bool: ...
    @property
    def is_sell(self) -> bool: ...
    @property
    def trader_id(self) -> TraderId: ...
    @property
    def instrument_id(self) -> InstrumentId: ...
    @property
    def strategy_id(self) -> StrategyId: ...
    @property
    def client_order_id(self) -> ClientOrderId: ...
    @property
    def venue_order_id(self) -> VenueOrderId: ...
    @property
    def account_id(self) -> AccountId: ...
    @property
    def trade_id(self) -> TradeId: ...
    @property
    def order_side(self) -> OrderSide: ...
    @property
    def last_qty(self) -> Quantity: ...
    @property
    def last_px(self) -> Price: ...
    @property
    def currency(self) -> Currency: ...
    @property
    def liquidity_side(self) -> LiquiditySide: ...
    @property
    def event_id(self) -> core.UUID4: ...
    @property
    def ts_event(self) -> int: ...
    @property
    def ts_init(self) -> int: ...
    @property
    def reconciliation(self) -> bool: ...
    @property
    def position_id(self) -> PositionId | None: ...
    @property
    def commission(self) -> Money | None: ...
    @property
    def info(self) -> dict[str, str] | None: ...
    @property
    def order_type(self) -> OrderType: ...
    @property
    def causation_id(self) -> core.UUID4 | None: ...
    @staticmethod
    def from_dict(values: dict) -> OrderFilled: ...
    def to_dict(self) -> typing.Any: ...

@typing.final
class OrderInitialized:
    @property
    def trader_id(self) -> TraderId: ...
    @property
    def strategy_id(self) -> StrategyId: ...
    @property
    def instrument_id(self) -> InstrumentId: ...
    @property
    def client_order_id(self) -> ClientOrderId: ...
    @property
    def order_side(self) -> OrderSide: ...
    @property
    def order_type(self) -> OrderType: ...
    @property
    def quantity(self) -> Quantity: ...
    @property
    def time_in_force(self) -> TimeInForce: ...
    @property
    def post_only(self) -> bool: ...
    @property
    def reduce_only(self) -> bool: ...
    @property
    def quote_quantity(self) -> bool: ...
    @property
    def reconciliation(self) -> bool: ...
    @property
    def event_id(self) -> core.UUID4: ...
    @property
    def ts_event(self) -> int: ...
    @property
    def ts_init(self) -> int: ...
    @property
    def price(self) -> Price | None: ...
    @property
    def activation_price(self) -> Price | None: ...
    @property
    def trigger_price(self) -> Price | None: ...
    @property
    def trigger_type(self) -> TriggerType | None: ...
    @property
    def limit_offset(self) -> decimal.Decimal | None: ...
    @property
    def trailing_offset(self) -> decimal.Decimal | None: ...
    @property
    def trailing_offset_type(self) -> TrailingOffsetType | None: ...
    @property
    def expire_time(self) -> int | None: ...
    @property
    def display_qty(self) -> Quantity | None: ...
    @property
    def emulation_trigger(self) -> TriggerType | None: ...
    @property
    def trigger_instrument_id(self) -> InstrumentId | None: ...
    @property
    def contingency_type(self) -> ContingencyType | None: ...
    @property
    def order_list_id(self) -> OrderListId | None: ...
    @property
    def linked_order_ids(self) -> list[ClientOrderId] | None: ...
    @property
    def parent_order_id(self) -> ClientOrderId | None: ...
    @property
    def exec_algorithm_id(self) -> ExecAlgorithmId | None: ...
    @property
    def exec_algorithm_params(self) -> dict[str, str] | None: ...
    @property
    def exec_spawn_id(self) -> ClientOrderId | None: ...
    @property
    def tags(self) -> list[str] | None: ...
    @property
    def causation_id(self) -> core.UUID4 | None: ...
    def __new__(
        cls,
        trader_id: TraderId,
        strategy_id: StrategyId,
        instrument_id: InstrumentId,
        client_order_id: ClientOrderId,
        order_side: OrderSide,
        order_type: OrderType,
        quantity: Quantity,
        time_in_force: TimeInForce,
        post_only: bool,
        reduce_only: bool,
        quote_quantity: bool,
        reconciliation: bool,
        event_id: core.UUID4,
        ts_event: int,
        ts_init: int,
        price: Price | None = None,
        activation_price: Price | None = None,
        trigger_price: Price | None = None,
        trigger_type: TriggerType | None = None,
        limit_offset: decimal.Decimal | None = None,
        trailing_offset: decimal.Decimal | None = None,
        trailing_offset_type: TrailingOffsetType | None = None,
        expire_time: int | None = None,
        display_qty: Quantity | None = None,
        emulation_trigger: TriggerType | None = None,
        trigger_instrument_id: InstrumentId | None = None,
        contingency_type: ContingencyType | None = None,
        order_list_id: OrderListId | None = None,
        linked_order_ids: typing.Sequence[ClientOrderId] | None = None,
        parent_order_id: ClientOrderId | None = None,
        exec_algorithm_id: ExecAlgorithmId | None = None,
        exec_algorithm_params: typing.Mapping[str, str] | None = None,
        exec_spawn_id: ClientOrderId | None = None,
        tags: typing.Sequence[str] | None = None,
    ) -> OrderInitialized: ...
    @staticmethod
    def from_dict(values: dict) -> OrderInitialized: ...
    def to_dict(self) -> typing.Any: ...

@typing.final
class OrderList:
    @property
    def id(self) -> OrderListId: ...
    @property
    def instrument_id(self) -> InstrumentId: ...
    @property
    def strategy_id(self) -> StrategyId: ...
    @property
    def first_client_order_id(self) -> ClientOrderId | None: ...
    @property
    def ts_init(self) -> int: ...
    def __hash__(self) -> int: ...
    def __len__(self) -> int: ...
    def client_order_ids(self) -> list[ClientOrderId]: ...

@typing.final
class OrderListId:
    def __init__(self, value: str) -> None: ...
    def __setstate__(self, state: typing.Any) -> None: ...
    def __getstate__(self) -> typing.Any: ...
    def __reduce__(self) -> typing.Any: ...
    def __hash__(self) -> int: ...
    @property
    def value(self) -> str: ...
    @staticmethod
    def from_str(value: str) -> OrderListId: ...

@typing.final
class OrderModifyRejected:
    def __init__(
        self,
        trader_id: TraderId,
        strategy_id: StrategyId,
        instrument_id: InstrumentId,
        client_order_id: ClientOrderId,
        reason: str,
        event_id: core.UUID4,
        ts_event: int,
        ts_init: int,
        reconciliation: bool,
        venue_order_id: VenueOrderId | None = None,
        account_id: AccountId | None = None,
    ) -> None: ...
    @property
    def causation_id(self) -> core.UUID4 | None: ...
    @staticmethod
    def from_dict(values: dict) -> OrderModifyRejected: ...
    @property
    def trader_id(self) -> TraderId: ...
    @property
    def strategy_id(self) -> StrategyId: ...
    @property
    def instrument_id(self) -> InstrumentId: ...
    @property
    def client_order_id(self) -> ClientOrderId: ...
    @property
    def venue_order_id(self) -> VenueOrderId | None: ...
    @property
    def account_id(self) -> AccountId | None: ...
    @property
    def reason(self) -> str: ...
    @property
    def event_id(self) -> core.UUID4: ...
    @property
    def ts_event(self) -> int: ...
    @property
    def ts_init(self) -> int: ...
    @property
    def reconciliation(self) -> bool: ...
    def to_dict(self) -> typing.Any: ...

@typing.final
class OrderPendingCancel:
    def __init__(
        self,
        trader_id: TraderId,
        strategy_id: StrategyId,
        instrument_id: InstrumentId,
        client_order_id: ClientOrderId,
        account_id: AccountId | None,
        event_id: core.UUID4,
        ts_event: int,
        ts_init: int,
        reconciliation: bool,
        venue_order_id: VenueOrderId | None = None,
    ) -> None: ...
    @property
    def causation_id(self) -> core.UUID4 | None: ...
    @staticmethod
    def from_dict(values: dict) -> OrderPendingCancel: ...
    @property
    def trader_id(self) -> TraderId: ...
    @property
    def strategy_id(self) -> StrategyId: ...
    @property
    def instrument_id(self) -> InstrumentId: ...
    @property
    def client_order_id(self) -> ClientOrderId: ...
    @property
    def venue_order_id(self) -> VenueOrderId | None: ...
    @property
    def account_id(self) -> AccountId | None: ...
    @property
    def event_id(self) -> core.UUID4: ...
    @property
    def ts_event(self) -> int: ...
    @property
    def ts_init(self) -> int: ...
    @property
    def reconciliation(self) -> bool: ...
    def to_dict(self) -> typing.Any: ...

@typing.final
class OrderPendingUpdate:
    def __init__(
        self,
        trader_id: TraderId,
        strategy_id: StrategyId,
        instrument_id: InstrumentId,
        client_order_id: ClientOrderId,
        account_id: AccountId | None,
        event_id: core.UUID4,
        ts_event: int,
        ts_init: int,
        reconciliation: bool,
        venue_order_id: VenueOrderId | None = None,
    ) -> None: ...
    @property
    def causation_id(self) -> core.UUID4 | None: ...
    @staticmethod
    def from_dict(values: dict) -> OrderPendingUpdate: ...
    @property
    def trader_id(self) -> TraderId: ...
    @property
    def strategy_id(self) -> StrategyId: ...
    @property
    def instrument_id(self) -> InstrumentId: ...
    @property
    def client_order_id(self) -> ClientOrderId: ...
    @property
    def venue_order_id(self) -> VenueOrderId | None: ...
    @property
    def account_id(self) -> AccountId | None: ...
    @property
    def event_id(self) -> core.UUID4: ...
    @property
    def ts_event(self) -> int: ...
    @property
    def ts_init(self) -> int: ...
    @property
    def reconciliation(self) -> bool: ...
    def to_dict(self) -> typing.Any: ...

@typing.final
class OrderRejected:
    def __init__(
        self,
        trader_id: TraderId,
        strategy_id: StrategyId,
        instrument_id: InstrumentId,
        client_order_id: ClientOrderId,
        account_id: AccountId,
        reason: str,
        event_id: core.UUID4,
        ts_event: int,
        ts_init: int,
        reconciliation: bool,
        due_post_only: bool = False,
    ) -> None: ...
    @property
    def causation_id(self) -> core.UUID4 | None: ...
    @staticmethod
    def from_dict(values: dict) -> OrderRejected: ...
    @property
    def trader_id(self) -> TraderId: ...
    @property
    def strategy_id(self) -> StrategyId: ...
    @property
    def instrument_id(self) -> InstrumentId: ...
    @property
    def client_order_id(self) -> ClientOrderId: ...
    @property
    def account_id(self) -> AccountId: ...
    @property
    def reason(self) -> str: ...
    @property
    def event_id(self) -> core.UUID4: ...
    @property
    def ts_event(self) -> int: ...
    @property
    def ts_init(self) -> int: ...
    @property
    def reconciliation(self) -> bool: ...
    @property
    def due_post_only(self) -> bool: ...
    def to_dict(self) -> typing.Any: ...

@typing.final
class OrderReleased:
    def __init__(
        self,
        trader_id: TraderId,
        strategy_id: StrategyId,
        instrument_id: InstrumentId,
        client_order_id: ClientOrderId,
        released_price: Price,
        event_id: core.UUID4,
        ts_event: int,
        ts_init: int,
    ) -> None: ...
    @property
    def causation_id(self) -> core.UUID4 | None: ...
    @staticmethod
    def from_dict(values: dict) -> OrderReleased: ...
    @property
    def trader_id(self) -> TraderId: ...
    @property
    def strategy_id(self) -> StrategyId: ...
    @property
    def instrument_id(self) -> InstrumentId: ...
    @property
    def client_order_id(self) -> ClientOrderId: ...
    @property
    def released_price(self) -> Price: ...
    @property
    def event_id(self) -> core.UUID4: ...
    @property
    def ts_event(self) -> int: ...
    @property
    def ts_init(self) -> int: ...
    def to_dict(self) -> typing.Any: ...

@typing.final
class OrderSnapshot:
    @staticmethod
    def from_dict(values: dict) -> OrderSnapshot: ...

@typing.final
class OrderStatusReport:
    def __init__(
        self,
        account_id: AccountId,
        instrument_id: InstrumentId,
        venue_order_id: VenueOrderId,
        order_side: OrderSide | None,
        order_type: OrderType,
        time_in_force: TimeInForce,
        order_status: OrderStatus,
        quantity: Quantity,
        filled_qty: Quantity,
        ts_accepted: int,
        ts_last: int,
        ts_init: int,
        client_order_id: ClientOrderId | None = None,
        report_id: core.UUID4 | None = None,
        order_list_id: OrderListId | None = None,
        venue_position_id: PositionId | None = None,
        linked_order_ids: typing.Sequence[ClientOrderId] | None = None,
        parent_order_id: ClientOrderId | None = None,
        contingency_type: ContingencyType | None = None,
        expire_time: int | None = None,
        price: Price | None = None,
        activation_price: Price | None = None,
        trigger_price: Price | None = None,
        trigger_type: TriggerType | None = None,
        limit_offset: decimal.Decimal | None = None,
        trailing_offset: decimal.Decimal | None = None,
        trailing_offset_type: TrailingOffsetType | None = None,
        avg_px: decimal.Decimal | None = None,
        display_qty: Quantity | None = None,
        post_only: bool = False,
        reduce_only: bool = False,
        cancel_reason: str | None = None,
        ts_triggered: int | None = None,
    ) -> None: ...
    @property
    def account_id(self) -> AccountId: ...
    @property
    def instrument_id(self) -> InstrumentId: ...
    @property
    def venue_order_id(self) -> VenueOrderId: ...
    @property
    def order_side(self) -> OrderSide | None: ...
    @property
    def order_type(self) -> OrderType: ...
    @property
    def time_in_force(self) -> TimeInForce: ...
    @property
    def order_status(self) -> OrderStatus: ...
    @property
    def quantity(self) -> Quantity: ...
    @property
    def filled_qty(self) -> Quantity: ...
    @property
    def report_id(self) -> core.UUID4: ...
    @property
    def ts_accepted(self) -> int: ...
    @property
    def ts_last(self) -> int: ...
    @property
    def ts_init(self) -> int: ...
    @property
    def client_order_id(self) -> ClientOrderId | None: ...
    @property
    def order_list_id(self) -> OrderListId | None: ...
    @property
    def venue_position_id(self) -> PositionId | None: ...
    @property
    def linked_order_ids(self) -> list[ClientOrderId] | None: ...
    @property
    def parent_order_id(self) -> ClientOrderId | None: ...
    @property
    def contingency_type(self) -> ContingencyType | None: ...
    @property
    def expire_time(self) -> int | None: ...
    @property
    def price(self) -> Price | None: ...
    @property
    def activation_price(self) -> Price | None: ...
    @property
    def trigger_price(self) -> Price | None: ...
    @property
    def trigger_type(self) -> TriggerType | None: ...
    @property
    def limit_offset(self) -> decimal.Decimal | None: ...
    @property
    def trailing_offset(self) -> decimal.Decimal | None: ...
    @property
    def trailing_offset_type(self) -> TrailingOffsetType | None: ...
    @property
    def avg_px(self) -> decimal.Decimal | None: ...
    @property
    def display_qty(self) -> Quantity | None: ...
    @property
    def post_only(self) -> bool: ...
    @property
    def reduce_only(self) -> bool: ...
    @property
    def cancel_reason(self) -> str | None: ...
    @property
    def ts_triggered(self) -> int | None: ...
    @property
    def is_open(self) -> bool: ...
    @staticmethod
    def from_dict(values: dict) -> OrderStatusReport: ...
    def to_dict(self) -> typing.Any: ...

@typing.final
class OrderSubmitted:
    def __init__(
        self,
        trader_id: TraderId,
        strategy_id: StrategyId,
        instrument_id: InstrumentId,
        client_order_id: ClientOrderId,
        account_id: AccountId,
        event_id: core.UUID4,
        ts_event: int,
        ts_init: int,
    ) -> None: ...
    @property
    def causation_id(self) -> core.UUID4 | None: ...
    @staticmethod
    def from_dict(values: dict) -> OrderSubmitted: ...
    @property
    def trader_id(self) -> TraderId: ...
    @property
    def strategy_id(self) -> StrategyId: ...
    @property
    def instrument_id(self) -> InstrumentId: ...
    @property
    def client_order_id(self) -> ClientOrderId: ...
    @property
    def account_id(self) -> AccountId: ...
    @property
    def event_id(self) -> core.UUID4: ...
    @property
    def ts_event(self) -> int: ...
    @property
    def ts_init(self) -> int: ...
    def to_dict(self) -> typing.Any: ...

@typing.final
class OrderTriggered:
    def __init__(
        self,
        trader_id: TraderId,
        strategy_id: StrategyId,
        instrument_id: InstrumentId,
        client_order_id: ClientOrderId,
        event_id: core.UUID4,
        ts_event: int,
        ts_init: int,
        reconciliation: bool,
        venue_order_id: VenueOrderId | None = None,
        account_id: AccountId | None = None,
    ) -> None: ...
    @property
    def causation_id(self) -> core.UUID4 | None: ...
    @staticmethod
    def from_dict(values: dict) -> OrderTriggered: ...
    @property
    def trader_id(self) -> TraderId: ...
    @property
    def strategy_id(self) -> StrategyId: ...
    @property
    def instrument_id(self) -> InstrumentId: ...
    @property
    def client_order_id(self) -> ClientOrderId: ...
    @property
    def venue_order_id(self) -> VenueOrderId | None: ...
    @property
    def account_id(self) -> AccountId | None: ...
    @property
    def event_id(self) -> core.UUID4: ...
    @property
    def ts_event(self) -> int: ...
    @property
    def ts_init(self) -> int: ...
    @property
    def reconciliation(self) -> bool: ...
    def to_dict(self) -> typing.Any: ...

@typing.final
class OrderUpdated:
    def __init__(
        self,
        trader_id: TraderId,
        strategy_id: StrategyId,
        instrument_id: InstrumentId,
        client_order_id: ClientOrderId,
        quantity: Quantity,
        event_id: core.UUID4,
        ts_event: int,
        ts_init: int,
        reconciliation: bool,
        venue_order_id: VenueOrderId | None = None,
        account_id: AccountId | None = None,
        price: Price | None = None,
        trigger_price: Price | None = None,
        protection_price: Price | None = None,
        is_quote_quantity: bool = False,
    ) -> None: ...
    @property
    def causation_id(self) -> core.UUID4 | None: ...
    @staticmethod
    def from_dict(values: dict) -> OrderUpdated: ...
    @property
    def trader_id(self) -> TraderId: ...
    @property
    def strategy_id(self) -> StrategyId: ...
    @property
    def instrument_id(self) -> InstrumentId: ...
    @property
    def client_order_id(self) -> ClientOrderId: ...
    @property
    def venue_order_id(self) -> VenueOrderId | None: ...
    @property
    def account_id(self) -> AccountId | None: ...
    @property
    def quantity(self) -> Quantity: ...
    @property
    def price(self) -> Price | None: ...
    @property
    def trigger_price(self) -> Price | None: ...
    @property
    def protection_price(self) -> Price | None: ...
    @property
    def event_id(self) -> core.UUID4: ...
    @property
    def ts_event(self) -> int: ...
    @property
    def ts_init(self) -> int: ...
    @property
    def is_quote_quantity(self) -> bool: ...
    @property
    def reconciliation(self) -> bool: ...
    def to_dict(self) -> typing.Any: ...

@typing.final
class OwnBookOrder:
    def __init__(
        self,
        trader_id: TraderId,
        client_order_id: ClientOrderId,
        side: OrderSide,
        price: Price,
        size: Quantity,
        order_type: OrderType,
        time_in_force: TimeInForce,
        status: OrderStatus,
        ts_last: int,
        ts_accepted: int,
        ts_submitted: int,
        ts_init: int,
        venue_order_id: VenueOrderId | None = None,
    ) -> None: ...
    def __hash__(self) -> int: ...
    @property
    def client_order_id(self) -> ClientOrderId: ...
    @property
    def side(self) -> OrderSide: ...
    @property
    def price(self) -> Price: ...
    @property
    def size(self) -> Quantity: ...
    @property
    def order_type(self) -> OrderType: ...
    @property
    def time_in_force(self) -> TimeInForce: ...
    @property
    def status(self) -> OrderStatus: ...
    @property
    def ts_last(self) -> int: ...
    @property
    def ts_init(self) -> int: ...
    def exposure(self) -> float: ...
    def signed_size(self) -> float: ...

@typing.final
class OwnOrderBook:
    def __init__(self, instrument_id: InstrumentId) -> None: ...
    @property
    def instrument_id(self) -> InstrumentId: ...
    @property
    def ts_last(self) -> int: ...
    @property
    def update_count(self) -> int: ...
    def reset(self) -> None: ...
    def add(self, order: OwnBookOrder) -> None: ...
    def update(self, order: OwnBookOrder) -> None: ...
    def delete(self, order: OwnBookOrder) -> None: ...
    def clear(self) -> None: ...
    def bid_client_order_ids(self) -> list[ClientOrderId]: ...
    def ask_client_order_ids(self) -> list[ClientOrderId]: ...
    def is_order_in_book(self, client_order_id: ClientOrderId) -> bool: ...
    def orders_to_list(self) -> list[OwnBookOrder]: ...
    def bids_to_list(self) -> list[OwnBookOrder]: ...
    def asks_to_list(self) -> list[OwnBookOrder]: ...
    def bids_to_dict(
        self,
        status: set[OrderStatus] | None = None,
        accepted_buffer_ns: int | None = None,
        ts_now: int | None = None,
    ) -> dict[decimal.Decimal, list[OwnBookOrder]]: ...
    def asks_to_dict(
        self,
        status: set[OrderStatus] | None = None,
        accepted_buffer_ns: int | None = None,
        ts_now: int | None = None,
    ) -> dict[decimal.Decimal, list[OwnBookOrder]]: ...
    def bid_quantity(
        self,
        status: set[OrderStatus] | None = None,
        depth: int | None = None,
        group_size: decimal.Decimal | None = None,
        accepted_buffer_ns: int | None = None,
        ts_now: int | None = None,
    ) -> dict[decimal.Decimal, decimal.Decimal]: ...
    def ask_quantity(
        self,
        status: set[OrderStatus] | None = None,
        depth: int | None = None,
        group_size: decimal.Decimal | None = None,
        accepted_buffer_ns: int | None = None,
        ts_now: int | None = None,
    ) -> dict[decimal.Decimal, decimal.Decimal]: ...
    def combined_with_opposite(self, opposite: OwnOrderBook) -> OwnOrderBook: ...
    def audit_open_orders(self, open_order_ids: set[ClientOrderId]) -> None: ...
    def pprint(self, num_levels: int = 3, group_size: decimal.Decimal | None = None) -> str: ...

@typing.final
class PerpetualContract:
    @property
    def symbol(self) -> Symbol: ...
    @property
    def venue(self) -> Venue: ...
    @property
    def tick_scheme(self) -> str | None: ...
    @property
    def instrument_class(self) -> InstrumentClass: ...
    @property
    def is_quanto(self) -> bool: ...
    @property
    def isin(self) -> str | None: ...
    def next_bid_price(self, value: float, num_ticks: int = ...) -> Price | None: ...
    def next_ask_price(self, value: float, num_ticks: int = ...) -> Price | None: ...
    def next_bid_prices(self, value: float, num_ticks: int = ...) -> list[decimal.Decimal]: ...
    def next_ask_prices(self, value: float, num_ticks: int = ...) -> list[decimal.Decimal]: ...
    def make_price(self, value: float) -> Price: ...
    def make_qty(self, value: float, round_down: bool = ...) -> Quantity: ...
    def notional_value(
        self, quantity: Quantity, price: Price, use_quote_for_inverse: bool = ...
    ) -> Money: ...
    def __init__(
        self,
        instrument_id: InstrumentId,
        raw_symbol: Symbol,
        underlying: str,
        asset_class: AssetClass,
        quote_currency: Currency,
        settlement_currency: Currency,
        is_inverse: bool,
        price_precision: int,
        size_precision: int,
        price_increment: Price,
        size_increment: Quantity,
        ts_event: int,
        ts_init: int,
        base_currency: Currency | None = None,
        multiplier: Quantity | None = None,
        lot_size: Quantity | None = None,
        max_quantity: Quantity | None = None,
        min_quantity: Quantity | None = None,
        max_notional: Money | None = None,
        min_notional: Money | None = None,
        max_price: Price | None = None,
        min_price: Price | None = None,
        margin_init: decimal.Decimal | None = None,
        margin_maint: decimal.Decimal | None = None,
        maker_fee: decimal.Decimal | None = None,
        taker_fee: decimal.Decimal | None = None,
        tick_scheme: str | None = None,
        info: dict | None = None,
    ) -> None: ...
    def __hash__(self) -> int: ...
    @property
    def type_name(self) -> str: ...
    @property
    def id(self) -> InstrumentId: ...
    @property
    def raw_symbol(self) -> Symbol: ...
    @property
    def underlying(self) -> str: ...
    @property
    def asset_class(self) -> AssetClass: ...
    @property
    def base_currency(self) -> Currency | None: ...
    @property
    def quote_currency(self) -> Currency: ...
    @property
    def settlement_currency(self) -> Currency: ...
    @property
    def is_inverse(self) -> bool: ...
    @property
    def price_precision(self) -> int: ...
    @property
    def size_precision(self) -> int: ...
    @property
    def price_increment(self) -> Price: ...
    @property
    def size_increment(self) -> Quantity: ...
    @property
    def multiplier(self) -> Quantity: ...
    @property
    def lot_size(self) -> Quantity: ...
    @property
    def max_quantity(self) -> Quantity | None: ...
    @property
    def min_quantity(self) -> Quantity | None: ...
    @property
    def max_notional(self) -> Money | None: ...
    @property
    def min_notional(self) -> Money | None: ...
    @property
    def max_price(self) -> Price | None: ...
    @property
    def min_price(self) -> Price | None: ...
    @property
    def margin_init(self) -> decimal.Decimal: ...
    @property
    def margin_maint(self) -> decimal.Decimal: ...
    @property
    def maker_fee(self) -> decimal.Decimal: ...
    @property
    def taker_fee(self) -> decimal.Decimal: ...
    @property
    def ts_event(self) -> int: ...
    @property
    def ts_init(self) -> int: ...
    @property
    def info(self) -> dict: ...
    @staticmethod
    def from_dict(values: dict) -> PerpetualContract: ...
    def to_dict(self) -> typing.Any: ...

@typing.final
class Pool:
    def __init__(
        self,
        chain: Chain,
        dex: Dex,
        address: str,
        pool_identifier: str,
        creation_block: int,
        token0: Token,
        token1: Token,
        fee: int | None,
        tick_spacing: int | None,
        ts_init: int,
    ) -> None: ...
    def __hash__(self) -> int: ...
    @property
    def chain(self) -> Chain: ...
    @property
    def dex(self) -> Dex: ...
    @property
    def instrument_id(self) -> InstrumentId: ...
    @property
    def address(self) -> str: ...
    @property
    def creation_block(self) -> int: ...
    @property
    def token0(self) -> Token: ...
    @property
    def token1(self) -> Token: ...
    @property
    def fee(self) -> int | None: ...
    @property
    def tick_spacing(self) -> int | None: ...
    @property
    def ts_event(self) -> int: ...
    @property
    def ts_init(self) -> int: ...

@typing.final
class PoolAnalytics: ...

@typing.final
class PoolFeeCollect:
    def __init__(
        self,
        chain: Chain,
        dex: Dex,
        pool_identifier: str,
        instrument_id: InstrumentId,
        block: int,
        transaction_hash: str,
        transaction_index: int,
        log_index: int,
        owner: str,
        amount0: str,
        amount1: str,
        tick_lower: int,
        tick_upper: int,
        timestamp: int,
    ) -> None: ...
    def __hash__(self) -> int: ...
    @property
    def chain(self) -> Chain: ...
    @property
    def dex(self) -> Dex: ...
    @property
    def instrument_id(self) -> InstrumentId: ...
    @property
    def pool_identifier(self) -> str: ...
    @property
    def block(self) -> int: ...
    @property
    def transaction_hash(self) -> str: ...
    @property
    def transaction_index(self) -> int: ...
    @property
    def log_index(self) -> int: ...
    @property
    def owner(self) -> str: ...
    @property
    def amount0(self) -> str: ...
    @property
    def amount1(self) -> str: ...
    @property
    def tick_lower(self) -> int: ...
    @property
    def tick_upper(self) -> int: ...
    @property
    def timestamp(self) -> int: ...
    @property
    def ts_event(self) -> int: ...
    @property
    def ts_init(self) -> int: ...

@typing.final
class PoolFeeProtocolCollect:
    def __init__(
        self,
        chain: Chain,
        dex: Dex,
        pool_identifier: str,
        instrument_id: InstrumentId,
        block: int,
        transaction_hash: str,
        transaction_index: int,
        log_index: int,
        sender: str,
        recipient: str,
        amount0: str,
        amount1: str,
        timestamp: int,
    ) -> None: ...
    def __hash__(self) -> int: ...
    @property
    def chain(self) -> Chain: ...
    @property
    def dex(self) -> Dex: ...
    @property
    def instrument_id(self) -> InstrumentId: ...
    @property
    def pool_identifier(self) -> str: ...
    @property
    def block(self) -> int: ...
    @property
    def transaction_hash(self) -> str: ...
    @property
    def transaction_index(self) -> int: ...
    @property
    def log_index(self) -> int: ...
    @property
    def sender(self) -> str: ...
    @property
    def recipient(self) -> str: ...
    @property
    def amount0(self) -> str: ...
    @property
    def amount1(self) -> str: ...
    @property
    def timestamp(self) -> int: ...
    @property
    def ts_event(self) -> int: ...
    @property
    def ts_init(self) -> int: ...

@typing.final
class PoolFeeProtocolUpdate:
    def __init__(
        self,
        chain: Chain,
        dex: Dex,
        pool_identifier: str,
        instrument_id: InstrumentId,
        block: int,
        transaction_hash: str,
        transaction_index: int,
        log_index: int,
        fee_protocol0_new: int,
        fee_protocol1_new: int,
        timestamp: int,
    ) -> None: ...
    def __hash__(self) -> int: ...
    @property
    def chain(self) -> Chain: ...
    @property
    def dex(self) -> Dex: ...
    @property
    def instrument_id(self) -> InstrumentId: ...
    @property
    def pool_identifier(self) -> str: ...
    @property
    def block(self) -> int: ...
    @property
    def transaction_hash(self) -> str: ...
    @property
    def transaction_index(self) -> int: ...
    @property
    def log_index(self) -> int: ...
    @property
    def fee_protocol0_new(self) -> int: ...
    @property
    def fee_protocol1_new(self) -> int: ...
    @property
    def timestamp(self) -> int: ...
    @property
    def ts_event(self) -> int: ...
    @property
    def ts_init(self) -> int: ...

@typing.final
class PoolFlash:
    def __init__(
        self,
        chain: Chain,
        dex: Dex,
        pool_identifier: str,
        instrument_id: InstrumentId,
        block: int,
        transaction_hash: str,
        transaction_index: int,
        log_index: int,
        sender: str,
        recipient: str,
        amount0: str,
        amount1: str,
        paid0: str,
        paid1: str,
        timestamp: int,
    ) -> None: ...
    def __hash__(self) -> int: ...
    @property
    def chain(self) -> Chain: ...
    @property
    def dex(self) -> Dex: ...
    @property
    def instrument_id(self) -> InstrumentId: ...
    @property
    def pool_identifier(self) -> str: ...
    @property
    def block(self) -> int: ...
    @property
    def transaction_hash(self) -> str: ...
    @property
    def transaction_index(self) -> int: ...
    @property
    def log_index(self) -> int: ...
    @property
    def sender(self) -> str: ...
    @property
    def recipient(self) -> str: ...
    @property
    def amount0(self) -> str: ...
    @property
    def amount1(self) -> str: ...
    @property
    def paid0(self) -> str: ...
    @property
    def paid1(self) -> str: ...
    @property
    def timestamp(self) -> int: ...
    @property
    def ts_event(self) -> int: ...
    @property
    def ts_init(self) -> int: ...

@typing.final
class PoolLiquidityUpdate:
    def __init__(
        self,
        chain: Chain,
        dex: Dex,
        pool_identifier: str,
        instrument_id: InstrumentId,
        kind: PoolLiquidityUpdateType,
        block: int,
        transaction_hash: str,
        transaction_index: int,
        log_index: int,
        sender: str | None,
        owner: str,
        position_liquidity: str,
        amount0: str,
        amount1: str,
        tick_lower: int,
        tick_upper: int,
        timestamp: int,
    ) -> None: ...
    def __hash__(self) -> int: ...
    @property
    def chain(self) -> Chain: ...
    @property
    def dex(self) -> Dex: ...
    @property
    def instrument_id(self) -> InstrumentId: ...
    @property
    def pool_identifier(self) -> str: ...
    @property
    def kind(self) -> PoolLiquidityUpdateType: ...
    @property
    def block(self) -> int: ...
    @property
    def transaction_hash(self) -> str: ...
    @property
    def transaction_index(self) -> int: ...
    @property
    def log_index(self) -> int: ...
    @property
    def sender(self) -> str | None: ...
    @property
    def owner(self) -> str: ...
    @property
    def position_liquidity(self) -> str: ...
    @property
    def amount0(self) -> str: ...
    @property
    def amount1(self) -> str: ...
    @property
    def tick_lower(self) -> int: ...
    @property
    def tick_upper(self) -> int: ...
    @property
    def timestamp(self) -> int: ...
    @property
    def ts_event(self) -> int: ...
    @property
    def ts_init(self) -> int: ...

@typing.final
class PoolPosition: ...

@typing.final
class PoolProfiler:
    @property
    def pool(self) -> Pool: ...
    @property
    def instrument_id(self) -> InstrumentId: ...
    @property
    def is_initialized(self) -> bool: ...
    @property
    def current_tick(self) -> int: ...
    @property
    def price_sqrt_ratio_x96(self) -> int: ...
    @property
    def total_amount0_deposited(self) -> str: ...
    @property
    def total_amount1_deposited(self) -> str: ...
    @property
    def total_amount0_collected(self) -> str: ...
    @property
    def total_amount1_collected(self) -> str: ...
    @property
    def protocol_fees_token0(self) -> str: ...
    @property
    def protocol_fees_token1(self) -> str: ...
    @property
    def fee_protocol(self) -> int: ...
    @property
    def fee_protocol0_basis_points(self) -> int | None: ...
    @property
    def fee_protocol1_basis_points(self) -> int | None: ...
    def get_active_liquidity(self) -> int: ...
    def get_active_tick_count(self) -> int: ...
    def get_total_tick_count(self) -> int: ...
    def get_total_active_positions(self) -> int: ...
    def get_total_inactive_positions(self) -> int: ...
    def estimate_balance_of_token0(self) -> str: ...
    def estimate_balance_of_token1(self) -> str: ...
    def get_total_liquidity(self) -> str: ...
    def liquidity_utilization_rate(self) -> float: ...
    def swap_exact_in(
        self, amount_in: str, zero_for_one: bool, sqrt_price_limit_x96: str | None = ...
    ) -> SwapQuote: ...
    def swap_exact_out(
        self, amount_out: str, zero_for_one: bool, sqrt_price_limit_x96: str | None = ...
    ) -> SwapQuote: ...
    def size_for_impact_bps(self, impact_bps: int, zero_for_one: bool) -> str: ...
    def size_for_impact_bps_detailed(
        self, impact_bps: int, zero_for_one: bool
    ) -> SizeForImpactResult: ...

@typing.final
class PoolSnapshot: ...

@typing.final
class PoolState: ...

@typing.final
class PoolSwap:
    def __init__(
        self,
        chain: Chain,
        dex: Dex,
        instrument_id: InstrumentId,
        pool_identifier: str,
        block: int,
        transaction_hash: str,
        transaction_index: int,
        log_index: int,
        timestamp: int,
        sender: str,
        receiver: str,
        amount0: str,
        amount1: str,
        sqrt_price_x96: str,
        liquidity: int,
        tick: int,
    ) -> None: ...
    def __hash__(self) -> int: ...
    @property
    def chain(self) -> Chain: ...
    @property
    def dex(self) -> Dex: ...
    @property
    def instrument_id(self) -> InstrumentId: ...
    @property
    def pool_identifier(self) -> str: ...
    @property
    def block(self) -> int: ...
    @property
    def transaction_hash(self) -> str: ...
    @property
    def transaction_index(self) -> int: ...
    @property
    def log_index(self) -> int: ...
    @property
    def sender(self) -> str: ...
    @property
    def recipient(self) -> str: ...
    @property
    def amount0(self) -> str: ...
    @property
    def amount1(self) -> str: ...
    @property
    def sqrt_price_x96(self) -> str: ...
    @property
    def liquidity(self) -> str: ...
    @property
    def tick(self) -> int: ...
    @property
    def timestamp(self) -> int: ...
    @property
    def ts_event(self) -> int: ...
    @property
    def ts_init(self) -> int: ...

@typing.final
class PoolTick: ...

@typing.final
class PortfolioGreeks:
    @property
    def ts_init(self) -> int: ...
    @property
    def ts_event(self) -> int: ...
    @property
    def pnl(self) -> float: ...
    @property
    def price(self) -> float: ...
    @property
    def delta(self) -> float: ...
    @property
    def gamma(self) -> float: ...
    @property
    def vega(self) -> float: ...
    @property
    def theta(self) -> float: ...
    @property
    def rho(self) -> float: ...

@typing.final
class PortfolioSnapshot:
    def __init__(
        self,
        account_id: AccountId,
        account_type: AccountType,
        balances: typing.Sequence[AccountBalance],
        margins: typing.Sequence[MarginBalance],
        unrealized_pnls: typing.Sequence[Money],
        realized_pnls: typing.Sequence[Money],
        total_equity: typing.Sequence[Money],
        event_id: core.UUID4,
        ts_event: int,
        ts_init: int,
        base_currency: Currency | None = None,
        base_currency_equity: Money | None = None,
        is_stale: bool = False,
        stale_instruments: typing.Sequence[InstrumentId] | None = None,
        stale_currencies: typing.Sequence[Currency] | None = None,
        unpriced_instruments: typing.Sequence[InstrumentId] | None = None,
    ) -> None: ...
    @property
    def account_id(self) -> AccountId: ...
    @property
    def account_type(self) -> AccountType: ...
    @property
    def base_currency(self) -> Currency | None: ...
    @property
    def balances(self) -> list[AccountBalance]: ...
    @property
    def margins(self) -> list[MarginBalance]: ...
    @property
    def unrealized_pnls(self) -> list[Money]: ...
    @property
    def realized_pnls(self) -> list[Money]: ...
    @property
    def total_equity(self) -> list[Money]: ...
    @property
    def base_currency_equity(self) -> Money | None: ...
    @property
    def is_stale(self) -> bool: ...
    @property
    def stale_instruments(self) -> list[InstrumentId]: ...
    @property
    def stale_currencies(self) -> list[Currency]: ...
    @property
    def unpriced_instruments(self) -> list[InstrumentId]: ...
    @property
    def event_id(self) -> core.UUID4: ...
    @property
    def ts_event(self) -> int: ...
    @property
    def ts_init(self) -> int: ...

@typing.final
class Position:
    @property
    def trader_id(self) -> TraderId: ...
    @property
    def strategy_id(self) -> StrategyId: ...
    @property
    def instrument_id(self) -> InstrumentId: ...
    @property
    def id(self) -> PositionId: ...
    @property
    def account_id(self) -> AccountId: ...
    @property
    def symbol(self) -> Symbol: ...
    @property
    def venue(self) -> Venue: ...
    @property
    def opening_order_id(self) -> ClientOrderId: ...
    @property
    def closing_order_id(self) -> ClientOrderId | None: ...
    @property
    def entry(self) -> OrderSide: ...
    @property
    def side(self) -> PositionSide: ...
    @property
    def signed_qty(self) -> float: ...
    @property
    def quantity(self) -> Quantity: ...
    @property
    def peak_qty(self) -> Quantity: ...
    @property
    def price_precision(self) -> int: ...
    @property
    def size_precision(self) -> int: ...
    @property
    def multiplier(self) -> Quantity: ...
    @property
    def is_inverse(self) -> bool: ...
    @property
    def instrument_class(self) -> InstrumentClass: ...
    @property
    def is_spot_currency(self) -> bool: ...
    @property
    def base_currency(self) -> Currency | None: ...
    @property
    def quote_currency(self) -> Currency: ...
    @property
    def settlement_currency(self) -> Currency: ...
    @property
    def ts_init(self) -> int: ...
    @property
    def ts_opened(self) -> int: ...
    @property
    def ts_last(self) -> int: ...
    @property
    def ts_closed(self) -> int | None: ...
    @property
    def duration_ns(self) -> int: ...
    @property
    def avg_px_open(self) -> float: ...
    @property
    def avg_px_close(self) -> float | None: ...
    @property
    def realized_return(self) -> float: ...
    @property
    def realized_pnl(self) -> Money | None: ...
    @property
    def last_event(self) -> OrderFilled | None: ...
    @property
    def last_trade_id(self) -> TradeId | None: ...
    @property
    def event_count(self) -> int: ...
    @property
    def is_open(self) -> bool: ...
    @property
    def is_closed(self) -> bool: ...
    @property
    def is_long(self) -> bool: ...
    @property
    def is_short(self) -> bool: ...
    def __new__(cls, instrument: typing.Any, fill: OrderFilled) -> Position: ...
    def events(self) -> list[OrderFilled]: ...
    def adjustments(self) -> list[PositionAdjusted]: ...
    def client_order_ids(self) -> list[ClientOrderId]: ...
    def venue_order_ids(self) -> list[VenueOrderId]: ...
    def trade_ids(self) -> list[TradeId]: ...
    def unrealized_pnl(self, last: Price) -> Money: ...
    def total_pnl(self, last: Price) -> Money: ...
    def commissions(self) -> list[Money]: ...
    def apply(self, fill: OrderFilled) -> None: ...
    def apply_adjustment(self, adjustment: PositionAdjusted) -> None: ...
    def purge_events_for_order(self, client_order_id: ClientOrderId) -> None: ...
    def is_opposite_side(self, side: OrderSide) -> bool: ...
    def calculate_pnl(
        self, avg_px_open: float, avg_px_close: float, quantity: Quantity
    ) -> Money: ...
    def notional_value(self, price: Price) -> Money: ...
    @staticmethod
    def from_dict(values: dict) -> Position: ...
    def to_dict(self) -> typing.Any: ...

@typing.final
class PositionAdjusted:
    def __init__(
        self,
        trader_id: TraderId,
        strategy_id: StrategyId,
        instrument_id: InstrumentId,
        position_id: PositionId,
        account_id: AccountId,
        adjustment_type: PositionAdjustmentType,
        quantity_change: decimal.Decimal | None,
        pnl_change: Money | None,
        reason: str | None,
        event_id: core.UUID4,
        ts_event: int,
        ts_init: int,
    ) -> None: ...
    @property
    def trader_id(self) -> TraderId: ...
    @property
    def strategy_id(self) -> StrategyId: ...
    @property
    def instrument_id(self) -> InstrumentId: ...
    @property
    def position_id(self) -> PositionId: ...
    @property
    def account_id(self) -> AccountId: ...
    @property
    def adjustment_type(self) -> PositionAdjustmentType: ...
    @property
    def quantity_change(self) -> decimal.Decimal | None: ...
    @property
    def pnl_change(self) -> Money | None: ...
    @property
    def reason(self) -> str | None: ...
    @property
    def event_id(self) -> core.UUID4: ...
    @property
    def ts_event(self) -> int: ...
    @property
    def ts_init(self) -> int: ...
    @staticmethod
    def from_dict(values: dict) -> PositionAdjusted: ...
    def to_dict(self) -> typing.Any: ...

@typing.final
class PositionChanged:
    @property
    def trader_id(self) -> TraderId: ...
    @property
    def strategy_id(self) -> StrategyId: ...
    @property
    def instrument_id(self) -> InstrumentId: ...
    @property
    def position_id(self) -> PositionId: ...
    @property
    def account_id(self) -> AccountId: ...
    @property
    def opening_order_id(self) -> ClientOrderId: ...
    @property
    def entry(self) -> OrderSide: ...
    @property
    def side(self) -> PositionSide: ...
    @property
    def signed_qty(self) -> float: ...
    @property
    def quantity(self) -> Quantity: ...
    @property
    def peak_quantity(self) -> Quantity: ...
    @property
    def peak_qty(self) -> Quantity: ...
    @property
    def last_qty(self) -> Quantity: ...
    @property
    def last_px(self) -> Price: ...
    @property
    def currency(self) -> Currency: ...
    @property
    def avg_px_open(self) -> float: ...
    @property
    def avg_px_close(self) -> float | None: ...
    @property
    def realized_return(self) -> float: ...
    @property
    def realized_pnl(self) -> Money | None: ...
    @property
    def unrealized_pnl(self) -> Money: ...
    @property
    def event_id(self) -> core.UUID4: ...
    @property
    def ts_opened(self) -> int: ...
    @property
    def ts_event(self) -> int: ...
    @property
    def ts_init(self) -> int: ...
    @staticmethod
    def create(
        position: Position, fill: OrderFilled, event_id: core.UUID4, ts_init: int
    ) -> PositionChanged: ...

@typing.final
class PositionClosed:
    @property
    def trader_id(self) -> TraderId: ...
    @property
    def strategy_id(self) -> StrategyId: ...
    @property
    def instrument_id(self) -> InstrumentId: ...
    @property
    def position_id(self) -> PositionId: ...
    @property
    def account_id(self) -> AccountId: ...
    @property
    def opening_order_id(self) -> ClientOrderId: ...
    @property
    def closing_order_id(self) -> ClientOrderId | None: ...
    @property
    def entry(self) -> OrderSide: ...
    @property
    def side(self) -> PositionSide: ...
    @property
    def signed_qty(self) -> float: ...
    @property
    def quantity(self) -> Quantity: ...
    @property
    def peak_quantity(self) -> Quantity: ...
    @property
    def peak_qty(self) -> Quantity: ...
    @property
    def last_qty(self) -> Quantity: ...
    @property
    def last_px(self) -> Price: ...
    @property
    def currency(self) -> Currency: ...
    @property
    def avg_px_open(self) -> float: ...
    @property
    def avg_px_close(self) -> float | None: ...
    @property
    def realized_return(self) -> float: ...
    @property
    def realized_pnl(self) -> Money | None: ...
    @property
    def unrealized_pnl(self) -> Money: ...
    @property
    def duration(self) -> int: ...
    @property
    def event_id(self) -> core.UUID4: ...
    @property
    def ts_opened(self) -> int: ...
    @property
    def ts_closed(self) -> int | None: ...
    @property
    def ts_event(self) -> int: ...
    @property
    def ts_init(self) -> int: ...
    @staticmethod
    def create(
        position: Position, fill: OrderFilled, event_id: core.UUID4, ts_init: int
    ) -> PositionClosed: ...

@typing.final
class PositionId:
    def __init__(self, value: str) -> None: ...
    def __setstate__(self, state: typing.Any) -> None: ...
    def __getstate__(self) -> typing.Any: ...
    def __reduce__(self) -> typing.Any: ...
    def __hash__(self) -> int: ...
    @property
    def value(self) -> str: ...
    @staticmethod
    def from_str(value: str) -> PositionId: ...

@typing.final
class PositionOpened:
    @staticmethod
    def create(
        position: Position, fill: OrderFilled, event_id: core.UUID4, ts_init: int
    ) -> PositionOpened: ...
    @property
    def trader_id(self) -> TraderId: ...
    @property
    def strategy_id(self) -> StrategyId: ...
    @property
    def instrument_id(self) -> InstrumentId: ...
    @property
    def position_id(self) -> PositionId: ...
    @property
    def account_id(self) -> AccountId: ...
    @property
    def opening_order_id(self) -> ClientOrderId: ...
    @property
    def entry(self) -> OrderSide: ...
    @property
    def side(self) -> PositionSide: ...
    @property
    def signed_qty(self) -> float: ...
    @property
    def quantity(self) -> Quantity: ...
    @property
    def last_qty(self) -> Quantity: ...
    @property
    def last_px(self) -> Price: ...
    @property
    def currency(self) -> Currency: ...
    @property
    def avg_px_open(self) -> float: ...
    @property
    def realized_pnl(self) -> Money | None: ...
    @property
    def event_id(self) -> core.UUID4: ...
    @property
    def ts_event(self) -> int: ...
    @property
    def ts_init(self) -> int: ...

@typing.final
class PositionSnapshot:
    @staticmethod
    def from_dict(values: dict) -> PositionSnapshot: ...

@typing.final
class PositionStatusReport:
    def __init__(
        self,
        account_id: AccountId,
        instrument_id: InstrumentId,
        position_side: PositionSide,
        quantity: Quantity,
        ts_last: int,
        ts_init: int,
        report_id: core.UUID4 | None = None,
        venue_position_id: PositionId | None = None,
        avg_px_open: decimal.Decimal | None = None,
    ) -> None: ...
    @property
    def account_id(self) -> AccountId: ...
    @property
    def instrument_id(self) -> InstrumentId: ...
    @property
    def strategy_id(self) -> InstrumentId: ...
    @property
    def venue_position_id(self) -> PositionId | None: ...
    @property
    def position_side(self) -> PositionSide: ...
    @property
    def quantity(self) -> Quantity: ...
    @property
    def avg_px_open(self) -> decimal.Decimal | None: ...
    @property
    def report_id(self) -> core.UUID4: ...
    @property
    def ts_last(self) -> int: ...
    @property
    def ts_init(self) -> int: ...
    @property
    def is_flat(self) -> bool: ...
    @property
    def is_long(self) -> bool: ...
    @property
    def is_short(self) -> bool: ...
    @staticmethod
    def from_dict(values: dict) -> PositionStatusReport: ...
    def to_dict(self) -> typing.Any: ...

@typing.final
class Price:
    def __init__(self, value: float, precision: int) -> None: ...
    def __reduce__(self) -> typing.Any: ...
    def __hash__(self) -> int: ...
    def __add__(self, other: typing.Any) -> typing.Any: ...
    def __radd__(self, other: typing.Any) -> typing.Any: ...
    def __sub__(self, other: typing.Any) -> typing.Any: ...
    def __rsub__(self, other: typing.Any) -> typing.Any: ...
    def __mul__(self, other: typing.Any) -> typing.Any: ...
    def __rmul__(self, other: typing.Any) -> typing.Any: ...
    def __truediv__(self, other: typing.Any) -> typing.Any: ...
    def __rtruediv__(self, other: typing.Any) -> typing.Any: ...
    def __floordiv__(self, other: typing.Any) -> typing.Any: ...
    def __rfloordiv__(self, other: typing.Any) -> typing.Any: ...
    def __mod__(self, other: typing.Any) -> typing.Any: ...
    def __rmod__(self, other: typing.Any) -> typing.Any: ...
    def __neg__(self) -> Price: ...
    def __pos__(self) -> Price: ...
    def __abs__(self) -> Price: ...
    def __int__(self) -> int: ...
    def __float__(self) -> float: ...
    def __round__(self, ndigits: int | None = None) -> decimal.Decimal: ...
    @property
    def raw(self) -> int: ...
    @property
    def precision(self) -> int: ...
    @staticmethod
    def from_raw(raw: int, precision: int) -> Price: ...
    @staticmethod
    def zero(precision: int = 0) -> Price: ...
    @staticmethod
    def from_int(value: int) -> Price: ...
    @staticmethod
    def from_str(value: str) -> Price: ...
    @staticmethod
    def from_decimal(decimal: decimal.Decimal) -> Price: ...
    @staticmethod
    def from_decimal_dp(decimal: decimal.Decimal, precision: int) -> Price: ...
    @staticmethod
    def from_mantissa_exponent(mantissa: int, exponent: int, precision: int) -> Price: ...
    def is_zero(self) -> bool: ...
    def is_positive(self) -> bool: ...
    def as_decimal(self) -> decimal.Decimal: ...
    def to_formatted_str(self) -> str: ...
    def checked_add(self, other: Price) -> Price | None: ...
    def checked_sub(self, other: Price) -> Price | None: ...
    def as_double(self) -> float: ...

@typing.final
class StrikeRange:
    @staticmethod
    def fixed(strikes: typing.Sequence[Price]) -> StrikeRange: ...
    @staticmethod
    def atm_relative(strikes_above: int, strikes_below: int) -> StrikeRange: ...
    @staticmethod
    def atm_percent(pct: float) -> StrikeRange: ...
    @staticmethod
    def delta(target: float, tolerance: float) -> StrikeRange: ...
    @property
    def kind(self) -> str: ...

@typing.final
class Quantity:
    def __init__(self, value: float, precision: int) -> None: ...
    def __reduce__(self) -> typing.Any: ...
    def __hash__(self) -> int: ...
    def __add__(self, other: typing.Any) -> typing.Any: ...
    def __radd__(self, other: typing.Any) -> typing.Any: ...
    def __sub__(self, other: typing.Any) -> typing.Any: ...
    def __rsub__(self, other: typing.Any) -> typing.Any: ...
    def __mul__(self, other: typing.Any) -> typing.Any: ...
    def __rmul__(self, other: typing.Any) -> typing.Any: ...
    def __truediv__(self, other: typing.Any) -> typing.Any: ...
    def __rtruediv__(self, other: typing.Any) -> typing.Any: ...
    def __floordiv__(self, other: typing.Any) -> typing.Any: ...
    def __rfloordiv__(self, other: typing.Any) -> typing.Any: ...
    def __mod__(self, other: typing.Any) -> typing.Any: ...
    def __rmod__(self, other: typing.Any) -> typing.Any: ...
    def __neg__(self) -> decimal.Decimal: ...
    def __pos__(self) -> Quantity: ...
    def __abs__(self) -> Quantity: ...
    def __int__(self) -> int: ...
    def __float__(self) -> float: ...
    def __round__(self, ndigits: int | None = None) -> decimal.Decimal: ...
    @property
    def raw(self) -> int: ...
    @property
    def precision(self) -> int: ...
    @staticmethod
    def from_raw(raw: int, precision: int) -> Quantity: ...
    @staticmethod
    def zero(precision: int = 0) -> Quantity: ...
    @staticmethod
    def from_int(value: int) -> Quantity: ...
    @staticmethod
    def from_str(value: str) -> Quantity: ...
    @staticmethod
    def from_decimal(decimal: decimal.Decimal) -> Quantity: ...
    @staticmethod
    def from_decimal_dp(decimal: decimal.Decimal, precision: int) -> Quantity: ...
    @staticmethod
    def from_mantissa_exponent(mantissa: int, exponent: int, precision: int) -> Quantity: ...
    def is_zero(self) -> bool: ...
    def is_positive(self) -> bool: ...
    def as_decimal(self) -> decimal.Decimal: ...
    def as_double(self) -> float: ...
    def to_formatted_str(self) -> str: ...
    def saturating_sub(self, other: Quantity) -> Quantity: ...
    def checked_add(self, other: Quantity) -> Quantity | None: ...
    def checked_sub(self, other: Quantity) -> Quantity | None: ...

@typing.final
class QuoteTick:
    def __init__(
        self,
        instrument_id: InstrumentId,
        bid_price: Price,
        ask_price: Price,
        bid_size: Quantity,
        ask_size: Quantity,
        ts_event: int,
        ts_init: int,
    ) -> None: ...
    def __setstate__(self, state: typing.Any) -> None: ...
    def __getstate__(self) -> typing.Any: ...
    def __reduce__(self) -> typing.Any: ...
    def __hash__(self) -> int: ...
    @property
    def instrument_id(self) -> InstrumentId: ...
    @property
    def bid_price(self) -> Price: ...
    @property
    def ask_price(self) -> Price: ...
    @property
    def bid_size(self) -> Quantity: ...
    @property
    def ask_size(self) -> Quantity: ...
    @property
    def ts_event(self) -> int: ...
    @property
    def ts_init(self) -> int: ...
    @staticmethod
    def fully_qualified_name() -> str: ...
    @staticmethod
    def get_metadata(
        instrument_id: InstrumentId, price_precision: int, size_precision: int
    ) -> dict[str, str]: ...
    @staticmethod
    def get_fields() -> dict: ...
    @staticmethod
    def from_raw(
        instrument_id: InstrumentId,
        bid_price_raw: int,
        ask_price_raw: int,
        bid_price_prec: int,
        ask_price_prec: int,
        bid_size_raw: int,
        ask_size_raw: int,
        bid_size_prec: int,
        ask_size_prec: int,
        ts_event: int,
        ts_init: int,
    ) -> QuoteTick: ...
    @staticmethod
    def from_dict(values: dict) -> QuoteTick: ...
    def extract_price(self, price_type: PriceType) -> Price: ...
    def extract_size(self, price_type: PriceType) -> Quantity: ...
    def to_dict(self) -> dict: ...
    def to_json_bytes(self) -> typing.Any: ...
    def to_msgpack_bytes(self) -> typing.Any: ...
    @staticmethod
    def from_json(data: typing.Any) -> QuoteTick: ...
    @staticmethod
    def from_msgpack(data: typing.Any) -> QuoteTick: ...

@typing.final
class SizeForImpactResult:
    @property
    def target_impact_bps(self) -> int: ...
    @property
    def size(self) -> str: ...
    @property
    def actual_impact_bps(self) -> int: ...
    @property
    def zero_for_one(self) -> bool: ...
    @property
    def iterations(self) -> int: ...
    @property
    def converged(self) -> bool: ...
    @property
    def expansion_count(self) -> int: ...
    @property
    def initial_high(self) -> str: ...
    @property
    def final_low(self) -> str: ...
    @property
    def final_high(self) -> str: ...
    def within_tolerance(self, tolerance_bps: int) -> bool: ...
    def accuracy_percent(self) -> float: ...

@typing.final
class StandardMarginModel:
    def __init__(self) -> None: ...

@typing.final
class StopLimitOrder:
    @property
    def avg_px(self) -> decimal.Decimal | None: ...
    @property
    def event_count(self) -> int: ...
    @property
    def is_buy(self) -> bool: ...
    @property
    def is_canceled(self) -> bool: ...
    @property
    def is_inflight(self) -> bool: ...
    @property
    def is_pending_cancel(self) -> bool: ...
    @property
    def is_pending_update(self) -> bool: ...
    @property
    def is_sell(self) -> bool: ...
    @property
    def last_event(self) -> typing.Any: ...
    @property
    def leaves_qty(self) -> Quantity: ...
    @property
    def overfill_qty(self) -> Quantity: ...
    @property
    def slippage(self) -> decimal.Decimal | None: ...
    @property
    def trade_ids(self) -> list[TradeId]: ...
    @property
    def ts_accepted(self) -> int | None: ...
    @property
    def ts_closed(self) -> int | None: ...
    @property
    def ts_submitted(self) -> int | None: ...
    @property
    def venue_order_ids(self) -> list[VenueOrderId]: ...
    @property
    def filled_qty(self) -> Quantity: ...
    @property
    def is_active_local(self) -> bool: ...
    @property
    def is_emulated(self) -> bool: ...
    @property
    def is_primary(self) -> bool: ...
    @property
    def is_spawned(self) -> bool: ...
    @property
    def last_trade_id(self) -> TradeId | None: ...
    @property
    def liquidity_side(self) -> LiquiditySide | None: ...
    @property
    def position_id(self) -> PositionId | None: ...
    @property
    def ts_last(self) -> int: ...
    @property
    def venue_order_id(self) -> VenueOrderId | None: ...
    @property
    def account_id(self) -> AccountId | None: ...
    @property
    def is_triggered(self) -> bool: ...
    @property
    def ts_triggered(self) -> int | None: ...
    def __init__(
        self,
        trader_id: TraderId,
        strategy_id: StrategyId,
        instrument_id: InstrumentId,
        client_order_id: ClientOrderId,
        order_side: OrderSide,
        quantity: Quantity,
        price: Price,
        trigger_price: Price,
        trigger_type: TriggerType,
        time_in_force: TimeInForce,
        post_only: bool,
        reduce_only: bool,
        quote_quantity: bool,
        init_id: core.UUID4,
        ts_init: int,
        expire_time: int | None = None,
        display_qty: Quantity | None = None,
        emulation_trigger: TriggerType | None = None,
        trigger_instrument_id: InstrumentId | None = None,
        contingency_type: ContingencyType | None = None,
        order_list_id: OrderListId | None = None,
        linked_order_ids: typing.Sequence[ClientOrderId] | None = None,
        parent_order_id: ClientOrderId | None = None,
        exec_algorithm_id: ExecAlgorithmId | None = None,
        exec_algorithm_params: typing.Mapping[str, str] | None = None,
        exec_spawn_id: ClientOrderId | None = None,
        tags: typing.Sequence[str] | None = None,
    ) -> None: ...
    @staticmethod
    def create(init: OrderInitialized) -> StopLimitOrder: ...
    @staticmethod
    def opposite_side(side: OrderSide) -> OrderSide: ...
    @staticmethod
    def closing_side(side: PositionSide) -> OrderSide | None: ...
    @property
    def status(self) -> OrderStatus: ...
    @property
    def trader_id(self) -> TraderId: ...
    @property
    def strategy_id(self) -> StrategyId: ...
    @property
    def instrument_id(self) -> InstrumentId: ...
    @property
    def client_order_id(self) -> ClientOrderId: ...
    @property
    def side(self) -> OrderSide: ...
    @property
    def quantity(self) -> Quantity: ...
    @property
    def price(self) -> Price: ...
    @property
    def trigger_price(self) -> Price: ...
    @property
    def trigger_type(self) -> TriggerType: ...
    @property
    def order_type(self) -> OrderType: ...
    @property
    def time_in_force(self) -> TimeInForce: ...
    @property
    def expire_time(self) -> int | None: ...
    @property
    def init_id(self) -> core.UUID4: ...
    @property
    def ts_init(self) -> int: ...
    @property
    def init_event(self) -> typing.Any: ...
    @property
    def has_price(self) -> bool: ...
    @property
    def is_passive(self) -> bool: ...
    @property
    def is_aggressive(self) -> bool: ...
    @property
    def is_closed(self) -> bool: ...
    @property
    def is_open(self) -> bool: ...
    @property
    def has_trigger_price(self) -> bool: ...
    @property
    def is_post_only(self) -> bool: ...
    @property
    def is_reduce_only(self) -> bool: ...
    @property
    def is_quote_quantity(self) -> bool: ...
    @property
    def display_qty(self) -> Quantity | None: ...
    @property
    def emulation_trigger(self) -> TriggerType | None: ...
    @property
    def trigger_instrument_id(self) -> InstrumentId | None: ...
    @property
    def contingency_type(self) -> ContingencyType | None: ...
    @property
    def order_list_id(self) -> OrderListId | None: ...
    @property
    def linked_order_ids(self) -> list[ClientOrderId] | None: ...
    @property
    def parent_order_id(self) -> ClientOrderId | None: ...
    @property
    def exec_algorithm_id(self) -> ExecAlgorithmId | None: ...
    @property
    def exec_algorithm_params(self) -> dict[str, str] | None: ...
    @property
    def exec_spawn_id(self) -> ClientOrderId | None: ...
    @property
    def tags(self) -> list[str] | None: ...
    def events(self) -> list[typing.Any]: ...
    def signed_decimal_qty(self) -> decimal.Decimal: ...
    def would_reduce_only(self, side: PositionSide, position_qty: Quantity) -> bool: ...
    def apply(self, event: typing.Any) -> None: ...
    @staticmethod
    def from_dict(values: dict) -> StopLimitOrder: ...
    def to_dict(self) -> typing.Any: ...

@typing.final
class StopMarketOrder:
    @property
    def avg_px(self) -> decimal.Decimal | None: ...
    @property
    def event_count(self) -> int: ...
    @property
    def is_buy(self) -> bool: ...
    @property
    def is_canceled(self) -> bool: ...
    @property
    def is_inflight(self) -> bool: ...
    @property
    def is_pending_cancel(self) -> bool: ...
    @property
    def is_pending_update(self) -> bool: ...
    @property
    def is_sell(self) -> bool: ...
    @property
    def last_event(self) -> typing.Any: ...
    @property
    def leaves_qty(self) -> Quantity: ...
    @property
    def overfill_qty(self) -> Quantity: ...
    @property
    def slippage(self) -> decimal.Decimal | None: ...
    @property
    def trade_ids(self) -> list[TradeId]: ...
    @property
    def ts_accepted(self) -> int | None: ...
    @property
    def ts_closed(self) -> int | None: ...
    @property
    def ts_submitted(self) -> int | None: ...
    @property
    def venue_order_ids(self) -> list[VenueOrderId]: ...
    @property
    def filled_qty(self) -> Quantity: ...
    @property
    def is_active_local(self) -> bool: ...
    @property
    def is_emulated(self) -> bool: ...
    @property
    def is_primary(self) -> bool: ...
    @property
    def is_spawned(self) -> bool: ...
    @property
    def last_trade_id(self) -> TradeId | None: ...
    @property
    def liquidity_side(self) -> LiquiditySide | None: ...
    @property
    def position_id(self) -> PositionId | None: ...
    @property
    def ts_last(self) -> int: ...
    @property
    def venue_order_id(self) -> VenueOrderId | None: ...
    @property
    def is_triggered(self) -> bool: ...
    @property
    def ts_triggered(self) -> int | None: ...
    def __init__(
        self,
        trader_id: TraderId,
        strategy_id: StrategyId,
        instrument_id: InstrumentId,
        client_order_id: ClientOrderId,
        order_side: OrderSide,
        quantity: Quantity,
        trigger_price: Price,
        trigger_type: TriggerType,
        time_in_force: TimeInForce,
        reduce_only: bool,
        quote_quantity: bool,
        init_id: core.UUID4,
        ts_init: int,
        expire_time: int | None = None,
        display_qty: Quantity | None = None,
        emulation_trigger: TriggerType | None = None,
        trigger_instrument_id: InstrumentId | None = None,
        contingency_type: ContingencyType | None = None,
        order_list_id: OrderListId | None = None,
        linked_order_ids: typing.Sequence[ClientOrderId] | None = None,
        parent_order_id: ClientOrderId | None = None,
        exec_algorithm_id: ExecAlgorithmId | None = None,
        exec_algorithm_params: typing.Mapping[str, str] | None = None,
        exec_spawn_id: ClientOrderId | None = None,
        tags: typing.Sequence[str] | None = None,
    ) -> None: ...
    @staticmethod
    def create(init: OrderInitialized) -> StopMarketOrder: ...
    @staticmethod
    def opposite_side(side: OrderSide) -> OrderSide: ...
    @staticmethod
    def closing_side(side: PositionSide) -> OrderSide | None: ...
    @property
    def status(self) -> OrderStatus: ...
    @property
    def trader_id(self) -> TraderId: ...
    @property
    def strategy_id(self) -> StrategyId: ...
    @property
    def instrument_id(self) -> InstrumentId: ...
    @property
    def client_order_id(self) -> ClientOrderId: ...
    @property
    def side(self) -> OrderSide: ...
    @property
    def quantity(self) -> Quantity: ...
    @property
    def trigger_price(self) -> Price: ...
    @property
    def trigger_type(self) -> TriggerType: ...
    @property
    def order_type(self) -> OrderType: ...
    @property
    def time_in_force(self) -> TimeInForce: ...
    @property
    def expire_time(self) -> int | None: ...
    @property
    def init_id(self) -> core.UUID4: ...
    @property
    def ts_init(self) -> int: ...
    @property
    def init_event(self) -> typing.Any: ...
    @property
    def has_price(self) -> bool: ...
    @property
    def has_trigger_price(self) -> bool: ...
    @property
    def is_passive(self) -> bool: ...
    @property
    def is_aggressive(self) -> bool: ...
    @property
    def is_closed(self) -> bool: ...
    @property
    def is_open(self) -> bool: ...
    @property
    def is_reduce_only(self) -> bool: ...
    @property
    def is_quote_quantity(self) -> bool: ...
    @property
    def display_qty(self) -> Quantity | None: ...
    @property
    def emulation_trigger(self) -> TriggerType | None: ...
    @property
    def trigger_instrument_id(self) -> InstrumentId | None: ...
    @property
    def contingency_type(self) -> ContingencyType | None: ...
    @property
    def order_list_id(self) -> OrderListId | None: ...
    @property
    def linked_order_ids(self) -> list[ClientOrderId] | None: ...
    @property
    def parent_order_id(self) -> ClientOrderId | None: ...
    @property
    def exec_algorithm_id(self) -> ExecAlgorithmId | None: ...
    @property
    def exec_algorithm_params(self) -> dict[str, str] | None: ...
    @property
    def exec_spawn_id(self) -> ClientOrderId | None: ...
    @property
    def tags(self) -> list[str] | None: ...
    @property
    def account_id(self) -> AccountId | None: ...
    def commission(self, currency: Currency) -> Money | None: ...
    def commissions(self) -> dict[Currency, Money]: ...
    def events(self) -> list[typing.Any]: ...
    def signed_decimal_qty(self) -> decimal.Decimal: ...
    def would_reduce_only(self, side: PositionSide, position_qty: Quantity) -> bool: ...
    def apply(self, event: typing.Any) -> None: ...
    @staticmethod
    def from_dict(values: dict) -> StopMarketOrder: ...
    def to_dict(self) -> typing.Any: ...

@typing.final
class StrategyId:
    def __init__(self, value: str) -> None: ...
    def __setstate__(self, state: typing.Any) -> None: ...
    def __getstate__(self) -> typing.Any: ...
    def __reduce__(self) -> typing.Any: ...
    def __hash__(self) -> int: ...
    @property
    def value(self) -> str: ...
    @staticmethod
    def from_str(value: str) -> StrategyId: ...

@typing.final
class SwapQuote:
    @property
    def amount0(self) -> str: ...
    @property
    def amount1(self) -> str: ...
    @property
    def sqrt_price_before_x96(self) -> str: ...
    @property
    def sqrt_price_after_x96(self) -> str: ...
    @property
    def tick_before(self) -> int: ...
    @property
    def tick_after(self) -> int: ...
    @property
    def liquidity_after(self) -> int: ...
    @property
    def fee_growth_global_after(self) -> str: ...
    @property
    def lp_fee(self) -> str: ...
    @property
    def protocol_fee(self) -> str: ...
    @property
    def crossed_ticks_count(self) -> int: ...
    def zero_for_one(self) -> bool: ...
    def total_fee(self) -> str: ...
    def total_crossed_ticks(self) -> int: ...
    def get_output_amount(self) -> str: ...

@typing.final
class Symbol:
    def __init__(self, value: str) -> None: ...
    def __setstate__(self, state: typing.Any) -> None: ...
    def __getstate__(self) -> typing.Any: ...
    def __reduce__(self) -> typing.Any: ...
    def __hash__(self) -> int: ...
    @staticmethod
    def from_str(value: str) -> Symbol: ...
    @property
    def value(self) -> str: ...
    @property
    def is_composite(self) -> bool: ...
    @property
    def root(self) -> str: ...
    @property
    def topic(self) -> str: ...

@typing.final
class SyntheticInstrument:
    def __init__(
        self,
        symbol: Symbol,
        price_precision: int,
        components: typing.Sequence[InstrumentId],
        formula: str,
        ts_event: int,
        ts_init: int,
    ) -> None: ...
    @property
    def id(self) -> InstrumentId: ...
    @property
    def symbol(self) -> Symbol: ...
    @property
    def venue(self) -> Venue: ...
    @property
    def price_precision(self) -> int: ...
    @property
    def price_increment(self) -> Price: ...
    @property
    def components(self) -> list[InstrumentId]: ...
    @property
    def formula(self) -> str: ...
    @property
    def ts_event(self) -> int: ...
    @property
    def ts_init(self) -> int: ...
    def is_valid_formula(self, formula: str) -> bool: ...
    def change_formula(self, formula: str) -> None: ...
    def calculate(self, inputs: typing.Sequence[float]) -> Price: ...
    def calculate_from_map(self, inputs: dict) -> Price: ...

@typing.final
class Token:
    def __init__(
        self, chain: Chain, address: str, name: str, symbol: str, decimals: int
    ) -> None: ...
    def __hash__(self) -> int: ...
    @property
    def chain(self) -> Chain: ...
    @property
    def address(self) -> str: ...
    @property
    def name(self) -> str: ...
    @property
    def symbol(self) -> str: ...
    @property
    def decimals(self) -> int: ...

@typing.final
class TokenizedAsset:
    @property
    def symbol(self) -> Symbol: ...
    @property
    def venue(self) -> Venue: ...
    @property
    def tick_scheme(self) -> str | None: ...
    @property
    def instrument_class(self) -> InstrumentClass: ...
    @property
    def is_inverse(self) -> bool: ...
    @property
    def is_quanto(self) -> bool: ...
    def next_bid_price(self, value: float, num_ticks: int = ...) -> Price | None: ...
    def next_ask_price(self, value: float, num_ticks: int = ...) -> Price | None: ...
    def next_bid_prices(self, value: float, num_ticks: int = ...) -> list[decimal.Decimal]: ...
    def next_ask_prices(self, value: float, num_ticks: int = ...) -> list[decimal.Decimal]: ...
    def make_price(self, value: float) -> Price: ...
    def make_qty(self, value: float, round_down: bool = ...) -> Quantity: ...
    def notional_value(
        self, quantity: Quantity, price: Price, use_quote_for_inverse: bool = ...
    ) -> Money: ...
    def __init__(
        self,
        instrument_id: InstrumentId,
        raw_symbol: Symbol,
        asset_class: AssetClass,
        base_currency: Currency,
        quote_currency: Currency,
        price_precision: int,
        size_precision: int,
        price_increment: Price,
        size_increment: Quantity,
        ts_event: int,
        ts_init: int,
        isin: str | None = None,
        multiplier: Quantity | None = None,
        lot_size: Quantity | None = None,
        max_quantity: Quantity | None = None,
        min_quantity: Quantity | None = None,
        max_notional: Money | None = None,
        min_notional: Money | None = None,
        max_price: Price | None = None,
        min_price: Price | None = None,
        margin_init: decimal.Decimal | None = None,
        margin_maint: decimal.Decimal | None = None,
        maker_fee: decimal.Decimal | None = None,
        taker_fee: decimal.Decimal | None = None,
        tick_scheme: str | None = None,
        info: dict | None = None,
    ) -> None: ...
    def __hash__(self) -> int: ...
    @property
    def type_name(self) -> str: ...
    @property
    def id(self) -> InstrumentId: ...
    @property
    def raw_symbol(self) -> Symbol: ...
    @property
    def asset_class(self) -> AssetClass: ...
    @property
    def base_currency(self) -> Currency: ...
    @property
    def quote_currency(self) -> Currency: ...
    @property
    def isin(self) -> str | None: ...
    @property
    def price_precision(self) -> int: ...
    @property
    def size_precision(self) -> int: ...
    @property
    def price_increment(self) -> Price: ...
    @property
    def size_increment(self) -> Quantity: ...
    @property
    def multiplier(self) -> Quantity: ...
    @property
    def lot_size(self) -> Quantity | None: ...
    @property
    def max_quantity(self) -> Quantity | None: ...
    @property
    def min_quantity(self) -> Quantity | None: ...
    @property
    def max_notional(self) -> Money | None: ...
    @property
    def min_notional(self) -> Money | None: ...
    @property
    def max_price(self) -> Price | None: ...
    @property
    def min_price(self) -> Price | None: ...
    @property
    def maker_fee(self) -> decimal.Decimal: ...
    @property
    def taker_fee(self) -> decimal.Decimal: ...
    @property
    def margin_maint(self) -> decimal.Decimal: ...
    @property
    def margin_init(self) -> decimal.Decimal: ...
    @property
    def ts_event(self) -> int: ...
    @property
    def ts_init(self) -> int: ...
    @property
    def info(self) -> dict: ...
    @staticmethod
    def from_dict(values: dict) -> TokenizedAsset: ...
    def to_dict(self) -> typing.Any: ...

@typing.final
class TradeId:
    def __init__(self, value: str) -> None: ...
    def __setstate__(self, state: typing.Any) -> None: ...
    def __getstate__(self) -> typing.Any: ...
    def __reduce__(self) -> typing.Any: ...
    def __hash__(self) -> int: ...
    @property
    def value(self) -> str: ...
    @staticmethod
    def from_str(value: str) -> TradeId: ...

@typing.final
class TradeTick:
    def __init__(
        self,
        instrument_id: InstrumentId,
        price: Price,
        size: Quantity,
        aggressor_side: AggressorSide,
        trade_id: TradeId,
        ts_event: int,
        ts_init: int,
    ) -> None: ...
    def __setstate__(self, state: typing.Any) -> None: ...
    def __getstate__(self) -> typing.Any: ...
    def __reduce__(self) -> typing.Any: ...
    def __hash__(self) -> int: ...
    @property
    def instrument_id(self) -> InstrumentId: ...
    @property
    def price(self) -> Price: ...
    @property
    def size(self) -> Quantity: ...
    @property
    def aggressor_side(self) -> AggressorSide: ...
    @property
    def trade_id(self) -> TradeId: ...
    @property
    def ts_event(self) -> int: ...
    @property
    def ts_init(self) -> int: ...
    @staticmethod
    def fully_qualified_name() -> str: ...
    @staticmethod
    def get_metadata(
        instrument_id: InstrumentId, price_precision: int, size_precision: int
    ) -> dict[str, str]: ...
    @staticmethod
    def get_fields() -> dict: ...
    @staticmethod
    def from_raw(
        instrument_id: InstrumentId,
        price_raw: int,
        price_prec: int,
        size_raw: int,
        size_prec: int,
        aggressor_side: AggressorSide,
        trade_id: TradeId,
        ts_event: int,
        ts_init: int,
    ) -> TradeTick: ...
    @staticmethod
    def from_dict(values: dict) -> TradeTick: ...
    def to_dict(self) -> dict: ...
    def to_json_bytes(self) -> typing.Any: ...
    def to_msgpack_bytes(self) -> typing.Any: ...
    @staticmethod
    def from_json(data: typing.Any) -> TradeTick: ...
    @staticmethod
    def from_msgpack(data: typing.Any) -> TradeTick: ...

@typing.final
class TraderId:
    def __init__(self, value: str) -> None: ...
    def __setstate__(self, state: typing.Any) -> None: ...
    def __getstate__(self) -> typing.Any: ...
    def __reduce__(self) -> typing.Any: ...
    def __hash__(self) -> int: ...
    @property
    def value(self) -> str: ...
    @staticmethod
    def from_str(value: str) -> TraderId: ...

@typing.final
class TrailingStopLimitOrder:
    @property
    def avg_px(self) -> decimal.Decimal | None: ...
    @property
    def event_count(self) -> int: ...
    @property
    def is_buy(self) -> bool: ...
    @property
    def is_canceled(self) -> bool: ...
    @property
    def is_inflight(self) -> bool: ...
    @property
    def is_pending_cancel(self) -> bool: ...
    @property
    def is_pending_update(self) -> bool: ...
    @property
    def is_sell(self) -> bool: ...
    @property
    def last_event(self) -> typing.Any: ...
    @property
    def leaves_qty(self) -> Quantity: ...
    @property
    def overfill_qty(self) -> Quantity: ...
    @property
    def slippage(self) -> decimal.Decimal | None: ...
    @property
    def trade_ids(self) -> list[TradeId]: ...
    @property
    def ts_accepted(self) -> int | None: ...
    @property
    def ts_closed(self) -> int | None: ...
    @property
    def ts_submitted(self) -> int | None: ...
    @property
    def venue_order_ids(self) -> list[VenueOrderId]: ...
    @property
    def filled_qty(self) -> Quantity: ...
    @property
    def is_active_local(self) -> bool: ...
    @property
    def is_emulated(self) -> bool: ...
    @property
    def is_primary(self) -> bool: ...
    @property
    def is_spawned(self) -> bool: ...
    @property
    def last_trade_id(self) -> TradeId | None: ...
    @property
    def liquidity_side(self) -> LiquiditySide | None: ...
    @property
    def position_id(self) -> PositionId | None: ...
    @property
    def ts_last(self) -> int: ...
    @property
    def venue_order_id(self) -> VenueOrderId | None: ...
    @property
    def is_triggered(self) -> bool: ...
    @property
    def ts_triggered(self) -> int | None: ...
    @property
    def is_activated(self) -> bool: ...
    def __init__(
        self,
        trader_id: TraderId,
        strategy_id: StrategyId,
        instrument_id: InstrumentId,
        client_order_id: ClientOrderId,
        order_side: OrderSide,
        quantity: Quantity,
        price: Price | None,
        trigger_price: Price | None,
        trigger_type: TriggerType,
        limit_offset: decimal.Decimal,
        trailing_offset: decimal.Decimal,
        trailing_offset_type: TrailingOffsetType,
        time_in_force: TimeInForce,
        post_only: bool,
        reduce_only: bool,
        quote_quantity: bool,
        init_id: core.UUID4,
        ts_init: int,
        activation_price: Price | None = None,
        expire_time: int | None = None,
        display_qty: Quantity | None = None,
        emulation_trigger: TriggerType | None = None,
        trigger_instrument_id: InstrumentId | None = None,
        contingency_type: ContingencyType | None = None,
        order_list_id: OrderListId | None = None,
        linked_order_ids: typing.Sequence[ClientOrderId] | None = None,
        parent_order_id: ClientOrderId | None = None,
        exec_algorithm_id: ExecAlgorithmId | None = None,
        exec_algorithm_params: typing.Mapping[str, str] | None = None,
        exec_spawn_id: ClientOrderId | None = None,
        tags: typing.Sequence[str] | None = None,
    ) -> None: ...
    @staticmethod
    def create(init: OrderInitialized) -> TrailingStopLimitOrder: ...
    @staticmethod
    def opposite_side(side: OrderSide) -> OrderSide: ...
    @staticmethod
    def closing_side(side: PositionSide) -> OrderSide | None: ...
    @property
    def status(self) -> OrderStatus: ...
    @property
    def trader_id(self) -> TraderId: ...
    @property
    def strategy_id(self) -> StrategyId: ...
    @property
    def instrument_id(self) -> InstrumentId: ...
    @property
    def client_order_id(self) -> ClientOrderId: ...
    @property
    def side(self) -> OrderSide: ...
    @property
    def quantity(self) -> Quantity: ...
    @property
    def price(self) -> Price | None: ...
    @property
    def trigger_price(self) -> Price | None: ...
    @property
    def trigger_type(self) -> TriggerType: ...
    @property
    def limit_offset(self) -> decimal.Decimal: ...
    @property
    def trailing_offset(self) -> decimal.Decimal: ...
    @property
    def trailing_offset_type(self) -> TrailingOffsetType: ...
    @property
    def activation_price(self) -> Price | None: ...
    @property
    def order_type(self) -> OrderType: ...
    @property
    def time_in_force(self) -> TimeInForce: ...
    @property
    def expire_time(self) -> int | None: ...
    @property
    def init_id(self) -> core.UUID4: ...
    @property
    def ts_init(self) -> int: ...
    @property
    def init_event(self) -> typing.Any: ...
    @property
    def has_price(self) -> bool: ...
    @property
    def has_trigger_price(self) -> bool: ...
    @property
    def is_passive(self) -> bool: ...
    @property
    def is_aggressive(self) -> bool: ...
    @property
    def is_closed(self) -> bool: ...
    @property
    def is_open(self) -> bool: ...
    @property
    def is_post_only(self) -> bool: ...
    @property
    def is_reduce_only(self) -> bool: ...
    @property
    def is_quote_quantity(self) -> bool: ...
    @property
    def display_qty(self) -> Quantity | None: ...
    @property
    def emulation_trigger(self) -> TriggerType | None: ...
    @property
    def trigger_instrument_id(self) -> InstrumentId | None: ...
    @property
    def contingency_type(self) -> ContingencyType | None: ...
    @property
    def order_list_id(self) -> OrderListId | None: ...
    @property
    def linked_order_ids(self) -> list[ClientOrderId] | None: ...
    @property
    def parent_order_id(self) -> ClientOrderId | None: ...
    @property
    def exec_algorithm_id(self) -> ExecAlgorithmId | None: ...
    @property
    def exec_algorithm_params(self) -> dict[str, str] | None: ...
    @property
    def exec_spawn_id(self) -> ClientOrderId | None: ...
    @property
    def account_id(self) -> AccountId | None: ...
    @property
    def tags(self) -> list[str] | None: ...
    def commission(self, currency: Currency) -> Money | None: ...
    def commissions(self) -> dict[Currency, Money]: ...
    def events(self) -> list[typing.Any]: ...
    def signed_decimal_qty(self) -> decimal.Decimal: ...
    def would_reduce_only(self, side: PositionSide, position_qty: Quantity) -> bool: ...
    def apply(self, event: typing.Any) -> None: ...
    @staticmethod
    def from_dict(values: dict) -> TrailingStopLimitOrder: ...
    def to_dict(self) -> typing.Any: ...

@typing.final
class TrailingStopMarketOrder:
    @property
    def avg_px(self) -> decimal.Decimal | None: ...
    @property
    def event_count(self) -> int: ...
    @property
    def is_buy(self) -> bool: ...
    @property
    def is_canceled(self) -> bool: ...
    @property
    def is_inflight(self) -> bool: ...
    @property
    def is_pending_cancel(self) -> bool: ...
    @property
    def is_pending_update(self) -> bool: ...
    @property
    def is_sell(self) -> bool: ...
    @property
    def last_event(self) -> typing.Any: ...
    @property
    def leaves_qty(self) -> Quantity: ...
    @property
    def overfill_qty(self) -> Quantity: ...
    @property
    def slippage(self) -> decimal.Decimal | None: ...
    @property
    def trade_ids(self) -> list[TradeId]: ...
    @property
    def ts_accepted(self) -> int | None: ...
    @property
    def ts_closed(self) -> int | None: ...
    @property
    def ts_submitted(self) -> int | None: ...
    @property
    def venue_order_ids(self) -> list[VenueOrderId]: ...
    @property
    def filled_qty(self) -> Quantity: ...
    @property
    def is_active_local(self) -> bool: ...
    @property
    def is_emulated(self) -> bool: ...
    @property
    def is_primary(self) -> bool: ...
    @property
    def is_spawned(self) -> bool: ...
    @property
    def last_trade_id(self) -> TradeId | None: ...
    @property
    def liquidity_side(self) -> LiquiditySide | None: ...
    @property
    def position_id(self) -> PositionId | None: ...
    @property
    def ts_last(self) -> int: ...
    @property
    def venue_order_id(self) -> VenueOrderId | None: ...
    @property
    def is_triggered(self) -> bool: ...
    @property
    def ts_triggered(self) -> int | None: ...
    @property
    def is_activated(self) -> bool: ...
    def __init__(
        self,
        trader_id: TraderId,
        strategy_id: StrategyId,
        instrument_id: InstrumentId,
        client_order_id: ClientOrderId,
        order_side: OrderSide,
        quantity: Quantity,
        trigger_price: Price | None,
        trigger_type: TriggerType,
        trailing_offset: decimal.Decimal,
        trailing_offset_type: TrailingOffsetType,
        time_in_force: TimeInForce,
        reduce_only: bool,
        quote_quantity: bool,
        init_id: core.UUID4,
        ts_init: int,
        activation_price: Price | None = None,
        expire_time: int | None = None,
        display_qty: Quantity | None = None,
        emulation_trigger: TriggerType | None = None,
        trigger_instrument_id: InstrumentId | None = None,
        contingency_type: ContingencyType | None = None,
        order_list_id: OrderListId | None = None,
        linked_order_ids: typing.Sequence[ClientOrderId] | None = None,
        parent_order_id: ClientOrderId | None = None,
        exec_algorithm_id: ExecAlgorithmId | None = None,
        exec_algorithm_params: typing.Mapping[str, str] | None = None,
        exec_spawn_id: ClientOrderId | None = None,
        tags: typing.Sequence[str] | None = None,
    ) -> None: ...
    @staticmethod
    def create(init: OrderInitialized) -> TrailingStopMarketOrder: ...
    @staticmethod
    def opposite_side(side: OrderSide) -> OrderSide: ...
    @staticmethod
    def closing_side(side: PositionSide) -> OrderSide | None: ...
    @property
    def status(self) -> OrderStatus: ...
    @property
    def trader_id(self) -> TraderId: ...
    @property
    def strategy_id(self) -> StrategyId: ...
    @property
    def instrument_id(self) -> InstrumentId: ...
    @property
    def client_order_id(self) -> ClientOrderId: ...
    @property
    def side(self) -> OrderSide: ...
    @property
    def quantity(self) -> Quantity: ...
    @property
    def trigger_price(self) -> Price | None: ...
    @property
    def trigger_type(self) -> TriggerType: ...
    @property
    def trailing_offset(self) -> decimal.Decimal: ...
    @property
    def trailing_offset_type(self) -> TrailingOffsetType: ...
    @property
    def activation_price(self) -> Price | None: ...
    @property
    def order_type(self) -> OrderType: ...
    @property
    def time_in_force(self) -> TimeInForce: ...
    @property
    def expire_time(self) -> int | None: ...
    @property
    def init_id(self) -> core.UUID4: ...
    @property
    def ts_init(self) -> int: ...
    @property
    def init_event(self) -> typing.Any: ...
    @property
    def has_price(self) -> bool: ...
    @property
    def has_trigger_price(self) -> bool: ...
    @property
    def is_passive(self) -> bool: ...
    @property
    def is_aggressive(self) -> bool: ...
    @property
    def is_closed(self) -> bool: ...
    @property
    def is_open(self) -> bool: ...
    @property
    def is_reduce_only(self) -> bool: ...
    @property
    def is_quote_quantity(self) -> bool: ...
    @property
    def display_qty(self) -> Quantity | None: ...
    @property
    def emulation_trigger(self) -> TriggerType | None: ...
    @property
    def trigger_instrument_id(self) -> InstrumentId | None: ...
    @property
    def contingency_type(self) -> ContingencyType | None: ...
    @property
    def order_list_id(self) -> OrderListId | None: ...
    @property
    def linked_order_ids(self) -> list[ClientOrderId] | None: ...
    @property
    def parent_order_id(self) -> ClientOrderId | None: ...
    @property
    def exec_algorithm_id(self) -> ExecAlgorithmId | None: ...
    @property
    def exec_algorithm_params(self) -> dict[str, str] | None: ...
    @property
    def exec_spawn_id(self) -> ClientOrderId | None: ...
    @property
    def account_id(self) -> AccountId | None: ...
    @property
    def tags(self) -> list[str] | None: ...
    def commission(self, currency: Currency) -> Money | None: ...
    def commissions(self) -> dict[Currency, Money]: ...
    def events(self) -> list[typing.Any]: ...
    def signed_decimal_qty(self) -> decimal.Decimal: ...
    def would_reduce_only(self, side: PositionSide, position_qty: Quantity) -> bool: ...
    def apply(self, event: typing.Any) -> None: ...
    @staticmethod
    def from_dict(values: dict) -> TrailingStopMarketOrder: ...
    def to_dict(self) -> typing.Any: ...

@typing.final
class Transaction:
    def __init__(
        self,
        chain: Chain,
        hash: str,
        block_hash: str,
        block_number: int,
        from_: str,
        to: str,
        gas: str,
        gas_price: str,
        transaction_index: int,
        value: str,
    ) -> None: ...
    def __hash__(self) -> int: ...
    @property
    def chain(self) -> Chain: ...
    @property
    def hash(self) -> str: ...
    @property
    def block_hash(self) -> str: ...
    @property
    def block_number(self) -> int: ...
    @property
    def from_(self) -> str: ...
    @property
    def to(self) -> str: ...
    @property
    def value(self) -> str: ...
    @property
    def transaction_index(self) -> int: ...
    @property
    def gas(self) -> str: ...
    @property
    def gas_price(self) -> str: ...

@typing.final
class Venue:
    def __init__(self, value: str) -> None: ...
    def __setstate__(self, state: typing.Any) -> None: ...
    def __getstate__(self) -> typing.Any: ...
    def __reduce__(self) -> typing.Any: ...
    def __hash__(self) -> int: ...
    @property
    def value(self) -> str: ...
    @staticmethod
    def from_str(value: str) -> Venue: ...

@typing.final
class VenueOrderId:
    def __init__(self, value: str) -> None: ...
    def __setstate__(self, state: typing.Any) -> None: ...
    def __getstate__(self) -> typing.Any: ...
    def __reduce__(self) -> typing.Any: ...
    def __hash__(self) -> int: ...
    @property
    def value(self) -> str: ...
    @staticmethod
    def from_str(value: str) -> VenueOrderId: ...

@typing.final
class WalletAccount:
    def __init__(self, event: AccountState, calculate_account_state: bool) -> None: ...
    @property
    def id(self) -> AccountId: ...
    @property
    def account_type(self) -> AccountType: ...
    @property
    def base_currency(self) -> Currency | None: ...
    @property
    def last_event(self) -> AccountState | None: ...
    @property
    def event_count(self) -> int: ...
    @property
    def events(self) -> list[AccountState]: ...
    @property
    def calculate_account_state(self) -> bool: ...
    def balance_total(self, currency: Currency | None = None) -> Money | None: ...
    def balances_total(self) -> dict[Currency, Money]: ...
    def balance_free(self, currency: Currency | None = None) -> Money | None: ...
    def balances_free(self) -> dict[Currency, Money]: ...
    def balance_locked(self, currency: Currency | None = None) -> Money | None: ...
    def balances_locked(self) -> dict[Currency, Money]: ...
    def balance(self, currency: Currency | None = None) -> AccountBalance | None: ...
    def balances(self) -> dict[Currency, AccountBalance]: ...
    def starting_balances(self) -> dict[Currency, Money]: ...
    def currencies(self) -> list[Currency]: ...
    def is_cash_account(self) -> bool: ...
    def is_margin_account(self) -> bool: ...
    def purge_account_events(self, ts_now: int, lookback_secs: int) -> None: ...
    def apply(self, event: AccountState) -> None: ...
    def calculate_balance_locked(
        self,
        instrument: typing.Any,
        side: OrderSide,
        quantity: Quantity,
        price: Price,
        use_quote_for_inverse: bool | None = None,
    ) -> Money: ...
    def calculate_commission(
        self,
        instrument: typing.Any,
        last_qty: Quantity,
        last_px: Price,
        liquidity_side: LiquiditySide,
        use_quote_for_inverse: bool | None = None,
    ) -> Money: ...
    def calculate_pnls(
        self, instrument: typing.Any, fill: OrderFilled, position: Position | None = None
    ) -> list[Money]: ...
    def to_dict(self) -> typing.Any: ...

@typing.final
class AccountType(Enum):
    CASH = ...
    MARGIN = ...
    BETTING = ...
    WALLET = ...

    def __init__(self, value: typing.Any) -> None: ...
    def __hash__(self) -> int: ...
    @property
    def name(self) -> str: ...
    @property
    def value(self) -> int: ...
    @classmethod
    def variants(cls) -> EnumIterator: ...
    @classmethod
    def from_str(cls, data: typing.Any) -> AccountType: ...

@typing.final
class AggregationSource(Enum):
    EXTERNAL = ...
    INTERNAL = ...

    def __init__(self, value: typing.Any) -> None: ...
    def __hash__(self) -> int: ...
    @property
    def name(self) -> str: ...
    @property
    def value(self) -> int: ...
    @classmethod
    def variants(cls) -> EnumIterator: ...
    @classmethod
    def from_str(cls, data: typing.Any) -> AggregationSource: ...

@typing.final
class AggressorSide(Enum):
    NO_AGGRESSOR = ...
    BUY = ...
    SELL = ...

    def __init__(self, value: typing.Any) -> None: ...
    def __hash__(self) -> int: ...
    @property
    def name(self) -> str: ...
    @property
    def value(self) -> int: ...
    @classmethod
    def variants(cls) -> EnumIterator: ...
    @classmethod
    def from_str(cls, data: typing.Any) -> AggressorSide: ...

@typing.final
class AssetClass(Enum):
    FX = ...
    EQUITY = ...
    COMMODITY = ...
    DEBT = ...
    INDEX = ...
    CRYPTOCURRENCY = ...
    ALTERNATIVE = ...

    def __init__(self, value: typing.Any) -> None: ...
    def __hash__(self) -> int: ...
    @property
    def name(self) -> str: ...
    @property
    def value(self) -> int: ...
    @classmethod
    def variants(cls) -> EnumIterator: ...
    @classmethod
    def from_str(cls, data: typing.Any) -> AssetClass: ...

@typing.final
class BarAggregation(Enum):
    TICK = ...
    TICK_IMBALANCE = ...
    TICK_RUNS = ...
    VOLUME = ...
    VOLUME_IMBALANCE = ...
    VOLUME_RUNS = ...
    VALUE = ...
    VALUE_IMBALANCE = ...
    VALUE_RUNS = ...
    MILLISECOND = ...
    SECOND = ...
    MINUTE = ...
    HOUR = ...
    DAY = ...
    WEEK = ...
    MONTH = ...
    YEAR = ...
    RENKO = ...

    def __init__(self, value: typing.Any) -> None: ...
    def __hash__(self) -> int: ...
    @property
    def name(self) -> str: ...
    @property
    def value(self) -> int: ...
    @classmethod
    def variants(cls) -> EnumIterator: ...
    @classmethod
    def from_str(cls, data: typing.Any) -> BarAggregation: ...

@typing.final
class BarIntervalType(Enum):
    LEFT_OPEN = ...
    RIGHT_OPEN = ...

    def __init__(self, value: typing.Any) -> None: ...
    def __hash__(self) -> int: ...
    @property
    def name(self) -> str: ...
    @property
    def value(self) -> int: ...
    @classmethod
    def variants(cls) -> EnumIterator: ...
    @classmethod
    def from_str(cls, data: typing.Any) -> BarIntervalType: ...

@typing.final
class BarType(Enum):
    Standard = ...
    Composite = ...

    def __init__(
        self,
        instrument_id: InstrumentId,
        spec: BarSpecification,
        aggregation_source: AggregationSource = AggregationSource.EXTERNAL,
    ) -> None: ...
    def __hash__(self) -> int: ...
    @staticmethod
    def fully_qualified_name() -> str: ...
    @staticmethod
    def from_str(value: str) -> BarType: ...
    @staticmethod
    def new_composite(
        instrument_id: InstrumentId,
        spec: BarSpecification,
        aggregation_source: AggregationSource,
        composite_step: int,
        composite_aggregation: BarAggregation,
        composite_aggregation_source: AggregationSource,
    ) -> BarType: ...
    def is_standard(self) -> bool: ...
    def is_composite(self) -> bool: ...
    def standard(self) -> BarType: ...
    def composite(self) -> BarType: ...
    def id_spec_key(self) -> tuple[InstrumentId, BarSpecification]: ...
    def is_externally_aggregated(self) -> bool: ...
    def is_internally_aggregated(self) -> bool: ...
    @property
    def instrument_id(self) -> InstrumentId: ...
    @property
    def spec(self) -> BarSpecification: ...
    @property
    def aggregation_source(self) -> AggregationSource: ...
    def __reduce__(self) -> typing.Any: ...

@typing.final
class BetSide(Enum):
    BACK = ...
    LAY = ...

    def __init__(self, value: typing.Any) -> None: ...
    def __hash__(self) -> int: ...
    @property
    def name(self) -> str: ...
    @property
    def value(self) -> int: ...
    @classmethod
    def variants(cls) -> EnumIterator: ...
    @classmethod
    def from_str(cls, data: typing.Any) -> BetSide: ...
    @classmethod
    def from_order_side(cls, order_side: OrderSide) -> BetSide: ...
    def opposite(self) -> BetSide: ...

@typing.final
class BookAction(Enum):
    ADD = ...
    UPDATE = ...
    DELETE = ...
    CLEAR = ...

    def __init__(self, value: typing.Any) -> None: ...
    def __hash__(self) -> int: ...
    @property
    def name(self) -> str: ...
    @property
    def value(self) -> int: ...
    @classmethod
    def variants(cls) -> EnumIterator: ...
    @classmethod
    def from_str(cls, data: typing.Any) -> BookAction: ...

@typing.final
class BookType(Enum):
    L1_MBP = ...
    L2_MBP = ...
    L3_MBO = ...

    def __init__(self, value: typing.Any) -> None: ...
    def __hash__(self) -> int: ...
    @property
    def name(self) -> str: ...
    @property
    def value(self) -> int: ...
    @classmethod
    def variants(cls) -> EnumIterator: ...
    @classmethod
    def from_str(cls, data: typing.Any) -> BookType: ...

@typing.final
class ContingencyType(Enum):
    OCO = ...
    OTO = ...
    OUO = ...

    NO_CONTINGENCY: ContingencyType | None
    @property
    def name(self) -> str: ...
    @property
    def value(self) -> int: ...
    def __new__(cls, value: typing.Any) -> ContingencyType | None: ...
    def __hash__(self) -> int: ...
    @classmethod
    def variants(cls) -> EnumIterator: ...
    @classmethod
    def from_str(cls, data: typing.Any) -> ContingencyType | None: ...

@typing.final
class ContinuousFutureAdjustmentType(Enum):
    BACKWARD_SPREAD = ...
    FORWARD_SPREAD = ...
    BACKWARD_RATIO = ...
    FORWARD_RATIO = ...

    def __init__(self, value: typing.Any) -> None: ...
    def __hash__(self) -> int: ...
    @property
    def name(self) -> str: ...
    @property
    def value(self) -> int: ...
    @property
    def is_ratio(self) -> bool: ...
    @property
    def is_backward(self) -> bool: ...
    @classmethod
    def variants(cls) -> EnumIterator: ...
    @classmethod
    def from_str(cls, data: typing.Any) -> ContinuousFutureAdjustmentType: ...

@typing.final
class CurrencyType(Enum):
    CRYPTO = ...
    FIAT = ...
    COMMODITY_BACKED = ...

    def __init__(self, value: typing.Any) -> None: ...
    def __hash__(self) -> int: ...
    @property
    def name(self) -> str: ...
    @property
    def value(self) -> int: ...
    @classmethod
    def variants(cls) -> EnumIterator: ...
    @classmethod
    def from_str(cls, data: typing.Any) -> CurrencyType: ...

@typing.final
class DefiData(Enum):
    Block = ...
    Pool = ...
    PoolSnapshot = ...
    PoolSwap = ...
    PoolLiquidityUpdate = ...
    PoolFeeCollect = ...
    PoolFeeProtocolUpdate = ...
    PoolFeeProtocolCollect = ...
    PoolFlash = ...

    @property
    def block_number(self) -> int: ...
    @property
    def transaction_index(self) -> int: ...
    @property
    def log_index(self) -> int: ...
    @property
    def timestamp(self) -> int: ...
    @property
    def ts_event(self) -> int: ...
    @property
    def ts_init(self) -> int: ...
    def block_position(self) -> tuple[int, int, int]: ...

@typing.final
class GreeksConvention(Enum):
    BLACK_SCHOLES = ...
    PRICE_ADJUSTED = ...

    def __init__(self, value: typing.Any) -> None: ...
    def __hash__(self) -> int: ...
    @property
    def name(self) -> str: ...
    @property
    def value(self) -> int: ...
    @classmethod
    def variants(cls) -> EnumIterator: ...
    @classmethod
    def from_str(cls, data: typing.Any) -> GreeksConvention: ...

@typing.final
class InstrumentClass(Enum):
    SPOT = ...
    SWAP = ...
    FUTURE = ...
    FUTURES_SPREAD = ...
    FORWARD = ...
    CFD = ...
    BOND = ...
    OPTION = ...
    OPTION_SPREAD = ...
    WARRANT = ...
    SPORTS_BETTING = ...
    BINARY_OPTION = ...

    def __init__(self, value: typing.Any) -> None: ...
    def __hash__(self) -> int: ...
    @property
    def name(self) -> str: ...
    @property
    def value(self) -> int: ...
    @classmethod
    def variants(cls) -> EnumIterator: ...
    @classmethod
    def from_str(cls, data: typing.Any) -> InstrumentClass: ...
    def has_expiration(self) -> bool: ...
    def allows_negative_price(self) -> bool: ...
    def parent_suffix(self) -> str | None: ...
    @classmethod
    def try_from_parent_suffix(cls, suffix: str) -> InstrumentClass | None: ...

@typing.final
class InstrumentCloseType(Enum):
    END_OF_SESSION = ...
    CONTRACT_EXPIRED = ...

    def __init__(self, value: typing.Any) -> None: ...
    def __hash__(self) -> int: ...
    @property
    def name(self) -> str: ...
    @property
    def value(self) -> int: ...
    @classmethod
    def variants(cls) -> EnumIterator: ...
    @classmethod
    def from_str(cls, data: typing.Any) -> InstrumentCloseType: ...

@typing.final
class LiquiditySide(Enum):
    NO_LIQUIDITY_SIDE = ...
    MAKER = ...
    TAKER = ...

    def __init__(self, value: typing.Any) -> None: ...
    def __hash__(self) -> int: ...
    @property
    def name(self) -> str: ...
    @property
    def value(self) -> int: ...
    @classmethod
    def variants(cls) -> EnumIterator: ...
    @classmethod
    def from_str(cls, data: typing.Any) -> LiquiditySide: ...

@typing.final
class MarketStatus(Enum):
    OPEN = ...
    CLOSED = ...
    PAUSED = ...
    HALTED = ...
    SUSPENDED = ...
    NOT_AVAILABLE = ...

    def __init__(self, value: typing.Any) -> None: ...
    def __hash__(self) -> int: ...
    @property
    def name(self) -> str: ...
    @property
    def value(self) -> int: ...
    @classmethod
    def variants(cls) -> EnumIterator: ...
    @classmethod
    def from_str(cls, data: typing.Any) -> MarketStatus: ...

@typing.final
class MarketStatusAction(Enum):
    NONE = ...
    PRE_OPEN = ...
    PRE_CROSS = ...
    QUOTING = ...
    CROSS = ...
    ROTATION = ...
    NEW_PRICE_INDICATION = ...
    TRADING = ...
    HALT = ...
    PAUSE = ...
    SUSPEND = ...
    PRE_CLOSE = ...
    CLOSE = ...
    POST_CLOSE = ...
    SHORT_SELL_RESTRICTION_CHANGE = ...
    NOT_AVAILABLE_FOR_TRADING = ...

    def __init__(self, value: typing.Any) -> None: ...
    def __hash__(self) -> int: ...
    @property
    def name(self) -> str: ...
    @property
    def value(self) -> int: ...
    @classmethod
    def variants(cls) -> EnumIterator: ...
    @classmethod
    def from_str(cls, data: typing.Any) -> MarketStatusAction: ...

@typing.final
class OmsType(Enum):
    UNSPECIFIED = ...
    NETTING = ...
    HEDGING = ...

    def __init__(self, value: typing.Any) -> None: ...
    def __hash__(self) -> int: ...
    @property
    def name(self) -> str: ...
    @property
    def value(self) -> int: ...
    @classmethod
    def variants(cls) -> EnumIterator: ...
    @classmethod
    def from_str(cls, data: typing.Any) -> OmsType: ...

@typing.final
class OptionKind(Enum):
    CALL = ...
    PUT = ...

    def __init__(self, value: typing.Any) -> None: ...
    def __hash__(self) -> int: ...
    @property
    def name(self) -> str: ...
    @property
    def value(self) -> int: ...
    @classmethod
    def variants(cls) -> EnumIterator: ...
    @classmethod
    def from_str(cls, data: typing.Any) -> OptionKind: ...

@typing.final
class OrderSide(Enum):
    BUY = ...
    SELL = ...

    NO_ORDER_SIDE: OrderSide | None
    @property
    def name(self) -> str: ...
    @property
    def value(self) -> int: ...
    def __new__(cls, value: typing.Any) -> OrderSide | None: ...
    def __hash__(self) -> int: ...
    @classmethod
    def variants(cls) -> EnumIterator: ...
    @classmethod
    def from_str(cls, data: typing.Any) -> OrderSide | None: ...

@typing.final
class OrderStatus(Enum):
    INITIALIZED = ...
    DENIED = ...
    EMULATED = ...
    RELEASED = ...
    SUBMITTED = ...
    ACCEPTED = ...
    REJECTED = ...
    CANCELED = ...
    EXPIRED = ...
    TRIGGERED = ...
    PENDING_UPDATE = ...
    PENDING_CANCEL = ...
    PARTIALLY_FILLED = ...
    FILLED = ...
    VOIDED = ...

    def __init__(self, value: typing.Any) -> None: ...
    def __hash__(self) -> int: ...
    @property
    def name(self) -> str: ...
    @property
    def value(self) -> int: ...
    @classmethod
    def variants(cls) -> EnumIterator: ...
    @classmethod
    def from_str(cls, data: typing.Any) -> OrderStatus: ...

@typing.final
class OrderType(Enum):
    MARKET = ...
    LIMIT = ...
    STOP_MARKET = ...
    STOP_LIMIT = ...
    MARKET_TO_LIMIT = ...
    MARKET_IF_TOUCHED = ...
    LIMIT_IF_TOUCHED = ...
    TRAILING_STOP_MARKET = ...
    TRAILING_STOP_LIMIT = ...

    def __init__(self, value: typing.Any) -> None: ...
    def __hash__(self) -> int: ...
    @property
    def name(self) -> str: ...
    @property
    def value(self) -> int: ...
    @classmethod
    def variants(cls) -> EnumIterator: ...
    @classmethod
    def from_str(cls, data: typing.Any) -> OrderType: ...

@typing.final
class OtoTriggerMode(Enum):
    PARTIAL = ...
    FULL = ...

    def __init__(self, value: typing.Any) -> None: ...
    def __hash__(self) -> int: ...
    @property
    def name(self) -> str: ...
    @property
    def value(self) -> int: ...
    @classmethod
    def variants(cls) -> EnumIterator: ...
    @classmethod
    def from_str(cls, data: typing.Any) -> OtoTriggerMode: ...

@typing.final
class PoolLiquidityUpdateType(Enum):
    MINT = ...
    BURN = ...

    def __init__(self, value: typing.Any) -> None: ...
    def __hash__(self) -> int: ...
    @property
    def name(self) -> str: ...
    @property
    def value(self) -> int: ...
    @classmethod
    def variants(cls) -> EnumIterator: ...
    @classmethod
    def from_str(cls, data: typing.Any) -> PoolLiquidityUpdateType: ...

@typing.final
class PositionAdjustmentType(Enum):
    COMMISSION = ...
    FUNDING = ...

    def __init__(self, value: typing.Any) -> None: ...
    def __hash__(self) -> int: ...
    @property
    def name(self) -> str: ...
    @property
    def value(self) -> int: ...
    @classmethod
    def variants(cls) -> EnumIterator: ...
    @classmethod
    def from_str(cls, data: typing.Any) -> PositionAdjustmentType: ...

@typing.final
class PositionSide(Enum):
    FLAT = ...
    LONG = ...
    SHORT = ...

    NO_POSITION_SIDE: PositionSide | None
    @property
    def name(self) -> str: ...
    @property
    def value(self) -> int: ...
    def __new__(cls, value: typing.Any) -> PositionSide | None: ...
    def __hash__(self) -> int: ...
    @classmethod
    def variants(cls) -> EnumIterator: ...
    @classmethod
    def from_str(cls, data: typing.Any) -> PositionSide | None: ...

@typing.final
class PriceType(Enum):
    BID = ...
    ASK = ...
    MID = ...
    LAST = ...
    MARK = ...

    def __init__(self, value: typing.Any) -> None: ...
    def __hash__(self) -> int: ...
    @property
    def name(self) -> str: ...
    @property
    def value(self) -> int: ...
    @classmethod
    def variants(cls) -> EnumIterator: ...
    @classmethod
    def from_str(cls, data: typing.Any) -> PriceType: ...
    @classmethod
    def from_int(cls, value: int) -> PriceType: ...

@typing.final
class RecordFlag(Enum):
    F_LAST = ...
    F_TOB = ...
    F_SNAPSHOT = ...
    F_MBP = ...
    RESERVED_2 = ...
    RESERVED_1 = ...

    def __init__(self, value: typing.Any) -> None: ...
    def __hash__(self) -> int: ...
    @property
    def name(self) -> str: ...
    @property
    def value(self) -> int: ...
    @classmethod
    def variants(cls) -> EnumIterator: ...
    @classmethod
    def from_str(cls, data: typing.Any) -> RecordFlag: ...
    def matches(self, value: int) -> bool: ...

@typing.final
class TimeInForce(Enum):
    GTC = ...
    IOC = ...
    FOK = ...
    GTD = ...
    DAY = ...
    AT_THE_OPEN = ...
    AT_THE_CLOSE = ...

    def __init__(self, value: typing.Any) -> None: ...
    def __hash__(self) -> int: ...
    @property
    def name(self) -> str: ...
    @property
    def value(self) -> int: ...
    @classmethod
    def variants(cls) -> EnumIterator: ...
    @classmethod
    def from_str(cls, data: typing.Any) -> TimeInForce: ...

@typing.final
class TradingState(Enum):
    ACTIVE = ...
    REDUCING = ...
    HALTED = ...

    def __init__(self, value: typing.Any) -> None: ...
    def __hash__(self) -> int: ...
    @property
    def name(self) -> str: ...
    @property
    def value(self) -> int: ...
    @classmethod
    def variants(cls) -> EnumIterator: ...
    @classmethod
    def from_str(cls, data: typing.Any) -> TradingState: ...

@typing.final
class TrailingOffsetType(Enum):
    PRICE = ...
    BASIS_POINTS = ...
    TICKS = ...
    PRICE_TIER = ...

    NO_TRAILING_OFFSET: TrailingOffsetType | None
    @property
    def name(self) -> str: ...
    @property
    def value(self) -> int: ...
    def __new__(cls, value: typing.Any) -> TrailingOffsetType | None: ...
    def __hash__(self) -> int: ...
    @classmethod
    def variants(cls) -> EnumIterator: ...
    @classmethod
    def from_str(cls, data: typing.Any) -> TrailingOffsetType | None: ...

@typing.final
class TriggerType(Enum):
    DEFAULT = ...
    LAST_PRICE = ...
    MARK_PRICE = ...
    INDEX_PRICE = ...
    BID_ASK = ...
    DOUBLE_LAST = ...
    DOUBLE_BID_ASK = ...
    LAST_OR_BID_ASK = ...
    MID_POINT = ...

    NO_TRIGGER: TriggerType | None
    @property
    def name(self) -> str: ...
    @property
    def value(self) -> int: ...
    def __new__(cls, value: typing.Any) -> TriggerType | None: ...
    def __hash__(self) -> int: ...
    @classmethod
    def variants(cls) -> EnumIterator: ...
    @classmethod
    def from_str(cls, data: typing.Any) -> TriggerType | None: ...

def betting_account_from_account_events(
    events: typing.Sequence[dict], calculate_account_state: bool
) -> BettingAccount: ...
def cash_account_from_account_events(
    events: typing.Sequence[dict], calculate_account_state: bool, allow_borrowing: bool = False
) -> CashAccount: ...
def custom_data_backend_kind(custom: CustomData) -> str: ...
def margin_account_from_account_events(
    events: typing.Sequence[dict], calculate_account_state: bool
) -> MarginAccount: ...
def black_scholes_greeks(
    s: float, r: float, b: float, vol: float, is_call: bool, k: float, t: float
) -> BlackScholesGreeksResult: ...
def calc_bets_pnl(bets: typing.Sequence[Bet]) -> decimal.Decimal: ...
def imply_vol(
    s: float, r: float, b: float, is_call: bool, k: float, t: float, price: float
) -> float: ...
def imply_vol_and_greeks(
    s: float, r: float, b: float, is_call: bool, k: float, t: float, price: float
) -> BlackScholesGreeksResult: ...
def inverse_probability_to_bet(
    probability: decimal.Decimal, volume: decimal.Decimal, side: OrderSide
) -> Bet: ...
def probability_to_bet(
    probability: decimal.Decimal, volume: decimal.Decimal, side: OrderSide
) -> Bet: ...
def refine_vol_and_greeks(
    s: float,
    r: float,
    b: float,
    is_call: bool,
    k: float,
    t: float,
    target_price: float,
    initial_vol: float,
) -> BlackScholesGreeksResult: ...
def register_custom_data_class(data_class: typing.Any) -> None: ...
def wallet_account_from_account_events(
    events: typing.Sequence[dict], calculate_account_state: bool
) -> WalletAccount: ...

@typing.final
class AmmType(Enum):
    CPAMM = ...
    CLAMM = ...
    CLAM_ENHANCED = ...
    STABLE_SWAP = ...
    WEIGHTED_POOL = ...
    COMPOSABLE_POOL = ...

    def __init__(self, value: typing.Any) -> None: ...
    def __hash__(self) -> int: ...
    @property
    def name(self) -> str: ...
    @property
    def value(self) -> int: ...
    @classmethod
    def variants(cls) -> EnumIterator: ...
    @classmethod
    def from_str(cls, data: typing.Any) -> AmmType: ...

@typing.final
class DexType(Enum):
    AERODROME_SLIPSTREAM = ...
    AERODROME_V1 = ...
    BALANCER_V2 = ...
    BALANCER_V3 = ...
    BASE_SWAP_V2 = ...
    BASE_X = ...
    CAMELOT_V3 = ...
    CURVE_FINANCE = ...
    FLUID_DEX = ...
    MAVERICK_V1 = ...
    MAVERICK_V2 = ...
    PANCAKE_SWAP_V3 = ...
    SUSHI_SWAP_V2 = ...
    SUSHI_SWAP_V3 = ...
    UNISWAP_V2 = ...
    UNISWAP_V3 = ...
    UNISWAP_V4 = ...

    def __hash__(self) -> int: ...

@typing.final
class Dex:
    def __init__(
        self,
        chain: Chain,
        name: str,
        factory: str,
        factory_creation_block: int,
        amm_type: str,
        pool_created_event: str,
        swap_event: str,
        mint_event: str,
        burn_event: str,
        collect_event: str,
    ) -> None: ...
    def __hash__(self) -> int: ...
    @property
    def chain(self) -> Chain: ...
    @property
    def name(self) -> DexType: ...
    @property
    def factory(self) -> str: ...
    @property
    def factory_creation_block(self) -> int: ...
    @property
    def pool_created_event(self) -> str: ...
    @property
    def swap_created_event(self) -> str: ...
    @property
    def mint_created_event(self) -> str: ...
    @property
    def burn_created_event(self) -> str: ...
    @property
    def amm_type(self) -> AmmType: ...

@typing.final
class Blockchain(Enum):
    ABSTRACT = ...
    ARBITRUM = ...
    ARBITRUM_NOVA = ...
    ARBITRUM_SEPOLIA = ...
    AURORA = ...
    AVALANCHE = ...
    BASE = ...
    BASE_SEPOLIA = ...
    BERACHAIN = ...
    BERACHAIN_BARTIO = ...
    BLAST = ...
    BLAST_SEPOLIA = ...
    BOBA = ...
    BSC = ...
    BSC_TESTNET = ...
    CELO = ...
    CHILIZ = ...
    CITREA_TESTNET = ...
    CURTIS = ...
    CYBER = ...
    DARWINIA = ...
    ETHEREUM = ...
    FANTOM = ...
    FLARE = ...
    FRAXTAL = ...
    FUJI = ...
    GALADRIEL_DEVNET = ...
    GNOSIS = ...
    GNOSIS_CHIADO = ...
    GNOSIS_TRACES = ...
    HARMONY_SHARD0 = ...
    HOLESKY = ...
    HOLESKY_TOKEN_TEST = ...
    HYPERLIQUID = ...
    HYPERLIQUID_TEMP = ...
    INK = ...
    INTERNAL_TEST_CHAIN = ...
    KROMA = ...
    LINEA = ...
    LISK = ...
    LUKSO = ...
    LUKSO_TESTNET = ...
    MANTA = ...
    MANTLE = ...
    MEGAETH_TESTNET = ...
    MERLIN = ...
    METALL2 = ...
    METIS = ...
    MEV_COMMIT = ...
    MODE = ...
    MONAD_TESTNET = ...
    MONAD_TESTNET_BACKUP = ...
    MOONBASE_ALPHA = ...
    MOONBEAM = ...
    MORPH = ...
    MORPH_HOLESKY = ...
    OPBNB = ...
    OPTIMISM = ...
    OPTIMISM_SEPOLIA = ...
    PHAROS_DEVNET = ...
    POLYGON = ...
    POLYGON_AMOY = ...
    POLYGON_ZK_EVM = ...
    ROOTSTOCK = ...
    SAAKURU = ...
    SCROLL = ...
    SEPOLIA = ...
    SHIMMER_EVM = ...
    SONEIUM = ...
    SOPHON = ...
    SOPHON_TESTNET = ...
    SUPERSEED = ...
    UNICHAIN = ...
    UNICHAIN_SEPOLIA = ...
    XDC = ...
    XDC_TESTNET = ...
    ZETA = ...
    ZIRCUIT = ...
    Z_KSYNC = ...
    ZORA = ...

    def __init__(self, value: typing.Any) -> None: ...
    def __hash__(self) -> int: ...
    @property
    def name(self) -> str: ...
    @property
    def value(self) -> int: ...
    @classmethod
    def variants(cls) -> EnumIterator: ...
    @classmethod
    def from_str(cls, data: typing.Any) -> Blockchain: ...

@typing.final
class Chain:
    def __init__(self, name: Blockchain, chain_id: int) -> None: ...
    def __hash__(self) -> int: ...
    @property
    def name(self) -> Blockchain: ...
    @property
    def chain_id(self) -> int: ...
    @property
    def hypersync_url(self) -> str: ...
    @property
    def rpc_url(self) -> str | None: ...
    @property
    def native_currency_decimals(self) -> int: ...
    def set_rpc_url(self, rpc_url: str) -> None: ...
    @staticmethod
    def from_chain_name(chain_name: str) -> Chain: ...
    @staticmethod
    def from_chain_id(chain_id: int) -> Chain | None: ...
    @staticmethod
    def ARBITRUM() -> Chain: ...
