"""
@generated by mypy-protobuf.  Do not edit manually!
isort:skip_file
"""
import builtins
import cosmos.base.v1beta1.coin_pb2
import google.protobuf.descriptor
import google.protobuf.message
import perp.v1.state_pb2
import typing
import typing_extensions

DESCRIPTOR: google.protobuf.descriptor.FileDescriptor

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

    MsgRemoveMargin: Msg to remove margin.
    """
    DESCRIPTOR: google.protobuf.descriptor.Descriptor
    SENDER_FIELD_NUMBER: builtins.int
    TOKEN_PAIR_FIELD_NUMBER: builtins.int
    MARGIN_FIELD_NUMBER: builtins.int
    sender: typing.Text
    token_pair: typing.Text
    @property
    def margin(self) -> cosmos.base.v1beta1.coin_pb2.Coin: ...
    def __init__(self,
        *,
        sender: typing.Text = ...,
        token_pair: typing.Text = ...,
        margin: typing.Optional[cosmos.base.v1beta1.coin_pb2.Coin] = ...,
        ) -> 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","sender",b"sender","token_pair",b"token_pair"]) -> None: ...
global___MsgRemoveMargin = MsgRemoveMargin

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"""
        pass
    funding_payment: typing.Text
    """the funding payment applied on this position interaction"""

    @property
    def position(self) -> perp.v1.state_pb2.Position:
        """The resulting position"""
        pass
    def __init__(self,
        *,
        margin_out: typing.Optional[cosmos.base.v1beta1.coin_pb2.Coin] = ...,
        funding_payment: typing.Text = ...,
        position: typing.Optional[perp.v1.state_pb2.Position] = ...,
        ) -> 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

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

    MsgAddMargin: Msg to remove margin.
    """
    DESCRIPTOR: google.protobuf.descriptor.Descriptor
    SENDER_FIELD_NUMBER: builtins.int
    TOKEN_PAIR_FIELD_NUMBER: builtins.int
    MARGIN_FIELD_NUMBER: builtins.int
    sender: typing.Text
    token_pair: typing.Text
    @property
    def margin(self) -> cosmos.base.v1beta1.coin_pb2.Coin: ...
    def __init__(self,
        *,
        sender: typing.Text = ...,
        token_pair: typing.Text = ...,
        margin: typing.Optional[cosmos.base.v1beta1.coin_pb2.Coin] = ...,
        ) -> 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","sender",b"sender","token_pair",b"token_pair"]) -> None: ...
global___MsgAddMargin = MsgAddMargin

class MsgAddMarginResponse(google.protobuf.message.Message):
    DESCRIPTOR: google.protobuf.descriptor.Descriptor
    FUNDING_PAYMENT_FIELD_NUMBER: builtins.int
    POSITION_FIELD_NUMBER: builtins.int
    funding_payment: typing.Text
    @property
    def position(self) -> perp.v1.state_pb2.Position: ...
    def __init__(self,
        *,
        funding_payment: typing.Text = ...,
        position: typing.Optional[perp.v1.state_pb2.Position] = ...,
        ) -> 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

class MsgLiquidate(google.protobuf.message.Message):
    """-------------------------- Liquidate --------------------------

    """
    DESCRIPTOR: google.protobuf.descriptor.Descriptor
    SENDER_FIELD_NUMBER: builtins.int
    TOKEN_PAIR_FIELD_NUMBER: builtins.int
    TRADER_FIELD_NUMBER: builtins.int
    sender: typing.Text
    """Sender is the liquidator address"""

    token_pair: typing.Text
    """TokenPair is the identifier for the position's virtual pool"""

    trader: typing.Text
    """Trader is the address of the owner of the position"""

    def __init__(self,
        *,
        sender: typing.Text = ...,
        token_pair: typing.Text = ...,
        trader: typing.Text = ...,
        ) -> None: ...
    def ClearField(self, field_name: typing_extensions.Literal["sender",b"sender","token_pair",b"token_pair","trader",b"trader"]) -> None: ...
global___MsgLiquidate = MsgLiquidate

class MsgLiquidateResponse(google.protobuf.message.Message):
    DESCRIPTOR: google.protobuf.descriptor.Descriptor
    FEE_TO_LIQUIDATOR_FIELD_NUMBER: builtins.int
    FEE_TO_PERP_ECOSYSTEM_FUND_FIELD_NUMBER: builtins.int
    @property
    def fee_to_liquidator(self) -> cosmos.base.v1beta1.coin_pb2.Coin: ...
    @property
    def fee_to_perp_ecosystem_fund(self) -> cosmos.base.v1beta1.coin_pb2.Coin: ...
    def __init__(self,
        *,
        fee_to_liquidator: typing.Optional[cosmos.base.v1beta1.coin_pb2.Coin] = ...,
        fee_to_perp_ecosystem_fund: typing.Optional[cosmos.base.v1beta1.coin_pb2.Coin] = ...,
        ) -> None: ...
    def HasField(self, field_name: typing_extensions.Literal["fee_to_liquidator",b"fee_to_liquidator","fee_to_perp_ecosystem_fund",b"fee_to_perp_ecosystem_fund"]) -> builtins.bool: ...
    def ClearField(self, field_name: typing_extensions.Literal["fee_to_liquidator",b"fee_to_liquidator","fee_to_perp_ecosystem_fund",b"fee_to_perp_ecosystem_fund"]) -> None: ...
global___MsgLiquidateResponse = MsgLiquidateResponse

class MsgOpenPosition(google.protobuf.message.Message):
    """-------------------------- OpenPosition --------------------------

    """
    DESCRIPTOR: google.protobuf.descriptor.Descriptor
    SENDER_FIELD_NUMBER: builtins.int
    TOKEN_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: typing.Text
    token_pair: typing.Text
    side: perp.v1.state_pb2.Side.ValueType
    quote_asset_amount: typing.Text
    leverage: typing.Text
    base_asset_amount_limit: typing.Text
    def __init__(self,
        *,
        sender: typing.Text = ...,
        token_pair: typing.Text = ...,
        side: perp.v1.state_pb2.Side.ValueType = ...,
        quote_asset_amount: typing.Text = ...,
        leverage: typing.Text = ...,
        base_asset_amount_limit: typing.Text = ...,
        ) -> None: ...
    def ClearField(self, field_name: typing_extensions.Literal["base_asset_amount_limit",b"base_asset_amount_limit","leverage",b"leverage","quote_asset_amount",b"quote_asset_amount","sender",b"sender","side",b"side","token_pair",b"token_pair"]) -> None: ...
global___MsgOpenPosition = MsgOpenPosition

class MsgOpenPositionResponse(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) -> perp.v1.state_pb2.Position: ...
    exchanged_notional_value: typing.Text
    """The amount of quote assets exchanged."""

    exchanged_position_size: typing.Text
    """The amount of base assets exchanged."""

    funding_payment: typing.Text
    """The funding payment applied on this position change, measured in quote units."""

    realized_pnl: typing.Text
    """The amount of PnL realized on this position changed, measured in quote units."""

    unrealized_pnl_after: typing.Text
    """The unrealized PnL in the position after the position change, measured in quote units."""

    margin_to_vault: typing.Text
    """The amount of margin the trader has to give to the vault.
    A negative value means the vault pays the trader.
    """

    position_notional: typing.Text
    """The position's notional value after the position change, measured in quote units."""

    def __init__(self,
        *,
        position: typing.Optional[perp.v1.state_pb2.Position] = ...,
        exchanged_notional_value: typing.Text = ...,
        exchanged_position_size: typing.Text = ...,
        funding_payment: typing.Text = ...,
        realized_pnl: typing.Text = ...,
        unrealized_pnl_after: typing.Text = ...,
        margin_to_vault: typing.Text = ...,
        position_notional: typing.Text = ...,
        ) -> 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___MsgOpenPositionResponse = MsgOpenPositionResponse

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

    """
    DESCRIPTOR: google.protobuf.descriptor.Descriptor
    SENDER_FIELD_NUMBER: builtins.int
    TOKEN_PAIR_FIELD_NUMBER: builtins.int
    sender: typing.Text
    token_pair: typing.Text
    def __init__(self,
        *,
        sender: typing.Text = ...,
        token_pair: typing.Text = ...,
        ) -> None: ...
    def ClearField(self, field_name: typing_extensions.Literal["sender",b"sender","token_pair",b"token_pair"]) -> None: ...
global___MsgClosePosition = MsgClosePosition

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: typing.Text
    """The amount of quote assets exchanged."""

    exchanged_position_size: typing.Text
    """The amount of base assets exchanged."""

    funding_payment: typing.Text
    """The funding payment applied on this position change, measured in quote units."""

    realized_pnl: typing.Text
    """The amount of PnL realized on this position changed, measured in quote units."""

    margin_to_trader: typing.Text
    """The amount of margin the trader receives after closing the position, from the vault.
    Should never be negative.
    """

    def __init__(self,
        *,
        exchanged_notional_value: typing.Text = ...,
        exchanged_position_size: typing.Text = ...,
        funding_payment: typing.Text = ...,
        realized_pnl: typing.Text = ...,
        margin_to_trader: typing.Text = ...,
        ) -> 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
