From 7b6ca32ce49a3e80a62d092a8fed04f09d003c0b Mon Sep 17 00:00:00 2001 From: Ilya Chekalskiy Date: Sun, 17 Dec 2017 16:08:22 +0100 Subject: [PATCH] Adding the ability to request all of coins by passing limit=0 --- coinmarketcap.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/coinmarketcap.go b/coinmarketcap.go index 4c8b141..88fdf13 100755 --- a/coinmarketcap.go +++ b/coinmarketcap.go @@ -48,7 +48,7 @@ func GetCoinData(coin string) (Coin, error) { // Get information about all coins listed in Coin Market Cap. func GetAllCoinData(limit int) (map[string]Coin, error) { var l string - if limit > 0 { + if limit >= 0 { l = fmt.Sprintf("?limit=%v", limit) } url = fmt.Sprintf("%s/ticker/%s", baseUrl, l)