Documentation ¶
Overview ¶
Package cryptoasset contains the calculus for bitcoin variation day by day
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // ErrStartDateAfterEndDate is the error returned when the start date is after the end date ErrStartDateAfterEndDate = errors.New("start date after end date") )
Functions ¶
This section is empty.
Types ¶
type BitcoinPrice ¶
BitcoinPrice represents the price of a bitcoin on a given date.
type BitcoinPriceGetter ¶
type BitcoinPriceGetter interface {
GetBitcoinPrice(date string) (btprice BitcoinPrice, err error)
}
BitcoinPriceGetter is the interface that wraps the GetBitcoinPrice method.
type Variation ¶
Variation represents a single day variation of an asset
func GetBitcoinVariation ¶
GetBitcoinVariation returns the bitcoin variation on a given period. The expected format is YYYY-MM-DD.
Click to show internal directories.
Click to hide internal directories.