Documentation ¶
Index ¶
- func GetPendingPerpetualOrderIDBytes(id uint64) []byte
- func GetPendingPerpetualOrderIDFromBytes(bz []byte) uint64
- func GetPendingSpotOrderIDBytes(id uint64) []byte
- func GetPendingSpotOrderIDFromBytes(bz []byte) uint64
- func NewMsgServerImpl(keeper Keeper) types.MsgServer
- type Keeper
- func (k Keeper) AppendPendingPerpetualOrder(ctx sdk.Context, pendingPerpetualOrder types.PerpetualOrder) uint64
- func (k Keeper) AppendPendingSpotOrder(ctx sdk.Context, pendingSpotOrder types.SpotOrder) uint64
- func (k Keeper) ConstructPerpetualOrderExtraInfo(ctx sdk.Context, order types.PerpetualOrder) (*types.PerpetualOrderExtraInfo, error)
- func (k Keeper) DeleteAllPendingPerpetualOrder(ctx sdk.Context) (list []types.PerpetualOrder)
- func (k Keeper) DeleteAllPendingSpotOrder(ctx sdk.Context) (list []types.SpotOrder)
- func (k Keeper) ExecuteLimitBuyOrder(ctx sdk.Context, order types.SpotOrder) error
- func (k Keeper) ExecuteLimitCloseOrder(ctx sdk.Context, order types.PerpetualOrder) error
- func (k Keeper) ExecuteLimitOpenOrder(ctx sdk.Context, order types.PerpetualOrder) error
- func (k Keeper) ExecuteLimitSellOrder(ctx sdk.Context, order types.SpotOrder) error
- func (k Keeper) ExecuteMarketBuyOrder(ctx sdk.Context, order types.SpotOrder) error
- func (k Keeper) ExecuteMarketCloseOrder(ctx sdk.Context, order types.PerpetualOrder) error
- func (k Keeper) ExecuteMarketOpenOrder(ctx sdk.Context, order types.PerpetualOrder) error
- func (k Keeper) ExecuteStopLossOrder(ctx sdk.Context, order types.SpotOrder) error
- func (k Keeper) GetAllLegacyPendingPerpetualOrder(ctx sdk.Context) (list []types.LegacyPerpetualOrder)
- func (k Keeper) GetAllPendingPerpetualOrder(ctx sdk.Context) (list []types.PerpetualOrder)
- func (k Keeper) GetAllPendingSpotOrder(ctx sdk.Context) (list []types.SpotOrder)
- func (k Keeper) GetAllSortedPerpetualOrder(ctx sdk.Context) (list [][]uint64, err error)
- func (k Keeper) GetAllSortedSpotOrder(ctx sdk.Context) (list [][]uint64, err error)
- func (k Keeper) GetAssetPriceFromDenomInToDenomOut(ctx sdk.Context, denomIn, denomOut string) (sdkmath.LegacyDec, error)
- func (k Keeper) GetParams(ctx sdk.Context) (params types.Params)
- func (k Keeper) GetPendingPerpetualOrder(ctx sdk.Context, id uint64) (val types.PerpetualOrder, found bool)
- func (k Keeper) GetPendingPerpetualOrderCount(ctx sdk.Context) uint64
- func (k Keeper) GetPendingPerpetualOrdersForAddress(ctx sdk.Context, address string, status *types.Status, ...) ([]types.PerpetualOrder, *query.PageResponse, error)
- func (k Keeper) GetPendingSpotOrder(ctx sdk.Context, id uint64) (val types.SpotOrder, found bool)
- func (k Keeper) GetPendingSpotOrderCount(ctx sdk.Context) uint64
- func (k Keeper) GetPendingSpotOrdersForAddress(ctx sdk.Context, address string, status *types.Status, ...) ([]types.SpotOrder, *query.PageResponse, error)
- func (k Keeper) Logger(ctx sdk.Context) log.Logger
- func (k Keeper) Params(goCtx context.Context, req *types.QueryParamsRequest) (*types.QueryParamsResponse, error)
- func (k Keeper) PendingPerpetualOrder(goCtx context.Context, req *types.QueryGetPendingPerpetualOrderRequest) (*types.QueryGetPendingPerpetualOrderResponse, error)
- func (k Keeper) PendingPerpetualOrderAll(goCtx context.Context, req *types.QueryAllPendingPerpetualOrderRequest) (*types.QueryAllPendingPerpetualOrderResponse, error)
- func (k Keeper) PendingPerpetualOrderForAddress(goCtx context.Context, req *types.QueryPendingPerpetualOrderForAddressRequest) (*types.QueryPendingPerpetualOrderForAddressResponse, error)
- func (k Keeper) PendingSpotOrder(goCtx context.Context, req *types.QueryGetPendingSpotOrderRequest) (*types.QueryGetPendingSpotOrderResponse, error)
- func (k Keeper) PendingSpotOrderAll(goCtx context.Context, req *types.QueryAllPendingSpotOrderRequest) (*types.QueryAllPendingSpotOrderResponse, error)
- func (k Keeper) PendingSpotOrderForAddress(goCtx context.Context, req *types.QueryPendingSpotOrderForAddressRequest) (*types.QueryPendingSpotOrderForAddressResponse, error)
- func (k Keeper) RemovePendingPerpetualOrder(ctx sdk.Context, id uint64)
- func (k Keeper) RemovePendingSpotOrder(ctx sdk.Context, id uint64)
- func (k Keeper) SetParams(ctx sdk.Context, params *types.Params) error
- func (k Keeper) SetPendingPerpetualOrder(ctx sdk.Context, pendingPerpetualOrder types.PerpetualOrder)
- func (k Keeper) SetPendingPerpetualOrderCount(ctx sdk.Context, count uint64)
- func (k Keeper) SetPendingSpotOrder(ctx sdk.Context, pendingSpotOrder types.SpotOrder)
- func (k Keeper) SetPendingSpotOrderCount(ctx sdk.Context, count uint64)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetPendingPerpetualOrderIDBytes ¶ added in v0.46.0
GetPendingPerpetualOrderIDBytes returns the byte representation of the ID
func GetPendingPerpetualOrderIDFromBytes ¶ added in v0.46.0
GetPendingPerpetualOrderIDFromBytes returns ID in uint64 format from a byte array
func GetPendingSpotOrderIDBytes ¶ added in v0.46.0
GetPendingSpotOrderIDBytes returns the byte representation of the ID
func GetPendingSpotOrderIDFromBytes ¶ added in v0.46.0
GetPendingSpotOrderIDFromBytes returns ID in uint64 format from a byte array
func NewMsgServerImpl ¶
NewMsgServerImpl returns an implementation of the MsgServer interface for the provided Keeper.
Types ¶
type Keeper ¶
type Keeper struct {
// contains filtered or unexported fields
}
func NewKeeper ¶
func NewKeeper( cdc codec.BinaryCodec, storeService store.KVStoreService, authority string, amm types.AmmKeeper, tier types.TierKeeper, perpetual types.PerpetualKeeper, ) *Keeper
func (Keeper) AppendPendingPerpetualOrder ¶ added in v0.46.0
func (k Keeper) AppendPendingPerpetualOrder( ctx sdk.Context, pendingPerpetualOrder types.PerpetualOrder, ) uint64
AppendPendingPerpetualOrder appends a pendingPerpetualOrder in the store with a new id and update the count
func (Keeper) AppendPendingSpotOrder ¶ added in v0.46.0
AppendPendingSpotOrder appends a pendingSpotOrder in the store with a new id and update the count
func (Keeper) ConstructPerpetualOrderExtraInfo ¶ added in v0.49.3
func (k Keeper) ConstructPerpetualOrderExtraInfo(ctx sdk.Context, order types.PerpetualOrder) (*types.PerpetualOrderExtraInfo, error)
ConstructPerpetualOrderExtraInfo fills up the extra information of the perpetual order and returns it
func (Keeper) DeleteAllPendingPerpetualOrder ¶ added in v0.49.3
func (k Keeper) DeleteAllPendingPerpetualOrder(ctx sdk.Context) (list []types.PerpetualOrder)
DeleteAllPendingPerpetualOrder returns all pendingPerpetualOrder
func (Keeper) DeleteAllPendingSpotOrder ¶ added in v0.49.3
DeleteAllPendingSpotOrder deleted all pendingSpotOrder
func (Keeper) ExecuteLimitBuyOrder ¶ added in v0.46.0
ExecuteLimitBuyOrder executes a limit buy order
func (Keeper) ExecuteLimitCloseOrder ¶ added in v0.46.0
ExecuteLimitCloseOrder executes a limit close order
func (Keeper) ExecuteLimitOpenOrder ¶ added in v0.46.0
ExecuteLimitOpenOrder executes a limit open order
func (Keeper) ExecuteLimitSellOrder ¶ added in v0.46.0
ExecuteLimitSellOrder executes a limit sell order
func (Keeper) ExecuteMarketBuyOrder ¶ added in v0.46.0
ExecuteMarketBuyOrder executes a market buy order
func (Keeper) ExecuteMarketCloseOrder ¶ added in v0.46.0
ExecuteMarketCloseOrder executes a market close order
func (Keeper) ExecuteMarketOpenOrder ¶ added in v0.46.0
ExecuteMarketOpenOrder executes a market open order
func (Keeper) ExecuteStopLossOrder ¶ added in v0.46.0
ExecuteStopLossSpotOrder executes a stop loss order
func (Keeper) GetAllLegacyPendingPerpetualOrder ¶ added in v0.48.0
func (k Keeper) GetAllLegacyPendingPerpetualOrder(ctx sdk.Context) (list []types.LegacyPerpetualOrder)
func (Keeper) GetAllPendingPerpetualOrder ¶ added in v0.46.0
func (k Keeper) GetAllPendingPerpetualOrder(ctx sdk.Context) (list []types.PerpetualOrder)
GetAllPendingPerpetualOrder returns all pendingPerpetualOrder
func (Keeper) GetAllPendingSpotOrder ¶ added in v0.46.0
GetAllPendingSpotOrder returns all pendingSpotOrder
func (Keeper) GetAllSortedPerpetualOrder ¶ added in v0.46.0
func (Keeper) GetAllSortedSpotOrder ¶ added in v0.46.0
GetAllPendingSpotOrder returns all pendingSpotOrder
func (Keeper) GetAssetPriceFromDenomInToDenomOut ¶ added in v0.46.0
func (k Keeper) GetAssetPriceFromDenomInToDenomOut(ctx sdk.Context, denomIn, denomOut string) (sdkmath.LegacyDec, error)
GetAssetPriceFromDenomInToDenomOut returns the price of an asset from a denom to another denom
func (Keeper) GetPendingPerpetualOrder ¶ added in v0.46.0
func (k Keeper) GetPendingPerpetualOrder(ctx sdk.Context, id uint64) (val types.PerpetualOrder, found bool)
GetPendingPerpetualOrder returns a pendingPerpetualOrder from its id
func (Keeper) GetPendingPerpetualOrderCount ¶ added in v0.46.0
GetPendingPerpetualOrderCount get the total number of pendingPerpetualOrder
func (Keeper) GetPendingPerpetualOrdersForAddress ¶ added in v0.48.0
func (k Keeper) GetPendingPerpetualOrdersForAddress(ctx sdk.Context, address string, status *types.Status, pagination *query.PageRequest) ([]types.PerpetualOrder, *query.PageResponse, error)
func (Keeper) GetPendingSpotOrder ¶ added in v0.46.0
GetPendingSpotOrder returns a pendingSpotOrder from its id
func (Keeper) GetPendingSpotOrderCount ¶ added in v0.46.0
GetPendingSpotOrderCount get the total number of pendingSpotOrder
func (Keeper) GetPendingSpotOrdersForAddress ¶ added in v0.48.0
func (Keeper) Params ¶
func (k Keeper) Params(goCtx context.Context, req *types.QueryParamsRequest) (*types.QueryParamsResponse, error)
func (Keeper) PendingPerpetualOrder ¶ added in v0.46.0
func (k Keeper) PendingPerpetualOrder(goCtx context.Context, req *types.QueryGetPendingPerpetualOrderRequest) (*types.QueryGetPendingPerpetualOrderResponse, error)
func (Keeper) PendingPerpetualOrderAll ¶ added in v0.46.0
func (k Keeper) PendingPerpetualOrderAll(goCtx context.Context, req *types.QueryAllPendingPerpetualOrderRequest) (*types.QueryAllPendingPerpetualOrderResponse, error)
func (Keeper) PendingPerpetualOrderForAddress ¶ added in v0.48.0
func (k Keeper) PendingPerpetualOrderForAddress(goCtx context.Context, req *types.QueryPendingPerpetualOrderForAddressRequest) (*types.QueryPendingPerpetualOrderForAddressResponse, error)
func (Keeper) PendingSpotOrder ¶ added in v0.46.0
func (k Keeper) PendingSpotOrder(goCtx context.Context, req *types.QueryGetPendingSpotOrderRequest) (*types.QueryGetPendingSpotOrderResponse, error)
func (Keeper) PendingSpotOrderAll ¶ added in v0.46.0
func (k Keeper) PendingSpotOrderAll(goCtx context.Context, req *types.QueryAllPendingSpotOrderRequest) (*types.QueryAllPendingSpotOrderResponse, error)
func (Keeper) PendingSpotOrderForAddress ¶ added in v0.48.0
func (k Keeper) PendingSpotOrderForAddress(goCtx context.Context, req *types.QueryPendingSpotOrderForAddressRequest) (*types.QueryPendingSpotOrderForAddressResponse, error)
func (Keeper) RemovePendingPerpetualOrder ¶ added in v0.46.0
RemovePendingPerpetualOrder removes a pendingPerpetualOrder from the store
func (Keeper) RemovePendingSpotOrder ¶ added in v0.46.0
RemovePendingSpotOrder removes a pendingSpotOrder from the store
func (Keeper) SetPendingPerpetualOrder ¶ added in v0.46.0
func (k Keeper) SetPendingPerpetualOrder(ctx sdk.Context, pendingPerpetualOrder types.PerpetualOrder)
SetPendingPerpetualOrder set a specific pendingPerpetualOrder in the store
func (Keeper) SetPendingPerpetualOrderCount ¶ added in v0.46.0
SetPendingPerpetualOrderCount set the total number of pendingPerpetualOrder
func (Keeper) SetPendingSpotOrder ¶ added in v0.46.0
SetPendingSpotOrder set a specific pendingSpotOrder in the store
Source Files ¶
- keeper.go
- msg_server.go
- msg_server_execute_orders.go
- msg_server_perpetual_order.go
- msg_server_spot_order.go
- msg_server_update_params.go
- params.go
- pending_perpetual_order.go
- pending_spot_order.go
- query.go
- query_params.go
- query_pending_perpetual_order.go
- query_pending_perpetual_order_for_address.go
- query_pending_spot_order.go
- query_pending_spot_order_for_address.go