mirror of
https://github.com/d0zingcat/gocryptotrader.git
synced 2026-06-03 15:10:49 +00:00
Fixed stutter issues from exchange.go
This commit is contained in:
committed by
Adrian Gallagher
parent
7042da1e03
commit
de48b62731
@@ -45,7 +45,7 @@ const (
|
||||
)
|
||||
|
||||
type Bitstamp struct {
|
||||
exchange.ExchangeBase
|
||||
exchange.Base
|
||||
Balance BitstampBalances
|
||||
}
|
||||
|
||||
|
||||
@@ -95,33 +95,33 @@ func (b *Bitstamp) GetOrderbookEx(p pair.CurrencyPair) (orderbook.OrderbookBase,
|
||||
}
|
||||
|
||||
//GetExchangeAccountInfo : Retrieves balances for all enabled currencies for the Bitstamp exchange
|
||||
func (e *Bitstamp) GetExchangeAccountInfo() (exchange.ExchangeAccountInfo, error) {
|
||||
var response exchange.ExchangeAccountInfo
|
||||
func (e *Bitstamp) GetExchangeAccountInfo() (exchange.AccountInfo, error) {
|
||||
var response exchange.AccountInfo
|
||||
response.ExchangeName = e.GetName()
|
||||
accountBalance, err := e.GetBalance()
|
||||
if err != nil {
|
||||
return response, err
|
||||
}
|
||||
|
||||
response.Currencies = append(response.Currencies, exchange.ExchangeAccountCurrencyInfo{
|
||||
response.Currencies = append(response.Currencies, exchange.AccountCurrencyInfo{
|
||||
CurrencyName: "BTC",
|
||||
TotalValue: accountBalance.BTCAvailable,
|
||||
Hold: accountBalance.BTCReserved,
|
||||
})
|
||||
|
||||
response.Currencies = append(response.Currencies, exchange.ExchangeAccountCurrencyInfo{
|
||||
response.Currencies = append(response.Currencies, exchange.AccountCurrencyInfo{
|
||||
CurrencyName: "XRP",
|
||||
TotalValue: accountBalance.XRPAvailable,
|
||||
Hold: accountBalance.XRPReserved,
|
||||
})
|
||||
|
||||
response.Currencies = append(response.Currencies, exchange.ExchangeAccountCurrencyInfo{
|
||||
response.Currencies = append(response.Currencies, exchange.AccountCurrencyInfo{
|
||||
CurrencyName: "USD",
|
||||
TotalValue: accountBalance.USDAvailable,
|
||||
Hold: accountBalance.USDReserved,
|
||||
})
|
||||
|
||||
response.Currencies = append(response.Currencies, exchange.ExchangeAccountCurrencyInfo{
|
||||
response.Currencies = append(response.Currencies, exchange.AccountCurrencyInfo{
|
||||
CurrencyName: "EUR",
|
||||
TotalValue: accountBalance.EURAvailable,
|
||||
Hold: accountBalance.EURReserved,
|
||||
|
||||
Reference in New Issue
Block a user