types

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: 8 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ModuleName = "order"
	RouterKey  = ModuleName
	StoreKey   = ModuleName
)
View Source
const MaxTimeInForce = 600

Variables

View Source
var ModuleCdc = codec.New()

Functions

func RegisterCodec

func RegisterCodec(cdc *codec.Codec)

Types

type ListQueryResult

type ListQueryResult struct {
	Orders []Order `json:"orders"`
}

func (ListQueryResult) String

func (l ListQueryResult) String() string

type MsgCancel

type MsgCancel struct {
	Owner   sdk.AccAddress
	OrderID store.EntityID
}

func NewMsgCancel

func NewMsgCancel(owner sdk.AccAddress, orderID store.EntityID) MsgCancel

func (MsgCancel) GetSignBytes

func (msg MsgCancel) GetSignBytes() []byte

func (MsgCancel) GetSigners

func (msg MsgCancel) GetSigners() []sdk.AccAddress

func (MsgCancel) Route

func (msg MsgCancel) Route() string

func (MsgCancel) Type

func (msg MsgCancel) Type() string

func (MsgCancel) ValidateBasic

func (msg MsgCancel) ValidateBasic() sdk.Error

type MsgPost

type MsgPost struct {
	Owner       sdk.AccAddress
	MarketID    store.EntityID
	Direction   matcheng.Direction
	Price       sdk.Uint
	Quantity    sdk.Uint
	TimeInForce uint16
}

func NewMsgPost

func NewMsgPost(owner sdk.AccAddress, marketID store.EntityID, direction matcheng.Direction, price sdk.Uint, quantity sdk.Uint, tif uint16) MsgPost

func (MsgPost) GetSignBytes

func (msg MsgPost) GetSignBytes() []byte

func (MsgPost) GetSigners

func (msg MsgPost) GetSigners() []sdk.AccAddress

func (MsgPost) Route

func (msg MsgPost) Route() string

func (MsgPost) Type

func (msg MsgPost) Type() string

func (MsgPost) ValidateBasic

func (msg MsgPost) ValidateBasic() sdk.Error

type Order

type Order struct {
	ID                store.EntityID     `json:"id"`
	Owner             sdk.AccAddress     `json:"owner"`
	MarketID          store.EntityID     `json:"market"`
	Direction         matcheng.Direction `json:"direction"`
	Price             sdk.Uint           `json:"price"`
	Quantity          sdk.Uint           `json:"quantity"`
	TimeInForceBlocks uint16             `json:"time_in_force_blocks"`
	CreatedBlock      int64              `json:"created_block"`
}

func New

func New(owner sdk.AccAddress, marketID store.EntityID, direction matcheng.Direction, price sdk.Uint, quantity sdk.Uint, tif uint16, created int64) Order

Jump to

Keyboard shortcuts

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