Add coin struct JSON tags

pull/80/head
Miguel Mota 4 years ago
parent 415b4c1d94
commit 8ea39c07d6

@ -2,52 +2,52 @@ package types
// Coin struct // Coin struct
type Coin struct { type Coin struct {
ID string ID string `json:"id"`
Name string Name string `json:"name"`
Symbol string Symbol string `json:"symbol"`
Rank int Rank int `json:"rank"`
Price float64 Price float64 `json:"price"`
Volume24H float64 Volume24H float64 `json:"volume24H"`
MarketCap float64 MarketCap float64 `json:"marketCap"`
AvailableSupply float64 AvailableSupply float64 `json:"availableSupply"`
TotalSupply float64 TotalSupply float64 `json:"totalSupply"`
PercentChange1H float64 PercentChange1H float64 `json:"percentChange1H"`
PercentChange24H float64 PercentChange24H float64 `json:"percentChange24H"`
PercentChange7D float64 PercentChange7D float64 `json:"percentChange7D"`
LastUpdated string LastUpdated string `json:"lastUpdated"`
} }
// GlobalMarketData struct // GlobalMarketData struct
type GlobalMarketData struct { type GlobalMarketData struct {
TotalMarketCapUSD float64 TotalMarketCapUSD float64 `json:"totalMarketCapUSD"`
Total24HVolumeUSD float64 Total24HVolumeUSD float64 `json:"total24HVolumeUSD"`
BitcoinPercentageOfMarketCap float64 BitcoinPercentageOfMarketCap float64 `json:"bitcoinPercentageOfMarketCap"`
ActiveCurrencies int ActiveCurrencies int `json:"activeCurrencies"`
ActiveAssets int ActiveAssets int `json:"activeAssets"`
ActiveMarkets int ActiveMarkets int `json:"activeMarkets"`
} }
// CoinGraph struct // CoinGraph struct
type CoinGraph struct { type CoinGraph struct {
MarketCapByAvailableSupply [][]float64 MarketCapByAvailableSupply [][]float64 `json:"marketCapByAvailableSupply"`
PriceBTC [][]float64 PriceBTC [][]float64 `json:"priceBTC"`
Price [][]float64 Price [][]float64 `json:"price"`
Volume [][]float64 Volume [][]float64 `json:"volume"`
} }
// Market struct // Market struct
type Market struct { type Market struct {
Rank int Rank int `json:"rank"`
Exchange string Exchange string `json:"exchange"`
Pair string Pair string `json:"pair"`
VolumeUSD float64 VolumeUSD float64 `json:"volumeUSD"`
Price float64 Price float64 `json:"price"`
VolumePercent float64 VolumePercent float64 `json:"volumePercent"`
Updated string Updated string `json:"updated"`
} }
// MarketGraph struct // MarketGraph struct
type MarketGraph struct { type MarketGraph struct {
MarketCapByAvailableSupply [][]float64 MarketCapByAvailableSupply [][]float64 `json:"marketCapByAvailableSupply"`
VolumeUSD [][]float64 VolumeUSD [][]float64 `json:"volumeUSD"`
} }

Loading…
Cancel
Save