orderbook

package
v0.0.0-...-b6067e1 Latest Latest
Warning

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

Go to latest
Published: Aug 15, 2023 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Correlation

func Correlation(a *Orderbook, b *Orderbook) float64

Types

type Levels

type Levels struct {
	Price json.Number
	Size  json.Number
}

type Orderbook

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

https://docs.deribit.com/#book-instrument_name-group-depth-interval

func New

func New() *Orderbook

func (*Orderbook) AskLevel

func (o *Orderbook) AskLevel(ind int) Levels

func (*Orderbook) BidLevel

func (o *Orderbook) BidLevel(ind int) Levels

func (*Orderbook) Empty

func (o *Orderbook) Empty() bool

func (*Orderbook) MarshalJSON

func (o *Orderbook) MarshalJSON() ([]byte, error)

func (*Orderbook) MidPri

func (o *Orderbook) MidPri() float64

func (*Orderbook) Middleware

func (o *Orderbook) Middleware(upd Response) error

func (*Orderbook) Prices

func (o *Orderbook) Prices() []float64

type Response

type Response *models.BookNotification

Jump to

Keyboard shortcuts

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