mirror of
https://github.com/d0zingcat/gocryptotrader.git
synced 2026-06-04 15:10:54 +00:00
bugfix: improve orderbook/ticker and currency logic
This commit is contained in:
@@ -124,7 +124,6 @@ func (e *EXMO) UpdateOrderbook(p currency.Pair, assetType string) (orderbook.Bas
|
||||
if !ok {
|
||||
continue
|
||||
}
|
||||
orderBook.Pair = x
|
||||
|
||||
var obItems []orderbook.Item
|
||||
for y := range data.Ask {
|
||||
@@ -144,7 +143,7 @@ func (e *EXMO) UpdateOrderbook(p currency.Pair, assetType string) (orderbook.Bas
|
||||
}
|
||||
|
||||
orderBook.Bids = obItems
|
||||
orderBook.Pair = p
|
||||
orderBook.Pair = x
|
||||
orderBook.ExchangeName = e.GetName()
|
||||
orderBook.AssetType = assetType
|
||||
|
||||
|
||||
@@ -97,7 +97,7 @@ func (k *Kraken) UpdateTicker(p currency.Pair, assetType string) (ticker.Price,
|
||||
|
||||
for _, x := range pairs {
|
||||
for y, z := range tickers {
|
||||
if !common.StringContains(y, x.Base.Upper().String()) &&
|
||||
if !common.StringContains(y, x.Base.Upper().String()) ||
|
||||
!common.StringContains(y, x.Quote.Upper().String()) {
|
||||
continue
|
||||
}
|
||||
|
||||
@@ -115,7 +115,6 @@ func (p *Poloniex) UpdateOrderbook(currencyPair currency.Pair, assetType string)
|
||||
if !ok {
|
||||
continue
|
||||
}
|
||||
orderBook.Pair = x
|
||||
|
||||
var obItems []orderbook.Item
|
||||
for y := range data.Bids {
|
||||
@@ -132,7 +131,7 @@ func (p *Poloniex) UpdateOrderbook(currencyPair currency.Pair, assetType string)
|
||||
orderbook.Item{Amount: obData.Amount, Price: obData.Price})
|
||||
}
|
||||
|
||||
orderBook.Pair = currencyPair
|
||||
orderBook.Pair = x
|
||||
orderBook.Asks = obItems
|
||||
orderBook.ExchangeName = p.GetName()
|
||||
orderBook.AssetType = assetType
|
||||
|
||||
Reference in New Issue
Block a user