stock

package
v1.3.0 Latest Latest
Warning

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

Go to latest
Published: Apr 8, 2021 License: BSD-3-Clause Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Cache

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

func NewCache

func NewCache() *Cache

func (*Cache) AddCurrency

func (c *Cache) AddCurrency(currency Currency) error

func (*Cache) AddQuote

func (c *Cache) AddQuote(quote Quote) error

func (*Cache) AddSymbol

func (c *Cache) AddSymbol(symbol Symbol) error

func (*Cache) GetCurrency

func (c *Cache) GetCurrency(currency, currencyTo string) (Currency, error)

func (*Cache) GetQuote

func (c *Cache) GetQuote(quote string) (Quote, error)

func (*Cache) GetSymbol

func (c *Cache) GetSymbol(symbol string) (Symbol, error)

type Currency

type Currency struct {
	Currency string
	Name     string
	Rates    map[string]fp.Fixed // map[currencyTo]ExchangeRate
}

type Quote

type Quote struct {
	Prices price
	Symbol string
	Volume string
}

type Symbol

type Symbol struct {
	Currency    string
	Description string
	Id          string
	Symbol      string
	Type        string
}

Directories

Path Synopsis
api

Jump to

Keyboard shortcuts

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