Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var AllRateType = []RateType{ RateTypeMid, RateTypeBuy, RateTypeSell, }
Functions ¶
func MarshalTime ¶
Types ¶
type ExchangeRate ¶
type ExchangeRate struct {
// Effective date/time for which this rate applies.
AsOf Time `json:"as_of"`
// Time when this record was fetched/observed by the system.
FetchedAt Time `json:"fetched_at"`
// Base currency (ISO 4217 or 4-letter crypto/stablecoin), e.g. "USD".
Base string `json:"base"`
// Target currency (ISO 4217 or 4-letter crypto/stablecoin), e.g. "VES".
Target string `json:"target"`
// Rate classification (MID/BUY/SELL).
RateType RateType `json:"rate_type"`
// Provider/source identifier, e.g. "BCV".
Source string `json:"source"`
// Quoted rate from base -> target.
Rate float64 `json:"rate"`
}
A single observed exchange rate data point.
type ExchangeRatePage ¶
type ExchangeRatePage struct {
// Current page of results.
Results []*ExchangeRate `json:"results"`
// Total number of matching results before pagination.
Total int32 `json:"total"`
}
A paginated collection of exchange rates.
type RateType ¶
type RateType string
Classifies the kind of rate being reported.
func (RateType) MarshalGQL ¶
func (RateType) MarshalJSON ¶
func (*RateType) UnmarshalGQL ¶
func (*RateType) UnmarshalJSON ¶
Click to show internal directories.
Click to hide internal directories.