mirror of
https://github.com/d0zingcat/gocryptotrader.git
synced 2026-05-30 07:26:46 +00:00
Bittrex - changed type of field "Id" in DepositHistory struct (#419)
* Bittrex GetDepositHistory method return new DepositHistory struct type * Id field of DepositHistory type changed to int64 * check exchange (exist and enabled) before calling methods on, to avoid program crashes * Update bittrex_types.go
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user