Documentation ¶
Overview ¶
Package types is a reverse proxy.
It translates gRPC into RESTful JSON APIs.
Package types is a reverse proxy.
It translates gRPC into RESTful JSON APIs.
Index ¶
- Constants
- Variables
- func MarketsAreEqual(expected, actual *Market) error
- func PositionsAreEqual(expected, actual *Position) error
- func RegisterCodec(cdc *codec.LegacyAmino)
- func RegisterInterfaces(registry cdctypes.InterfaceRegistry)
- func RegisterMsgHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error
- func RegisterMsgHandlerClient(ctx context.Context, mux *runtime.ServeMux, client MsgClient) error
- func RegisterMsgHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, ...) (err error)
- func RegisterMsgHandlerServer(ctx context.Context, mux *runtime.ServeMux, server MsgServer) error
- func RegisterMsgServer(s grpc1.Server, srv MsgServer)
- func RegisterQueryHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error
- func RegisterQueryHandlerClient(ctx context.Context, mux *runtime.ServeMux, client QueryClient) error
- func RegisterQueryHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, ...) (err error)
- func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, server QueryServer) error
- func RegisterQueryServer(s grpc1.Server, srv QueryServer)
- type AMM
- func (amm *AMM) Bias() (bias sdk.Dec)
- func (amm AMM) CalcRepegCost(newPriceMultiplier sdk.Dec) (cost sdkmath.Int, err error)
- func (amm AMM) CalcUpdateSwapInvariantCost(newSwapInvariant sdk.Dec) (sdkmath.Int, error)
- func (amm AMM) ComputeSqrtDepth() (sqrtDepth sdk.Dec, err error)
- func (*AMM) Descriptor() ([]byte, []int)
- func (amm AMM) FromQuoteAssetToReserve(quoteAsset sdk.Dec) sdk.Dec
- func (amm AMM) FromQuoteReserveToAsset(quoteReserve sdk.Dec) sdk.Dec
- func (amm AMM) GetBaseReserveAmt(quoteReserveAmt sdk.Dec, dir Direction) (baseReserveDelta sdk.Dec, err error)
- func (amm AMM) GetMarketValue() (sdk.Dec, error)
- func (amm AMM) GetQuoteReserveAmt(baseReserveAmt sdk.Dec, dir Direction) (quoteReserveDelta sdk.Dec, err error)
- func (amm AMM) MarkPrice() sdk.Dec
- func (m *AMM) Marshal() (dAtA []byte, err error)
- func (m *AMM) MarshalTo(dAtA []byte) (int, error)
- func (m *AMM) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*AMM) ProtoMessage()
- func (m *AMM) Reset()
- func (m *AMM) Size() (n int)
- func (m *AMM) String() string
- func (amm *AMM) SwapBaseAsset(baseAssetAmt sdk.Dec, dir Direction) (quoteAssetDelta sdk.Dec, err error)
- func (amm *AMM) SwapQuoteAsset(quoteAssetAmt sdk.Dec, dir Direction) (baseAssetDelta sdk.Dec, err error)
- func (m *AMM) Unmarshal(dAtA []byte) error
- func (amm *AMM) UpdateSwapInvariant(newSwapInvariant sdk.Dec) (err error)
- func (amm AMM) Validate() error
- func (amm *AMM) WithBaseReserve(baseReserve sdk.Dec) *AMM
- func (amm *AMM) WithPair(pair asset.Pair) *AMM
- func (amm *AMM) WithPriceMultiplier(priceMultiplier sdk.Dec) *AMM
- func (amm *AMM) WithQuoteReserve(quoteReserve sdk.Dec) *AMM
- func (amm *AMM) WithSqrtDepth(sqrtDepth sdk.Dec) *AMM
- func (amm *AMM) WithTotalLong(totalLong sdk.Dec) *AMM
- func (amm *AMM) WithTotalShort(totalShort sdk.Dec) *AMM
- func (m *AMM) XXX_DiscardUnknown()
- func (m *AMM) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *AMM) XXX_Merge(src proto.Message)
- func (m *AMM) XXX_Size() int
- func (m *AMM) XXX_Unmarshal(b []byte) error
- type AccountKeeper
- type AccountWithBalance
- func (*AccountWithBalance) Descriptor() ([]byte, []int)
- func (m *AccountWithBalance) GetAddress() string
- func (m *AccountWithBalance) GetBalance() github_com_cosmos_cosmos_sdk_types.Coins
- func (m *AccountWithBalance) GetName() string
- func (m *AccountWithBalance) Marshal() (dAtA []byte, err error)
- func (m *AccountWithBalance) MarshalTo(dAtA []byte) (int, error)
- func (m *AccountWithBalance) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*AccountWithBalance) ProtoMessage()
- func (m *AccountWithBalance) Reset()
- func (m *AccountWithBalance) Size() (n int)
- func (m *AccountWithBalance) String() string
- func (m *AccountWithBalance) Unmarshal(dAtA []byte) error
- func (m *AccountWithBalance) XXX_DiscardUnknown()
- func (m *AccountWithBalance) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *AccountWithBalance) XXX_Merge(src proto.Message)
- func (m *AccountWithBalance) XXX_Size() int
- func (m *AccountWithBalance) XXX_Unmarshal(b []byte) error
- type AmmMarket
- func (*AmmMarket) Descriptor() ([]byte, []int)
- func (m *AmmMarket) GetAmm() AMM
- func (m *AmmMarket) GetMarket() Market
- func (m *AmmMarket) Marshal() (dAtA []byte, err error)
- func (m *AmmMarket) MarshalTo(dAtA []byte) (int, error)
- func (m *AmmMarket) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*AmmMarket) ProtoMessage()
- func (m *AmmMarket) Reset()
- func (m *AmmMarket) Size() (n int)
- func (m *AmmMarket) String() string
- func (m *AmmMarket) Unmarshal(dAtA []byte) error
- func (m *AmmMarket) XXX_DiscardUnknown()
- func (m *AmmMarket) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *AmmMarket) XXX_Merge(src proto.Message)
- func (m *AmmMarket) XXX_Size() int
- func (m *AmmMarket) XXX_Unmarshal(b []byte) error
- type AmmUpdatedEvent
- func (*AmmUpdatedEvent) Descriptor() ([]byte, []int)
- func (m *AmmUpdatedEvent) GetFinalAmm() AMM
- func (m *AmmUpdatedEvent) Marshal() (dAtA []byte, err error)
- func (m *AmmUpdatedEvent) MarshalTo(dAtA []byte) (int, error)
- func (m *AmmUpdatedEvent) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*AmmUpdatedEvent) ProtoMessage()
- func (m *AmmUpdatedEvent) Reset()
- func (m *AmmUpdatedEvent) Size() (n int)
- func (m *AmmUpdatedEvent) String() string
- func (m *AmmUpdatedEvent) Unmarshal(dAtA []byte) error
- func (m *AmmUpdatedEvent) XXX_DiscardUnknown()
- func (m *AmmUpdatedEvent) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *AmmUpdatedEvent) XXX_Merge(src proto.Message)
- func (m *AmmUpdatedEvent) XXX_Size() int
- func (m *AmmUpdatedEvent) XXX_Unmarshal(b []byte) error
- type BankKeeper
- type ChangeReason
- func (c *ChangeReason) Marshal() ([]byte, error)
- func (c *ChangeReason) MarshalJSON() ([]byte, error)
- func (c *ChangeReason) MarshalTo(data []byte) (n int, err error)
- func (c *ChangeReason) Size() int
- func (c *ChangeReason) Unmarshal(data []byte) error
- func (c *ChangeReason) UnmarshalJSON(data []byte) error
- type Direction
- type EpochKeeper
- type FundingRateChangedEvent
- func (*FundingRateChangedEvent) Descriptor() ([]byte, []int)
- func (m *FundingRateChangedEvent) Marshal() (dAtA []byte, err error)
- func (m *FundingRateChangedEvent) MarshalTo(dAtA []byte) (int, error)
- func (m *FundingRateChangedEvent) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*FundingRateChangedEvent) ProtoMessage()
- func (m *FundingRateChangedEvent) Reset()
- func (m *FundingRateChangedEvent) Size() (n int)
- func (m *FundingRateChangedEvent) String() string
- func (m *FundingRateChangedEvent) Unmarshal(dAtA []byte) error
- func (m *FundingRateChangedEvent) XXX_DiscardUnknown()
- func (m *FundingRateChangedEvent) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *FundingRateChangedEvent) XXX_Merge(src proto.Message)
- func (m *FundingRateChangedEvent) XXX_Size() int
- func (m *FundingRateChangedEvent) XXX_Unmarshal(b []byte) error
- type GenesisState
- func (*GenesisState) Descriptor() ([]byte, []int)
- func (m *GenesisState) GetAmms() []AMM
- func (m *GenesisState) GetMarkets() []Market
- func (m *GenesisState) GetPositions() []Position
- func (m *GenesisState) GetReserveSnapshots() []ReserveSnapshot
- func (m *GenesisState) Marshal() (dAtA []byte, err error)
- func (m *GenesisState) MarshalTo(dAtA []byte) (int, error)
- func (m *GenesisState) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*GenesisState) ProtoMessage()
- func (m *GenesisState) Reset()
- func (m *GenesisState) Size() (n int)
- func (m *GenesisState) String() string
- func (m *GenesisState) Unmarshal(dAtA []byte) error
- func (gs GenesisState) Validate() error
- func (m *GenesisState) XXX_DiscardUnknown()
- func (m *GenesisState) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *GenesisState) XXX_Merge(src proto.Message)
- func (m *GenesisState) XXX_Size() int
- func (m *GenesisState) XXX_Unmarshal(b []byte) error
- type LiquidateResp
- type LiquidationFailedEvent
- func (*LiquidationFailedEvent) Descriptor() ([]byte, []int)
- func (m *LiquidationFailedEvent) GetLiquidator() string
- func (m *LiquidationFailedEvent) GetReason() LiquidationFailedEvent_LiquidationFailedReason
- func (m *LiquidationFailedEvent) GetTrader() string
- func (m *LiquidationFailedEvent) Marshal() (dAtA []byte, err error)
- func (m *LiquidationFailedEvent) MarshalTo(dAtA []byte) (int, error)
- func (m *LiquidationFailedEvent) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*LiquidationFailedEvent) ProtoMessage()
- func (m *LiquidationFailedEvent) Reset()
- func (m *LiquidationFailedEvent) Size() (n int)
- func (m *LiquidationFailedEvent) String() string
- func (m *LiquidationFailedEvent) Unmarshal(dAtA []byte) error
- func (m *LiquidationFailedEvent) XXX_DiscardUnknown()
- func (m *LiquidationFailedEvent) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *LiquidationFailedEvent) XXX_Merge(src proto.Message)
- func (m *LiquidationFailedEvent) XXX_Size() int
- func (m *LiquidationFailedEvent) XXX_Unmarshal(b []byte) error
- type LiquidationFailedEvent_LiquidationFailedReason
- type Market
- func (*Market) Descriptor() ([]byte, []int)
- func (m *Market) GetEnabled() bool
- func (m *Market) GetFundingRateEpochId() string
- func (m *Market) GetPrepaidBadDebt() types.Coin
- func (m *Market) GetTwapLookbackWindow() time.Duration
- func (m *Market) Marshal() (dAtA []byte, err error)
- func (m *Market) MarshalTo(dAtA []byte) (int, error)
- func (m *Market) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*Market) ProtoMessage()
- func (m *Market) Reset()
- func (m *Market) Size() (n int)
- func (m *Market) String() string
- func (m *Market) Unmarshal(dAtA []byte) error
- func (market *Market) Validate() error
- func (market *Market) WithEcosystemFee(value sdk.Dec) *Market
- func (market *Market) WithExchangeFee(value sdk.Dec) *Market
- func (market *Market) WithFundingRateEpochId(value string) *Market
- func (market *Market) WithLatestCumulativePremiumFraction(value sdk.Dec) *Market
- func (market *Market) WithLiquidationFee(value sdk.Dec) *Market
- func (market *Market) WithMaintenanceMarginRatio(value sdk.Dec) *Market
- func (market *Market) WithMaxLeverage(value sdk.Dec) *Market
- func (market *Market) WithPair(value asset.Pair) *Market
- func (market *Market) WithPartialLiquidationRatio(value sdk.Dec) *Market
- func (m *Market) XXX_DiscardUnknown()
- func (m *Market) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *Market) XXX_Merge(src proto.Message)
- func (m *Market) XXX_Size() int
- func (m *Market) XXX_Unmarshal(b []byte) error
- type MarketUpdatedEvent
- func (*MarketUpdatedEvent) Descriptor() ([]byte, []int)
- func (m *MarketUpdatedEvent) GetFinalMarket() Market
- func (m *MarketUpdatedEvent) Marshal() (dAtA []byte, err error)
- func (m *MarketUpdatedEvent) MarshalTo(dAtA []byte) (int, error)
- func (m *MarketUpdatedEvent) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*MarketUpdatedEvent) ProtoMessage()
- func (m *MarketUpdatedEvent) Reset()
- func (m *MarketUpdatedEvent) Size() (n int)
- func (m *MarketUpdatedEvent) String() string
- func (m *MarketUpdatedEvent) Unmarshal(dAtA []byte) error
- func (m *MarketUpdatedEvent) XXX_DiscardUnknown()
- func (m *MarketUpdatedEvent) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *MarketUpdatedEvent) XXX_Merge(src proto.Message)
- func (m *MarketUpdatedEvent) XXX_Size() int
- func (m *MarketUpdatedEvent) XXX_Unmarshal(b []byte) error
- type MsgAddMargin
- func (*MsgAddMargin) Descriptor() ([]byte, []int)
- func (m *MsgAddMargin) GetMargin() types.Coin
- func (m *MsgAddMargin) GetSender() string
- func (m MsgAddMargin) GetSignBytes() []byte
- func (m MsgAddMargin) GetSigners() []sdk.AccAddress
- func (m *MsgAddMargin) Marshal() (dAtA []byte, err error)
- func (m *MsgAddMargin) MarshalTo(dAtA []byte) (int, error)
- func (m *MsgAddMargin) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*MsgAddMargin) ProtoMessage()
- func (m *MsgAddMargin) Reset()
- func (m MsgAddMargin) Route() string
- func (m *MsgAddMargin) Size() (n int)
- func (m *MsgAddMargin) String() string
- func (m MsgAddMargin) Type() string
- func (m *MsgAddMargin) Unmarshal(dAtA []byte) error
- func (m MsgAddMargin) ValidateBasic() error
- func (m *MsgAddMargin) XXX_DiscardUnknown()
- func (m *MsgAddMargin) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *MsgAddMargin) XXX_Merge(src proto.Message)
- func (m *MsgAddMargin) XXX_Size() int
- func (m *MsgAddMargin) XXX_Unmarshal(b []byte) error
- type MsgAddMarginResponse
- func (*MsgAddMarginResponse) Descriptor() ([]byte, []int)
- func (m *MsgAddMarginResponse) GetPosition() *Position
- func (m *MsgAddMarginResponse) Marshal() (dAtA []byte, err error)
- func (m *MsgAddMarginResponse) MarshalTo(dAtA []byte) (int, error)
- func (m *MsgAddMarginResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*MsgAddMarginResponse) ProtoMessage()
- func (m *MsgAddMarginResponse) Reset()
- func (m *MsgAddMarginResponse) Size() (n int)
- func (m *MsgAddMarginResponse) String() string
- func (m *MsgAddMarginResponse) Unmarshal(dAtA []byte) error
- func (m *MsgAddMarginResponse) XXX_DiscardUnknown()
- func (m *MsgAddMarginResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *MsgAddMarginResponse) XXX_Merge(src proto.Message)
- func (m *MsgAddMarginResponse) XXX_Size() int
- func (m *MsgAddMarginResponse) XXX_Unmarshal(b []byte) error
- type MsgClient
- type MsgClosePosition
- func (*MsgClosePosition) Descriptor() ([]byte, []int)
- func (m *MsgClosePosition) GetSender() string
- func (m MsgClosePosition) GetSignBytes() []byte
- func (m MsgClosePosition) GetSigners() []sdk.AccAddress
- func (m *MsgClosePosition) Marshal() (dAtA []byte, err error)
- func (m *MsgClosePosition) MarshalTo(dAtA []byte) (int, error)
- func (m *MsgClosePosition) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*MsgClosePosition) ProtoMessage()
- func (m *MsgClosePosition) Reset()
- func (m MsgClosePosition) Route() string
- func (m *MsgClosePosition) Size() (n int)
- func (m *MsgClosePosition) String() string
- func (m MsgClosePosition) Type() string
- func (m *MsgClosePosition) Unmarshal(dAtA []byte) error
- func (m MsgClosePosition) ValidateBasic() error
- func (m *MsgClosePosition) XXX_DiscardUnknown()
- func (m *MsgClosePosition) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *MsgClosePosition) XXX_Merge(src proto.Message)
- func (m *MsgClosePosition) XXX_Size() int
- func (m *MsgClosePosition) XXX_Unmarshal(b []byte) error
- type MsgClosePositionResponse
- func (*MsgClosePositionResponse) Descriptor() ([]byte, []int)
- func (m *MsgClosePositionResponse) Marshal() (dAtA []byte, err error)
- func (m *MsgClosePositionResponse) MarshalTo(dAtA []byte) (int, error)
- func (m *MsgClosePositionResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*MsgClosePositionResponse) ProtoMessage()
- func (m *MsgClosePositionResponse) Reset()
- func (m *MsgClosePositionResponse) Size() (n int)
- func (m *MsgClosePositionResponse) String() string
- func (m *MsgClosePositionResponse) Unmarshal(dAtA []byte) error
- func (m *MsgClosePositionResponse) XXX_DiscardUnknown()
- func (m *MsgClosePositionResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *MsgClosePositionResponse) XXX_Merge(src proto.Message)
- func (m *MsgClosePositionResponse) XXX_Size() int
- func (m *MsgClosePositionResponse) XXX_Unmarshal(b []byte) error
- type MsgDonateToEcosystemFund
- func (*MsgDonateToEcosystemFund) Descriptor() ([]byte, []int)
- func (m *MsgDonateToEcosystemFund) GetDonation() types.Coin
- func (m *MsgDonateToEcosystemFund) GetSender() string
- func (m MsgDonateToEcosystemFund) GetSignBytes() []byte
- func (m MsgDonateToEcosystemFund) GetSigners() []sdk.AccAddress
- func (m *MsgDonateToEcosystemFund) Marshal() (dAtA []byte, err error)
- func (m *MsgDonateToEcosystemFund) MarshalTo(dAtA []byte) (int, error)
- func (m *MsgDonateToEcosystemFund) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*MsgDonateToEcosystemFund) ProtoMessage()
- func (m *MsgDonateToEcosystemFund) Reset()
- func (m MsgDonateToEcosystemFund) Route() string
- func (m *MsgDonateToEcosystemFund) Size() (n int)
- func (m *MsgDonateToEcosystemFund) String() string
- func (m MsgDonateToEcosystemFund) Type() string
- func (m *MsgDonateToEcosystemFund) Unmarshal(dAtA []byte) error
- func (m MsgDonateToEcosystemFund) ValidateBasic() error
- func (m *MsgDonateToEcosystemFund) XXX_DiscardUnknown()
- func (m *MsgDonateToEcosystemFund) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *MsgDonateToEcosystemFund) XXX_Merge(src proto.Message)
- func (m *MsgDonateToEcosystemFund) XXX_Size() int
- func (m *MsgDonateToEcosystemFund) XXX_Unmarshal(b []byte) error
- type MsgDonateToEcosystemFundResponse
- func (*MsgDonateToEcosystemFundResponse) Descriptor() ([]byte, []int)
- func (m *MsgDonateToEcosystemFundResponse) Marshal() (dAtA []byte, err error)
- func (m *MsgDonateToEcosystemFundResponse) MarshalTo(dAtA []byte) (int, error)
- func (m *MsgDonateToEcosystemFundResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*MsgDonateToEcosystemFundResponse) ProtoMessage()
- func (m *MsgDonateToEcosystemFundResponse) Reset()
- func (m *MsgDonateToEcosystemFundResponse) Size() (n int)
- func (m *MsgDonateToEcosystemFundResponse) String() string
- func (m *MsgDonateToEcosystemFundResponse) Unmarshal(dAtA []byte) error
- func (m *MsgDonateToEcosystemFundResponse) XXX_DiscardUnknown()
- func (m *MsgDonateToEcosystemFundResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *MsgDonateToEcosystemFundResponse) XXX_Merge(src proto.Message)
- func (m *MsgDonateToEcosystemFundResponse) XXX_Size() int
- func (m *MsgDonateToEcosystemFundResponse) XXX_Unmarshal(b []byte) error
- type MsgMultiLiquidate
- func (*MsgMultiLiquidate) Descriptor() ([]byte, []int)
- func (m *MsgMultiLiquidate) GetLiquidations() []*MsgMultiLiquidate_Liquidation
- func (m *MsgMultiLiquidate) GetSender() string
- func (m *MsgMultiLiquidate) GetSigners() []sdk.AccAddress
- func (m *MsgMultiLiquidate) Marshal() (dAtA []byte, err error)
- func (m *MsgMultiLiquidate) MarshalTo(dAtA []byte) (int, error)
- func (m *MsgMultiLiquidate) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*MsgMultiLiquidate) ProtoMessage()
- func (m *MsgMultiLiquidate) Reset()
- func (m *MsgMultiLiquidate) Size() (n int)
- func (m *MsgMultiLiquidate) String() string
- func (m *MsgMultiLiquidate) Unmarshal(dAtA []byte) error
- func (m *MsgMultiLiquidate) ValidateBasic() error
- func (m *MsgMultiLiquidate) XXX_DiscardUnknown()
- func (m *MsgMultiLiquidate) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *MsgMultiLiquidate) XXX_Merge(src proto.Message)
- func (m *MsgMultiLiquidate) XXX_Size() int
- func (m *MsgMultiLiquidate) XXX_Unmarshal(b []byte) error
- type MsgMultiLiquidateResponse
- func (*MsgMultiLiquidateResponse) Descriptor() ([]byte, []int)
- func (m *MsgMultiLiquidateResponse) GetLiquidations() []*MsgMultiLiquidateResponse_LiquidationResponse
- func (m *MsgMultiLiquidateResponse) Marshal() (dAtA []byte, err error)
- func (m *MsgMultiLiquidateResponse) MarshalTo(dAtA []byte) (int, error)
- func (m *MsgMultiLiquidateResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*MsgMultiLiquidateResponse) ProtoMessage()
- func (m *MsgMultiLiquidateResponse) Reset()
- func (m *MsgMultiLiquidateResponse) Size() (n int)
- func (m *MsgMultiLiquidateResponse) String() string
- func (m *MsgMultiLiquidateResponse) Unmarshal(dAtA []byte) error
- func (m *MsgMultiLiquidateResponse) XXX_DiscardUnknown()
- func (m *MsgMultiLiquidateResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *MsgMultiLiquidateResponse) XXX_Merge(src proto.Message)
- func (m *MsgMultiLiquidateResponse) XXX_Size() int
- func (m *MsgMultiLiquidateResponse) XXX_Unmarshal(b []byte) error
- type MsgMultiLiquidateResponse_LiquidationResponse
- func (*MsgMultiLiquidateResponse_LiquidationResponse) Descriptor() ([]byte, []int)
- func (m *MsgMultiLiquidateResponse_LiquidationResponse) GetError() string
- func (m *MsgMultiLiquidateResponse_LiquidationResponse) GetLiquidatorFee() *types.Coin
- func (m *MsgMultiLiquidateResponse_LiquidationResponse) GetPerpEfFee() *types.Coin
- func (m *MsgMultiLiquidateResponse_LiquidationResponse) GetSuccess() bool
- func (m *MsgMultiLiquidateResponse_LiquidationResponse) GetTrader() string
- func (m *MsgMultiLiquidateResponse_LiquidationResponse) Marshal() (dAtA []byte, err error)
- func (m *MsgMultiLiquidateResponse_LiquidationResponse) MarshalTo(dAtA []byte) (int, error)
- func (m *MsgMultiLiquidateResponse_LiquidationResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*MsgMultiLiquidateResponse_LiquidationResponse) ProtoMessage()
- func (m *MsgMultiLiquidateResponse_LiquidationResponse) Reset()
- func (m *MsgMultiLiquidateResponse_LiquidationResponse) Size() (n int)
- func (m *MsgMultiLiquidateResponse_LiquidationResponse) String() string
- func (m *MsgMultiLiquidateResponse_LiquidationResponse) Unmarshal(dAtA []byte) error
- func (m *MsgMultiLiquidateResponse_LiquidationResponse) XXX_DiscardUnknown()
- func (m *MsgMultiLiquidateResponse_LiquidationResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *MsgMultiLiquidateResponse_LiquidationResponse) XXX_Merge(src proto.Message)
- func (m *MsgMultiLiquidateResponse_LiquidationResponse) XXX_Size() int
- func (m *MsgMultiLiquidateResponse_LiquidationResponse) XXX_Unmarshal(b []byte) error
- type MsgMultiLiquidate_Liquidation
- func (*MsgMultiLiquidate_Liquidation) Descriptor() ([]byte, []int)
- func (m *MsgMultiLiquidate_Liquidation) GetTrader() string
- func (m *MsgMultiLiquidate_Liquidation) Marshal() (dAtA []byte, err error)
- func (m *MsgMultiLiquidate_Liquidation) MarshalTo(dAtA []byte) (int, error)
- func (m *MsgMultiLiquidate_Liquidation) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*MsgMultiLiquidate_Liquidation) ProtoMessage()
- func (m *MsgMultiLiquidate_Liquidation) Reset()
- func (m *MsgMultiLiquidate_Liquidation) Size() (n int)
- func (m *MsgMultiLiquidate_Liquidation) String() string
- func (m *MsgMultiLiquidate_Liquidation) Unmarshal(dAtA []byte) error
- func (m *MsgMultiLiquidate_Liquidation) XXX_DiscardUnknown()
- func (m *MsgMultiLiquidate_Liquidation) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *MsgMultiLiquidate_Liquidation) XXX_Merge(src proto.Message)
- func (m *MsgMultiLiquidate_Liquidation) XXX_Size() int
- func (m *MsgMultiLiquidate_Liquidation) XXX_Unmarshal(b []byte) error
- type MsgOpenPosition
- func (*MsgOpenPosition) Descriptor() ([]byte, []int)
- func (m *MsgOpenPosition) GetSender() string
- func (m *MsgOpenPosition) GetSide() Direction
- func (m MsgOpenPosition) GetSignBytes() []byte
- func (m *MsgOpenPosition) GetSigners() []sdk.AccAddress
- func (m *MsgOpenPosition) Marshal() (dAtA []byte, err error)
- func (m *MsgOpenPosition) MarshalTo(dAtA []byte) (int, error)
- func (m *MsgOpenPosition) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*MsgOpenPosition) ProtoMessage()
- func (m *MsgOpenPosition) Reset()
- func (m MsgOpenPosition) Route() string
- func (m *MsgOpenPosition) Size() (n int)
- func (m *MsgOpenPosition) String() string
- func (m MsgOpenPosition) Type() string
- func (m *MsgOpenPosition) Unmarshal(dAtA []byte) error
- func (m *MsgOpenPosition) ValidateBasic() error
- func (m *MsgOpenPosition) XXX_DiscardUnknown()
- func (m *MsgOpenPosition) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *MsgOpenPosition) XXX_Merge(src proto.Message)
- func (m *MsgOpenPosition) XXX_Size() int
- func (m *MsgOpenPosition) XXX_Unmarshal(b []byte) error
- type MsgOpenPositionResponse
- func (*MsgOpenPositionResponse) Descriptor() ([]byte, []int)
- func (m *MsgOpenPositionResponse) GetPosition() *Position
- func (m *MsgOpenPositionResponse) Marshal() (dAtA []byte, err error)
- func (m *MsgOpenPositionResponse) MarshalTo(dAtA []byte) (int, error)
- func (m *MsgOpenPositionResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*MsgOpenPositionResponse) ProtoMessage()
- func (m *MsgOpenPositionResponse) Reset()
- func (m *MsgOpenPositionResponse) Size() (n int)
- func (m *MsgOpenPositionResponse) String() string
- func (m *MsgOpenPositionResponse) Unmarshal(dAtA []byte) error
- func (m *MsgOpenPositionResponse) XXX_DiscardUnknown()
- func (m *MsgOpenPositionResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *MsgOpenPositionResponse) XXX_Merge(src proto.Message)
- func (m *MsgOpenPositionResponse) XXX_Size() int
- func (m *MsgOpenPositionResponse) XXX_Unmarshal(b []byte) error
- type MsgRemoveMargin
- func (*MsgRemoveMargin) Descriptor() ([]byte, []int)
- func (m *MsgRemoveMargin) GetMargin() types.Coin
- func (m *MsgRemoveMargin) GetSender() string
- func (m MsgRemoveMargin) GetSignBytes() []byte
- func (m MsgRemoveMargin) GetSigners() []sdk.AccAddress
- func (m *MsgRemoveMargin) Marshal() (dAtA []byte, err error)
- func (m *MsgRemoveMargin) MarshalTo(dAtA []byte) (int, error)
- func (m *MsgRemoveMargin) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*MsgRemoveMargin) ProtoMessage()
- func (m *MsgRemoveMargin) Reset()
- func (m MsgRemoveMargin) Route() string
- func (m *MsgRemoveMargin) Size() (n int)
- func (m *MsgRemoveMargin) String() string
- func (m MsgRemoveMargin) Type() string
- func (m *MsgRemoveMargin) Unmarshal(dAtA []byte) error
- func (m MsgRemoveMargin) ValidateBasic() error
- func (m *MsgRemoveMargin) XXX_DiscardUnknown()
- func (m *MsgRemoveMargin) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *MsgRemoveMargin) XXX_Merge(src proto.Message)
- func (m *MsgRemoveMargin) XXX_Size() int
- func (m *MsgRemoveMargin) XXX_Unmarshal(b []byte) error
- type MsgRemoveMarginResponse
- func (*MsgRemoveMarginResponse) Descriptor() ([]byte, []int)
- func (m *MsgRemoveMarginResponse) GetMarginOut() types.Coin
- func (m *MsgRemoveMarginResponse) GetPosition() *Position
- func (m *MsgRemoveMarginResponse) Marshal() (dAtA []byte, err error)
- func (m *MsgRemoveMarginResponse) MarshalTo(dAtA []byte) (int, error)
- func (m *MsgRemoveMarginResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*MsgRemoveMarginResponse) ProtoMessage()
- func (m *MsgRemoveMarginResponse) Reset()
- func (m *MsgRemoveMarginResponse) Size() (n int)
- func (m *MsgRemoveMarginResponse) String() string
- func (m *MsgRemoveMarginResponse) Unmarshal(dAtA []byte) error
- func (m *MsgRemoveMarginResponse) XXX_DiscardUnknown()
- func (m *MsgRemoveMarginResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *MsgRemoveMarginResponse) XXX_Merge(src proto.Message)
- func (m *MsgRemoveMarginResponse) XXX_Size() int
- func (m *MsgRemoveMarginResponse) XXX_Unmarshal(b []byte) error
- type MsgServer
- type OracleKeeper
- type Position
- func (*Position) Descriptor() ([]byte, []int)
- func (m *Position) GetLastUpdatedBlockNumber() int64
- func (m *Position) GetTraderAddress() string
- func (m *Position) Marshal() (dAtA []byte, err error)
- func (m *Position) MarshalTo(dAtA []byte) (int, error)
- func (m *Position) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*Position) ProtoMessage()
- func (m *Position) Reset()
- func (m *Position) Size() (n int)
- func (m *Position) String() string
- func (m *Position) Unmarshal(dAtA []byte) error
- func (m *Position) Validate() error
- func (m *Position) XXX_DiscardUnknown()
- func (m *Position) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *Position) XXX_Merge(src proto.Message)
- func (m *Position) XXX_Size() int
- func (m *Position) XXX_Unmarshal(b []byte) error
- type PositionChangedEvent
- func (*PositionChangedEvent) Descriptor() ([]byte, []int)
- func (m *PositionChangedEvent) GetBadDebt() types.Coin
- func (m *PositionChangedEvent) GetBlockHeight() int64
- func (m *PositionChangedEvent) GetFinalPosition() Position
- func (m *PositionChangedEvent) GetTransactionFee() types.Coin
- func (m *PositionChangedEvent) Marshal() (dAtA []byte, err error)
- func (m *PositionChangedEvent) MarshalTo(dAtA []byte) (int, error)
- func (m *PositionChangedEvent) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*PositionChangedEvent) ProtoMessage()
- func (m *PositionChangedEvent) Reset()
- func (m *PositionChangedEvent) Size() (n int)
- func (m *PositionChangedEvent) String() string
- func (m *PositionChangedEvent) Unmarshal(dAtA []byte) error
- func (m *PositionChangedEvent) XXX_DiscardUnknown()
- func (m *PositionChangedEvent) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *PositionChangedEvent) XXX_Merge(src proto.Message)
- func (m *PositionChangedEvent) XXX_Size() int
- func (m *PositionChangedEvent) XXX_Unmarshal(b []byte) error
- type PositionLiquidatedEvent
- func (*PositionLiquidatedEvent) Descriptor() ([]byte, []int)
- func (m *PositionLiquidatedEvent) GetBadDebt() types.Coin
- func (m *PositionLiquidatedEvent) GetBlockHeight() int64
- func (m *PositionLiquidatedEvent) GetBlockTimeMs() int64
- func (m *PositionLiquidatedEvent) GetFeeToEcosystemFund() types.Coin
- func (m *PositionLiquidatedEvent) GetFeeToLiquidator() types.Coin
- func (m *PositionLiquidatedEvent) GetLiquidatorAddress() string
- func (m *PositionLiquidatedEvent) GetMargin() types.Coin
- func (m *PositionLiquidatedEvent) GetTraderAddress() string
- func (m *PositionLiquidatedEvent) Marshal() (dAtA []byte, err error)
- func (m *PositionLiquidatedEvent) MarshalTo(dAtA []byte) (int, error)
- func (m *PositionLiquidatedEvent) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*PositionLiquidatedEvent) ProtoMessage()
- func (m *PositionLiquidatedEvent) Reset()
- func (m *PositionLiquidatedEvent) Size() (n int)
- func (m *PositionLiquidatedEvent) String() string
- func (m *PositionLiquidatedEvent) Unmarshal(dAtA []byte) error
- func (m *PositionLiquidatedEvent) XXX_DiscardUnknown()
- func (m *PositionLiquidatedEvent) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *PositionLiquidatedEvent) XXX_Merge(src proto.Message)
- func (m *PositionLiquidatedEvent) XXX_Size() int
- func (m *PositionLiquidatedEvent) XXX_Unmarshal(b []byte) error
- type PositionResp
- type PositionSettledEvent
- func (*PositionSettledEvent) Descriptor() ([]byte, []int)
- func (m *PositionSettledEvent) GetSettledCoins() github_com_cosmos_cosmos_sdk_types.Coins
- func (m *PositionSettledEvent) GetTraderAddress() string
- func (m *PositionSettledEvent) Marshal() (dAtA []byte, err error)
- func (m *PositionSettledEvent) MarshalTo(dAtA []byte) (int, error)
- func (m *PositionSettledEvent) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*PositionSettledEvent) ProtoMessage()
- func (m *PositionSettledEvent) Reset()
- func (m *PositionSettledEvent) Size() (n int)
- func (m *PositionSettledEvent) String() string
- func (m *PositionSettledEvent) Unmarshal(dAtA []byte) error
- func (m *PositionSettledEvent) XXX_DiscardUnknown()
- func (m *PositionSettledEvent) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *PositionSettledEvent) XXX_Merge(src proto.Message)
- func (m *PositionSettledEvent) XXX_Size() int
- func (m *PositionSettledEvent) XXX_Unmarshal(b []byte) error
- type QueryClient
- type QueryMarketsRequest
- func (*QueryMarketsRequest) Descriptor() ([]byte, []int)
- func (m *QueryMarketsRequest) Marshal() (dAtA []byte, err error)
- func (m *QueryMarketsRequest) MarshalTo(dAtA []byte) (int, error)
- func (m *QueryMarketsRequest) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*QueryMarketsRequest) ProtoMessage()
- func (m *QueryMarketsRequest) Reset()
- func (m *QueryMarketsRequest) Size() (n int)
- func (m *QueryMarketsRequest) String() string
- func (m *QueryMarketsRequest) Unmarshal(dAtA []byte) error
- func (m *QueryMarketsRequest) XXX_DiscardUnknown()
- func (m *QueryMarketsRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *QueryMarketsRequest) XXX_Merge(src proto.Message)
- func (m *QueryMarketsRequest) XXX_Size() int
- func (m *QueryMarketsRequest) XXX_Unmarshal(b []byte) error
- type QueryMarketsResponse
- func (*QueryMarketsResponse) Descriptor() ([]byte, []int)
- func (m *QueryMarketsResponse) GetAmmMarkets() []AmmMarket
- func (m *QueryMarketsResponse) Marshal() (dAtA []byte, err error)
- func (m *QueryMarketsResponse) MarshalTo(dAtA []byte) (int, error)
- func (m *QueryMarketsResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*QueryMarketsResponse) ProtoMessage()
- func (m *QueryMarketsResponse) Reset()
- func (m *QueryMarketsResponse) Size() (n int)
- func (m *QueryMarketsResponse) String() string
- func (m *QueryMarketsResponse) Unmarshal(dAtA []byte) error
- func (m *QueryMarketsResponse) XXX_DiscardUnknown()
- func (m *QueryMarketsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *QueryMarketsResponse) XXX_Merge(src proto.Message)
- func (m *QueryMarketsResponse) XXX_Size() int
- func (m *QueryMarketsResponse) XXX_Unmarshal(b []byte) error
- type QueryModuleAccountsRequest
- func (*QueryModuleAccountsRequest) Descriptor() ([]byte, []int)
- func (m *QueryModuleAccountsRequest) Marshal() (dAtA []byte, err error)
- func (m *QueryModuleAccountsRequest) MarshalTo(dAtA []byte) (int, error)
- func (m *QueryModuleAccountsRequest) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*QueryModuleAccountsRequest) ProtoMessage()
- func (m *QueryModuleAccountsRequest) Reset()
- func (m *QueryModuleAccountsRequest) Size() (n int)
- func (m *QueryModuleAccountsRequest) String() string
- func (m *QueryModuleAccountsRequest) Unmarshal(dAtA []byte) error
- func (m *QueryModuleAccountsRequest) XXX_DiscardUnknown()
- func (m *QueryModuleAccountsRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *QueryModuleAccountsRequest) XXX_Merge(src proto.Message)
- func (m *QueryModuleAccountsRequest) XXX_Size() int
- func (m *QueryModuleAccountsRequest) XXX_Unmarshal(b []byte) error
- type QueryModuleAccountsResponse
- func (*QueryModuleAccountsResponse) Descriptor() ([]byte, []int)
- func (m *QueryModuleAccountsResponse) GetAccounts() []AccountWithBalance
- func (m *QueryModuleAccountsResponse) Marshal() (dAtA []byte, err error)
- func (m *QueryModuleAccountsResponse) MarshalTo(dAtA []byte) (int, error)
- func (m *QueryModuleAccountsResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*QueryModuleAccountsResponse) ProtoMessage()
- func (m *QueryModuleAccountsResponse) Reset()
- func (m *QueryModuleAccountsResponse) Size() (n int)
- func (m *QueryModuleAccountsResponse) String() string
- func (m *QueryModuleAccountsResponse) Unmarshal(dAtA []byte) error
- func (m *QueryModuleAccountsResponse) XXX_DiscardUnknown()
- func (m *QueryModuleAccountsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *QueryModuleAccountsResponse) XXX_Merge(src proto.Message)
- func (m *QueryModuleAccountsResponse) XXX_Size() int
- func (m *QueryModuleAccountsResponse) XXX_Unmarshal(b []byte) error
- type QueryPositionRequest
- func (*QueryPositionRequest) Descriptor() ([]byte, []int)
- func (m *QueryPositionRequest) GetTrader() string
- func (m *QueryPositionRequest) Marshal() (dAtA []byte, err error)
- func (m *QueryPositionRequest) MarshalTo(dAtA []byte) (int, error)
- func (m *QueryPositionRequest) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*QueryPositionRequest) ProtoMessage()
- func (m *QueryPositionRequest) Reset()
- func (m *QueryPositionRequest) Size() (n int)
- func (m *QueryPositionRequest) String() string
- func (m *QueryPositionRequest) Unmarshal(dAtA []byte) error
- func (m *QueryPositionRequest) XXX_DiscardUnknown()
- func (m *QueryPositionRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *QueryPositionRequest) XXX_Merge(src proto.Message)
- func (m *QueryPositionRequest) XXX_Size() int
- func (m *QueryPositionRequest) XXX_Unmarshal(b []byte) error
- type QueryPositionResponse
- func (*QueryPositionResponse) Descriptor() ([]byte, []int)
- func (m *QueryPositionResponse) GetPosition() Position
- func (m *QueryPositionResponse) Marshal() (dAtA []byte, err error)
- func (m *QueryPositionResponse) MarshalTo(dAtA []byte) (int, error)
- func (m *QueryPositionResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*QueryPositionResponse) ProtoMessage()
- func (m *QueryPositionResponse) Reset()
- func (m *QueryPositionResponse) Size() (n int)
- func (m *QueryPositionResponse) String() string
- func (m *QueryPositionResponse) Unmarshal(dAtA []byte) error
- func (m *QueryPositionResponse) XXX_DiscardUnknown()
- func (m *QueryPositionResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *QueryPositionResponse) XXX_Merge(src proto.Message)
- func (m *QueryPositionResponse) XXX_Size() int
- func (m *QueryPositionResponse) XXX_Unmarshal(b []byte) error
- type QueryPositionsRequest
- func (*QueryPositionsRequest) Descriptor() ([]byte, []int)
- func (m *QueryPositionsRequest) GetTrader() string
- func (m *QueryPositionsRequest) Marshal() (dAtA []byte, err error)
- func (m *QueryPositionsRequest) MarshalTo(dAtA []byte) (int, error)
- func (m *QueryPositionsRequest) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*QueryPositionsRequest) ProtoMessage()
- func (m *QueryPositionsRequest) Reset()
- func (m *QueryPositionsRequest) Size() (n int)
- func (m *QueryPositionsRequest) String() string
- func (m *QueryPositionsRequest) Unmarshal(dAtA []byte) error
- func (m *QueryPositionsRequest) XXX_DiscardUnknown()
- func (m *QueryPositionsRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *QueryPositionsRequest) XXX_Merge(src proto.Message)
- func (m *QueryPositionsRequest) XXX_Size() int
- func (m *QueryPositionsRequest) XXX_Unmarshal(b []byte) error
- type QueryPositionsResponse
- func (*QueryPositionsResponse) Descriptor() ([]byte, []int)
- func (m *QueryPositionsResponse) GetPositions() []QueryPositionResponse
- func (m *QueryPositionsResponse) Marshal() (dAtA []byte, err error)
- func (m *QueryPositionsResponse) MarshalTo(dAtA []byte) (int, error)
- func (m *QueryPositionsResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*QueryPositionsResponse) ProtoMessage()
- func (m *QueryPositionsResponse) Reset()
- func (m *QueryPositionsResponse) Size() (n int)
- func (m *QueryPositionsResponse) String() string
- func (m *QueryPositionsResponse) Unmarshal(dAtA []byte) error
- func (m *QueryPositionsResponse) XXX_DiscardUnknown()
- func (m *QueryPositionsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *QueryPositionsResponse) XXX_Merge(src proto.Message)
- func (m *QueryPositionsResponse) XXX_Size() int
- func (m *QueryPositionsResponse) XXX_Unmarshal(b []byte) error
- type QueryServer
- type ReserveSnapshot
- func (*ReserveSnapshot) Descriptor() ([]byte, []int)
- func (m *ReserveSnapshot) GetAmm() AMM
- func (m *ReserveSnapshot) GetTimestampMs() int64
- func (m *ReserveSnapshot) Marshal() (dAtA []byte, err error)
- func (m *ReserveSnapshot) MarshalTo(dAtA []byte) (int, error)
- func (m *ReserveSnapshot) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*ReserveSnapshot) ProtoMessage()
- func (m *ReserveSnapshot) Reset()
- func (m *ReserveSnapshot) Size() (n int)
- func (m *ReserveSnapshot) String() string
- func (m *ReserveSnapshot) Unmarshal(dAtA []byte) error
- func (s ReserveSnapshot) Validate() error
- func (m *ReserveSnapshot) XXX_DiscardUnknown()
- func (m *ReserveSnapshot) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *ReserveSnapshot) XXX_Merge(src proto.Message)
- func (m *ReserveSnapshot) XXX_Size() int
- func (m *ReserveSnapshot) XXX_Unmarshal(b []byte) error
- type TwapCalcOption
- type UnimplementedMsgServer
- func (*UnimplementedMsgServer) AddMargin(ctx context.Context, req *MsgAddMargin) (*MsgAddMarginResponse, error)
- func (*UnimplementedMsgServer) ClosePosition(ctx context.Context, req *MsgClosePosition) (*MsgClosePositionResponse, error)
- func (*UnimplementedMsgServer) DonateToEcosystemFund(ctx context.Context, req *MsgDonateToEcosystemFund) (*MsgDonateToEcosystemFundResponse, error)
- func (*UnimplementedMsgServer) MultiLiquidate(ctx context.Context, req *MsgMultiLiquidate) (*MsgMultiLiquidateResponse, error)
- func (*UnimplementedMsgServer) OpenPosition(ctx context.Context, req *MsgOpenPosition) (*MsgOpenPositionResponse, error)
- func (*UnimplementedMsgServer) RemoveMargin(ctx context.Context, req *MsgRemoveMargin) (*MsgRemoveMarginResponse, error)
- type UnimplementedQueryServer
- func (*UnimplementedQueryServer) ModuleAccounts(ctx context.Context, req *QueryModuleAccountsRequest) (*QueryModuleAccountsResponse, error)
- func (*UnimplementedQueryServer) QueryMarkets(ctx context.Context, req *QueryMarketsRequest) (*QueryMarketsResponse, error)
- func (*UnimplementedQueryServer) QueryPosition(ctx context.Context, req *QueryPositionRequest) (*QueryPositionResponse, error)
- func (*UnimplementedQueryServer) QueryPositions(ctx context.Context, req *QueryPositionsRequest) (*QueryPositionsResponse, error)
Constants ¶
const ( ModuleName = "perp" VaultModuleAccount = "vault" PerpEFModuleAccount = "perp_ef" FeePoolModuleAccount = "fee_pool" )
Variables ¶
var ( ErrPairNotSupported = sdkerrors.Register(ModuleName, 1, "pair not supported") ErrQuoteReserveAtZero = sdkerrors.Register(ModuleName, 2, "quote reserve after at zero") ErrBaseReserveAtZero = sdkerrors.Register(ModuleName, 3, "base reserve after at zero") ErrNoLastSnapshotSaved = sdkerrors.Register(ModuleName, 4, "There was no last snapshot, could be that you did not do snapshot on pool creation") ErrAssetFailsUserLimit = sdkerrors.Register(ModuleName, 5, "amount of assets traded does not meet user-defined limit") // Price-related errors ErrNoValidPrice = sdkerrors.Register(ModuleName, 8, "no valid prices available") ErrNoValidTWAP = sdkerrors.Register(ModuleName, 9, "TWAP price not found") // Could replace ErrBaseReserveAtZero and ErrQUoteReserveAtZero if wrapped ErrInvalidAmmReserves = sdkerrors.Register(ModuleName, 10, "base and quote reserves must always be positive") ErrLiquidityDepth = sdkerrors.Register(ModuleName, 11, "liquidity depth must be positive and equal to the square of the reserves") ErrMarginRatioTooHigh = sdkerrors.Register(ModuleName, 13, "margin ratio is too healthy to liquidate") ErrPairNotFound = sdkerrors.Register(ModuleName, 14, "pair doesn't have live market") ErrPositionZero = sdkerrors.Register(ModuleName, 15, "position is zero") ErrBadDebt = sdkerrors.Register(ModuleName, 16, "failed to remove margin; position would have bad debt if removed") ErrInputQuoteAmtNegative = sdkerrors.Register(ModuleName, 17, "quote amount cannot be zero") ErrInputBaseAmtNegative = sdkerrors.Register(ModuleName, 30, "base amount cannot be zero") ErrUserLeverageNegative = sdkerrors.Register(ModuleName, 18, "leverage cannot be zero") ErrMarginRatioTooLow = sdkerrors.Register(ModuleName, 19, "margin ratio did not meet maintenance margin ratio") ErrLeverageIsTooHigh = sdkerrors.Register(ModuleName, 20, "leverage cannot be higher than market parameter") ErrAllLiquidationsFailed = sdkerrors.Register(ModuleName, 22, "all liquidations failed") ErrParseLiquidateResponse = sdkerrors.Register(ModuleName, 31, "failed to JSON parse liquidate responses") ErrPositionHealthy = sdkerrors.Register(ModuleName, 23, "position is healthy") ErrLiquidityDepthOverflow = sdkerrors.Register(ModuleName, 24, "liquidty depth overflow") ErrMarketNotEnabled = sdkerrors.Register(ModuleName, 25, "market is not enabled, you can only fully close your position") ErrNonPositivePegMultiplier = sdkerrors.Register(ModuleName, 26, "peg multiplier must be > 0") ErrNegativeSwapInvariant = sdkerrors.Register(ModuleName, 27, "swap multiplier must be > 0") ErrNilSwapInvariant = sdkerrors.Register(ModuleName, 28, "swap multiplier must be not nil") ErrNotEnoughFundToPayAction = sdkerrors.Register(ModuleName, 29, "not enough fund in perp EF to pay for action") )
var ( ErrInvalidLengthEvent = fmt.Errorf("proto: negative length found during unmarshaling") ErrIntOverflowEvent = fmt.Errorf("proto: integer overflow") ErrUnexpectedEndOfGroupEvent = fmt.Errorf("proto: unexpected end of group") )
var ( ErrInvalidLengthGenesis = fmt.Errorf("proto: negative length found during unmarshaling") ErrIntOverflowGenesis = fmt.Errorf("proto: integer overflow") ErrUnexpectedEndOfGroupGenesis = fmt.Errorf("proto: unexpected end of group") )
var ( // StoreKey defines the primary module store key. StoreKey = ModuleName MemStoreKey = "mem_" + ModuleName // RouterKey is the message route for perp. RouterKey = ModuleName // QuerierRoute defines the module's query routing key. QuerierRoute = ModuleName )
var ( ErrInvalidLengthQuery = fmt.Errorf("proto: negative length found during unmarshaling") ErrIntOverflowQuery = fmt.Errorf("proto: integer overflow") ErrUnexpectedEndOfGroupQuery = fmt.Errorf("proto: unexpected end of group") )
var ( ErrInvalidLengthState = fmt.Errorf("proto: negative length found during unmarshaling") ErrIntOverflowState = fmt.Errorf("proto: integer overflow") ErrUnexpectedEndOfGroupState = fmt.Errorf("proto: unexpected end of group") )
var ( ErrInvalidLengthTx = fmt.Errorf("proto: negative length found during unmarshaling") ErrIntOverflowTx = fmt.Errorf("proto: integer overflow") ErrUnexpectedEndOfGroupTx = fmt.Errorf("proto: unexpected end of group") )
var Direction_name = map[int32]string{
0: "DIRECTION_UNSPECIFIED",
1: "LONG",
2: "SHORT",
}
var Direction_value = map[string]int32{
"DIRECTION_UNSPECIFIED": 0,
"LONG": 1,
"SHORT": 2,
}
var LiquidationFailedEvent_LiquidationFailedReason_name = map[int32]string{
0: "UNSPECIFIED",
1: "POSITION_HEALTHY",
2: "NONEXISTENT_PAIR",
3: "NONEXISTENT_POSITION",
}
var LiquidationFailedEvent_LiquidationFailedReason_value = map[string]int32{
"UNSPECIFIED": 0,
"POSITION_HEALTHY": 1,
"NONEXISTENT_PAIR": 2,
"NONEXISTENT_POSITION": 3,
}
var ModuleAccounts = []string{ ModuleName, PerpEFModuleAccount, VaultModuleAccount, FeePoolModuleAccount, common.TreasuryPoolModuleAccount, }
var (
ModuleCdc = codec.NewProtoCodec(cdctypes.NewInterfaceRegistry())
)
var TwapCalcOption_name = map[int32]string{
0: "TWAP_CALC_OPTION_UNSPECIFIED",
1: "SPOT",
2: "QUOTE_ASSET_SWAP",
3: "BASE_ASSET_SWAP",
}
var TwapCalcOption_value = map[string]int32{
"TWAP_CALC_OPTION_UNSPECIFIED": 0,
"SPOT": 1,
"QUOTE_ASSET_SWAP": 2,
"BASE_ASSET_SWAP": 3,
}
Functions ¶
func MarketsAreEqual ¶
func PositionsAreEqual ¶
func RegisterCodec ¶
func RegisterCodec(cdc *codec.LegacyAmino)
func RegisterInterfaces ¶
func RegisterInterfaces(registry cdctypes.InterfaceRegistry)
func RegisterMsgHandler ¶
RegisterMsgHandler registers the http handlers for service Msg to "mux". The handlers forward requests to the grpc endpoint over "conn".
func RegisterMsgHandlerClient ¶
RegisterMsgHandlerClient registers the http handlers for service Msg to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "MsgClient". Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "MsgClient" doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in "MsgClient" to call the correct interceptors.
func RegisterMsgHandlerFromEndpoint ¶
func RegisterMsgHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error)
RegisterMsgHandlerFromEndpoint is same as RegisterMsgHandler but automatically dials to "endpoint" and closes the connection when "ctx" gets done.
func RegisterMsgHandlerServer ¶
RegisterMsgHandlerServer registers the http handlers for service Msg to "mux". UnaryRPC :call MsgServer directly. StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterMsgHandlerFromEndpoint instead.
func RegisterMsgServer ¶
func RegisterQueryHandler ¶
RegisterQueryHandler registers the http handlers for service Query to "mux". The handlers forward requests to the grpc endpoint over "conn".
func RegisterQueryHandlerClient ¶
func RegisterQueryHandlerClient(ctx context.Context, mux *runtime.ServeMux, client QueryClient) error
RegisterQueryHandlerClient registers the http handlers for service Query to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "QueryClient". Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "QueryClient" doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in "QueryClient" to call the correct interceptors.
func RegisterQueryHandlerFromEndpoint ¶
func RegisterQueryHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error)
RegisterQueryHandlerFromEndpoint is same as RegisterQueryHandler but automatically dials to "endpoint" and closes the connection when "ctx" gets done.
func RegisterQueryHandlerServer ¶
func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, server QueryServer) error
RegisterQueryHandlerServer registers the http handlers for service Query to "mux". UnaryRPC :call QueryServer directly. StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterQueryHandlerFromEndpoint instead.
func RegisterQueryServer ¶
func RegisterQueryServer(s grpc1.Server, srv QueryServer)
Types ¶
type AMM ¶
type AMM struct { // identifies the market this AMM belongs to Pair github_com_NibiruChain_nibiru_x_common_asset.Pair `protobuf:"bytes,1,opt,name=pair,proto3,customtype=github.com/NibiruChain/nibiru/x/common/asset.Pair" json:"pair"` // the amount of base reserves this AMM has BaseReserve github_com_cosmos_cosmos_sdk_types.Dec `` /* 134-byte string literal not displayed */ // the amount of quote reserves this AMM has QuoteReserve github_com_cosmos_cosmos_sdk_types.Dec `` /* 137-byte string literal not displayed */ // sqrt(k) SqrtDepth github_com_cosmos_cosmos_sdk_types.Dec `` /* 128-byte string literal not displayed */ // the price multiplier of the dynamic AMM PriceMultiplier github_com_cosmos_cosmos_sdk_types.Dec `` /* 146-byte string literal not displayed */ // Total long refers to the sum of long open notional in base. TotalLong github_com_cosmos_cosmos_sdk_types.Dec `` /* 128-byte string literal not displayed */ // Total short refers to the sum of short open notional in base. TotalShort github_com_cosmos_cosmos_sdk_types.Dec `` /* 131-byte string literal not displayed */ }
func (*AMM) Bias ¶
Bias returns the bias of the market in the base asset. It's the net amount of base assets for longs minus the net amount of base assets for shorts.
func (AMM) CalcRepegCost ¶
CalcRepegCost provides the cost of re-pegging the pool to a new candidate peg multiplier.
func (AMM) CalcUpdateSwapInvariantCost ¶
CalcUpdateSwapInvariantCost returns the cost of updating the invariant of the pool
func (AMM) ComputeSqrtDepth ¶
Returns the sqrt k of the reserves
func (*AMM) Descriptor ¶
func (AMM) FromQuoteAssetToReserve ¶
returns the amount of quote reserve equivalent to the amount of quote asset given
func (AMM) FromQuoteReserveToAsset ¶
returns the amount of quote asset equivalent to the amount of quote reserve given
func (AMM) GetBaseReserveAmt ¶
func (amm AMM) GetBaseReserveAmt( quoteReserveAmt sdk.Dec, dir Direction, ) (baseReserveDelta sdk.Dec, err error)
Returns the amount of base reserve equivalent to the amount of quote reserve given
args: - quoteReserveAmt: the amount of quote reserve before the trade, must be positive - dir: the direction of the trade
returns: - baseReserveDelta: the amount of base reserve after the trade, unsigned - err: error
NOTE: baseReserveDelta is always positive Throws an error if input quoteReserveAmt is negative, or if the final quote reserve is not positive
func (AMM) GetMarketValue ¶
returns the amount of quote assets the amm has to pay out if all longs and shorts close out their positions positive value means the amm has to pay out quote assets negative value means the amm has to receive quote assets
func (AMM) GetQuoteReserveAmt ¶
func (amm AMM) GetQuoteReserveAmt( baseReserveAmt sdk.Dec, dir Direction, ) (quoteReserveDelta sdk.Dec, err error)
returns the amount of quote reserve equivalent to the amount of base asset given
args: - baseReserveAmt: the amount of base reserves to trade, must be positive - dir: the direction of the trade
returns: - quoteReserveDelta: the amount of quote reserve after the trade - err: error
NOTE: quoteReserveDelta is always positive
func (*AMM) ProtoMessage ¶
func (*AMM) ProtoMessage()
func (*AMM) SwapBaseAsset ¶
func (amm *AMM) SwapBaseAsset(baseAssetAmt sdk.Dec, dir Direction) (quoteAssetDelta sdk.Dec, err error)
SwapBaseAsset swaps base asset for quote asset
args:
- baseAssetAmt: amount of base asset to swap, must be positive
- dir: direction of swap
returns:
- quoteAssetDelta: amount of quote asset received
- err: error if any
Note: quoteAssetDelta is always positive
func (*AMM) SwapQuoteAsset ¶
func (amm *AMM) SwapQuoteAsset( quoteAssetAmt sdk.Dec, dir Direction, ) (baseAssetDelta sdk.Dec, err error)
SwapQuoteAsset swaps base asset for quote asset
args: - quoteAssetAmt: amount of base asset to swap, must be positive - dir: direction the user takes
returns: - baseAssetDelta: amount of base asset received - err: error
NOTE: baseAssetDelta is always positive
func (*AMM) UpdateSwapInvariant ¶
UpdateSwapInvariant updates the swap invariant of the amm
func (*AMM) XXX_DiscardUnknown ¶
func (m *AMM) XXX_DiscardUnknown()
func (*AMM) XXX_Unmarshal ¶
type AccountKeeper ¶
type AccountKeeper interface { GetAccount(ctx sdk.Context, addr sdk.AccAddress) authtypes.AccountI GetModuleAddress(name string) sdk.AccAddress GetModuleAccount(ctx sdk.Context, moduleName string) authtypes.ModuleAccountI }
AccountKeeper defines the expected account keeper used for simulations (noalias)
type AccountWithBalance ¶
type AccountWithBalance struct { Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` Address string `protobuf:"bytes,2,opt,name=address,proto3" json:"address,omitempty"` Balance github_com_cosmos_cosmos_sdk_types.Coins `protobuf:"bytes,3,rep,name=balance,proto3,castrepeated=github.com/cosmos/cosmos-sdk/types.Coins" json:"balance"` }
func (*AccountWithBalance) Descriptor ¶
func (*AccountWithBalance) Descriptor() ([]byte, []int)
func (*AccountWithBalance) GetAddress ¶
func (m *AccountWithBalance) GetAddress() string
func (*AccountWithBalance) GetBalance ¶
func (m *AccountWithBalance) GetBalance() github_com_cosmos_cosmos_sdk_types.Coins
func (*AccountWithBalance) GetName ¶
func (m *AccountWithBalance) GetName() string
func (*AccountWithBalance) Marshal ¶
func (m *AccountWithBalance) Marshal() (dAtA []byte, err error)
func (*AccountWithBalance) MarshalTo ¶
func (m *AccountWithBalance) MarshalTo(dAtA []byte) (int, error)
func (*AccountWithBalance) MarshalToSizedBuffer ¶
func (m *AccountWithBalance) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*AccountWithBalance) ProtoMessage ¶
func (*AccountWithBalance) ProtoMessage()
func (*AccountWithBalance) Reset ¶
func (m *AccountWithBalance) Reset()
func (*AccountWithBalance) Size ¶
func (m *AccountWithBalance) Size() (n int)
func (*AccountWithBalance) String ¶
func (m *AccountWithBalance) String() string
func (*AccountWithBalance) Unmarshal ¶
func (m *AccountWithBalance) Unmarshal(dAtA []byte) error
func (*AccountWithBalance) XXX_DiscardUnknown ¶
func (m *AccountWithBalance) XXX_DiscardUnknown()
func (*AccountWithBalance) XXX_Marshal ¶
func (m *AccountWithBalance) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*AccountWithBalance) XXX_Merge ¶
func (m *AccountWithBalance) XXX_Merge(src proto.Message)
func (*AccountWithBalance) XXX_Size ¶
func (m *AccountWithBalance) XXX_Size() int
func (*AccountWithBalance) XXX_Unmarshal ¶
func (m *AccountWithBalance) XXX_Unmarshal(b []byte) error
type AmmMarket ¶
type AmmMarket struct { Market Market `protobuf:"bytes,1,opt,name=market,proto3" json:"market"` Amm AMM `protobuf:"bytes,2,opt,name=amm,proto3" json:"amm"` }
func (*AmmMarket) Descriptor ¶
func (*AmmMarket) MarshalToSizedBuffer ¶
func (*AmmMarket) ProtoMessage ¶
func (*AmmMarket) ProtoMessage()
func (*AmmMarket) XXX_DiscardUnknown ¶
func (m *AmmMarket) XXX_DiscardUnknown()
func (*AmmMarket) XXX_Marshal ¶
func (*AmmMarket) XXX_Unmarshal ¶
type AmmUpdatedEvent ¶
type AmmUpdatedEvent struct { // the final state of the AMM FinalAmm AMM `protobuf:"bytes,1,opt,name=final_amm,json=finalAmm,proto3" json:"final_amm"` // The mark price of the pair. MarkPriceTwap github_com_cosmos_cosmos_sdk_types.Dec `` /* 142-byte string literal not displayed */ // The oracle index price of the pair. IndexPriceTwap github_com_cosmos_cosmos_sdk_types.Dec `` /* 145-byte string literal not displayed */ }
This event is emitted when the amm is updated, which can be triggered by the following events:
- swap - edit price multiplier - edit depth
func (*AmmUpdatedEvent) Descriptor ¶
func (*AmmUpdatedEvent) Descriptor() ([]byte, []int)
func (*AmmUpdatedEvent) GetFinalAmm ¶
func (m *AmmUpdatedEvent) GetFinalAmm() AMM
func (*AmmUpdatedEvent) Marshal ¶
func (m *AmmUpdatedEvent) Marshal() (dAtA []byte, err error)
func (*AmmUpdatedEvent) MarshalToSizedBuffer ¶
func (m *AmmUpdatedEvent) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*AmmUpdatedEvent) ProtoMessage ¶
func (*AmmUpdatedEvent) ProtoMessage()
func (*AmmUpdatedEvent) Reset ¶
func (m *AmmUpdatedEvent) Reset()
func (*AmmUpdatedEvent) Size ¶
func (m *AmmUpdatedEvent) Size() (n int)
func (*AmmUpdatedEvent) String ¶
func (m *AmmUpdatedEvent) String() string
func (*AmmUpdatedEvent) Unmarshal ¶
func (m *AmmUpdatedEvent) Unmarshal(dAtA []byte) error
func (*AmmUpdatedEvent) XXX_DiscardUnknown ¶
func (m *AmmUpdatedEvent) XXX_DiscardUnknown()
func (*AmmUpdatedEvent) XXX_Marshal ¶
func (m *AmmUpdatedEvent) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*AmmUpdatedEvent) XXX_Merge ¶
func (m *AmmUpdatedEvent) XXX_Merge(src proto.Message)
func (*AmmUpdatedEvent) XXX_Size ¶
func (m *AmmUpdatedEvent) XXX_Size() int
func (*AmmUpdatedEvent) XXX_Unmarshal ¶
func (m *AmmUpdatedEvent) XXX_Unmarshal(b []byte) error
type BankKeeper ¶
type BankKeeper interface { SpendableCoins(ctx sdk.Context, addr sdk.AccAddress) sdk.Coins MintCoins(ctx sdk.Context, moduleName string, amt sdk.Coins) error SendCoinsFromAccountToModule( ctx sdk.Context, senderAddr sdk.AccAddress, recipientModule string, amt sdk.Coins, ) error SendCoinsFromModuleToModule( ctx sdk.Context, senderModule string, recipientModule string, amt sdk.Coins) error SendCoinsFromModuleToAccount( ctx sdk.Context, senderModule string, recipientAddr sdk.AccAddress, amt sdk.Coins, ) error GetBalance(ctx sdk.Context, addr sdk.AccAddress, denom string) sdk.Coin GetAllBalances(ctx sdk.Context, addr sdk.AccAddress) sdk.Coins }
BankKeeper defines the expected interface needed to retrieve account balances.
type ChangeReason ¶
type ChangeReason string
const ( ChangeReason_OpenPosition ChangeReason = "open_position" ChangeReason_ClosePosition ChangeReason = "close_position" ChangeReason_AddMargin ChangeReason = "add_margin" ChangeReason_RemoveMargin ChangeReason = "remove_margin" ChangeReason_Liquidate ChangeReason = "liquidate" )
func (*ChangeReason) Marshal ¶
func (c *ChangeReason) Marshal() ([]byte, error)
func (*ChangeReason) MarshalJSON ¶
func (c *ChangeReason) MarshalJSON() ([]byte, error)
func (*ChangeReason) Size ¶
func (c *ChangeReason) Size() int
func (*ChangeReason) Unmarshal ¶
func (c *ChangeReason) Unmarshal(data []byte) error
func (*ChangeReason) UnmarshalJSON ¶
func (c *ChangeReason) UnmarshalJSON(data []byte) error
type Direction ¶
type Direction int32
The direction that the user is trading in LONG means the user is going long the base asset (e.g. buy BTC) SHORT means the user is shorting the base asset (e.g. sell BTC)
func (Direction) EnumDescriptor ¶
type EpochKeeper ¶
type FundingRateChangedEvent ¶
type FundingRateChangedEvent struct { // The pair for which the funding rate was calculated. Pair github_com_NibiruChain_nibiru_x_common_asset.Pair `protobuf:"bytes,1,opt,name=pair,proto3,customtype=github.com/NibiruChain/nibiru/x/common/asset.Pair" json:"pair"` // The mark price of the pair. MarkPriceTwap github_com_cosmos_cosmos_sdk_types.Dec `` /* 142-byte string literal not displayed */ // The oracle index price of the pair. IndexPriceTwap github_com_cosmos_cosmos_sdk_types.Dec `` /* 145-byte string literal not displayed */ // The latest premium fraction just calculated. PremiumFraction github_com_cosmos_cosmos_sdk_types.Dec `` /* 146-byte string literal not displayed */ // The market's latest cumulative premium fraction. // The funding payment a position will pay is the difference between this // value and the latest cumulative premium fraction on the position, // multiplied by the position size. CumulativePremiumFraction github_com_cosmos_cosmos_sdk_types.Dec `` /* 178-byte string literal not displayed */ }
Emitted when the funding rate changes for a market.
func (*FundingRateChangedEvent) Descriptor ¶
func (*FundingRateChangedEvent) Descriptor() ([]byte, []int)
func (*FundingRateChangedEvent) Marshal ¶
func (m *FundingRateChangedEvent) Marshal() (dAtA []byte, err error)
func (*FundingRateChangedEvent) MarshalTo ¶
func (m *FundingRateChangedEvent) MarshalTo(dAtA []byte) (int, error)
func (*FundingRateChangedEvent) MarshalToSizedBuffer ¶
func (m *FundingRateChangedEvent) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*FundingRateChangedEvent) ProtoMessage ¶
func (*FundingRateChangedEvent) ProtoMessage()
func (*FundingRateChangedEvent) Reset ¶
func (m *FundingRateChangedEvent) Reset()
func (*FundingRateChangedEvent) Size ¶
func (m *FundingRateChangedEvent) Size() (n int)
func (*FundingRateChangedEvent) String ¶
func (m *FundingRateChangedEvent) String() string
func (*FundingRateChangedEvent) Unmarshal ¶
func (m *FundingRateChangedEvent) Unmarshal(dAtA []byte) error
func (*FundingRateChangedEvent) XXX_DiscardUnknown ¶
func (m *FundingRateChangedEvent) XXX_DiscardUnknown()
func (*FundingRateChangedEvent) XXX_Marshal ¶
func (m *FundingRateChangedEvent) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*FundingRateChangedEvent) XXX_Merge ¶
func (m *FundingRateChangedEvent) XXX_Merge(src proto.Message)
func (*FundingRateChangedEvent) XXX_Size ¶
func (m *FundingRateChangedEvent) XXX_Size() int
func (*FundingRateChangedEvent) XXX_Unmarshal ¶
func (m *FundingRateChangedEvent) XXX_Unmarshal(b []byte) error
type GenesisState ¶
type GenesisState struct { Markets []Market `protobuf:"bytes,2,rep,name=markets,proto3" json:"markets"` Amms []AMM `protobuf:"bytes,3,rep,name=amms,proto3" json:"amms"` Positions []Position `protobuf:"bytes,4,rep,name=positions,proto3" json:"positions"` ReserveSnapshots []ReserveSnapshot `protobuf:"bytes,5,rep,name=reserve_snapshots,json=reserveSnapshots,proto3" json:"reserve_snapshots"` }
GenesisState defines the perp module's genesis state.
func DefaultGenesis ¶
func DefaultGenesis() *GenesisState
DefaultGenesis returns the default Capability genesis state
func GetGenesisStateFromAppState ¶
func GetGenesisStateFromAppState(cdc codec.JSONCodec, appState map[string]json.RawMessage) *GenesisState
func (*GenesisState) Descriptor ¶
func (*GenesisState) Descriptor() ([]byte, []int)
func (*GenesisState) GetAmms ¶
func (m *GenesisState) GetAmms() []AMM
func (*GenesisState) GetMarkets ¶
func (m *GenesisState) GetMarkets() []Market
func (*GenesisState) GetPositions ¶
func (m *GenesisState) GetPositions() []Position
func (*GenesisState) GetReserveSnapshots ¶
func (m *GenesisState) GetReserveSnapshots() []ReserveSnapshot
func (*GenesisState) Marshal ¶
func (m *GenesisState) Marshal() (dAtA []byte, err error)
func (*GenesisState) MarshalToSizedBuffer ¶
func (m *GenesisState) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*GenesisState) ProtoMessage ¶
func (*GenesisState) ProtoMessage()
func (*GenesisState) Reset ¶
func (m *GenesisState) Reset()
func (*GenesisState) Size ¶
func (m *GenesisState) Size() (n int)
func (*GenesisState) String ¶
func (m *GenesisState) String() string
func (*GenesisState) Unmarshal ¶
func (m *GenesisState) Unmarshal(dAtA []byte) error
func (GenesisState) Validate ¶
func (gs GenesisState) Validate() error
Validate performs basic genesis state validation returning an error upon any failure.
func (*GenesisState) XXX_DiscardUnknown ¶
func (m *GenesisState) XXX_DiscardUnknown()
func (*GenesisState) XXX_Marshal ¶
func (m *GenesisState) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*GenesisState) XXX_Merge ¶
func (m *GenesisState) XXX_Merge(src proto.Message)
func (*GenesisState) XXX_Size ¶
func (m *GenesisState) XXX_Size() int
func (*GenesisState) XXX_Unmarshal ¶
func (m *GenesisState) XXX_Unmarshal(b []byte) error
type LiquidateResp ¶
type LiquidateResp struct { // Amount of bad debt created by the liquidation event BadDebt sdkmath.Int // Fee paid to the liquidator FeeToLiquidator sdkmath.Int // Fee paid to the Perp EF fund FeeToPerpEcosystemFund sdkmath.Int // Address of the liquidator Liquidator string // Position response from the close or open reverse position PositionResp *PositionResp }
func (*LiquidateResp) Validate ¶
func (l *LiquidateResp) Validate() error
type LiquidationFailedEvent ¶
type LiquidationFailedEvent struct { // The pair for which we are trying to liquidate. Pair github_com_NibiruChain_nibiru_x_common_asset.Pair `protobuf:"bytes,1,opt,name=pair,proto3,customtype=github.com/NibiruChain/nibiru/x/common/asset.Pair" json:"pair"` // owner of the position. Trader string `protobuf:"bytes,2,opt,name=trader,proto3" json:"trader,omitempty"` // Address of the account that executed the tx. Liquidator string `protobuf:"bytes,3,opt,name=liquidator,proto3" json:"liquidator,omitempty"` // Reason for the liquidation failure. Reason LiquidationFailedEvent_LiquidationFailedReason `` /* 133-byte string literal not displayed */ }
Emitted when liquidation fails.
func (*LiquidationFailedEvent) Descriptor ¶
func (*LiquidationFailedEvent) Descriptor() ([]byte, []int)
func (*LiquidationFailedEvent) GetLiquidator ¶
func (m *LiquidationFailedEvent) GetLiquidator() string
func (*LiquidationFailedEvent) GetReason ¶
func (m *LiquidationFailedEvent) GetReason() LiquidationFailedEvent_LiquidationFailedReason
func (*LiquidationFailedEvent) GetTrader ¶
func (m *LiquidationFailedEvent) GetTrader() string
func (*LiquidationFailedEvent) Marshal ¶
func (m *LiquidationFailedEvent) Marshal() (dAtA []byte, err error)
func (*LiquidationFailedEvent) MarshalTo ¶
func (m *LiquidationFailedEvent) MarshalTo(dAtA []byte) (int, error)
func (*LiquidationFailedEvent) MarshalToSizedBuffer ¶
func (m *LiquidationFailedEvent) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*LiquidationFailedEvent) ProtoMessage ¶
func (*LiquidationFailedEvent) ProtoMessage()
func (*LiquidationFailedEvent) Reset ¶
func (m *LiquidationFailedEvent) Reset()
func (*LiquidationFailedEvent) Size ¶
func (m *LiquidationFailedEvent) Size() (n int)
func (*LiquidationFailedEvent) String ¶
func (m *LiquidationFailedEvent) String() string
func (*LiquidationFailedEvent) Unmarshal ¶
func (m *LiquidationFailedEvent) Unmarshal(dAtA []byte) error
func (*LiquidationFailedEvent) XXX_DiscardUnknown ¶
func (m *LiquidationFailedEvent) XXX_DiscardUnknown()
func (*LiquidationFailedEvent) XXX_Marshal ¶
func (m *LiquidationFailedEvent) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*LiquidationFailedEvent) XXX_Merge ¶
func (m *LiquidationFailedEvent) XXX_Merge(src proto.Message)
func (*LiquidationFailedEvent) XXX_Size ¶
func (m *LiquidationFailedEvent) XXX_Size() int
func (*LiquidationFailedEvent) XXX_Unmarshal ¶
func (m *LiquidationFailedEvent) XXX_Unmarshal(b []byte) error
type LiquidationFailedEvent_LiquidationFailedReason ¶
type LiquidationFailedEvent_LiquidationFailedReason int32
const ( LiquidationFailedEvent_UNSPECIFIED LiquidationFailedEvent_LiquidationFailedReason = 0 // the position is healthy and does not need to be liquidated. LiquidationFailedEvent_POSITION_HEALTHY LiquidationFailedEvent_LiquidationFailedReason = 1 // the pair does not exist. LiquidationFailedEvent_NONEXISTENT_PAIR LiquidationFailedEvent_LiquidationFailedReason = 2 // the position does not exist. LiquidationFailedEvent_NONEXISTENT_POSITION LiquidationFailedEvent_LiquidationFailedReason = 3 )
func (LiquidationFailedEvent_LiquidationFailedReason) EnumDescriptor ¶
func (LiquidationFailedEvent_LiquidationFailedReason) EnumDescriptor() ([]byte, []int)
func (LiquidationFailedEvent_LiquidationFailedReason) String ¶
func (x LiquidationFailedEvent_LiquidationFailedReason) String() string
type Market ¶
type Market struct { // the trading pair represented by this market // always BASE:QUOTE, e.g. BTC:NUSD or ETH:NUSD Pair github_com_NibiruChain_nibiru_x_common_asset.Pair `protobuf:"bytes,1,opt,name=pair,proto3,customtype=github.com/NibiruChain/nibiru/x/common/asset.Pair" json:"pair"` // whether or not the market is enabled Enabled bool `protobuf:"varint,2,opt,name=enabled,proto3" json:"enabled,omitempty"` // the minimum margin ratio which a user must maintain on this market MaintenanceMarginRatio github_com_cosmos_cosmos_sdk_types.Dec `` /* 169-byte string literal not displayed */ // the maximum leverage a user is able to be taken on this market MaxLeverage github_com_cosmos_cosmos_sdk_types.Dec `` /* 134-byte string literal not displayed */ // Latest cumulative premium fraction for a given pair. // Calculated once per funding rate interval. // A premium fraction is the difference between mark and index, divided by the // number of payments per day. (mark - index) / # payments in a day LatestCumulativePremiumFraction github_com_cosmos_cosmos_sdk_types.Dec `` /* 198-byte string literal not displayed */ // the percentage of the notional given to the exchange when trading ExchangeFeeRatio github_com_cosmos_cosmos_sdk_types.Dec `` /* 151-byte string literal not displayed */ // the percentage of the notional transferred to the ecosystem fund when // trading EcosystemFundFeeRatio github_com_cosmos_cosmos_sdk_types.Dec `` /* 168-byte string literal not displayed */ // the percentage of liquidated position that will be // given to out as a reward. Half of the liquidation fee is given to the // liquidator, and the other half is given to the ecosystem fund. LiquidationFeeRatio github_com_cosmos_cosmos_sdk_types.Dec `` /* 160-byte string literal not displayed */ // the portion of the position size we try to liquidate if the available // margin is higher than liquidation fee PartialLiquidationRatio github_com_cosmos_cosmos_sdk_types.Dec `` /* 172-byte string literal not displayed */ // specifies the interval on which the funding rate is updated FundingRateEpochId string `protobuf:"bytes,10,opt,name=funding_rate_epoch_id,json=fundingRateEpochId,proto3" json:"funding_rate_epoch_id,omitempty"` // amount of time to look back for TWAP calculations TwapLookbackWindow time.Duration `protobuf:"bytes,11,opt,name=twap_lookback_window,json=twapLookbackWindow,proto3,stdduration" json:"twap_lookback_window"` // the amount of collateral already credited from the ecosystem fund PrepaidBadDebt types.Coin `protobuf:"bytes,12,opt,name=prepaid_bad_debt,json=prepaidBadDebt,proto3" json:"prepaid_bad_debt"` }
func DefaultMarket ¶
func (*Market) Descriptor ¶
func (*Market) GetEnabled ¶
func (*Market) GetFundingRateEpochId ¶
func (*Market) GetPrepaidBadDebt ¶
func (*Market) GetTwapLookbackWindow ¶
func (*Market) MarshalToSizedBuffer ¶
func (*Market) ProtoMessage ¶
func (*Market) ProtoMessage()
func (*Market) WithFundingRateEpochId ¶
func (*Market) WithLatestCumulativePremiumFraction ¶
func (*Market) WithMaintenanceMarginRatio ¶
func (*Market) WithPartialLiquidationRatio ¶
func (*Market) XXX_DiscardUnknown ¶
func (m *Market) XXX_DiscardUnknown()
func (*Market) XXX_Marshal ¶
func (*Market) XXX_Unmarshal ¶
type MarketUpdatedEvent ¶
type MarketUpdatedEvent struct { // the final state of the market FinalMarket Market `protobuf:"bytes,1,opt,name=final_market,json=finalMarket,proto3" json:"final_market"` }
This event is emitted at the end of every block for persisting market changes off-chain
Market changes are triggered by the following actions:
- disabling market - changing market fees - bad debt is prepaid by the ecosystem fund
func (*MarketUpdatedEvent) Descriptor ¶
func (*MarketUpdatedEvent) Descriptor() ([]byte, []int)
func (*MarketUpdatedEvent) GetFinalMarket ¶
func (m *MarketUpdatedEvent) GetFinalMarket() Market
func (*MarketUpdatedEvent) Marshal ¶
func (m *MarketUpdatedEvent) Marshal() (dAtA []byte, err error)
func (*MarketUpdatedEvent) MarshalTo ¶
func (m *MarketUpdatedEvent) MarshalTo(dAtA []byte) (int, error)
func (*MarketUpdatedEvent) MarshalToSizedBuffer ¶
func (m *MarketUpdatedEvent) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*MarketUpdatedEvent) ProtoMessage ¶
func (*MarketUpdatedEvent) ProtoMessage()
func (*MarketUpdatedEvent) Reset ¶
func (m *MarketUpdatedEvent) Reset()
func (*MarketUpdatedEvent) Size ¶
func (m *MarketUpdatedEvent) Size() (n int)
func (*MarketUpdatedEvent) String ¶
func (m *MarketUpdatedEvent) String() string
func (*MarketUpdatedEvent) Unmarshal ¶
func (m *MarketUpdatedEvent) Unmarshal(dAtA []byte) error
func (*MarketUpdatedEvent) XXX_DiscardUnknown ¶
func (m *MarketUpdatedEvent) XXX_DiscardUnknown()
func (*MarketUpdatedEvent) XXX_Marshal ¶
func (m *MarketUpdatedEvent) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*MarketUpdatedEvent) XXX_Merge ¶
func (m *MarketUpdatedEvent) XXX_Merge(src proto.Message)
func (*MarketUpdatedEvent) XXX_Size ¶
func (m *MarketUpdatedEvent) XXX_Size() int
func (*MarketUpdatedEvent) XXX_Unmarshal ¶
func (m *MarketUpdatedEvent) XXX_Unmarshal(b []byte) error
type MsgAddMargin ¶
type MsgAddMargin struct { Sender string `protobuf:"bytes,1,opt,name=sender,proto3" json:"sender,omitempty"` Pair github_com_NibiruChain_nibiru_x_common_asset.Pair `protobuf:"bytes,2,opt,name=pair,proto3,customtype=github.com/NibiruChain/nibiru/x/common/asset.Pair" json:"pair"` Margin types.Coin `protobuf:"bytes,3,opt,name=margin,proto3" json:"margin"` }
MsgAddMargin: Msg to remove margin.
func (*MsgAddMargin) Descriptor ¶
func (*MsgAddMargin) Descriptor() ([]byte, []int)
func (*MsgAddMargin) GetMargin ¶
func (m *MsgAddMargin) GetMargin() types.Coin
func (*MsgAddMargin) GetSender ¶
func (m *MsgAddMargin) GetSender() string
func (MsgAddMargin) GetSignBytes ¶
func (m MsgAddMargin) GetSignBytes() []byte
func (MsgAddMargin) GetSigners ¶
func (m MsgAddMargin) GetSigners() []sdk.AccAddress
func (*MsgAddMargin) Marshal ¶
func (m *MsgAddMargin) Marshal() (dAtA []byte, err error)
func (*MsgAddMargin) MarshalToSizedBuffer ¶
func (m *MsgAddMargin) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*MsgAddMargin) ProtoMessage ¶
func (*MsgAddMargin) ProtoMessage()
func (*MsgAddMargin) Reset ¶
func (m *MsgAddMargin) Reset()
func (MsgAddMargin) Route ¶
func (m MsgAddMargin) Route() string
func (*MsgAddMargin) Size ¶
func (m *MsgAddMargin) Size() (n int)
func (*MsgAddMargin) String ¶
func (m *MsgAddMargin) String() string
func (MsgAddMargin) Type ¶
func (m MsgAddMargin) Type() string
func (*MsgAddMargin) Unmarshal ¶
func (m *MsgAddMargin) Unmarshal(dAtA []byte) error
func (MsgAddMargin) ValidateBasic ¶
func (m MsgAddMargin) ValidateBasic() error
func (*MsgAddMargin) XXX_DiscardUnknown ¶
func (m *MsgAddMargin) XXX_DiscardUnknown()
func (*MsgAddMargin) XXX_Marshal ¶
func (m *MsgAddMargin) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*MsgAddMargin) XXX_Merge ¶
func (m *MsgAddMargin) XXX_Merge(src proto.Message)
func (*MsgAddMargin) XXX_Size ¶
func (m *MsgAddMargin) XXX_Size() int
func (*MsgAddMargin) XXX_Unmarshal ¶
func (m *MsgAddMargin) XXX_Unmarshal(b []byte) error
type MsgAddMarginResponse ¶
type MsgAddMarginResponse struct { FundingPayment github_com_cosmos_cosmos_sdk_types.Dec `` /* 143-byte string literal not displayed */ Position *Position `protobuf:"bytes,2,opt,name=position,proto3" json:"position,omitempty"` }
func (*MsgAddMarginResponse) Descriptor ¶
func (*MsgAddMarginResponse) Descriptor() ([]byte, []int)
func (*MsgAddMarginResponse) GetPosition ¶
func (m *MsgAddMarginResponse) GetPosition() *Position
func (*MsgAddMarginResponse) Marshal ¶
func (m *MsgAddMarginResponse) Marshal() (dAtA []byte, err error)
func (*MsgAddMarginResponse) MarshalTo ¶
func (m *MsgAddMarginResponse) MarshalTo(dAtA []byte) (int, error)
func (*MsgAddMarginResponse) MarshalToSizedBuffer ¶
func (m *MsgAddMarginResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*MsgAddMarginResponse) ProtoMessage ¶
func (*MsgAddMarginResponse) ProtoMessage()
func (*MsgAddMarginResponse) Reset ¶
func (m *MsgAddMarginResponse) Reset()
func (*MsgAddMarginResponse) Size ¶
func (m *MsgAddMarginResponse) Size() (n int)
func (*MsgAddMarginResponse) String ¶
func (m *MsgAddMarginResponse) String() string
func (*MsgAddMarginResponse) Unmarshal ¶
func (m *MsgAddMarginResponse) Unmarshal(dAtA []byte) error
func (*MsgAddMarginResponse) XXX_DiscardUnknown ¶
func (m *MsgAddMarginResponse) XXX_DiscardUnknown()
func (*MsgAddMarginResponse) XXX_Marshal ¶
func (m *MsgAddMarginResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*MsgAddMarginResponse) XXX_Merge ¶
func (m *MsgAddMarginResponse) XXX_Merge(src proto.Message)
func (*MsgAddMarginResponse) XXX_Size ¶
func (m *MsgAddMarginResponse) XXX_Size() int
func (*MsgAddMarginResponse) XXX_Unmarshal ¶
func (m *MsgAddMarginResponse) XXX_Unmarshal(b []byte) error
type MsgClient ¶
type MsgClient interface { RemoveMargin(ctx context.Context, in *MsgRemoveMargin, opts ...grpc.CallOption) (*MsgRemoveMarginResponse, error) AddMargin(ctx context.Context, in *MsgAddMargin, opts ...grpc.CallOption) (*MsgAddMarginResponse, error) MultiLiquidate(ctx context.Context, in *MsgMultiLiquidate, opts ...grpc.CallOption) (*MsgMultiLiquidateResponse, error) OpenPosition(ctx context.Context, in *MsgOpenPosition, opts ...grpc.CallOption) (*MsgOpenPositionResponse, error) ClosePosition(ctx context.Context, in *MsgClosePosition, opts ...grpc.CallOption) (*MsgClosePositionResponse, error) DonateToEcosystemFund(ctx context.Context, in *MsgDonateToEcosystemFund, opts ...grpc.CallOption) (*MsgDonateToEcosystemFundResponse, error) }
MsgClient is the client API for Msg service.
For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
func NewMsgClient ¶
func NewMsgClient(cc grpc1.ClientConn) MsgClient
type MsgClosePosition ¶
type MsgClosePosition struct { Sender string `protobuf:"bytes,1,opt,name=sender,proto3" json:"sender,omitempty"` Pair github_com_NibiruChain_nibiru_x_common_asset.Pair `protobuf:"bytes,2,opt,name=pair,proto3,customtype=github.com/NibiruChain/nibiru/x/common/asset.Pair" json:"pair"` }
func (*MsgClosePosition) Descriptor ¶
func (*MsgClosePosition) Descriptor() ([]byte, []int)
func (*MsgClosePosition) GetSender ¶
func (m *MsgClosePosition) GetSender() string
func (MsgClosePosition) GetSignBytes ¶
func (m MsgClosePosition) GetSignBytes() []byte
func (MsgClosePosition) GetSigners ¶
func (m MsgClosePosition) GetSigners() []sdk.AccAddress
func (*MsgClosePosition) Marshal ¶
func (m *MsgClosePosition) Marshal() (dAtA []byte, err error)
func (*MsgClosePosition) MarshalToSizedBuffer ¶
func (m *MsgClosePosition) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*MsgClosePosition) ProtoMessage ¶
func (*MsgClosePosition) ProtoMessage()
func (*MsgClosePosition) Reset ¶
func (m *MsgClosePosition) Reset()
func (MsgClosePosition) Route ¶
func (m MsgClosePosition) Route() string
func (*MsgClosePosition) Size ¶
func (m *MsgClosePosition) Size() (n int)
func (*MsgClosePosition) String ¶
func (m *MsgClosePosition) String() string
func (MsgClosePosition) Type ¶
func (m MsgClosePosition) Type() string
func (*MsgClosePosition) Unmarshal ¶
func (m *MsgClosePosition) Unmarshal(dAtA []byte) error
func (MsgClosePosition) ValidateBasic ¶
func (m MsgClosePosition) ValidateBasic() error
func (*MsgClosePosition) XXX_DiscardUnknown ¶
func (m *MsgClosePosition) XXX_DiscardUnknown()
func (*MsgClosePosition) XXX_Marshal ¶
func (m *MsgClosePosition) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*MsgClosePosition) XXX_Merge ¶
func (m *MsgClosePosition) XXX_Merge(src proto.Message)
func (*MsgClosePosition) XXX_Size ¶
func (m *MsgClosePosition) XXX_Size() int
func (*MsgClosePosition) XXX_Unmarshal ¶
func (m *MsgClosePosition) XXX_Unmarshal(b []byte) error
type MsgClosePositionResponse ¶
type MsgClosePositionResponse struct { // The amount of quote assets exchanged. ExchangedNotionalValue github_com_cosmos_cosmos_sdk_types.Dec `` /* 169-byte string literal not displayed */ // The amount of base assets exchanged. ExchangedPositionSize github_com_cosmos_cosmos_sdk_types.Dec `` /* 166-byte string literal not displayed */ // The funding payment applied on this position change, measured in quote // units. FundingPayment github_com_cosmos_cosmos_sdk_types.Dec `` /* 143-byte string literal not displayed */ // The amount of PnL realized on this position changed, measured in quote // units. RealizedPnl github_com_cosmos_cosmos_sdk_types.Dec `` /* 134-byte string literal not displayed */ // The amount of margin the trader receives after closing the position, from // the vault. Should never be negative. MarginToTrader github_com_cosmos_cosmos_sdk_types.Dec `` /* 145-byte string literal not displayed */ }
func (*MsgClosePositionResponse) Descriptor ¶
func (*MsgClosePositionResponse) Descriptor() ([]byte, []int)
func (*MsgClosePositionResponse) Marshal ¶
func (m *MsgClosePositionResponse) Marshal() (dAtA []byte, err error)
func (*MsgClosePositionResponse) MarshalTo ¶
func (m *MsgClosePositionResponse) MarshalTo(dAtA []byte) (int, error)
func (*MsgClosePositionResponse) MarshalToSizedBuffer ¶
func (m *MsgClosePositionResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*MsgClosePositionResponse) ProtoMessage ¶
func (*MsgClosePositionResponse) ProtoMessage()
func (*MsgClosePositionResponse) Reset ¶
func (m *MsgClosePositionResponse) Reset()
func (*MsgClosePositionResponse) Size ¶
func (m *MsgClosePositionResponse) Size() (n int)
func (*MsgClosePositionResponse) String ¶
func (m *MsgClosePositionResponse) String() string
func (*MsgClosePositionResponse) Unmarshal ¶
func (m *MsgClosePositionResponse) Unmarshal(dAtA []byte) error
func (*MsgClosePositionResponse) XXX_DiscardUnknown ¶
func (m *MsgClosePositionResponse) XXX_DiscardUnknown()
func (*MsgClosePositionResponse) XXX_Marshal ¶
func (m *MsgClosePositionResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*MsgClosePositionResponse) XXX_Merge ¶
func (m *MsgClosePositionResponse) XXX_Merge(src proto.Message)
func (*MsgClosePositionResponse) XXX_Size ¶
func (m *MsgClosePositionResponse) XXX_Size() int
func (*MsgClosePositionResponse) XXX_Unmarshal ¶
func (m *MsgClosePositionResponse) XXX_Unmarshal(b []byte) error
type MsgDonateToEcosystemFund ¶
type MsgDonateToEcosystemFund struct { Sender string `protobuf:"bytes,1,opt,name=sender,proto3" json:"sender,omitempty"` // donation to the EF Donation types.Coin `protobuf:"bytes,2,opt,name=donation,proto3" json:"donation" yaml:"donation"` }
func (*MsgDonateToEcosystemFund) Descriptor ¶
func (*MsgDonateToEcosystemFund) Descriptor() ([]byte, []int)
func (*MsgDonateToEcosystemFund) GetDonation ¶
func (m *MsgDonateToEcosystemFund) GetDonation() types.Coin
func (*MsgDonateToEcosystemFund) GetSender ¶
func (m *MsgDonateToEcosystemFund) GetSender() string
func (MsgDonateToEcosystemFund) GetSignBytes ¶
func (m MsgDonateToEcosystemFund) GetSignBytes() []byte
func (MsgDonateToEcosystemFund) GetSigners ¶
func (m MsgDonateToEcosystemFund) GetSigners() []sdk.AccAddress
func (*MsgDonateToEcosystemFund) Marshal ¶
func (m *MsgDonateToEcosystemFund) Marshal() (dAtA []byte, err error)
func (*MsgDonateToEcosystemFund) MarshalTo ¶
func (m *MsgDonateToEcosystemFund) MarshalTo(dAtA []byte) (int, error)
func (*MsgDonateToEcosystemFund) MarshalToSizedBuffer ¶
func (m *MsgDonateToEcosystemFund) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*MsgDonateToEcosystemFund) ProtoMessage ¶
func (*MsgDonateToEcosystemFund) ProtoMessage()
func (*MsgDonateToEcosystemFund) Reset ¶
func (m *MsgDonateToEcosystemFund) Reset()
func (MsgDonateToEcosystemFund) Route ¶
func (m MsgDonateToEcosystemFund) Route() string
func (*MsgDonateToEcosystemFund) Size ¶
func (m *MsgDonateToEcosystemFund) Size() (n int)
func (*MsgDonateToEcosystemFund) String ¶
func (m *MsgDonateToEcosystemFund) String() string
func (MsgDonateToEcosystemFund) Type ¶
func (m MsgDonateToEcosystemFund) Type() string
func (*MsgDonateToEcosystemFund) Unmarshal ¶
func (m *MsgDonateToEcosystemFund) Unmarshal(dAtA []byte) error
func (MsgDonateToEcosystemFund) ValidateBasic ¶
func (m MsgDonateToEcosystemFund) ValidateBasic() error
func (*MsgDonateToEcosystemFund) XXX_DiscardUnknown ¶
func (m *MsgDonateToEcosystemFund) XXX_DiscardUnknown()
func (*MsgDonateToEcosystemFund) XXX_Marshal ¶
func (m *MsgDonateToEcosystemFund) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*MsgDonateToEcosystemFund) XXX_Merge ¶
func (m *MsgDonateToEcosystemFund) XXX_Merge(src proto.Message)
func (*MsgDonateToEcosystemFund) XXX_Size ¶
func (m *MsgDonateToEcosystemFund) XXX_Size() int
func (*MsgDonateToEcosystemFund) XXX_Unmarshal ¶
func (m *MsgDonateToEcosystemFund) XXX_Unmarshal(b []byte) error
type MsgDonateToEcosystemFundResponse ¶
type MsgDonateToEcosystemFundResponse struct { }
func (*MsgDonateToEcosystemFundResponse) Descriptor ¶
func (*MsgDonateToEcosystemFundResponse) Descriptor() ([]byte, []int)
func (*MsgDonateToEcosystemFundResponse) Marshal ¶
func (m *MsgDonateToEcosystemFundResponse) Marshal() (dAtA []byte, err error)
func (*MsgDonateToEcosystemFundResponse) MarshalTo ¶
func (m *MsgDonateToEcosystemFundResponse) MarshalTo(dAtA []byte) (int, error)
func (*MsgDonateToEcosystemFundResponse) MarshalToSizedBuffer ¶
func (m *MsgDonateToEcosystemFundResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*MsgDonateToEcosystemFundResponse) ProtoMessage ¶
func (*MsgDonateToEcosystemFundResponse) ProtoMessage()
func (*MsgDonateToEcosystemFundResponse) Reset ¶
func (m *MsgDonateToEcosystemFundResponse) Reset()
func (*MsgDonateToEcosystemFundResponse) Size ¶
func (m *MsgDonateToEcosystemFundResponse) Size() (n int)
func (*MsgDonateToEcosystemFundResponse) String ¶
func (m *MsgDonateToEcosystemFundResponse) String() string
func (*MsgDonateToEcosystemFundResponse) Unmarshal ¶
func (m *MsgDonateToEcosystemFundResponse) Unmarshal(dAtA []byte) error
func (*MsgDonateToEcosystemFundResponse) XXX_DiscardUnknown ¶
func (m *MsgDonateToEcosystemFundResponse) XXX_DiscardUnknown()
func (*MsgDonateToEcosystemFundResponse) XXX_Marshal ¶
func (m *MsgDonateToEcosystemFundResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*MsgDonateToEcosystemFundResponse) XXX_Merge ¶
func (m *MsgDonateToEcosystemFundResponse) XXX_Merge(src proto.Message)
func (*MsgDonateToEcosystemFundResponse) XXX_Size ¶
func (m *MsgDonateToEcosystemFundResponse) XXX_Size() int
func (*MsgDonateToEcosystemFundResponse) XXX_Unmarshal ¶
func (m *MsgDonateToEcosystemFundResponse) XXX_Unmarshal(b []byte) error
type MsgMultiLiquidate ¶
type MsgMultiLiquidate struct { Sender string `protobuf:"bytes,1,opt,name=sender,proto3" json:"sender,omitempty"` Liquidations []*MsgMultiLiquidate_Liquidation `protobuf:"bytes,2,rep,name=liquidations,proto3" json:"liquidations,omitempty"` }
func (*MsgMultiLiquidate) Descriptor ¶
func (*MsgMultiLiquidate) Descriptor() ([]byte, []int)
func (*MsgMultiLiquidate) GetLiquidations ¶
func (m *MsgMultiLiquidate) GetLiquidations() []*MsgMultiLiquidate_Liquidation
func (*MsgMultiLiquidate) GetSender ¶
func (m *MsgMultiLiquidate) GetSender() string
func (*MsgMultiLiquidate) GetSigners ¶
func (m *MsgMultiLiquidate) GetSigners() []sdk.AccAddress
func (*MsgMultiLiquidate) Marshal ¶
func (m *MsgMultiLiquidate) Marshal() (dAtA []byte, err error)
func (*MsgMultiLiquidate) MarshalTo ¶
func (m *MsgMultiLiquidate) MarshalTo(dAtA []byte) (int, error)
func (*MsgMultiLiquidate) MarshalToSizedBuffer ¶
func (m *MsgMultiLiquidate) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*MsgMultiLiquidate) ProtoMessage ¶
func (*MsgMultiLiquidate) ProtoMessage()
func (*MsgMultiLiquidate) Reset ¶
func (m *MsgMultiLiquidate) Reset()
func (*MsgMultiLiquidate) Size ¶
func (m *MsgMultiLiquidate) Size() (n int)
func (*MsgMultiLiquidate) String ¶
func (m *MsgMultiLiquidate) String() string
func (*MsgMultiLiquidate) Unmarshal ¶
func (m *MsgMultiLiquidate) Unmarshal(dAtA []byte) error
func (*MsgMultiLiquidate) ValidateBasic ¶
func (m *MsgMultiLiquidate) ValidateBasic() error
func (*MsgMultiLiquidate) XXX_DiscardUnknown ¶
func (m *MsgMultiLiquidate) XXX_DiscardUnknown()
func (*MsgMultiLiquidate) XXX_Marshal ¶
func (m *MsgMultiLiquidate) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*MsgMultiLiquidate) XXX_Merge ¶
func (m *MsgMultiLiquidate) XXX_Merge(src proto.Message)
func (*MsgMultiLiquidate) XXX_Size ¶
func (m *MsgMultiLiquidate) XXX_Size() int
func (*MsgMultiLiquidate) XXX_Unmarshal ¶
func (m *MsgMultiLiquidate) XXX_Unmarshal(b []byte) error
type MsgMultiLiquidateResponse ¶
type MsgMultiLiquidateResponse struct {
Liquidations []*MsgMultiLiquidateResponse_LiquidationResponse `protobuf:"bytes,1,rep,name=liquidations,proto3" json:"liquidations,omitempty"`
}
func (*MsgMultiLiquidateResponse) Descriptor ¶
func (*MsgMultiLiquidateResponse) Descriptor() ([]byte, []int)
func (*MsgMultiLiquidateResponse) GetLiquidations ¶
func (m *MsgMultiLiquidateResponse) GetLiquidations() []*MsgMultiLiquidateResponse_LiquidationResponse
func (*MsgMultiLiquidateResponse) Marshal ¶
func (m *MsgMultiLiquidateResponse) Marshal() (dAtA []byte, err error)
func (*MsgMultiLiquidateResponse) MarshalTo ¶
func (m *MsgMultiLiquidateResponse) MarshalTo(dAtA []byte) (int, error)
func (*MsgMultiLiquidateResponse) MarshalToSizedBuffer ¶
func (m *MsgMultiLiquidateResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*MsgMultiLiquidateResponse) ProtoMessage ¶
func (*MsgMultiLiquidateResponse) ProtoMessage()
func (*MsgMultiLiquidateResponse) Reset ¶
func (m *MsgMultiLiquidateResponse) Reset()
func (*MsgMultiLiquidateResponse) Size ¶
func (m *MsgMultiLiquidateResponse) Size() (n int)
func (*MsgMultiLiquidateResponse) String ¶
func (m *MsgMultiLiquidateResponse) String() string
func (*MsgMultiLiquidateResponse) Unmarshal ¶
func (m *MsgMultiLiquidateResponse) Unmarshal(dAtA []byte) error
func (*MsgMultiLiquidateResponse) XXX_DiscardUnknown ¶
func (m *MsgMultiLiquidateResponse) XXX_DiscardUnknown()
func (*MsgMultiLiquidateResponse) XXX_Marshal ¶
func (m *MsgMultiLiquidateResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*MsgMultiLiquidateResponse) XXX_Merge ¶
func (m *MsgMultiLiquidateResponse) XXX_Merge(src proto.Message)
func (*MsgMultiLiquidateResponse) XXX_Size ¶
func (m *MsgMultiLiquidateResponse) XXX_Size() int
func (*MsgMultiLiquidateResponse) XXX_Unmarshal ¶
func (m *MsgMultiLiquidateResponse) XXX_Unmarshal(b []byte) error
type MsgMultiLiquidateResponse_LiquidationResponse ¶
type MsgMultiLiquidateResponse_LiquidationResponse struct { Success bool `protobuf:"varint,1,opt,name=success,proto3" json:"success,omitempty"` Error string `protobuf:"bytes,2,opt,name=error,proto3" json:"error,omitempty"` LiquidatorFee *types.Coin `protobuf:"bytes,3,opt,name=liquidator_fee,json=liquidatorFee,proto3" json:"liquidator_fee,omitempty"` PerpEfFee *types.Coin `protobuf:"bytes,4,opt,name=perp_ef_fee,json=perpEfFee,proto3" json:"perp_ef_fee,omitempty"` Trader string `protobuf:"bytes,5,opt,name=trader,proto3" json:"trader,omitempty"` }
func (*MsgMultiLiquidateResponse_LiquidationResponse) Descriptor ¶
func (*MsgMultiLiquidateResponse_LiquidationResponse) Descriptor() ([]byte, []int)
func (*MsgMultiLiquidateResponse_LiquidationResponse) GetError ¶
func (m *MsgMultiLiquidateResponse_LiquidationResponse) GetError() string
func (*MsgMultiLiquidateResponse_LiquidationResponse) GetLiquidatorFee ¶
func (m *MsgMultiLiquidateResponse_LiquidationResponse) GetLiquidatorFee() *types.Coin
func (*MsgMultiLiquidateResponse_LiquidationResponse) GetPerpEfFee ¶
func (m *MsgMultiLiquidateResponse_LiquidationResponse) GetPerpEfFee() *types.Coin
func (*MsgMultiLiquidateResponse_LiquidationResponse) GetSuccess ¶
func (m *MsgMultiLiquidateResponse_LiquidationResponse) GetSuccess() bool
func (*MsgMultiLiquidateResponse_LiquidationResponse) GetTrader ¶
func (m *MsgMultiLiquidateResponse_LiquidationResponse) GetTrader() string
func (*MsgMultiLiquidateResponse_LiquidationResponse) Marshal ¶
func (m *MsgMultiLiquidateResponse_LiquidationResponse) Marshal() (dAtA []byte, err error)
func (*MsgMultiLiquidateResponse_LiquidationResponse) MarshalTo ¶
func (m *MsgMultiLiquidateResponse_LiquidationResponse) MarshalTo(dAtA []byte) (int, error)
func (*MsgMultiLiquidateResponse_LiquidationResponse) MarshalToSizedBuffer ¶
func (m *MsgMultiLiquidateResponse_LiquidationResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*MsgMultiLiquidateResponse_LiquidationResponse) ProtoMessage ¶
func (*MsgMultiLiquidateResponse_LiquidationResponse) ProtoMessage()
func (*MsgMultiLiquidateResponse_LiquidationResponse) Reset ¶
func (m *MsgMultiLiquidateResponse_LiquidationResponse) Reset()
func (*MsgMultiLiquidateResponse_LiquidationResponse) Size ¶
func (m *MsgMultiLiquidateResponse_LiquidationResponse) Size() (n int)
func (*MsgMultiLiquidateResponse_LiquidationResponse) String ¶
func (m *MsgMultiLiquidateResponse_LiquidationResponse) String() string
func (*MsgMultiLiquidateResponse_LiquidationResponse) Unmarshal ¶
func (m *MsgMultiLiquidateResponse_LiquidationResponse) Unmarshal(dAtA []byte) error
func (*MsgMultiLiquidateResponse_LiquidationResponse) XXX_DiscardUnknown ¶
func (m *MsgMultiLiquidateResponse_LiquidationResponse) XXX_DiscardUnknown()
func (*MsgMultiLiquidateResponse_LiquidationResponse) XXX_Marshal ¶
func (m *MsgMultiLiquidateResponse_LiquidationResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*MsgMultiLiquidateResponse_LiquidationResponse) XXX_Merge ¶
func (m *MsgMultiLiquidateResponse_LiquidationResponse) XXX_Merge(src proto.Message)
func (*MsgMultiLiquidateResponse_LiquidationResponse) XXX_Size ¶
func (m *MsgMultiLiquidateResponse_LiquidationResponse) XXX_Size() int
func (*MsgMultiLiquidateResponse_LiquidationResponse) XXX_Unmarshal ¶
func (m *MsgMultiLiquidateResponse_LiquidationResponse) XXX_Unmarshal(b []byte) error
type MsgMultiLiquidate_Liquidation ¶
type MsgMultiLiquidate_Liquidation struct { Pair github_com_NibiruChain_nibiru_x_common_asset.Pair `protobuf:"bytes,1,opt,name=pair,proto3,customtype=github.com/NibiruChain/nibiru/x/common/asset.Pair" json:"pair"` Trader string `protobuf:"bytes,2,opt,name=trader,proto3" json:"trader,omitempty"` }
func (*MsgMultiLiquidate_Liquidation) Descriptor ¶
func (*MsgMultiLiquidate_Liquidation) Descriptor() ([]byte, []int)
func (*MsgMultiLiquidate_Liquidation) GetTrader ¶
func (m *MsgMultiLiquidate_Liquidation) GetTrader() string
func (*MsgMultiLiquidate_Liquidation) Marshal ¶
func (m *MsgMultiLiquidate_Liquidation) Marshal() (dAtA []byte, err error)
func (*MsgMultiLiquidate_Liquidation) MarshalTo ¶
func (m *MsgMultiLiquidate_Liquidation) MarshalTo(dAtA []byte) (int, error)
func (*MsgMultiLiquidate_Liquidation) MarshalToSizedBuffer ¶
func (m *MsgMultiLiquidate_Liquidation) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*MsgMultiLiquidate_Liquidation) ProtoMessage ¶
func (*MsgMultiLiquidate_Liquidation) ProtoMessage()
func (*MsgMultiLiquidate_Liquidation) Reset ¶
func (m *MsgMultiLiquidate_Liquidation) Reset()
func (*MsgMultiLiquidate_Liquidation) Size ¶
func (m *MsgMultiLiquidate_Liquidation) Size() (n int)
func (*MsgMultiLiquidate_Liquidation) String ¶
func (m *MsgMultiLiquidate_Liquidation) String() string
func (*MsgMultiLiquidate_Liquidation) Unmarshal ¶
func (m *MsgMultiLiquidate_Liquidation) Unmarshal(dAtA []byte) error
func (*MsgMultiLiquidate_Liquidation) XXX_DiscardUnknown ¶
func (m *MsgMultiLiquidate_Liquidation) XXX_DiscardUnknown()
func (*MsgMultiLiquidate_Liquidation) XXX_Marshal ¶
func (m *MsgMultiLiquidate_Liquidation) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*MsgMultiLiquidate_Liquidation) XXX_Merge ¶
func (m *MsgMultiLiquidate_Liquidation) XXX_Merge(src proto.Message)
func (*MsgMultiLiquidate_Liquidation) XXX_Size ¶
func (m *MsgMultiLiquidate_Liquidation) XXX_Size() int
func (*MsgMultiLiquidate_Liquidation) XXX_Unmarshal ¶
func (m *MsgMultiLiquidate_Liquidation) XXX_Unmarshal(b []byte) error
type MsgOpenPosition ¶
type MsgOpenPosition struct { Sender string `protobuf:"bytes,1,opt,name=sender,proto3" json:"sender,omitempty"` Pair github_com_NibiruChain_nibiru_x_common_asset.Pair `protobuf:"bytes,2,opt,name=pair,proto3,customtype=github.com/NibiruChain/nibiru/x/common/asset.Pair" json:"pair"` Side Direction `protobuf:"varint,3,opt,name=side,proto3,enum=nibiru.perp.v2.Direction" json:"side,omitempty"` QuoteAssetAmount github_com_cosmos_cosmos_sdk_types.Int `` /* 151-byte string literal not displayed */ Leverage github_com_cosmos_cosmos_sdk_types.Dec `protobuf:"bytes,5,opt,name=leverage,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Dec" json:"leverage"` BaseAssetAmountLimit github_com_cosmos_cosmos_sdk_types.Int `` /* 165-byte string literal not displayed */ }
func (*MsgOpenPosition) Descriptor ¶
func (*MsgOpenPosition) Descriptor() ([]byte, []int)
func (*MsgOpenPosition) GetSender ¶
func (m *MsgOpenPosition) GetSender() string
func (*MsgOpenPosition) GetSide ¶
func (m *MsgOpenPosition) GetSide() Direction
func (MsgOpenPosition) GetSignBytes ¶
func (m MsgOpenPosition) GetSignBytes() []byte
func (*MsgOpenPosition) GetSigners ¶
func (m *MsgOpenPosition) GetSigners() []sdk.AccAddress
func (*MsgOpenPosition) Marshal ¶
func (m *MsgOpenPosition) Marshal() (dAtA []byte, err error)
func (*MsgOpenPosition) MarshalToSizedBuffer ¶
func (m *MsgOpenPosition) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*MsgOpenPosition) ProtoMessage ¶
func (*MsgOpenPosition) ProtoMessage()
func (*MsgOpenPosition) Reset ¶
func (m *MsgOpenPosition) Reset()
func (MsgOpenPosition) Route ¶
func (m MsgOpenPosition) Route() string
func (*MsgOpenPosition) Size ¶
func (m *MsgOpenPosition) Size() (n int)
func (*MsgOpenPosition) String ¶
func (m *MsgOpenPosition) String() string
func (MsgOpenPosition) Type ¶
func (m MsgOpenPosition) Type() string
func (*MsgOpenPosition) Unmarshal ¶
func (m *MsgOpenPosition) Unmarshal(dAtA []byte) error
func (*MsgOpenPosition) ValidateBasic ¶
func (m *MsgOpenPosition) ValidateBasic() error
func (*MsgOpenPosition) XXX_DiscardUnknown ¶
func (m *MsgOpenPosition) XXX_DiscardUnknown()
func (*MsgOpenPosition) XXX_Marshal ¶
func (m *MsgOpenPosition) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*MsgOpenPosition) XXX_Merge ¶
func (m *MsgOpenPosition) XXX_Merge(src proto.Message)
func (*MsgOpenPosition) XXX_Size ¶
func (m *MsgOpenPosition) XXX_Size() int
func (*MsgOpenPosition) XXX_Unmarshal ¶
func (m *MsgOpenPosition) XXX_Unmarshal(b []byte) error
type MsgOpenPositionResponse ¶
type MsgOpenPositionResponse struct { Position *Position `protobuf:"bytes,1,opt,name=position,proto3" json:"position,omitempty"` // The amount of quote assets exchanged. ExchangedNotionalValue github_com_cosmos_cosmos_sdk_types.Dec `` /* 169-byte string literal not displayed */ // The amount of base assets exchanged. ExchangedPositionSize github_com_cosmos_cosmos_sdk_types.Dec `` /* 166-byte string literal not displayed */ // The funding payment applied on this position change, measured in quote // units. FundingPayment github_com_cosmos_cosmos_sdk_types.Dec `` /* 143-byte string literal not displayed */ // The amount of PnL realized on this position changed, measured in quote // units. RealizedPnl github_com_cosmos_cosmos_sdk_types.Dec `` /* 134-byte string literal not displayed */ // The unrealized PnL in the position after the position change, measured in // quote units. UnrealizedPnlAfter github_com_cosmos_cosmos_sdk_types.Dec `` /* 157-byte string literal not displayed */ // The amount of margin the trader has to give to the vault. // A negative value means the vault pays the trader. MarginToVault github_com_cosmos_cosmos_sdk_types.Dec `` /* 142-byte string literal not displayed */ // The position's notional value after the position change, measured in quote // units. PositionNotional github_com_cosmos_cosmos_sdk_types.Dec `` /* 149-byte string literal not displayed */ }
func (*MsgOpenPositionResponse) Descriptor ¶
func (*MsgOpenPositionResponse) Descriptor() ([]byte, []int)
func (*MsgOpenPositionResponse) GetPosition ¶
func (m *MsgOpenPositionResponse) GetPosition() *Position
func (*MsgOpenPositionResponse) Marshal ¶
func (m *MsgOpenPositionResponse) Marshal() (dAtA []byte, err error)
func (*MsgOpenPositionResponse) MarshalTo ¶
func (m *MsgOpenPositionResponse) MarshalTo(dAtA []byte) (int, error)
func (*MsgOpenPositionResponse) MarshalToSizedBuffer ¶
func (m *MsgOpenPositionResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*MsgOpenPositionResponse) ProtoMessage ¶
func (*MsgOpenPositionResponse) ProtoMessage()
func (*MsgOpenPositionResponse) Reset ¶
func (m *MsgOpenPositionResponse) Reset()
func (*MsgOpenPositionResponse) Size ¶
func (m *MsgOpenPositionResponse) Size() (n int)
func (*MsgOpenPositionResponse) String ¶
func (m *MsgOpenPositionResponse) String() string
func (*MsgOpenPositionResponse) Unmarshal ¶
func (m *MsgOpenPositionResponse) Unmarshal(dAtA []byte) error
func (*MsgOpenPositionResponse) XXX_DiscardUnknown ¶
func (m *MsgOpenPositionResponse) XXX_DiscardUnknown()
func (*MsgOpenPositionResponse) XXX_Marshal ¶
func (m *MsgOpenPositionResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*MsgOpenPositionResponse) XXX_Merge ¶
func (m *MsgOpenPositionResponse) XXX_Merge(src proto.Message)
func (*MsgOpenPositionResponse) XXX_Size ¶
func (m *MsgOpenPositionResponse) XXX_Size() int
func (*MsgOpenPositionResponse) XXX_Unmarshal ¶
func (m *MsgOpenPositionResponse) XXX_Unmarshal(b []byte) error
type MsgRemoveMargin ¶
type MsgRemoveMargin struct { Sender string `protobuf:"bytes,1,opt,name=sender,proto3" json:"sender,omitempty"` Pair github_com_NibiruChain_nibiru_x_common_asset.Pair `protobuf:"bytes,2,opt,name=pair,proto3,customtype=github.com/NibiruChain/nibiru/x/common/asset.Pair" json:"pair"` Margin types.Coin `protobuf:"bytes,3,opt,name=margin,proto3" json:"margin"` }
MsgRemoveMargin: Msg to remove margin.
func (*MsgRemoveMargin) Descriptor ¶
func (*MsgRemoveMargin) Descriptor() ([]byte, []int)
func (*MsgRemoveMargin) GetMargin ¶
func (m *MsgRemoveMargin) GetMargin() types.Coin
func (*MsgRemoveMargin) GetSender ¶
func (m *MsgRemoveMargin) GetSender() string
func (MsgRemoveMargin) GetSignBytes ¶
func (m MsgRemoveMargin) GetSignBytes() []byte
func (MsgRemoveMargin) GetSigners ¶
func (m MsgRemoveMargin) GetSigners() []sdk.AccAddress
func (*MsgRemoveMargin) Marshal ¶
func (m *MsgRemoveMargin) Marshal() (dAtA []byte, err error)
func (*MsgRemoveMargin) MarshalToSizedBuffer ¶
func (m *MsgRemoveMargin) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*MsgRemoveMargin) ProtoMessage ¶
func (*MsgRemoveMargin) ProtoMessage()
func (*MsgRemoveMargin) Reset ¶
func (m *MsgRemoveMargin) Reset()
func (MsgRemoveMargin) Route ¶
func (m MsgRemoveMargin) Route() string
func (*MsgRemoveMargin) Size ¶
func (m *MsgRemoveMargin) Size() (n int)
func (*MsgRemoveMargin) String ¶
func (m *MsgRemoveMargin) String() string
func (MsgRemoveMargin) Type ¶
func (m MsgRemoveMargin) Type() string
func (*MsgRemoveMargin) Unmarshal ¶
func (m *MsgRemoveMargin) Unmarshal(dAtA []byte) error
func (MsgRemoveMargin) ValidateBasic ¶
func (m MsgRemoveMargin) ValidateBasic() error
func (*MsgRemoveMargin) XXX_DiscardUnknown ¶
func (m *MsgRemoveMargin) XXX_DiscardUnknown()
func (*MsgRemoveMargin) XXX_Marshal ¶
func (m *MsgRemoveMargin) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*MsgRemoveMargin) XXX_Merge ¶
func (m *MsgRemoveMargin) XXX_Merge(src proto.Message)
func (*MsgRemoveMargin) XXX_Size ¶
func (m *MsgRemoveMargin) XXX_Size() int
func (*MsgRemoveMargin) XXX_Unmarshal ¶
func (m *MsgRemoveMargin) XXX_Unmarshal(b []byte) error
type MsgRemoveMarginResponse ¶
type MsgRemoveMarginResponse struct { // tokens transferred back to the trader MarginOut types.Coin `protobuf:"bytes,1,opt,name=margin_out,json=marginOut,proto3" json:"margin_out"` // the funding payment applied on this position interaction FundingPayment github_com_cosmos_cosmos_sdk_types.Dec `` /* 143-byte string literal not displayed */ // The resulting position Position *Position `protobuf:"bytes,3,opt,name=position,proto3" json:"position,omitempty"` }
func (*MsgRemoveMarginResponse) Descriptor ¶
func (*MsgRemoveMarginResponse) Descriptor() ([]byte, []int)
func (*MsgRemoveMarginResponse) GetMarginOut ¶
func (m *MsgRemoveMarginResponse) GetMarginOut() types.Coin
func (*MsgRemoveMarginResponse) GetPosition ¶
func (m *MsgRemoveMarginResponse) GetPosition() *Position
func (*MsgRemoveMarginResponse) Marshal ¶
func (m *MsgRemoveMarginResponse) Marshal() (dAtA []byte, err error)
func (*MsgRemoveMarginResponse) MarshalTo ¶
func (m *MsgRemoveMarginResponse) MarshalTo(dAtA []byte) (int, error)
func (*MsgRemoveMarginResponse) MarshalToSizedBuffer ¶
func (m *MsgRemoveMarginResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*MsgRemoveMarginResponse) ProtoMessage ¶
func (*MsgRemoveMarginResponse) ProtoMessage()
func (*MsgRemoveMarginResponse) Reset ¶
func (m *MsgRemoveMarginResponse) Reset()
func (*MsgRemoveMarginResponse) Size ¶
func (m *MsgRemoveMarginResponse) Size() (n int)
func (*MsgRemoveMarginResponse) String ¶
func (m *MsgRemoveMarginResponse) String() string
func (*MsgRemoveMarginResponse) Unmarshal ¶
func (m *MsgRemoveMarginResponse) Unmarshal(dAtA []byte) error
func (*MsgRemoveMarginResponse) XXX_DiscardUnknown ¶
func (m *MsgRemoveMarginResponse) XXX_DiscardUnknown()
func (*MsgRemoveMarginResponse) XXX_Marshal ¶
func (m *MsgRemoveMarginResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*MsgRemoveMarginResponse) XXX_Merge ¶
func (m *MsgRemoveMarginResponse) XXX_Merge(src proto.Message)
func (*MsgRemoveMarginResponse) XXX_Size ¶
func (m *MsgRemoveMarginResponse) XXX_Size() int
func (*MsgRemoveMarginResponse) XXX_Unmarshal ¶
func (m *MsgRemoveMarginResponse) XXX_Unmarshal(b []byte) error
type MsgServer ¶
type MsgServer interface { RemoveMargin(context.Context, *MsgRemoveMargin) (*MsgRemoveMarginResponse, error) AddMargin(context.Context, *MsgAddMargin) (*MsgAddMarginResponse, error) MultiLiquidate(context.Context, *MsgMultiLiquidate) (*MsgMultiLiquidateResponse, error) OpenPosition(context.Context, *MsgOpenPosition) (*MsgOpenPositionResponse, error) ClosePosition(context.Context, *MsgClosePosition) (*MsgClosePositionResponse, error) DonateToEcosystemFund(context.Context, *MsgDonateToEcosystemFund) (*MsgDonateToEcosystemFundResponse, error) }
MsgServer is the server API for Msg service.
type OracleKeeper ¶
type Position ¶
type Position struct { // address identifies the address owner of this position TraderAddress string `protobuf:"bytes,1,opt,name=trader_address,json=traderAddress,proto3" json:"trader_address,omitempty"` // pair identifies the pair associated with this position Pair github_com_NibiruChain_nibiru_x_common_asset.Pair `protobuf:"bytes,2,opt,name=pair,proto3,customtype=github.com/NibiruChain/nibiru/x/common/asset.Pair" json:"pair"` // the position size Size_ github_com_cosmos_cosmos_sdk_types.Dec `protobuf:"bytes,3,opt,name=size,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Dec" json:"size"` // amount of margin remaining in the position Margin github_com_cosmos_cosmos_sdk_types.Dec `protobuf:"bytes,4,opt,name=margin,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Dec" json:"margin"` // value of position in quote assets when opened OpenNotional github_com_cosmos_cosmos_sdk_types.Dec `` /* 137-byte string literal not displayed */ // The most recent cumulative premium fraction this position has. // Used to calculate the next funding payment. LatestCumulativePremiumFraction github_com_cosmos_cosmos_sdk_types.Dec `` /* 198-byte string literal not displayed */ // last block number this position was updated LastUpdatedBlockNumber int64 `` /* 132-byte string literal not displayed */ }
func ZeroPosition ¶
func (*Position) Descriptor ¶
func (*Position) GetLastUpdatedBlockNumber ¶
func (*Position) GetTraderAddress ¶
func (*Position) MarshalToSizedBuffer ¶
func (*Position) ProtoMessage ¶
func (*Position) ProtoMessage()
func (*Position) XXX_DiscardUnknown ¶
func (m *Position) XXX_DiscardUnknown()
func (*Position) XXX_Marshal ¶
func (*Position) XXX_Unmarshal ¶
type PositionChangedEvent ¶
type PositionChangedEvent struct { FinalPosition Position `protobuf:"bytes,1,opt,name=final_position,json=finalPosition,proto3" json:"final_position"` // Position notional (in quote units) after the change. In general, // 'notional = baseAmount * priceQuotePerBase', where size is the baseAmount. PositionNotional github_com_cosmos_cosmos_sdk_types.Dec `` /* 149-byte string literal not displayed */ // Transaction fee paid. A "taker" fee. TransactionFee types.Coin `protobuf:"bytes,3,opt,name=transaction_fee,json=transactionFee,proto3" json:"transaction_fee" yaml:"transaction_fee"` // realize profits and losses after the change RealizedPnl github_com_cosmos_cosmos_sdk_types.Dec `` /* 134-byte string literal not displayed */ // Amount of bad debt cleared by the PerpEF during the change. // Bad debt is negative net margin past the liquidation point of a position. BadDebt types.Coin `protobuf:"bytes,5,opt,name=bad_debt,json=badDebt,proto3" json:"bad_debt"` // A funding payment made or received by the trader on the current position. //'fundingPayment' is positive if 'owner' is the sender and negative if 'owner' //is the receiver of the payment. Its magnitude is abs(size * fundingRate). //Funding payments act to converge the mark price and index price //(average price on major exchanges). FundingPayment github_com_cosmos_cosmos_sdk_types.Dec `` /* 143-byte string literal not displayed */ // The block number at which this position was changed. BlockHeight int64 `protobuf:"varint,7,opt,name=block_height,json=blockHeight,proto3" json:"block_height,omitempty"` // margin_to_user is the amount of collateral received by the trader during // the position change. A positve value indicates that the trader received // funds, while a negative value indicates that the trader spent funds. MarginToUser github_com_cosmos_cosmos_sdk_types.Int `` /* 139-byte string literal not displayed */ // change_reason describes the reason for why the position resulted in a // change. Change type can take the following values: // // - CHANGE_REASON_UNSPECIFIED: Unspecified change reason. // - CHANGE_REASON_ADD_MARGIN: Margin was added to the position. // - CHANGE_REASON_REMOVE_MARGIN: Margin was removed from the position. // - CHANGE_REASON_OPEN_POSITION: A new position was opened. // - CHANGE_REASON_CLOSE_POSITION: An existing position was closed. ChangeReason ChangeReason `protobuf:"bytes,9,opt,name=change_reason,json=changeReason,proto3,customtype=ChangeReason" json:"change_reason"` }
Emitted when a position changes.
func (*PositionChangedEvent) Descriptor ¶
func (*PositionChangedEvent) Descriptor() ([]byte, []int)
func (*PositionChangedEvent) GetBadDebt ¶
func (m *PositionChangedEvent) GetBadDebt() types.Coin
func (*PositionChangedEvent) GetBlockHeight ¶
func (m *PositionChangedEvent) GetBlockHeight() int64
func (*PositionChangedEvent) GetFinalPosition ¶
func (m *PositionChangedEvent) GetFinalPosition() Position
func (*PositionChangedEvent) GetTransactionFee ¶
func (m *PositionChangedEvent) GetTransactionFee() types.Coin
func (*PositionChangedEvent) Marshal ¶
func (m *PositionChangedEvent) Marshal() (dAtA []byte, err error)
func (*PositionChangedEvent) MarshalTo ¶
func (m *PositionChangedEvent) MarshalTo(dAtA []byte) (int, error)
func (*PositionChangedEvent) MarshalToSizedBuffer ¶
func (m *PositionChangedEvent) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*PositionChangedEvent) ProtoMessage ¶
func (*PositionChangedEvent) ProtoMessage()
func (*PositionChangedEvent) Reset ¶
func (m *PositionChangedEvent) Reset()
func (*PositionChangedEvent) Size ¶
func (m *PositionChangedEvent) Size() (n int)
func (*PositionChangedEvent) String ¶
func (m *PositionChangedEvent) String() string
func (*PositionChangedEvent) Unmarshal ¶
func (m *PositionChangedEvent) Unmarshal(dAtA []byte) error
func (*PositionChangedEvent) XXX_DiscardUnknown ¶
func (m *PositionChangedEvent) XXX_DiscardUnknown()
func (*PositionChangedEvent) XXX_Marshal ¶
func (m *PositionChangedEvent) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*PositionChangedEvent) XXX_Merge ¶
func (m *PositionChangedEvent) XXX_Merge(src proto.Message)
func (*PositionChangedEvent) XXX_Size ¶
func (m *PositionChangedEvent) XXX_Size() int
func (*PositionChangedEvent) XXX_Unmarshal ¶
func (m *PositionChangedEvent) XXX_Unmarshal(b []byte) error
type PositionLiquidatedEvent ¶
type PositionLiquidatedEvent struct { // identifier of the corresponding virtual pool for the position Pair github_com_NibiruChain_nibiru_x_common_asset.Pair `protobuf:"bytes,1,opt,name=pair,proto3,customtype=github.com/NibiruChain/nibiru/x/common/asset.Pair" json:"pair"` // owner of the position. TraderAddress string `protobuf:"bytes,2,opt,name=trader_address,json=traderAddress,proto3" json:"trader_address,omitempty"` // margin * leverage * vPrice. 'notional' is the virtual size times the // virtual price on 'perp.amm'. ExchangedQuoteAmount github_com_cosmos_cosmos_sdk_types.Dec `` /* 163-byte string literal not displayed */ // virtual amount of base assets for the position, which would be margin * // leverage * priceBasePerQuote. ExchangedPositionSize github_com_cosmos_cosmos_sdk_types.Dec `` /* 166-byte string literal not displayed */ // Address of the account that executed the tx. LiquidatorAddress string `protobuf:"bytes,5,opt,name=liquidator_address,json=liquidatorAddress,proto3" json:"liquidator_address,omitempty"` // Commission (in margin units) received by 'liquidator'. FeeToLiquidator types.Coin `protobuf:"bytes,6,opt,name=fee_to_liquidator,json=feeToLiquidator,proto3" json:"fee_to_liquidator" yaml:"fee_to_liquidator"` // Commission (in margin units) given to the ecosystem fund. FeeToEcosystemFund types.Coin `` /* 138-byte string literal not displayed */ // Bad debt (margin units) cleared by the PerpEF during the tx. Bad debt is // negative net margin past the liquidation point of a position. BadDebt types.Coin `protobuf:"bytes,8,opt,name=bad_debt,json=badDebt,proto3" json:"bad_debt"` // Remaining margin in the position after liquidation Margin types.Coin `protobuf:"bytes,9,opt,name=margin,proto3" json:"margin" yaml:"margin"` // Remaining position notional in the position after liquidation PositionNotional github_com_cosmos_cosmos_sdk_types.Dec `` /* 150-byte string literal not displayed */ // Remaining position size in the position after liquidation PositionSize github_com_cosmos_cosmos_sdk_types.Dec `` /* 138-byte string literal not displayed */ // Unrealized PnL in the position after liquidation UnrealizedPnl github_com_cosmos_cosmos_sdk_types.Dec `protobuf:"bytes,12,opt,name=unrealizedPnl,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Dec" json:"unrealizedPnl"` // Spot price of the vAMM after liquidation MarkPrice github_com_cosmos_cosmos_sdk_types.Dec `` /* 129-byte string literal not displayed */ // The block number at which this liquidation occured. BlockHeight int64 `protobuf:"varint,14,opt,name=block_height,json=blockHeight,proto3" json:"block_height,omitempty"` // The unix timestamp in milliseconds at which this liquidation occured. BlockTimeMs int64 `protobuf:"varint,15,opt,name=block_time_ms,json=blockTimeMs,proto3" json:"block_time_ms,omitempty"` }
Emitted when a position is liquidated.
func (*PositionLiquidatedEvent) Descriptor ¶
func (*PositionLiquidatedEvent) Descriptor() ([]byte, []int)
func (*PositionLiquidatedEvent) GetBadDebt ¶
func (m *PositionLiquidatedEvent) GetBadDebt() types.Coin
func (*PositionLiquidatedEvent) GetBlockHeight ¶
func (m *PositionLiquidatedEvent) GetBlockHeight() int64
func (*PositionLiquidatedEvent) GetBlockTimeMs ¶
func (m *PositionLiquidatedEvent) GetBlockTimeMs() int64
func (*PositionLiquidatedEvent) GetFeeToEcosystemFund ¶
func (m *PositionLiquidatedEvent) GetFeeToEcosystemFund() types.Coin
func (*PositionLiquidatedEvent) GetFeeToLiquidator ¶
func (m *PositionLiquidatedEvent) GetFeeToLiquidator() types.Coin
func (*PositionLiquidatedEvent) GetLiquidatorAddress ¶
func (m *PositionLiquidatedEvent) GetLiquidatorAddress() string
func (*PositionLiquidatedEvent) GetMargin ¶
func (m *PositionLiquidatedEvent) GetMargin() types.Coin
func (*PositionLiquidatedEvent) GetTraderAddress ¶
func (m *PositionLiquidatedEvent) GetTraderAddress() string
func (*PositionLiquidatedEvent) Marshal ¶
func (m *PositionLiquidatedEvent) Marshal() (dAtA []byte, err error)
func (*PositionLiquidatedEvent) MarshalTo ¶
func (m *PositionLiquidatedEvent) MarshalTo(dAtA []byte) (int, error)
func (*PositionLiquidatedEvent) MarshalToSizedBuffer ¶
func (m *PositionLiquidatedEvent) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*PositionLiquidatedEvent) ProtoMessage ¶
func (*PositionLiquidatedEvent) ProtoMessage()
func (*PositionLiquidatedEvent) Reset ¶
func (m *PositionLiquidatedEvent) Reset()
func (*PositionLiquidatedEvent) Size ¶
func (m *PositionLiquidatedEvent) Size() (n int)
func (*PositionLiquidatedEvent) String ¶
func (m *PositionLiquidatedEvent) String() string
func (*PositionLiquidatedEvent) Unmarshal ¶
func (m *PositionLiquidatedEvent) Unmarshal(dAtA []byte) error
func (*PositionLiquidatedEvent) XXX_DiscardUnknown ¶
func (m *PositionLiquidatedEvent) XXX_DiscardUnknown()
func (*PositionLiquidatedEvent) XXX_Marshal ¶
func (m *PositionLiquidatedEvent) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*PositionLiquidatedEvent) XXX_Merge ¶
func (m *PositionLiquidatedEvent) XXX_Merge(src proto.Message)
func (*PositionLiquidatedEvent) XXX_Size ¶
func (m *PositionLiquidatedEvent) XXX_Size() int
func (*PositionLiquidatedEvent) XXX_Unmarshal ¶
func (m *PositionLiquidatedEvent) XXX_Unmarshal(b []byte) error
type PositionResp ¶
type PositionResp struct { Position Position // The amount of quote assets exchanged. ExchangedNotionalValue sdk.Dec // The amount of base assets exchanged. Signed, positive represents long and negative represents short from the user's perspective. ExchangedPositionSize sdk.Dec // The amount of bad debt accrued during this position change. // Measured in absolute value of quote units. // If greater than zero, then the position change event will likely fail. BadDebt sdk.Dec // The funding payment applied on this position change. FundingPayment sdk.Dec // The amount of PnL realized on this position changed, measured in quote // units. RealizedPnl sdk.Dec // The unrealized PnL in the position after the position change. UnrealizedPnlAfter sdk.Dec // The amount of margin the trader has to give to the vault. // A negative value means the vault pays the trader. MarginToVault sdk.Dec // The position's notional value after the position change, measured in quote // units. PositionNotional sdk.Dec }
type PositionSettledEvent ¶
type PositionSettledEvent struct { // Identifier for the virtual pool of the position. Pair github_com_NibiruChain_nibiru_x_common_asset.Pair `protobuf:"bytes,1,opt,name=pair,proto3,customtype=github.com/NibiruChain/nibiru/x/common/asset.Pair" json:"pair"` // Owner of the position. TraderAddress string `protobuf:"bytes,2,opt,name=trader_address,json=traderAddress,proto3" json:"trader_address,omitempty"` // Settled coin as dictated by the settlement price of the perp.amm. SettledCoins github_com_cosmos_cosmos_sdk_types.Coins `` /* 162-byte string literal not displayed */ }
Emitted when a position is settled.
func (*PositionSettledEvent) Descriptor ¶
func (*PositionSettledEvent) Descriptor() ([]byte, []int)
func (*PositionSettledEvent) GetSettledCoins ¶
func (m *PositionSettledEvent) GetSettledCoins() github_com_cosmos_cosmos_sdk_types.Coins
func (*PositionSettledEvent) GetTraderAddress ¶
func (m *PositionSettledEvent) GetTraderAddress() string
func (*PositionSettledEvent) Marshal ¶
func (m *PositionSettledEvent) Marshal() (dAtA []byte, err error)
func (*PositionSettledEvent) MarshalTo ¶
func (m *PositionSettledEvent) MarshalTo(dAtA []byte) (int, error)
func (*PositionSettledEvent) MarshalToSizedBuffer ¶
func (m *PositionSettledEvent) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*PositionSettledEvent) ProtoMessage ¶
func (*PositionSettledEvent) ProtoMessage()
func (*PositionSettledEvent) Reset ¶
func (m *PositionSettledEvent) Reset()
func (*PositionSettledEvent) Size ¶
func (m *PositionSettledEvent) Size() (n int)
func (*PositionSettledEvent) String ¶
func (m *PositionSettledEvent) String() string
func (*PositionSettledEvent) Unmarshal ¶
func (m *PositionSettledEvent) Unmarshal(dAtA []byte) error
func (*PositionSettledEvent) XXX_DiscardUnknown ¶
func (m *PositionSettledEvent) XXX_DiscardUnknown()
func (*PositionSettledEvent) XXX_Marshal ¶
func (m *PositionSettledEvent) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*PositionSettledEvent) XXX_Merge ¶
func (m *PositionSettledEvent) XXX_Merge(src proto.Message)
func (*PositionSettledEvent) XXX_Size ¶
func (m *PositionSettledEvent) XXX_Size() int
func (*PositionSettledEvent) XXX_Unmarshal ¶
func (m *PositionSettledEvent) XXX_Unmarshal(b []byte) error
type QueryClient ¶
type QueryClient interface { QueryPosition(ctx context.Context, in *QueryPositionRequest, opts ...grpc.CallOption) (*QueryPositionResponse, error) QueryPositions(ctx context.Context, in *QueryPositionsRequest, opts ...grpc.CallOption) (*QueryPositionsResponse, error) // Queries the reserve assets in a given pool, identified by a token pair. ModuleAccounts(ctx context.Context, in *QueryModuleAccountsRequest, opts ...grpc.CallOption) (*QueryModuleAccountsResponse, error) QueryMarkets(ctx context.Context, in *QueryMarketsRequest, opts ...grpc.CallOption) (*QueryMarketsResponse, error) }
QueryClient is the client API for Query service.
For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
func NewQueryClient ¶
func NewQueryClient(cc grpc1.ClientConn) QueryClient
type QueryMarketsRequest ¶
type QueryMarketsRequest struct { }
func (*QueryMarketsRequest) Descriptor ¶
func (*QueryMarketsRequest) Descriptor() ([]byte, []int)
func (*QueryMarketsRequest) Marshal ¶
func (m *QueryMarketsRequest) Marshal() (dAtA []byte, err error)
func (*QueryMarketsRequest) MarshalTo ¶
func (m *QueryMarketsRequest) MarshalTo(dAtA []byte) (int, error)
func (*QueryMarketsRequest) MarshalToSizedBuffer ¶
func (m *QueryMarketsRequest) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*QueryMarketsRequest) ProtoMessage ¶
func (*QueryMarketsRequest) ProtoMessage()
func (*QueryMarketsRequest) Reset ¶
func (m *QueryMarketsRequest) Reset()
func (*QueryMarketsRequest) Size ¶
func (m *QueryMarketsRequest) Size() (n int)
func (*QueryMarketsRequest) String ¶
func (m *QueryMarketsRequest) String() string
func (*QueryMarketsRequest) Unmarshal ¶
func (m *QueryMarketsRequest) Unmarshal(dAtA []byte) error
func (*QueryMarketsRequest) XXX_DiscardUnknown ¶
func (m *QueryMarketsRequest) XXX_DiscardUnknown()
func (*QueryMarketsRequest) XXX_Marshal ¶
func (m *QueryMarketsRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*QueryMarketsRequest) XXX_Merge ¶
func (m *QueryMarketsRequest) XXX_Merge(src proto.Message)
func (*QueryMarketsRequest) XXX_Size ¶
func (m *QueryMarketsRequest) XXX_Size() int
func (*QueryMarketsRequest) XXX_Unmarshal ¶
func (m *QueryMarketsRequest) XXX_Unmarshal(b []byte) error
type QueryMarketsResponse ¶
type QueryMarketsResponse struct {
AmmMarkets []AmmMarket `protobuf:"bytes,1,rep,name=amm_markets,json=ammMarkets,proto3" json:"amm_markets"`
}
func (*QueryMarketsResponse) Descriptor ¶
func (*QueryMarketsResponse) Descriptor() ([]byte, []int)
func (*QueryMarketsResponse) GetAmmMarkets ¶
func (m *QueryMarketsResponse) GetAmmMarkets() []AmmMarket
func (*QueryMarketsResponse) Marshal ¶
func (m *QueryMarketsResponse) Marshal() (dAtA []byte, err error)
func (*QueryMarketsResponse) MarshalTo ¶
func (m *QueryMarketsResponse) MarshalTo(dAtA []byte) (int, error)
func (*QueryMarketsResponse) MarshalToSizedBuffer ¶
func (m *QueryMarketsResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*QueryMarketsResponse) ProtoMessage ¶
func (*QueryMarketsResponse) ProtoMessage()
func (*QueryMarketsResponse) Reset ¶
func (m *QueryMarketsResponse) Reset()
func (*QueryMarketsResponse) Size ¶
func (m *QueryMarketsResponse) Size() (n int)
func (*QueryMarketsResponse) String ¶
func (m *QueryMarketsResponse) String() string
func (*QueryMarketsResponse) Unmarshal ¶
func (m *QueryMarketsResponse) Unmarshal(dAtA []byte) error
func (*QueryMarketsResponse) XXX_DiscardUnknown ¶
func (m *QueryMarketsResponse) XXX_DiscardUnknown()
func (*QueryMarketsResponse) XXX_Marshal ¶
func (m *QueryMarketsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*QueryMarketsResponse) XXX_Merge ¶
func (m *QueryMarketsResponse) XXX_Merge(src proto.Message)
func (*QueryMarketsResponse) XXX_Size ¶
func (m *QueryMarketsResponse) XXX_Size() int
func (*QueryMarketsResponse) XXX_Unmarshal ¶
func (m *QueryMarketsResponse) XXX_Unmarshal(b []byte) error
type QueryModuleAccountsRequest ¶
type QueryModuleAccountsRequest struct { }
func (*QueryModuleAccountsRequest) Descriptor ¶
func (*QueryModuleAccountsRequest) Descriptor() ([]byte, []int)
func (*QueryModuleAccountsRequest) Marshal ¶
func (m *QueryModuleAccountsRequest) Marshal() (dAtA []byte, err error)
func (*QueryModuleAccountsRequest) MarshalTo ¶
func (m *QueryModuleAccountsRequest) MarshalTo(dAtA []byte) (int, error)
func (*QueryModuleAccountsRequest) MarshalToSizedBuffer ¶
func (m *QueryModuleAccountsRequest) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*QueryModuleAccountsRequest) ProtoMessage ¶
func (*QueryModuleAccountsRequest) ProtoMessage()
func (*QueryModuleAccountsRequest) Reset ¶
func (m *QueryModuleAccountsRequest) Reset()
func (*QueryModuleAccountsRequest) Size ¶
func (m *QueryModuleAccountsRequest) Size() (n int)
func (*QueryModuleAccountsRequest) String ¶
func (m *QueryModuleAccountsRequest) String() string
func (*QueryModuleAccountsRequest) Unmarshal ¶
func (m *QueryModuleAccountsRequest) Unmarshal(dAtA []byte) error
func (*QueryModuleAccountsRequest) XXX_DiscardUnknown ¶
func (m *QueryModuleAccountsRequest) XXX_DiscardUnknown()
func (*QueryModuleAccountsRequest) XXX_Marshal ¶
func (m *QueryModuleAccountsRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*QueryModuleAccountsRequest) XXX_Merge ¶
func (m *QueryModuleAccountsRequest) XXX_Merge(src proto.Message)
func (*QueryModuleAccountsRequest) XXX_Size ¶
func (m *QueryModuleAccountsRequest) XXX_Size() int
func (*QueryModuleAccountsRequest) XXX_Unmarshal ¶
func (m *QueryModuleAccountsRequest) XXX_Unmarshal(b []byte) error
type QueryModuleAccountsResponse ¶
type QueryModuleAccountsResponse struct {
Accounts []AccountWithBalance `protobuf:"bytes,1,rep,name=accounts,proto3" json:"accounts"`
}
func (*QueryModuleAccountsResponse) Descriptor ¶
func (*QueryModuleAccountsResponse) Descriptor() ([]byte, []int)
func (*QueryModuleAccountsResponse) GetAccounts ¶
func (m *QueryModuleAccountsResponse) GetAccounts() []AccountWithBalance
func (*QueryModuleAccountsResponse) Marshal ¶
func (m *QueryModuleAccountsResponse) Marshal() (dAtA []byte, err error)
func (*QueryModuleAccountsResponse) MarshalTo ¶
func (m *QueryModuleAccountsResponse) MarshalTo(dAtA []byte) (int, error)
func (*QueryModuleAccountsResponse) MarshalToSizedBuffer ¶
func (m *QueryModuleAccountsResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*QueryModuleAccountsResponse) ProtoMessage ¶
func (*QueryModuleAccountsResponse) ProtoMessage()
func (*QueryModuleAccountsResponse) Reset ¶
func (m *QueryModuleAccountsResponse) Reset()
func (*QueryModuleAccountsResponse) Size ¶
func (m *QueryModuleAccountsResponse) Size() (n int)
func (*QueryModuleAccountsResponse) String ¶
func (m *QueryModuleAccountsResponse) String() string
func (*QueryModuleAccountsResponse) Unmarshal ¶
func (m *QueryModuleAccountsResponse) Unmarshal(dAtA []byte) error
func (*QueryModuleAccountsResponse) XXX_DiscardUnknown ¶
func (m *QueryModuleAccountsResponse) XXX_DiscardUnknown()
func (*QueryModuleAccountsResponse) XXX_Marshal ¶
func (m *QueryModuleAccountsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*QueryModuleAccountsResponse) XXX_Merge ¶
func (m *QueryModuleAccountsResponse) XXX_Merge(src proto.Message)
func (*QueryModuleAccountsResponse) XXX_Size ¶
func (m *QueryModuleAccountsResponse) XXX_Size() int
func (*QueryModuleAccountsResponse) XXX_Unmarshal ¶
func (m *QueryModuleAccountsResponse) XXX_Unmarshal(b []byte) error
type QueryPositionRequest ¶
type QueryPositionRequest struct { Pair github_com_NibiruChain_nibiru_x_common_asset.Pair `protobuf:"bytes,1,opt,name=pair,proto3,customtype=github.com/NibiruChain/nibiru/x/common/asset.Pair" json:"pair"` Trader string `protobuf:"bytes,2,opt,name=trader,proto3" json:"trader,omitempty"` }
QueryPositionRequest is the request type for the position of the x/perp module account.
func (*QueryPositionRequest) Descriptor ¶
func (*QueryPositionRequest) Descriptor() ([]byte, []int)
func (*QueryPositionRequest) GetTrader ¶
func (m *QueryPositionRequest) GetTrader() string
func (*QueryPositionRequest) Marshal ¶
func (m *QueryPositionRequest) Marshal() (dAtA []byte, err error)
func (*QueryPositionRequest) MarshalTo ¶
func (m *QueryPositionRequest) MarshalTo(dAtA []byte) (int, error)
func (*QueryPositionRequest) MarshalToSizedBuffer ¶
func (m *QueryPositionRequest) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*QueryPositionRequest) ProtoMessage ¶
func (*QueryPositionRequest) ProtoMessage()
func (*QueryPositionRequest) Reset ¶
func (m *QueryPositionRequest) Reset()
func (*QueryPositionRequest) Size ¶
func (m *QueryPositionRequest) Size() (n int)
func (*QueryPositionRequest) String ¶
func (m *QueryPositionRequest) String() string
func (*QueryPositionRequest) Unmarshal ¶
func (m *QueryPositionRequest) Unmarshal(dAtA []byte) error
func (*QueryPositionRequest) XXX_DiscardUnknown ¶
func (m *QueryPositionRequest) XXX_DiscardUnknown()
func (*QueryPositionRequest) XXX_Marshal ¶
func (m *QueryPositionRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*QueryPositionRequest) XXX_Merge ¶
func (m *QueryPositionRequest) XXX_Merge(src proto.Message)
func (*QueryPositionRequest) XXX_Size ¶
func (m *QueryPositionRequest) XXX_Size() int
func (*QueryPositionRequest) XXX_Unmarshal ¶
func (m *QueryPositionRequest) XXX_Unmarshal(b []byte) error
type QueryPositionResponse ¶
type QueryPositionResponse struct { // The position as it exists in the blockchain state Position Position `protobuf:"bytes,1,opt,name=position,proto3" json:"position"` // The position's current notional value, if it were to be entirely closed (in // margin units). PositionNotional github_com_cosmos_cosmos_sdk_types.Dec `` /* 149-byte string literal not displayed */ // The position's unrealized PnL. UnrealizedPnl github_com_cosmos_cosmos_sdk_types.Dec `` /* 140-byte string literal not displayed */ // margin ratio of the position based on the spot price MarginRatio github_com_cosmos_cosmos_sdk_types.Dec `` /* 134-byte string literal not displayed */ }
func (*QueryPositionResponse) Descriptor ¶
func (*QueryPositionResponse) Descriptor() ([]byte, []int)
func (*QueryPositionResponse) GetPosition ¶
func (m *QueryPositionResponse) GetPosition() Position
func (*QueryPositionResponse) Marshal ¶
func (m *QueryPositionResponse) Marshal() (dAtA []byte, err error)
func (*QueryPositionResponse) MarshalTo ¶
func (m *QueryPositionResponse) MarshalTo(dAtA []byte) (int, error)
func (*QueryPositionResponse) MarshalToSizedBuffer ¶
func (m *QueryPositionResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*QueryPositionResponse) ProtoMessage ¶
func (*QueryPositionResponse) ProtoMessage()
func (*QueryPositionResponse) Reset ¶
func (m *QueryPositionResponse) Reset()
func (*QueryPositionResponse) Size ¶
func (m *QueryPositionResponse) Size() (n int)
func (*QueryPositionResponse) String ¶
func (m *QueryPositionResponse) String() string
func (*QueryPositionResponse) Unmarshal ¶
func (m *QueryPositionResponse) Unmarshal(dAtA []byte) error
func (*QueryPositionResponse) XXX_DiscardUnknown ¶
func (m *QueryPositionResponse) XXX_DiscardUnknown()
func (*QueryPositionResponse) XXX_Marshal ¶
func (m *QueryPositionResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*QueryPositionResponse) XXX_Merge ¶
func (m *QueryPositionResponse) XXX_Merge(src proto.Message)
func (*QueryPositionResponse) XXX_Size ¶
func (m *QueryPositionResponse) XXX_Size() int
func (*QueryPositionResponse) XXX_Unmarshal ¶
func (m *QueryPositionResponse) XXX_Unmarshal(b []byte) error
type QueryPositionsRequest ¶
type QueryPositionsRequest struct {
Trader string `protobuf:"bytes,1,opt,name=trader,proto3" json:"trader,omitempty"`
}
func (*QueryPositionsRequest) Descriptor ¶
func (*QueryPositionsRequest) Descriptor() ([]byte, []int)
func (*QueryPositionsRequest) GetTrader ¶
func (m *QueryPositionsRequest) GetTrader() string
func (*QueryPositionsRequest) Marshal ¶
func (m *QueryPositionsRequest) Marshal() (dAtA []byte, err error)
func (*QueryPositionsRequest) MarshalTo ¶
func (m *QueryPositionsRequest) MarshalTo(dAtA []byte) (int, error)
func (*QueryPositionsRequest) MarshalToSizedBuffer ¶
func (m *QueryPositionsRequest) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*QueryPositionsRequest) ProtoMessage ¶
func (*QueryPositionsRequest) ProtoMessage()
func (*QueryPositionsRequest) Reset ¶
func (m *QueryPositionsRequest) Reset()
func (*QueryPositionsRequest) Size ¶
func (m *QueryPositionsRequest) Size() (n int)
func (*QueryPositionsRequest) String ¶
func (m *QueryPositionsRequest) String() string
func (*QueryPositionsRequest) Unmarshal ¶
func (m *QueryPositionsRequest) Unmarshal(dAtA []byte) error
func (*QueryPositionsRequest) XXX_DiscardUnknown ¶
func (m *QueryPositionsRequest) XXX_DiscardUnknown()
func (*QueryPositionsRequest) XXX_Marshal ¶
func (m *QueryPositionsRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*QueryPositionsRequest) XXX_Merge ¶
func (m *QueryPositionsRequest) XXX_Merge(src proto.Message)
func (*QueryPositionsRequest) XXX_Size ¶
func (m *QueryPositionsRequest) XXX_Size() int
func (*QueryPositionsRequest) XXX_Unmarshal ¶
func (m *QueryPositionsRequest) XXX_Unmarshal(b []byte) error
type QueryPositionsResponse ¶
type QueryPositionsResponse struct {
Positions []QueryPositionResponse `protobuf:"bytes,1,rep,name=positions,proto3" json:"positions"`
}
func (*QueryPositionsResponse) Descriptor ¶
func (*QueryPositionsResponse) Descriptor() ([]byte, []int)
func (*QueryPositionsResponse) GetPositions ¶
func (m *QueryPositionsResponse) GetPositions() []QueryPositionResponse
func (*QueryPositionsResponse) Marshal ¶
func (m *QueryPositionsResponse) Marshal() (dAtA []byte, err error)
func (*QueryPositionsResponse) MarshalTo ¶
func (m *QueryPositionsResponse) MarshalTo(dAtA []byte) (int, error)
func (*QueryPositionsResponse) MarshalToSizedBuffer ¶
func (m *QueryPositionsResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*QueryPositionsResponse) ProtoMessage ¶
func (*QueryPositionsResponse) ProtoMessage()
func (*QueryPositionsResponse) Reset ¶
func (m *QueryPositionsResponse) Reset()
func (*QueryPositionsResponse) Size ¶
func (m *QueryPositionsResponse) Size() (n int)
func (*QueryPositionsResponse) String ¶
func (m *QueryPositionsResponse) String() string
func (*QueryPositionsResponse) Unmarshal ¶
func (m *QueryPositionsResponse) Unmarshal(dAtA []byte) error
func (*QueryPositionsResponse) XXX_DiscardUnknown ¶
func (m *QueryPositionsResponse) XXX_DiscardUnknown()
func (*QueryPositionsResponse) XXX_Marshal ¶
func (m *QueryPositionsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*QueryPositionsResponse) XXX_Merge ¶
func (m *QueryPositionsResponse) XXX_Merge(src proto.Message)
func (*QueryPositionsResponse) XXX_Size ¶
func (m *QueryPositionsResponse) XXX_Size() int
func (*QueryPositionsResponse) XXX_Unmarshal ¶
func (m *QueryPositionsResponse) XXX_Unmarshal(b []byte) error
type QueryServer ¶
type QueryServer interface { QueryPosition(context.Context, *QueryPositionRequest) (*QueryPositionResponse, error) QueryPositions(context.Context, *QueryPositionsRequest) (*QueryPositionsResponse, error) // Queries the reserve assets in a given pool, identified by a token pair. ModuleAccounts(context.Context, *QueryModuleAccountsRequest) (*QueryModuleAccountsResponse, error) QueryMarkets(context.Context, *QueryMarketsRequest) (*QueryMarketsResponse, error) }
QueryServer is the server API for Query service.
type ReserveSnapshot ¶
type ReserveSnapshot struct { Amm AMM `protobuf:"bytes,1,opt,name=amm,proto3" json:"amm"` // milliseconds since unix epoch TimestampMs int64 `protobuf:"varint,2,opt,name=timestamp_ms,json=timestampMs,proto3" json:"timestamp_ms,omitempty"` }
a snapshot of the perp.amm's reserves at a given point in time
func (*ReserveSnapshot) Descriptor ¶
func (*ReserveSnapshot) Descriptor() ([]byte, []int)
func (*ReserveSnapshot) GetAmm ¶
func (m *ReserveSnapshot) GetAmm() AMM
func (*ReserveSnapshot) GetTimestampMs ¶
func (m *ReserveSnapshot) GetTimestampMs() int64
func (*ReserveSnapshot) Marshal ¶
func (m *ReserveSnapshot) Marshal() (dAtA []byte, err error)
func (*ReserveSnapshot) MarshalToSizedBuffer ¶
func (m *ReserveSnapshot) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*ReserveSnapshot) ProtoMessage ¶
func (*ReserveSnapshot) ProtoMessage()
func (*ReserveSnapshot) Reset ¶
func (m *ReserveSnapshot) Reset()
func (*ReserveSnapshot) Size ¶
func (m *ReserveSnapshot) Size() (n int)
func (*ReserveSnapshot) String ¶
func (m *ReserveSnapshot) String() string
func (*ReserveSnapshot) Unmarshal ¶
func (m *ReserveSnapshot) Unmarshal(dAtA []byte) error
func (ReserveSnapshot) Validate ¶
func (s ReserveSnapshot) Validate() error
func (*ReserveSnapshot) XXX_DiscardUnknown ¶
func (m *ReserveSnapshot) XXX_DiscardUnknown()
func (*ReserveSnapshot) XXX_Marshal ¶
func (m *ReserveSnapshot) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*ReserveSnapshot) XXX_Merge ¶
func (m *ReserveSnapshot) XXX_Merge(src proto.Message)
func (*ReserveSnapshot) XXX_Size ¶
func (m *ReserveSnapshot) XXX_Size() int
func (*ReserveSnapshot) XXX_Unmarshal ¶
func (m *ReserveSnapshot) XXX_Unmarshal(b []byte) error
type TwapCalcOption ¶
type TwapCalcOption int32
Enumerates different options of calculating twap.
const ( TwapCalcOption_TWAP_CALC_OPTION_UNSPECIFIED TwapCalcOption = 0 // Spot price from quote asset reserve / base asset reserve TwapCalcOption_SPOT TwapCalcOption = 1 // Swapping with quote assets, output denominated in base assets TwapCalcOption_QUOTE_ASSET_SWAP TwapCalcOption = 2 // Swapping with base assets, output denominated in quote assets TwapCalcOption_BASE_ASSET_SWAP TwapCalcOption = 3 )
func (TwapCalcOption) EnumDescriptor ¶
func (TwapCalcOption) EnumDescriptor() ([]byte, []int)
func (TwapCalcOption) String ¶
func (x TwapCalcOption) String() string
type UnimplementedMsgServer ¶
type UnimplementedMsgServer struct { }
UnimplementedMsgServer can be embedded to have forward compatible implementations.
func (*UnimplementedMsgServer) AddMargin ¶
func (*UnimplementedMsgServer) AddMargin(ctx context.Context, req *MsgAddMargin) (*MsgAddMarginResponse, error)
func (*UnimplementedMsgServer) ClosePosition ¶
func (*UnimplementedMsgServer) ClosePosition(ctx context.Context, req *MsgClosePosition) (*MsgClosePositionResponse, error)
func (*UnimplementedMsgServer) DonateToEcosystemFund ¶
func (*UnimplementedMsgServer) DonateToEcosystemFund(ctx context.Context, req *MsgDonateToEcosystemFund) (*MsgDonateToEcosystemFundResponse, error)
func (*UnimplementedMsgServer) MultiLiquidate ¶
func (*UnimplementedMsgServer) MultiLiquidate(ctx context.Context, req *MsgMultiLiquidate) (*MsgMultiLiquidateResponse, error)
func (*UnimplementedMsgServer) OpenPosition ¶
func (*UnimplementedMsgServer) OpenPosition(ctx context.Context, req *MsgOpenPosition) (*MsgOpenPositionResponse, error)
func (*UnimplementedMsgServer) RemoveMargin ¶
func (*UnimplementedMsgServer) RemoveMargin(ctx context.Context, req *MsgRemoveMargin) (*MsgRemoveMarginResponse, error)
type UnimplementedQueryServer ¶
type UnimplementedQueryServer struct { }
UnimplementedQueryServer can be embedded to have forward compatible implementations.
func (*UnimplementedQueryServer) ModuleAccounts ¶
func (*UnimplementedQueryServer) ModuleAccounts(ctx context.Context, req *QueryModuleAccountsRequest) (*QueryModuleAccountsResponse, error)
func (*UnimplementedQueryServer) QueryMarkets ¶
func (*UnimplementedQueryServer) QueryMarkets(ctx context.Context, req *QueryMarketsRequest) (*QueryMarketsResponse, error)
func (*UnimplementedQueryServer) QueryPosition ¶
func (*UnimplementedQueryServer) QueryPosition(ctx context.Context, req *QueryPositionRequest) (*QueryPositionResponse, error)
func (*UnimplementedQueryServer) QueryPositions ¶
func (*UnimplementedQueryServer) QueryPositions(ctx context.Context, req *QueryPositionsRequest) (*QueryPositionsResponse, error)