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.
Click to show internal directories.
Click to hide internal directories.