pull/38/head 1.2.0
Miguel Mota 5 years ago
parent 6361b22399
commit eaf94232a1

@ -4,6 +4,13 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
## [1.2.0] - 2019-05-12
### Added
- Added CoinGecko API support
### Changed
- Default API from CoinMarketCap to CoinGecko
## [1.1.6] - 2019-04-23
### Added
- Prompt for CoinMarketCap Pro API Key

@ -18,7 +18,7 @@ func Run() {
flag.BoolVar(&reset, "reset", false, "Reset config")
flag.StringVar(&config, "config", "", "Config filepath")
flag.StringVar(&cmcAPIKey, "coinmarketcap-api-key", "", "CoinMarketCap API key")
flag.StringVar(&apiChoice, "api", cointop.CoinMarketCap, "API choice")
flag.StringVar(&apiChoice, "api", cointop.CoinGecko, "API choice")
flag.Parse()
if v || ver {
fmt.Printf("cointop v%s", cointop.Version())

@ -204,6 +204,7 @@ func (s *Service) GetGlobalMarketData(convert string) (apitypes.GlobalMarketData
ActiveAssets: 0,
ActiveMarkets: int(market.Markets),
}
return ret, nil
}

@ -75,7 +75,9 @@ func (ct *Cointop) updateMarketbar() error {
if ok {
ct.debuglog("soft cache hit")
}
} else {
}
if market.TotalMarketCapUSD == 0 {
market, err = ct.api.GetGlobalMarketData(ct.currencyconversion)
if err != nil {
filecache.Get(cachekey, &market)

@ -1,7 +1,7 @@
package cointop
// TODO: make dynamic based on git tag
const version = "1.1.6"
const version = "1.2.0"
func (ct *Cointop) version() string {
return version

Loading…
Cancel
Save