Modules§
- genesis_
state - Nested message and enum types in
GenesisState
. - liquidation_
failed_ event - Nested message and enum types in
LiquidationFailedEvent
. - msg_
multi_ liquidate - Nested message and enum types in
MsgMultiLiquidate
. - msg_
multi_ liquidate_ response - Nested message and enum types in
MsgMultiLiquidateResponse
.
Structs§
- Account
With Balance - Amm
- AmmMarket
- AmmUpdated
Event - This event is emitted when the amm is updated, which can be triggered by the following events:
- DnrAllocation
- DNRAllocation represents a rebates allocation for a given epoch.
- Event
Shift PegMultiplier - EventShiftPegMultiplier: ABCI event emitted from MsgShiftPegMultiplier
- Event
Shift Swap Invariant - EventShiftSwapInvariant: ABCI event emitted from MsgShiftSwapInvariant
- Funding
Rate Changed Event - Emitted when the funding rate changes for a market.
- Genesis
Market Last Version - GenesisMarketLastVersion is the last version including pair only used for genesis
- Genesis
Position - Genesis
State - GenesisState defines the perp module’s genesis state. Thge genesis state is used not only to start the network but also useful for exporting and importing state during network upgrades.
- Liquidation
Failed Event - Emitted when liquidation fails.
- Market
- Market
Last Version - MarketLastVersion is used to store the last version of the market
- Market
Updated Event - This event is emitted at the end of every block for persisting market changes off-chain
- MsgAdd
Margin - MsgAddMargin: Msg to remove margin.
- MsgAdd
Margin Response - MsgAllocate
Epoch Rebates - ––––––––––––– AllocateEpochRebates –––––––––––––
- MsgAllocate
Epoch Rebates Response - MsgChange
Collateral Denom - MsgChangeCollateralDenom: Changes the collateral denom for the module. [SUDO] Only callable by sudoers.
- MsgChange
Collateral Denom Response - MsgClose
Market - CloseMarket: gRPC tx msg for closing a market. Admin-only.
- MsgClose
Market Response - MsgClose
Position - MsgClose
Position Response - MsgDonate
ToEcosystem Fund - MsgDonate
ToEcosystem Fund Response - MsgMarket
Order - MsgMarket
Order Response - MsgMulti
Liquidate - MsgMulti
Liquidate Response - MsgPartial
Close - MsgPartial
Close Response - MsgRemove
Margin - MsgRemoveMargin: Msg to remove margin.
- MsgRemove
Margin Response - MsgSettle
Position - MsgSettlePosition: Msg to remove margin.
- MsgShift
PegMultiplier - MsgShiftPegMultiplier: gRPC tx msg for changing the peg multiplier. [SUDO] Only callable sudoers.
- MsgShift
PegMultiplier Response - MsgShift
Swap Invariant - MsgShiftSwapInvariant: gRPC tx msg for changing the swap invariant. [SUDO] Only callable sudoers.
- MsgShift
Swap Invariant Response - MsgWithdraw
Epoch Rebates - ––––––––––––– WithdrawEpochRebates –––––––––––––
- MsgWithdraw
Epoch Rebates Response - MsgWithdraw
From Perp Fund - MsgWithdrawFromPerpFund: gRPC tx msg for changing the swap invariant. [SUDO] Only callable sudoers.
- MsgWithdraw
From Perp Fund Response - Position
- Position
Changed Event - Emitted when a position changes.
- Position
Liquidated Event - Emitted when a position is liquidated. Wraps a PositionChanged event since a liquidation causes position changes.
- Position
Settled Event - Emitted when a position is settled.
- Query
Collateral Request - QueryCollateralRequest: Request type for the “nibiru.perp.v2.Query/Collateral” gRPC service method
- Query
Collateral Response - QueryCollateralRequest: Response type for the “nibiru.perp.v2.Query/Collateral” gRPC service method
- Query
Markets Request - Query
Markets Response - Query
Module Accounts Request - QueryModuleAccountsRequest: Request type for the “nibiru.perp.v2.Query/ModuleAccounts” gRPC service method
- Query
Module Accounts Response - QueryModuleAccountsResponse: Response type for the “nibiru.perp.v2.Query/ModuleAccounts” gRPC service method
- Query
Position Request - QueryPositionRequest: Request type for the “nibiru.perp.v2.Query/Position” gRPC service method
- Query
Position Response - QueryPositionResponse: Response type for the “nibiru.perp.v2.Query/Position” gRPC service method
- Query
Position Store Request - QueryPositionStoreRequest: Request type for the “nibiru.perp.v2.Query/PositionStore” gRPC service method
- Query
Position Store Response - QueryPositionStoreResponse: Response type for the “nibiru.perp.v2.Query/PositionStore” gRPC service method
- Query
Positions Request - QueryPositionsRequest: Request type for the “nibiru.perp.v2.Query/Positions” gRPC service method
- Query
Positions Response - QueryPositionsResponse: Response type for the “nibiru.perp.v2.Query/Positions” gRPC service method
- Reserve
Snapshot - a snapshot of the perp.amm’s reserves at a given point in time
Enums§
- Direction
- 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)
- Twap
Calc Option - Enumerates different options of calculating twap.