price

package
v0.5.1 Latest Latest
Warning

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

Go to latest
Published: Nov 28, 2022 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type PriceWatcher

type PriceWatcher struct {
	UpdateInterval time.Duration
	Currencies     map[string]string
	Exchanges      map[string]func(string) (float64, error)
	// contains filtered or unexported fields
}
var (
	Price map[string]float64
	P     *PriceWatcher
)

func NewPriceWatcher

func NewPriceWatcher() *PriceWatcher

func (*PriceWatcher) GetBitfinexPrice

func (p *PriceWatcher) GetBitfinexPrice(currency string) (float64, error)

func (*PriceWatcher) GetCoinbasePrice

func (p *PriceWatcher) GetCoinbasePrice(currency string) (float64, error)

func (*PriceWatcher) Start

func (p *PriceWatcher) Start()

func (*PriceWatcher) Watch

func (p *PriceWatcher) Watch() error

Jump to

Keyboard shortcuts

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