mirror of
https://github.com/d0zingcat/gocryptotrader.git
synced 2026-05-18 07:26:50 +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
|
||||
|
||||
@@ -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"`
|
||||
|
||||
Reference in New Issue
Block a user