v0_10

package
v0.19.9 Latest Latest
Warning

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

Go to latest
Published: Oct 25, 2021 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

View Source
const ModuleName = "order"

Variables

This section is empty.

Functions

This section is empty.

Types

type GenesisState

type GenesisState struct {
	Params     Params   `json:"params"`
	OpenOrders []*Order `json:"open_orders"`
}

GenesisState - all order state that must be provided at genesis

type Order

type Order struct {
	TxHash            string         `json:"txhash"`           // txHash of the place order tx
	OrderID           string         `json:"order_id"`         // order id
	Sender            sdk.AccAddress `json:"sender"`           // order maker address
	Product           string         `json:"product"`          // product for trading pair
	Side              string         `json:"side"`             // BUY/SELL
	Price             sdk.Dec        `json:"price"`            // price of the order
	Quantity          sdk.Dec        `json:"quantity"`         // quantity of the order
	Status            int64          `json:"status"`           // order status, see OrderStatusXXX
	FilledAvgPrice    sdk.Dec        `json:"filled_avg_price"` // filled average price
	RemainQuantity    sdk.Dec        `json:"remain_quantity"`  // Remaining quantity of the order
	RemainLocked      sdk.Dec        `json:"remain_locked"`    // Remaining locked quantity of token
	Timestamp         int64          `json:"timestamp"`        // created timestamp
	OrderExpireBlocks int64          `json:"order_expire_blocks"`
	FeePerBlock       sdk.SysCoin    `json:"fee_per_block"`
	ExtraInfo         string         `json:"extra_info"` // extra info of order in json format
}

nolint

type Params

type Params struct {
	OrderExpireBlocks int64       `json:"order_expire_blocks"`
	MaxDealsPerBlock  int64       `json:"max_deals_per_block"`
	FeePerBlock       sdk.SysCoin `json:"fee_per_block"`
	TradeFeeRate      sdk.Dec     `json:"trade_fee_rate"`
}

nolint : order parameters

Jump to

Keyboard shortcuts

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