"""
@generated by mypy-protobuf.  Do not edit manually!
isort:skip_file
"""
import builtins
import collections.abc
import cosmos.base.v1beta1.coin_pb2
import google.protobuf.descriptor
import google.protobuf.internal.containers
import google.protobuf.message
import nibiru.perp.v2.state_pb2
import sys

if sys.version_info >= (3, 8):
    import typing as typing_extensions
else:
    import typing_extensions

DESCRIPTOR: google.protobuf.descriptor.FileDescriptor

@typing_extensions.final
class MsgRemoveMargin(google.protobuf.message.Message):
    """-------------------------- RemoveMargin --------------------------

    MsgRemoveMargin: Msg to remove margin.
    """

    DESCRIPTOR: google.protobuf.descriptor.Descriptor

    SENDER_FIELD_NUMBER: builtins.int
    PAIR_FIELD_NUMBER: builtins.int
    MARGIN_FIELD_NUMBER: builtins.int
    sender: builtins.str
    pair: builtins.str
    @property
    def margin(self) -> cosmos.base.v1beta1.coin_pb2.Coin: ...
    def __init__(
        self,
        *,
        sender: builtins.str = ...,
        pair: builtins.str = ...,
        margin: cosmos.base.v1beta1.coin_pb2.Coin | None = ...,
    ) -> None: ...
    def HasField(self, field_name: typing_extensions.Literal["margin", b"margin"]) -> builtins.bool: ...
    def ClearField(self, field_name: typing_extensions.Literal["margin", b"margin", "pair", b"pair", "sender", b"sender"]) -> None: ...

global___MsgRemoveMargin = MsgRemoveMargin

@typing_extensions.final
class MsgRemoveMarginResponse(google.protobuf.message.Message):
    DESCRIPTOR: google.protobuf.descriptor.Descriptor

    MARGIN_OUT_FIELD_NUMBER: builtins.int
    FUNDING_PAYMENT_FIELD_NUMBER: builtins.int
    POSITION_FIELD_NUMBER: builtins.int
    @property
    def margin_out(self) -> cosmos.base.v1beta1.coin_pb2.Coin:
        """tokens transferred back to the trader"""
    funding_payment: builtins.str
    """the funding payment applied on this position interaction"""
    @property
    def position(self) -> nibiru.perp.v2.state_pb2.Position:
        """The resulting position"""
    def __init__(
        self,
        *,
        margin_out: cosmos.base.v1beta1.coin_pb2.Coin | None = ...,
        funding_payment: builtins.str = ...,
        position: nibiru.perp.v2.state_pb2.Position | None = ...,
    ) -> None: ...
    def HasField(self, field_name: typing_extensions.Literal["margin_out", b"margin_out", "position", b"position"]) -> builtins.bool: ...
    def ClearField(self, field_name: typing_extensions.Literal["funding_payment", b"funding_payment", "margin_out", b"margin_out", "position", b"position"]) -> None: ...

global___MsgRemoveMarginResponse = MsgRemoveMarginResponse

@typing_extensions.final
class MsgAddMargin(google.protobuf.message.Message):
    """-------------------------- AddMargin --------------------------

    MsgAddMargin: Msg to remove margin.
    """

    DESCRIPTOR: google.protobuf.descriptor.Descriptor

    SENDER_FIELD_NUMBER: builtins.int
    PAIR_FIELD_NUMBER: builtins.int
    MARGIN_FIELD_NUMBER: builtins.int
    sender: builtins.str
    pair: builtins.str
    @property
    def margin(self) -> cosmos.base.v1beta1.coin_pb2.Coin: ...
    def __init__(
        self,
        *,
        sender: builtins.str = ...,
        pair: builtins.str = ...,
        margin: cosmos.base.v1beta1.coin_pb2.Coin | None = ...,
    ) -> None: ...
    def HasField(self, field_name: typing_extensions.Literal["margin", b"margin"]) -> builtins.bool: ...
    def ClearField(self, field_name: typing_extensions.Literal["margin", b"margin", "pair", b"pair", "sender", b"sender"]) -> None: ...

global___MsgAddMargin = MsgAddMargin

@typing_extensions.final
class MsgAddMarginResponse(google.protobuf.message.Message):
    DESCRIPTOR: google.protobuf.descriptor.Descriptor

    FUNDING_PAYMENT_FIELD_NUMBER: builtins.int
    POSITION_FIELD_NUMBER: builtins.int
    funding_payment: builtins.str
    @property
    def position(self) -> nibiru.perp.v2.state_pb2.Position: ...
    def __init__(
        self,
        *,
        funding_payment: builtins.str = ...,
        position: nibiru.perp.v2.state_pb2.Position | None = ...,
    ) -> None: ...
    def HasField(self, field_name: typing_extensions.Literal["position", b"position"]) -> builtins.bool: ...
    def ClearField(self, field_name: typing_extensions.Literal["funding_payment", b"funding_payment", "position", b"position"]) -> None: ...

global___MsgAddMarginResponse = MsgAddMarginResponse

@typing_extensions.final
class MsgMultiLiquidate(google.protobuf.message.Message):
    """-------------------------- Liquidation --------------------------"""

    DESCRIPTOR: google.protobuf.descriptor.Descriptor

    @typing_extensions.final
    class Liquidation(google.protobuf.message.Message):
        DESCRIPTOR: google.protobuf.descriptor.Descriptor

        PAIR_FIELD_NUMBER: builtins.int
        TRADER_FIELD_NUMBER: builtins.int
        pair: builtins.str
        trader: builtins.str
        def __init__(
            self,
            *,
            pair: builtins.str = ...,
            trader: builtins.str = ...,
        ) -> None: ...
        def ClearField(self, field_name: typing_extensions.Literal["pair", b"pair", "trader", b"trader"]) -> None: ...

    SENDER_FIELD_NUMBER: builtins.int
    LIQUIDATIONS_FIELD_NUMBER: builtins.int
    sender: builtins.str
    @property
    def liquidations(self) -> google.protobuf.internal.containers.RepeatedCompositeFieldContainer[global___MsgMultiLiquidate.Liquidation]: ...
    def __init__(
        self,
        *,
        sender: builtins.str = ...,
        liquidations: collections.abc.Iterable[global___MsgMultiLiquidate.Liquidation] | None = ...,
    ) -> None: ...
    def ClearField(self, field_name: typing_extensions.Literal["liquidations", b"liquidations", "sender", b"sender"]) -> None: ...

global___MsgMultiLiquidate = MsgMultiLiquidate

@typing_extensions.final
class MsgMultiLiquidateResponse(google.protobuf.message.Message):
    DESCRIPTOR: google.protobuf.descriptor.Descriptor

    @typing_extensions.final
    class LiquidationResponse(google.protobuf.message.Message):
        DESCRIPTOR: google.protobuf.descriptor.Descriptor

        SUCCESS_FIELD_NUMBER: builtins.int
        ERROR_FIELD_NUMBER: builtins.int
        LIQUIDATOR_FEE_FIELD_NUMBER: builtins.int
        PERP_EF_FEE_FIELD_NUMBER: builtins.int
        TRADER_FIELD_NUMBER: builtins.int
        PAIR_FIELD_NUMBER: builtins.int
        success: builtins.bool
        error: builtins.str
        @property
        def liquidator_fee(self) -> cosmos.base.v1beta1.coin_pb2.Coin:
            """nullable since no fee is taken on failed liquidation"""
        @property
        def perp_ef_fee(self) -> cosmos.base.v1beta1.coin_pb2.Coin:
            """perp ecosystem fund"""
        trader: builtins.str
        """nullable since no fee is taken on failed liquidation"""
        pair: builtins.str
        def __init__(
            self,
            *,
            success: builtins.bool = ...,
            error: builtins.str = ...,
            liquidator_fee: cosmos.base.v1beta1.coin_pb2.Coin | None = ...,
            perp_ef_fee: cosmos.base.v1beta1.coin_pb2.Coin | None = ...,
            trader: builtins.str = ...,
            pair: builtins.str = ...,
        ) -> None: ...
        def HasField(self, field_name: typing_extensions.Literal["liquidator_fee", b"liquidator_fee", "perp_ef_fee", b"perp_ef_fee"]) -> builtins.bool: ...
        def ClearField(self, field_name: typing_extensions.Literal["error", b"error", "liquidator_fee", b"liquidator_fee", "pair", b"pair", "perp_ef_fee", b"perp_ef_fee", "success", b"success", "trader", b"trader"]) -> None: ...

    LIQUIDATIONS_FIELD_NUMBER: builtins.int
    @property
    def liquidations(self) -> google.protobuf.internal.containers.RepeatedCompositeFieldContainer[global___MsgMultiLiquidateResponse.LiquidationResponse]: ...
    def __init__(
        self,
        *,
        liquidations: collections.abc.Iterable[global___MsgMultiLiquidateResponse.LiquidationResponse] | None = ...,
    ) -> None: ...
    def ClearField(self, field_name: typing_extensions.Literal["liquidations", b"liquidations"]) -> None: ...

global___MsgMultiLiquidateResponse = MsgMultiLiquidateResponse

@typing_extensions.final
class MsgMarketOrder(google.protobuf.message.Message):
    """-------------------------- MarketOrder --------------------------"""

    DESCRIPTOR: google.protobuf.descriptor.Descriptor

    SENDER_FIELD_NUMBER: builtins.int
    PAIR_FIELD_NUMBER: builtins.int
    SIDE_FIELD_NUMBER: builtins.int
    QUOTE_ASSET_AMOUNT_FIELD_NUMBER: builtins.int
    LEVERAGE_FIELD_NUMBER: builtins.int
    BASE_ASSET_AMOUNT_LIMIT_FIELD_NUMBER: builtins.int
    sender: builtins.str
    pair: builtins.str
    side: nibiru.perp.v2.state_pb2.Direction.ValueType
    quote_asset_amount: builtins.str
    leverage: builtins.str
    base_asset_amount_limit: builtins.str
    def __init__(
        self,
        *,
        sender: builtins.str = ...,
        pair: builtins.str = ...,
        side: nibiru.perp.v2.state_pb2.Direction.ValueType = ...,
        quote_asset_amount: builtins.str = ...,
        leverage: builtins.str = ...,
        base_asset_amount_limit: builtins.str = ...,
    ) -> None: ...
    def ClearField(self, field_name: typing_extensions.Literal["base_asset_amount_limit", b"base_asset_amount_limit", "leverage", b"leverage", "pair", b"pair", "quote_asset_amount", b"quote_asset_amount", "sender", b"sender", "side", b"side"]) -> None: ...

global___MsgMarketOrder = MsgMarketOrder

@typing_extensions.final
class MsgMarketOrderResponse(google.protobuf.message.Message):
    DESCRIPTOR: google.protobuf.descriptor.Descriptor

    POSITION_FIELD_NUMBER: builtins.int
    EXCHANGED_NOTIONAL_VALUE_FIELD_NUMBER: builtins.int
    EXCHANGED_POSITION_SIZE_FIELD_NUMBER: builtins.int
    FUNDING_PAYMENT_FIELD_NUMBER: builtins.int
    REALIZED_PNL_FIELD_NUMBER: builtins.int
    UNREALIZED_PNL_AFTER_FIELD_NUMBER: builtins.int
    MARGIN_TO_VAULT_FIELD_NUMBER: builtins.int
    POSITION_NOTIONAL_FIELD_NUMBER: builtins.int
    @property
    def position(self) -> nibiru.perp.v2.state_pb2.Position: ...
    exchanged_notional_value: builtins.str
    """The amount of quote assets exchanged."""
    exchanged_position_size: builtins.str
    """The amount of base assets exchanged."""
    funding_payment: builtins.str
    """The funding payment applied on this position change, measured in quote
    units.
    """
    realized_pnl: builtins.str
    """The amount of PnL realized on this position changed, measured in quote
    units.
    """
    unrealized_pnl_after: builtins.str
    """The unrealized PnL in the position after the position change, measured in
    quote units.
    """
    margin_to_vault: builtins.str
    """The amount of margin the trader has to give to the vault.
    A negative value means the vault pays the trader.
    """
    position_notional: builtins.str
    """The position's notional value after the position change, measured in quote
    units.
    """
    def __init__(
        self,
        *,
        position: nibiru.perp.v2.state_pb2.Position | None = ...,
        exchanged_notional_value: builtins.str = ...,
        exchanged_position_size: builtins.str = ...,
        funding_payment: builtins.str = ...,
        realized_pnl: builtins.str = ...,
        unrealized_pnl_after: builtins.str = ...,
        margin_to_vault: builtins.str = ...,
        position_notional: builtins.str = ...,
    ) -> None: ...
    def HasField(self, field_name: typing_extensions.Literal["position", b"position"]) -> builtins.bool: ...
    def ClearField(self, field_name: typing_extensions.Literal["exchanged_notional_value", b"exchanged_notional_value", "exchanged_position_size", b"exchanged_position_size", "funding_payment", b"funding_payment", "margin_to_vault", b"margin_to_vault", "position", b"position", "position_notional", b"position_notional", "realized_pnl", b"realized_pnl", "unrealized_pnl_after", b"unrealized_pnl_after"]) -> None: ...

global___MsgMarketOrderResponse = MsgMarketOrderResponse

@typing_extensions.final
class MsgClosePosition(google.protobuf.message.Message):
    """-------------------------- ClosePosition --------------------------"""

    DESCRIPTOR: google.protobuf.descriptor.Descriptor

    SENDER_FIELD_NUMBER: builtins.int
    PAIR_FIELD_NUMBER: builtins.int
    sender: builtins.str
    pair: builtins.str
    def __init__(
        self,
        *,
        sender: builtins.str = ...,
        pair: builtins.str = ...,
    ) -> None: ...
    def ClearField(self, field_name: typing_extensions.Literal["pair", b"pair", "sender", b"sender"]) -> None: ...

global___MsgClosePosition = MsgClosePosition

@typing_extensions.final
class MsgClosePositionResponse(google.protobuf.message.Message):
    DESCRIPTOR: google.protobuf.descriptor.Descriptor

    EXCHANGED_NOTIONAL_VALUE_FIELD_NUMBER: builtins.int
    EXCHANGED_POSITION_SIZE_FIELD_NUMBER: builtins.int
    FUNDING_PAYMENT_FIELD_NUMBER: builtins.int
    REALIZED_PNL_FIELD_NUMBER: builtins.int
    MARGIN_TO_TRADER_FIELD_NUMBER: builtins.int
    exchanged_notional_value: builtins.str
    """The amount of quote assets exchanged."""
    exchanged_position_size: builtins.str
    """The amount of base assets exchanged."""
    funding_payment: builtins.str
    """The funding payment applied on this position change, measured in quote
    units.
    """
    realized_pnl: builtins.str
    """The amount of PnL realized on this position changed, measured in quote
    units.
    """
    margin_to_trader: builtins.str
    """The amount of margin the trader receives after closing the position, from
    the vault. Should never be negative.
    """
    def __init__(
        self,
        *,
        exchanged_notional_value: builtins.str = ...,
        exchanged_position_size: builtins.str = ...,
        funding_payment: builtins.str = ...,
        realized_pnl: builtins.str = ...,
        margin_to_trader: builtins.str = ...,
    ) -> None: ...
    def ClearField(self, field_name: typing_extensions.Literal["exchanged_notional_value", b"exchanged_notional_value", "exchanged_position_size", b"exchanged_position_size", "funding_payment", b"funding_payment", "margin_to_trader", b"margin_to_trader", "realized_pnl", b"realized_pnl"]) -> None: ...

global___MsgClosePositionResponse = MsgClosePositionResponse

@typing_extensions.final
class MsgPartialClose(google.protobuf.message.Message):
    DESCRIPTOR: google.protobuf.descriptor.Descriptor

    SENDER_FIELD_NUMBER: builtins.int
    PAIR_FIELD_NUMBER: builtins.int
    SIZE_FIELD_NUMBER: builtins.int
    sender: builtins.str
    pair: builtins.str
    size: builtins.str
    def __init__(
        self,
        *,
        sender: builtins.str = ...,
        pair: builtins.str = ...,
        size: builtins.str = ...,
    ) -> None: ...
    def ClearField(self, field_name: typing_extensions.Literal["pair", b"pair", "sender", b"sender", "size", b"size"]) -> None: ...

global___MsgPartialClose = MsgPartialClose

@typing_extensions.final
class MsgPartialCloseResponse(google.protobuf.message.Message):
    DESCRIPTOR: google.protobuf.descriptor.Descriptor

    EXCHANGED_NOTIONAL_VALUE_FIELD_NUMBER: builtins.int
    EXCHANGED_POSITION_SIZE_FIELD_NUMBER: builtins.int
    FUNDING_PAYMENT_FIELD_NUMBER: builtins.int
    REALIZED_PNL_FIELD_NUMBER: builtins.int
    MARGIN_TO_TRADER_FIELD_NUMBER: builtins.int
    exchanged_notional_value: builtins.str
    """The amount of quote assets exchanged."""
    exchanged_position_size: builtins.str
    """The amount of base assets exchanged."""
    funding_payment: builtins.str
    """The funding payment applied on this position change, measured in quote
    units.
    """
    realized_pnl: builtins.str
    """The amount of PnL realized on this position changed, measured in quote
    units.
    """
    margin_to_trader: builtins.str
    """The amount of margin the trader receives after closing the position, from
    the vault. Should never be negative.
    """
    def __init__(
        self,
        *,
        exchanged_notional_value: builtins.str = ...,
        exchanged_position_size: builtins.str = ...,
        funding_payment: builtins.str = ...,
        realized_pnl: builtins.str = ...,
        margin_to_trader: builtins.str = ...,
    ) -> None: ...
    def ClearField(self, field_name: typing_extensions.Literal["exchanged_notional_value", b"exchanged_notional_value", "exchanged_position_size", b"exchanged_position_size", "funding_payment", b"funding_payment", "margin_to_trader", b"margin_to_trader", "realized_pnl", b"realized_pnl"]) -> None: ...

global___MsgPartialCloseResponse = MsgPartialCloseResponse

@typing_extensions.final
class MsgDonateToEcosystemFund(google.protobuf.message.Message):
    """-------------------------- DonateToEcosystemFund --------------------------"""

    DESCRIPTOR: google.protobuf.descriptor.Descriptor

    SENDER_FIELD_NUMBER: builtins.int
    DONATION_FIELD_NUMBER: builtins.int
    sender: builtins.str
    @property
    def donation(self) -> cosmos.base.v1beta1.coin_pb2.Coin:
        """donation to the EF"""
    def __init__(
        self,
        *,
        sender: builtins.str = ...,
        donation: cosmos.base.v1beta1.coin_pb2.Coin | None = ...,
    ) -> None: ...
    def HasField(self, field_name: typing_extensions.Literal["donation", b"donation"]) -> builtins.bool: ...
    def ClearField(self, field_name: typing_extensions.Literal["donation", b"donation", "sender", b"sender"]) -> None: ...

global___MsgDonateToEcosystemFund = MsgDonateToEcosystemFund

@typing_extensions.final
class MsgDonateToEcosystemFundResponse(google.protobuf.message.Message):
    DESCRIPTOR: google.protobuf.descriptor.Descriptor

    def __init__(
        self,
    ) -> None: ...

global___MsgDonateToEcosystemFundResponse = MsgDonateToEcosystemFundResponse
