engine

package
v0.0.0-...-8768773 Latest Latest
Warning

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

Go to latest
Published: Sep 22, 2018 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type EngineResource

type EngineResource struct {
	// contains filtered or unexported fields
}
var Engine *EngineResource

func InitEngine

func InitEngine(orderDao *daos.OrderDao, redisConn redis.Conn) (engine *EngineResource, err error)

func (*EngineResource) GetOrderBook

func (e *EngineResource) GetOrderBook(pair *types.Pair) (sellBook, buyBook []*map[string]float64)

func (*EngineResource) PublishOrder

func (e *EngineResource) PublishOrder(order *types.Order) error

func (*EngineResource) SubscribeEngineResponse

func (e *EngineResource) SubscribeEngineResponse(fn func(*EngineResponse) error) error

type EngineResponse

type EngineResponse struct {
	Order          *types.Order
	Trades         []*types.Trade
	RemainingOrder *types.Order

	FillStatus     FillStatus
	MatchingOrders []*FillOrder
}

type FillOrder

type FillOrder struct {
	Amount int64
	Order  *types.Order
}

type FillStatus

type FillStatus int
const (
	NO_MATCH FillStatus
	PARTIAL
	FULL
	ERROR
)

type Match

type Match struct {
	Order          *types.Order
	FillStatus     FillStatus
	MatchingOrders []*FillOrder
}

Jump to

Keyboard shortcuts

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