kanaelib

package
v0.0.0-...-4f87207 Latest Latest
Warning

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

Go to latest
Published: Jul 2, 2017 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const (
	PrecisionPoloniex = 8
)

Variables

This section is empty.

Functions

func Check

func Check(e error)

func GetExecutablePath

func GetExecutablePath() string

func ToFixed

func ToFixed(num float64, precision int) float64

func ToFloatStr

func ToFloatStr(num float64) string

Types

type Settings

type Settings struct {
	APIKey    string `yaml:"poloniex_api_key"`
	APISecret string `yaml:"poloniex_api_secret"`

	DatabaseFileName string `yaml:"database_filename"`
}

func LoadSettings

func LoadSettings(filepath string) (Settings, error)

func (*Settings) MakePoloniex

func (s *Settings) MakePoloniex() *poloniex.Poloniex

type TickerCache

type TickerCache struct {
	UpdatedAt time.Time
	// contains filtered or unexported fields
}

func NewTickerCache

func NewTickerCache(api *poloniex.Poloniex) *TickerCache

func (*TickerCache) Get

func (c *TickerCache) Get(asset, currency string) (poloniex.PoloniexTicker, error)

func (*TickerCache) Refresh

func (c *TickerCache) Refresh() error

Jump to

Keyboard shortcuts

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