mirror of
https://github.com/d0zingcat/gocryptotrader.git
synced 2026-05-19 23:16:48 +00:00
Kraken - fix bugs with wrong indexes (#623)
* add Cost param to Kraken GetOrderInfo output * fmt * faulty resp.Time handling in Binance GetOrderInfo method * add orderBookProcess * Update exchanges/binance/binance_websocket.go Co-authored-by: Adrian Gallagher <adrian.gallagher@thrasher.io> * fmt * comment change * add param for log * fixed wrong indexes Co-authored-by: Vazha Bezhanishvili <vazha.bezhanishvili@elegro.eu> Co-authored-by: Adrian Gallagher <adrian.gallagher@thrasher.io>
This commit is contained in:
@@ -160,7 +160,7 @@ func (d *Detail) UpdateOrderFromDetail(m *Detail) {
|
||||
d.Trades[y].Fee = m.Trades[x].Fee
|
||||
updated = true
|
||||
}
|
||||
if m.Trades[y].Price != 0 && d.Trades[y].Price != m.Trades[x].Price {
|
||||
if m.Trades[x].Price != 0 && d.Trades[y].Price != m.Trades[x].Price {
|
||||
d.Trades[y].Price = m.Trades[x].Price
|
||||
updated = true
|
||||
}
|
||||
@@ -176,7 +176,7 @@ func (d *Detail) UpdateOrderFromDetail(m *Detail) {
|
||||
d.Trades[y].Description = m.Trades[x].Description
|
||||
updated = true
|
||||
}
|
||||
if m.Trades[y].Amount != 0 && d.Trades[y].Amount != m.Trades[x].Amount {
|
||||
if m.Trades[x].Amount != 0 && d.Trades[y].Amount != m.Trades[x].Amount {
|
||||
d.Trades[y].Amount = m.Trades[x].Amount
|
||||
updated = true
|
||||
}
|
||||
@@ -309,7 +309,7 @@ func (d *Detail) UpdateOrderFromModify(m *Modify) {
|
||||
d.Trades[y].Fee = m.Trades[x].Fee
|
||||
updated = true
|
||||
}
|
||||
if m.Trades[y].Price != 0 && d.Trades[y].Price != m.Trades[x].Price {
|
||||
if m.Trades[x].Price != 0 && d.Trades[y].Price != m.Trades[x].Price {
|
||||
d.Trades[y].Price = m.Trades[x].Price
|
||||
updated = true
|
||||
}
|
||||
@@ -325,7 +325,7 @@ func (d *Detail) UpdateOrderFromModify(m *Modify) {
|
||||
d.Trades[y].Description = m.Trades[x].Description
|
||||
updated = true
|
||||
}
|
||||
if m.Trades[y].Amount != 0 && d.Trades[y].Amount != m.Trades[x].Amount {
|
||||
if m.Trades[x].Amount != 0 && d.Trades[y].Amount != m.Trades[x].Amount {
|
||||
d.Trades[y].Amount = m.Trades[x].Amount
|
||||
updated = true
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user