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

import decimal
import typing

from nautilus_trader import model

__all__ = [
    "FixedRiskSizer",
    "PositionSizer",
    "RiskEngineConfig",
]

@typing.final
class FixedRiskSizer(PositionSizer):
    def __new__(cls, instrument: typing.Any) -> typing.Self: ...
    def calculate(
        self,
        entry: model.Price,
        stop_loss: model.Price,
        equity: model.Money,
        risk: decimal.Decimal,
        commission_rate: decimal.Decimal = decimal.Decimal(0),
        exchange_rate: decimal.Decimal = decimal.Decimal(1),
        hard_limit: decimal.Decimal | None = None,
        unit_batch_size: decimal.Decimal = decimal.Decimal(1),
        units: int = 1,
    ) -> model.Quantity: ...

class PositionSizer:
    @property
    def instrument(self) -> typing.Any: ...
    def __new__(cls, instrument: typing.Any) -> typing.Self: ...
    def update_instrument(self, instrument: typing.Any) -> None: ...
    def calculate(
        self,
        entry: model.Price,
        stop_loss: model.Price,
        equity: model.Money,
        risk: decimal.Decimal,
        commission_rate: decimal.Decimal = decimal.Decimal(0),
        exchange_rate: decimal.Decimal = decimal.Decimal(1),
        hard_limit: decimal.Decimal | None = None,
        unit_batch_size: decimal.Decimal = decimal.Decimal(1),
        units: int = 1,
    ) -> model.Quantity: ...

@typing.final
class RiskEngineConfig:
    def __init__(
        self,
        bypass: bool | None = None,
        max_order_submit_rate: str | None = None,
        max_order_modify_rate: str | None = None,
        max_notional_per_order: typing.Mapping[str, typing.Any] | None = None,
        full_position_exit_venues: typing.Sequence[model.Venue] | None = None,
        debug: bool | None = None,
    ) -> None: ...
    @property
    def bypass(self) -> bool: ...
    @property
    def max_order_submit_rate(self) -> str: ...
    @property
    def max_order_modify_rate(self) -> str: ...
    @property
    def max_notional_per_order(self) -> dict[str, str]: ...
    @property
    def full_position_exit_venues(self) -> list[model.Venue]: ...
    @property
    def debug(self) -> bool: ...
