types

package
v0.2.8 Latest Latest
Warning

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

Go to latest
Published: Sep 9, 2024 License: GPL-3.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Ask

type Ask DepthItem

func NewAsk

func NewAsk(price PriceType, quantity ...QuantityType) *Ask

func (*Ask) Equal

func (i *Ask) Equal(than btree.Item) bool

func (*Ask) GetDepthItem

func (i *Ask) GetDepthItem() *DepthItem

func (*Ask) Less

func (i *Ask) Less(than btree.Item) bool

type Bid

type Bid DepthItem

func NewBid

func NewBid(price PriceType, quantity ...QuantityType) *Bid

func (*Bid) Equal

func (i *Bid) Equal(than btree.Item) bool

func (*Bid) GetDepthItem

func (i *Bid) GetDepthItem() *DepthItem

func (*Bid) Less

func (i *Bid) Less(than btree.Item) bool

type DeltaPriceType

type DeltaPriceType float64

type DeltaQuantityType

type DeltaQuantityType float64

type DeltaValueType

type DeltaValueType float64

type DepthFilter

type DepthFilter func(*DepthItem) bool

type DepthItem

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

func New

func New(price PriceType, quantity ...QuantityType) *DepthItem

Конструктори

func (*DepthItem) Equal

func (i *DepthItem) Equal(than btree.Item) bool

func (*DepthItem) GetPrice

func (i *DepthItem) GetPrice() PriceType

CRUD

func (*DepthItem) GetQuantity

func (i *DepthItem) GetQuantity() QuantityType

func (*DepthItem) GetQuantityDeviation

func (d *DepthItem) GetQuantityDeviation(middle QuantityType) float64

Статистичні функції

func (*DepthItem) GetValue

func (i *DepthItem) GetValue() ValueType

func (*DepthItem) Less

func (i *DepthItem) Less(than btree.Item) bool

Функції для btree.Btree

func (*DepthItem) SetPrice

func (i *DepthItem) SetPrice(price PriceType)

func (*DepthItem) SetQuantity

func (i *DepthItem) SetQuantity(quantity QuantityType)

type DepthIterator

type DepthIterator func(iterator btree.ItemIterator)

type DepthTester

type DepthTester func(result *DepthItem, target *DepthItem) bool

type NormalizedItem

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

func NewNormalizedItem

func NewNormalizedItem(price PriceType, degree int, exp int, roundUp bool, quantityIn ...QuantityType) *NormalizedItem

func (*NormalizedItem) Add

func (i *NormalizedItem) Add(price PriceType, quantity QuantityType)

func (*NormalizedItem) Delete

func (i *NormalizedItem) Delete(price PriceType, quantity QuantityType)

func (*NormalizedItem) Equal

func (i *NormalizedItem) Equal(than btree.Item) bool

func (*NormalizedItem) GetDepth

func (i *NormalizedItem) GetDepth(price PriceType) (depthItem *DepthItem)

Робота зі стаканом

func (*NormalizedItem) GetDepths

func (i *NormalizedItem) GetDepths() *btree.BTree

func (*NormalizedItem) GetMinMax

func (i *NormalizedItem) GetMinMax(quantity QuantityType) (minMax *QuantityItem)

Робота з Мінімальними та Максимальними значеннями

func (*NormalizedItem) GetMinMaxes

func (i *NormalizedItem) GetMinMaxes() *btree.BTree

func (*NormalizedItem) GetNormalizedPrice

func (i *NormalizedItem) GetNormalizedPrice() PriceType

CRUD

func (*NormalizedItem) GetQuantity

func (i *NormalizedItem) GetQuantity() QuantityType

Робота з кількістю по нормалізованим ордерам, повинно дорівнувати суммі кількостей по всіх ордерах в стакані

func (*NormalizedItem) IsShouldDelete

func (i *NormalizedItem) IsShouldDelete() bool

func (*NormalizedItem) Less

func (i *NormalizedItem) Less(than btree.Item) bool

Функції для btree.Btree

func (*NormalizedItem) SetQuantity

func (i *NormalizedItem) SetQuantity(quantity QuantityType)

type PriceOnQuantityType

type PriceOnQuantityType float64

type PricePercentOnQuantityType

type PricePercentOnQuantityType float64

type PricePercentType

type PricePercentType float64

type PriceType

type PriceType float64

type QuantityItem

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

func NewQuantityItem

func NewQuantityItem(price PriceType, quantity QuantityType, degree int) *QuantityItem

Конструктори

func (*QuantityItem) Add

func (i *QuantityItem) Add(price PriceType, quantity QuantityType)

func (*QuantityItem) Delete

func (i *QuantityItem) Delete(price PriceType, quantity QuantityType)

func (*QuantityItem) Equal

func (i *QuantityItem) Equal(than btree.Item) bool

func (*QuantityItem) GetDepth

func (i *QuantityItem) GetDepth(price PriceType) *DepthItem

CRUD

func (*QuantityItem) GetDepthMax

func (i *QuantityItem) GetDepthMax() *DepthItem

func (*QuantityItem) GetDepthMin

func (i *QuantityItem) GetDepthMin() *DepthItem

Робота з Мінімальними та Максимальними значеннями

func (*QuantityItem) GetDepths

func (i *QuantityItem) GetDepths() *btree.BTree

func (*QuantityItem) IsShouldDelete

func (i *QuantityItem) IsShouldDelete() bool

func (*QuantityItem) Less

func (i *QuantityItem) Less(than btree.Item) bool

Функції для btree.Btree

type QuantityPercentType

type QuantityPercentType float64

type QuantityType

type QuantityType float64

type ValuePercentType

type ValuePercentType float64

type ValueType

type ValueType float64

Jump to

Keyboard shortcuts

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