rest

package
v1.4.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 21, 2024 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RegisterRESTRoutes

func RegisterRESTRoutes(cliCtx client.Context, r *mux.Router)

Types

type CloseReq

type CloseReq struct {
	BaseReq rest.BaseReq `json:"base_req"`
	Signer  string       `json:"signer"` // User who is trying to close margin position
	// nolint:revive
	Id uint64 `json:"id"` // Id of the mtp

}

type ForceCloseReq

type ForceCloseReq struct {
	BaseReq    rest.BaseReq `json:"base_req"`
	Signer     string       `json:"signer"`      // User who is trying to close margin position
	MtpAddress string       `json:"mtp_address"` // MtpAddress for position to force close
	// nolint:revive
	Id uint64 `json:"id"` // Id of the mtp

}

type OpenReq

type OpenReq struct {
	BaseReq          rest.BaseReq   `json:"base_req"`
	Signer           string         `json:"signer"`            // User who is trying to open margin position
	CollateralAsset  clptypes.Asset `json:"collateral_asset"`  // CollateralAsset for margin position
	CollateralAmount sdk.Uint       `json:"collateral_amount"` // CollateralAmount is the amount of collateral being added
	BorrowAsset      clptypes.Asset `json:"borrow_asset"`      // BorrowAsset is asset being borrowed in margin position
	Position         types.Position `json:"position"`          // Position type for margin position
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL