diff --git a/engine/helpers.go b/engine/helpers.go index 73b2fa55..0b6093bc 100644 --- a/engine/helpers.go +++ b/engine/helpers.go @@ -417,13 +417,19 @@ func GetRelatableCurrencies(p currency.Pair, incOrig, incUSDT bool) currency.Pai // GetSpecificOrderbook returns a specific orderbook given the currency, // exchangeName and assetType func GetSpecificOrderbook(p currency.Pair, exchangeName string, assetType asset.Item) (*orderbook.Base, error) { - return GetExchangeByName(exchangeName).FetchOrderbook(p, assetType) + if CheckExchangeExists(exchangeName) { + return GetExchangeByName(exchangeName).FetchOrderbook(p, assetType) + } + return &orderbook.Base{}, errors.New("exchange is not loaded/doesn't exist") } // GetSpecificTicker returns a specific ticker given the currency, // exchangeName and assetType func GetSpecificTicker(p currency.Pair, exchangeName string, assetType asset.Item) (*ticker.Price, error) { - return GetExchangeByName(exchangeName).FetchTicker(p, assetType) + if CheckExchangeExists(exchangeName) { + return GetExchangeByName(exchangeName).FetchTicker(p, assetType) + } + return &ticker.Price{}, errors.New("exchange is not loaded/doesn't exist") } // GetCollatedExchangeAccountInfoByCoin collates individual exchange account diff --git a/exchanges/bittrex/bittrex_types.go b/exchanges/bittrex/bittrex_types.go index 92e9f1d3..0de36b06 100644 --- a/exchanges/bittrex/bittrex_types.go +++ b/exchanges/bittrex/bittrex_types.go @@ -215,7 +215,7 @@ type DepositHistory struct { Success bool `json:"success"` Message string `json:"message"` Result []struct { - ID string `json:"Id"` + ID int64 `json:"Id"` Amount float64 `json:"Amount"` Currency string `json:"Currency"` Confirmations int64 `json:"Confirmations"`