refdata

package
v0.0.0-...-8fb26ab Latest Latest
Warning

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

Go to latest
Published: Oct 15, 2023 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var MaximumSizeError = errors.New("order size is greater than maximum trade size")
View Source
var MinimumSizeError = errors.New("order size is less than minimum trade size")
View Source
var NilRefDataError = errors.New("nil reference data")
View Source
var NoTradeSizeLimitTypeError = errors.New("no trade size limit type")
View Source
var ReferenceDataNotFoundError = errors.New("reference data not found")
View Source
var UnsupportedRefDataError = errors.New("unsupported reference data")

Functions

This section is empty.

Types

type BaseTradeSizeLimit

type BaseTradeSizeLimit struct {
	BaseMinTradeSize float64
	BaseMaxTradeSize float64
}

type Composite

type Composite struct {
	PriceQty          Interface
	TradeSizeLimit    Interface
	MinQuoteTime      time.Duration
	ReplenishmentRate time.Duration
	UsePostOnly       bool
}

type Increment

type Increment struct {
	PriceIncrement float64
	QtyIncrement   float64
}

type Interface

type Interface interface{}

We have to use type assertions or type selecting for mutually exclusive types This is just a marker to help us know we expect one of the Interface types defined below.

type Manager

type Manager[T instr.Instrument] struct {
	// contains filtered or unexported fields
}

func NewManager

func NewManager[T instr.Instrument]() *Manager[T]

func (*Manager[T]) Get

func (r *Manager[T]) Get(exchange exchange.Exchange, instrument T) (*Composite, error)

func (*Manager[T]) Register

func (r *Manager[T]) Register(exchange exchange.Exchange, instrument T, refData *Composite)

type Precision

type Precision struct {
	PricePrecision int
	QtyPrecision   int
}

type TermTradeSizeLimit

type TermTradeSizeLimit struct {
	TermMinTradeSize float64
	TermMaxTradeSize float64
}

Jump to

Keyboard shortcuts

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