tokenrate

package module
v0.0.0-...-20dc6fc Latest Latest
Warning

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

Go to latest
Published: Nov 22, 2019 License: MIT Imports: 1 Imported by: 3

README

tokenrate

tokenrate is a library to query historical rates of token

Documentation

Overview

Package tokenrate supports query historical rates of tokens. There are multiple implementations using different API providers.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ETHUSDRateProvider

type ETHUSDRateProvider interface {
	USDRate(time.Time) (float64, error)
	// Name return name of provider
	Name() string
}

ETHUSDRateProvider is the common interface to query historical rates of ETH to USD.

type Provider

type Provider interface {
	Rate(token, currency string, timestamp time.Time) (float64, error)
	//Name return name of provider
	Name() string
}

Provider is the common interface to query historical rates of any token to real worldp currencies. **Experimental**: the token, each provider intepretered currency, parameters differently.

Directories

Path Synopsis
pkg
app
usdrate

Jump to

Keyboard shortcuts

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