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

import decimal
import typing

from nautilus_trader import model

__all__ = [
    "BestPriceFillModel",
    "CappedOptionFeeModel",
    "CompetitionAwareFillModel",
    "DefaultFillModel",
    "ExecutionEngineConfig",
    "FeeModel",
    "FillModel",
    "FixedFeeModel",
    "LimitOrderPartialFillModel",
    "MakerTakerFeeModel",
    "MarketHoursFillModel",
    "OneTickSlippageFillModel",
    "OrderEmulatorConfig",
    "PerContractFeeModel",
    "ProbabilisticFillModel",
    "ProbabilityPriceFeeModel",
    "SizeAwareFillModel",
    "StaticLatencyModel",
    "ThreeTierFillModel",
    "TieredNotionalOptionFeeModel",
    "TwoTierFillModel",
    "VolumeSensitiveFillModel",
]

@typing.final
class BestPriceFillModel:
    def __init__(
        self, prob_fill_on_limit: float, prob_slippage: float, random_seed: int | None = ...
    ) -> None: ...

@typing.final
class CappedOptionFeeModel(FeeModel):
    def __new__(
        cls,
        maker_rate: decimal.Decimal | None = None,
        taker_rate: decimal.Decimal | None = None,
        cap_rate: decimal.Decimal | None = None,
    ) -> typing.Self: ...
    def get_commission(
        self,
        order: typing.Any,
        fill_quantity: model.Quantity,
        fill_px: model.Price,
        instrument: typing.Any,
    ) -> model.Money: ...
    def get_commission_with_context(
        self,
        order: typing.Any,
        fill_quantity: model.Quantity,
        fill_px: model.Price,
        instrument: typing.Any,
        underlying_px: model.Price | None = None,
    ) -> model.Money: ...

@typing.final
class CompetitionAwareFillModel:
    def __init__(
        self,
        prob_fill_on_limit: float = 1.0,
        prob_slippage: float = 0.0,
        random_seed: int | None = None,
        liquidity_factor: float = 0.3,
    ) -> None: ...

@typing.final
class DefaultFillModel:
    def __init__(
        self, prob_fill_on_limit: float, prob_slippage: float, random_seed: int | None = ...
    ) -> None: ...

@typing.final
class ExecutionEngineConfig:
    @property
    def load_cache(self) -> bool: ...
    @property
    def manage_own_order_books(self) -> bool: ...
    @property
    def snapshot_orders(self) -> bool: ...
    @property
    def snapshot_positions(self) -> bool: ...
    @property
    def snapshot_positions_interval_secs(self) -> float | None: ...
    @property
    def carry_replay_events_on_reopen(self) -> bool: ...
    @property
    def allow_overfills(self) -> bool: ...
    @property
    def external_clients(self) -> list[model.ClientId] | None: ...
    @property
    def purge_closed_orders_interval_mins(self) -> int | None: ...
    @property
    def purge_closed_orders_buffer_mins(self) -> int | None: ...
    @property
    def purge_closed_positions_interval_mins(self) -> int | None: ...
    @property
    def purge_closed_positions_buffer_mins(self) -> int | None: ...
    @property
    def purge_account_events_interval_mins(self) -> int | None: ...
    @property
    def purge_account_events_lookback_mins(self) -> int | None: ...
    @property
    def purge_from_database(self) -> bool: ...
    @property
    def debug(self) -> bool: ...
    def __new__(
        cls,
        load_cache: bool | None = None,
        manage_own_order_books: bool | None = None,
        snapshot_orders: bool | None = None,
        snapshot_positions: bool | None = None,
        snapshot_positions_interval_secs: float | None = None,
        carry_replay_events_on_reopen: bool | None = None,
        allow_overfills: bool | None = None,
        external_clients: typing.Sequence[model.ClientId] | None = None,
        purge_closed_orders_interval_mins: int | None = None,
        purge_closed_orders_buffer_mins: int | None = None,
        purge_closed_positions_interval_mins: int | None = None,
        purge_closed_positions_buffer_mins: int | None = None,
        purge_account_events_interval_mins: int | None = None,
        purge_account_events_lookback_mins: int | None = None,
        purge_from_database: bool | None = None,
        debug: bool | None = None,
    ) -> ExecutionEngineConfig: ...

class FeeModel:
    def __new__(cls, *_args: typing.Any, **_kwargs: typing.Any) -> typing.Self: ...
    def get_commission(
        self,
        _order: typing.Any,
        _fill_quantity: model.Quantity,
        _fill_px: model.Price,
        _instrument: typing.Any,
    ) -> model.Money: ...
    def get_commission_with_context(
        self,
        order: typing.Any,
        fill_quantity: model.Quantity,
        fill_px: model.Price,
        instrument: typing.Any,
        _underlying_px: model.Price | None = None,
    ) -> model.Money: ...

class FillModel:
    def __init__(self) -> None: ...
    def is_limit_filled(self) -> bool: ...
    def is_slipped(self) -> bool: ...
    def fill_limit_inside_spread(self) -> bool: ...
    def get_orderbook_for_fill_simulation(
        self,
        _instrument: typing.Any,
        _order: typing.Any,
        _best_bid: model.Price,
        _best_ask: model.Price,
    ) -> model.OrderBook | None: ...

@typing.final
class FixedFeeModel(FeeModel):
    def __new__(
        cls,
        commission: model.Money,
        charge_commission_once: bool | None = None,
        change_commission_once: bool | None = None,
    ) -> typing.Self: ...
    def get_commission(
        self,
        order: typing.Any,
        fill_quantity: model.Quantity,
        fill_px: model.Price,
        instrument: typing.Any,
    ) -> model.Money: ...

@typing.final
class LimitOrderPartialFillModel:
    def __init__(
        self, prob_fill_on_limit: float, prob_slippage: float, random_seed: int | None = ...
    ) -> None: ...

@typing.final
class MakerTakerFeeModel(FeeModel):
    def __new__(cls) -> typing.Self: ...
    def get_commission(
        self,
        order: typing.Any,
        fill_quantity: model.Quantity,
        fill_px: model.Price,
        instrument: typing.Any,
    ) -> model.Money: ...

@typing.final
class MarketHoursFillModel:
    def __init__(
        self, prob_fill_on_limit: float, prob_slippage: float, random_seed: int | None = ...
    ) -> None: ...

@typing.final
class OneTickSlippageFillModel:
    def __init__(
        self, prob_fill_on_limit: float, prob_slippage: float, random_seed: int | None = ...
    ) -> None: ...

@typing.final
class OrderEmulatorConfig:
    def __init__(self, debug: bool | None = None) -> None: ...
    @property
    def debug(self) -> bool: ...

@typing.final
class PerContractFeeModel(FeeModel):
    def __new__(cls, commission: model.Money) -> typing.Self: ...
    def get_commission(
        self,
        order: typing.Any,
        fill_quantity: model.Quantity,
        fill_px: model.Price,
        instrument: typing.Any,
    ) -> model.Money: ...

@typing.final
class ProbabilisticFillModel:
    def __init__(
        self, prob_fill_on_limit: float, prob_slippage: float, random_seed: int | None = ...
    ) -> None: ...

@typing.final
class ProbabilityPriceFeeModel(FeeModel):
    def __new__(cls) -> typing.Self: ...
    def get_commission(
        self,
        order: typing.Any,
        fill_quantity: model.Quantity,
        fill_px: model.Price,
        instrument: typing.Any,
    ) -> model.Money: ...

@typing.final
class SizeAwareFillModel:
    def __init__(
        self, prob_fill_on_limit: float, prob_slippage: float, random_seed: int | None = ...
    ) -> None: ...

@typing.final
class StaticLatencyModel:
    def __init__(
        self,
        base_latency_nanos: int = 0,
        insert_latency_nanos: int = 0,
        update_latency_nanos: int = 0,
        cancel_latency_nanos: int = 0,
    ) -> None: ...

@typing.final
class ThreeTierFillModel:
    def __init__(
        self, prob_fill_on_limit: float, prob_slippage: float, random_seed: int | None = ...
    ) -> None: ...

@typing.final
class TieredNotionalOptionFeeModel(FeeModel):
    def __new__(
        cls, maker_rate: decimal.Decimal | None = None, taker_rate: decimal.Decimal | None = None
    ) -> typing.Self: ...
    def get_commission(
        self,
        order: typing.Any,
        fill_quantity: model.Quantity,
        fill_px: model.Price,
        instrument: typing.Any,
    ) -> model.Money: ...

@typing.final
class TwoTierFillModel:
    def __init__(
        self, prob_fill_on_limit: float, prob_slippage: float, random_seed: int | None = ...
    ) -> None: ...

@typing.final
class VolumeSensitiveFillModel:
    def __init__(
        self, prob_fill_on_limit: float, prob_slippage: float, random_seed: int | None = ...
    ) -> None: ...
