orderbook

package
v0.0.0-...-7640ebf Latest Latest
Warning

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

Go to latest
Published: Sep 30, 2024 License: BSD-3-Clause Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Controller

type Controller interface {
	Logger() logging.Logger
}

type Order

type Order struct {
	ID        ids.ID `json:"id"`
	Owner     string `json:"owner"` // we always send address over RPC
	InTick    uint64 `json:"inTick"`
	OutTick   uint64 `json:"outTick"`
	Remaining uint64 `json:"remaining"`
	// contains filtered or unexported fields
}

type OrderBook

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

func New

func New(c Controller, trackedPairs []string) *OrderBook

func (*OrderBook) Add

func (o *OrderBook) Add(txID ids.ID, actor crypto.PublicKey, action *actions.CreateOrder)

func (*OrderBook) Orders

func (o *OrderBook) Orders(pair string, limit int) []*Order

func (*OrderBook) Remove

func (o *OrderBook) Remove(id ids.ID)

func (*OrderBook) UpdateRemaining

func (o *OrderBook) UpdateRemaining(id ids.ID, remaining uint64)

Jump to

Keyboard shortcuts

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