pricesolver

package
v1.61.0 Latest Latest
Warning

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

Go to latest
Published: Dec 23, 2024 License: AGPL-3.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type SimplePriceSolver

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

SimplePriceSolver implements a map-structure-based price index

func NewSimplePriceResolver

func NewSimplePriceResolver(markets types.MarketMap) *SimplePriceSolver

func (*SimplePriceSolver) BindStream added in v1.61.0

func (m *SimplePriceSolver) BindStream(stream types.Stream)

func (*SimplePriceSolver) ResolvePrice

func (m *SimplePriceSolver) ResolvePrice(asset string, preferredFiats ...string) (fixedpoint.Value, bool)

func (*SimplePriceSolver) Update

func (m *SimplePriceSolver) Update(symbol string, price fixedpoint.Value)

func (*SimplePriceSolver) UpdateFromTickers added in v1.61.0

func (m *SimplePriceSolver) UpdateFromTickers(ctx context.Context, ex types.Exchange, symbols ...string) error

func (*SimplePriceSolver) UpdateFromTrade

func (m *SimplePriceSolver) UpdateFromTrade(trade types.Trade)

Jump to

Keyboard shortcuts

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