fill

package
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: Oct 30, 2019 License: Apache-2.0, Apache-2.0 Imports: 18 Imported by: 0

Documentation

Index

Constants

View Source
const (
	QueryGet = "get"
)
View Source
const (
	TableKey = "fill"
)

Variables

This section is empty.

Functions

func NewQuerier

func NewQuerier(keeper Keeper) sdk.Querier

func RegisterRoutes

func RegisterRoutes(ctx context.CLIContext, r *mux.Router, cdc *codec.Codec)

Types

type Fill

type Fill struct {
	OrderID     store.EntityID     `json:"order_id"`
	Owner       sdk.AccAddress     `json:"owner"`
	Pair        string             `json:"pair"`
	Direction   matcheng.Direction `json:"direction"`
	QtyFilled   sdk.Uint           `json:"qty_filled"`
	QtyUnfilled sdk.Uint           `json:"qty_unfilled"`
	BlockNumber int64              `json:"block_number"`
	Price       sdk.Uint           `json:"price"`
}

type IteratorCB

type IteratorCB func(fill Fill) bool

type Keeper

type Keeper struct {
	// contains filtered or unexported fields
}

func NewKeeper

func NewKeeper(db dbm.DB, cdc *codec.Codec) Keeper

func (Keeper) IterOverBlockNumbers

func (k Keeper) IterOverBlockNumbers(start int64, end int64, cb IteratorCB)

func (Keeper) OnEvent

func (k Keeper) OnEvent(event interface{}) error

func (Keeper) OnFillEvent

func (k Keeper) OnFillEvent(event types.Fill)

type QueryRequest

type QueryRequest struct {
	Owner      sdk.AccAddress
	StartBlock int64
	EndBlock   int64
}

type QueryResult

type QueryResult struct {
	Fills []Fill
}

type RESTFill

type RESTFill struct {
	BlockInclusion   embedded.BlockInclusion `json:"block_inclusion"`
	QuantityFilled   sdk.Uint                `json:"quantity_filled"`
	QuantityUnfilled sdk.Uint                `json:"quantity_unfilled"`
	Direction        matcheng.Direction      `json:"direction"`
	OrderID          store.EntityID          `json:"order_id"`
	Pair             string                  `json:"pair"`
	Price            sdk.Uint                `json:"price"`
	Owner            sdk.AccAddress          `json:"owner"`
}

type RESTQueryResult

type RESTQueryResult struct {
	Fills []RESTFill `json:"fills"`
}

Jump to

Keyboard shortcuts

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