Documentation ¶
Index ¶
- Constants
- type Currency
- func (m *Currency) ConvertHistoryPeriod(period string) int
- func (m *Currency) HistoryIndex(key string) float64
- func (m *Currency) HistoryKey(otherCoinSymbol string, period int) string
- func (m *Currency) HistoryMilestones(pair string, period int, start int64, end int64) []*CurrencyMilestone
- func (m *Currency) HistoryPeriods() []int
- func (m *Currency) LoadPrice(otherCoinSymbol *string) float32
- func (m *Currency) MarshalBinary() ([]byte, error)
- func (m *Currency) Price(convert *string) float32
- func (m *Currency) PriceKey(otherCoinSymbol string) string
- func (m *Currency) UnmarshalBinary(b []byte) error
- func (m *Currency) UpdateHistory(otherCoinSymbol string, score float64, period int, milestone CurrencyMilestone)
- func (m *Currency) UpdatePrice(convert string, price float64)
- type CurrencyMilestone
- type Price
Constants ¶
View Source
const ( // CurrencySymbolUSD captures enum value "USD" CurrencySymbolUSD string = "USD" // CurrencySymbolBTC captures enum value "BTC" CurrencySymbolBTC string = "BTC" // CurrencySymbolNZD captures enum value "NZD" CurrencySymbolNZD string = "NZD" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Currency ¶
type Currency struct { // name Name string `json:"name,omitempty"` // pair Pair string `json:"pair,omitempty"` // symbol Symbol string `json:"symbol,omitempty"` // value Value *float32 `json:"value,omitempty"` }
Currency currency
func (*Currency) ConvertHistoryPeriod ¶
func (*Currency) HistoryIndex ¶
Returns the last index value of sorted list
func (*Currency) HistoryKey ¶
func (*Currency) HistoryMilestones ¶
func (*Currency) HistoryPeriods ¶
func (*Currency) MarshalBinary ¶
MarshalBinary interface implementation
func (*Currency) UnmarshalBinary ¶
UnmarshalBinary interface implementation
func (*Currency) UpdateHistory ¶
func (m *Currency) UpdateHistory(otherCoinSymbol string, score float64, period int, milestone CurrencyMilestone)
func (*Currency) UpdatePrice ¶
type CurrencyMilestone ¶
type CurrencyMilestone struct { // at // Format: datetime At strfmt.DateTime `json:"at,omitempty"` // close Close float64 `json:"close,omitempty"` // max Max float64 `json:"max,omitempty"` // min Min float64 `json:"min,omitempty"` // open Open float64 `json:"open,omitempty"` }
CurrencyMilestone currency milestone swagger:model CurrencyMilestone
func (*CurrencyMilestone) MarshalBinary ¶
func (m *CurrencyMilestone) MarshalBinary() ([]byte, error)
MarshalBinary interface implementation
func (*CurrencyMilestone) UnmarshalBinary ¶
func (m *CurrencyMilestone) UnmarshalBinary(b []byte) error
UnmarshalBinary interface implementation
Click to show internal directories.
Click to hide internal directories.