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

DESCRIPTOR: google.protobuf.descriptor.FileDescriptor

class QueryParamsRequest(google.protobuf.message.Message):
    """---------------------------------------- Params

    QueryParamsRequest is request type for the Query/Params RPC method.
    """
    DESCRIPTOR: google.protobuf.descriptor.Descriptor
    def __init__(self,
        ) -> None: ...
global___QueryParamsRequest = QueryParamsRequest

class QueryParamsResponse(google.protobuf.message.Message):
    """QueryParamsResponse is response type for the Query/Params RPC method."""
    DESCRIPTOR: google.protobuf.descriptor.Descriptor
    PARAMS_FIELD_NUMBER: builtins.int
    @property
    def params(self) -> perp.v1.state_pb2.Params:
        """params holds all the parameters of this module."""
        pass
    def __init__(self,
        *,
        params: typing.Optional[perp.v1.state_pb2.Params] = ...,
        ) -> None: ...
    def HasField(self, field_name: typing_extensions.Literal["params",b"params"]) -> builtins.bool: ...
    def ClearField(self, field_name: typing_extensions.Literal["params",b"params"]) -> None: ...
global___QueryParamsResponse = QueryParamsResponse

class QueryTraderPositionRequest(google.protobuf.message.Message):
    """---------------------------------------- TraderPosition

    QueryTraderPositionRequest is the request type for the position of the 
    x/perp module account.
    """
    DESCRIPTOR: google.protobuf.descriptor.Descriptor
    TOKEN_PAIR_FIELD_NUMBER: builtins.int
    TRADER_FIELD_NUMBER: builtins.int
    token_pair: typing.Text
    trader: typing.Text
    def __init__(self,
        *,
        token_pair: typing.Text = ...,
        trader: typing.Text = ...,
        ) -> None: ...
    def ClearField(self, field_name: typing_extensions.Literal["token_pair",b"token_pair","trader",b"trader"]) -> None: ...
global___QueryTraderPositionRequest = QueryTraderPositionRequest

class QueryTraderPositionResponse(google.protobuf.message.Message):
    DESCRIPTOR: google.protobuf.descriptor.Descriptor
    POSITION_FIELD_NUMBER: builtins.int
    POSITION_NOTIONAL_FIELD_NUMBER: builtins.int
    UNREALIZED_PNL_FIELD_NUMBER: builtins.int
    MARGIN_RATIO_MARK_FIELD_NUMBER: builtins.int
    MARGIN_RATIO_INDEX_FIELD_NUMBER: builtins.int
    BLOCK_NUMBER_FIELD_NUMBER: builtins.int
    @property
    def position(self) -> perp.v1.state_pb2.Position:
        """The position as it exists in the blockchain state"""
        pass
    position_notional: typing.Text
    """The position's current notional value, if it were to be entirely closed (in margin units)."""

    unrealized_pnl: typing.Text
    """The position's unrealized PnL."""

    margin_ratio_mark: typing.Text
    """margin ratio of the position based on the mark price, mark TWAP. The higher
    value of the possible margin ratios (TWAP and instantaneous) is taken to be 
    'marginRatioMark'. Calculated from margin, unrealized PnL, and position notional.
    """

    margin_ratio_index: typing.Text
    """margin ratio of the position based on the index price. Calculated from margin, 
    unrealized PnL, and position notional.
    """

    block_number: builtins.int
    """BlockNumber is current block number at the time of query."""

    def __init__(self,
        *,
        position: typing.Optional[perp.v1.state_pb2.Position] = ...,
        position_notional: typing.Text = ...,
        unrealized_pnl: typing.Text = ...,
        margin_ratio_mark: typing.Text = ...,
        margin_ratio_index: typing.Text = ...,
        block_number: builtins.int = ...,
        ) -> None: ...
    def HasField(self, field_name: typing_extensions.Literal["position",b"position"]) -> builtins.bool: ...
    def ClearField(self, field_name: typing_extensions.Literal["block_number",b"block_number","margin_ratio_index",b"margin_ratio_index","margin_ratio_mark",b"margin_ratio_mark","position",b"position","position_notional",b"position_notional","unrealized_pnl",b"unrealized_pnl"]) -> None: ...
global___QueryTraderPositionResponse = QueryTraderPositionResponse
