func IsDefaultCurrency(currency string) bool {
	return common.StringContains(
		DefaultCurrencies, common.StringToUpper(currency),
	)
}
IsDefaultCurrency checks if the currency passed in matches the default
FIAT currency
package currency
import (
	"errors"
	"fmt"
	"log"
	"net/url"
	"strings"
	"time"
	"github.com/mattkanwisher/cryptofiend/common"
)
type Rate struct {
	ID   string  `json:"id"`
	Name string  `json:"Name"`
	Rate float64 `json:",string"`
	Date string  `json:"Date"`
	Time string  `json:"Time"`
	Ask  float64 `json:",string"`
	Bid  float64 `json:",string"`
}
type YahooJSONResponseInfo struct {
	Count   int       `json:"count"`
	Created time.Time `json:"created"`
	Lang    string    `json:"lang"`
}
type YahooJSONResponse struct {
	Query struct {
		YahooJSONResponseInfo
		Results struct {
			Rate []Rate `json:"rate"`
		}
	}
}
type FixerResponse struct {
	Base  string             `json:"base"`
	Date  string             `json:"date"`
	Rates map[string]float64 `json:"rates"`
}
const (
	maxCurrencyPairsPerRequest = 350
	yahooYQLURL                = "https://query.yahooapis.com/v1/public/yql?"
	yahooDatabase              = "store://datatables.org/alltableswithkeys"
	fixerAPI                   = "http://api.fixer.io/latest"
	DefaultCurrencies = "USD,AUD,EUR,CNY"
	DefaultCryptoCurrencies = "BTC,LTC,ETH,DOGE,DASH,XRP,XMR"
)
var (
	CurrencyStore             map[string]Rate
	CurrencyStoreFixer        map[string]float64
	BaseCurrencies            string
	CryptoCurrencies          string
	ErrCurrencyDataNotFetched = errors.New("yahoo currency data has not been fetched yet")
	ErrCurrencyNotFound       = errors.New("unable to find specified currency")
	ErrQueryingYahoo          = errors.New("unable to query Yahoo currency values")
	ErrQueryingYahooZeroCount = errors.New("yahoo returned zero currency data")
	YahooEnabled              = false
)
func SetProvider(yahooEnabled bool) {
	if yahooEnabled {
		YahooEnabled = true
		return
	}
	YahooEnabled = false
}
func SwapProvider() {
	if YahooEnabled {
		YahooEnabled = false
		return
	}
	YahooEnabled = true
}
func GetProvider() string {
	if YahooEnabled {
		return "yahoo"
	}
	return "fixer"
}