mirror of
https://github.com/d0zingcat/gocryptotrader.git
synced 2026-05-30 15:10:40 +00:00
huobi: Swap ticker amount and volume values (#1679)
Co-authored-by: shazbert <ryan.oharareid@thrasher.io>
This commit is contained in:
@@ -356,8 +356,8 @@ func (h *HUOBI) UpdateTickers(ctx context.Context, a asset.Item) error {
|
||||
Low: ticks.Data[i].Low,
|
||||
Bid: ticks.Data[i].Bid,
|
||||
Ask: ticks.Data[i].Ask,
|
||||
Volume: ticks.Data[i].Volume,
|
||||
QuoteVolume: ticks.Data[i].Amount,
|
||||
Volume: ticks.Data[i].Amount,
|
||||
QuoteVolume: ticks.Data[i].Volume,
|
||||
Open: ticks.Data[i].Open,
|
||||
Close: ticks.Data[i].Close,
|
||||
BidSize: ticks.Data[i].BidSize,
|
||||
@@ -389,8 +389,8 @@ func (h *HUOBI) UpdateTickers(ctx context.Context, a asset.Item) error {
|
||||
err = ticker.ProcessTicker(&ticker.Price{
|
||||
High: ticks[i].High.Float64(),
|
||||
Low: ticks[i].Low.Float64(),
|
||||
Volume: ticks[i].Volume.Float64(),
|
||||
QuoteVolume: ticks[i].Amount.Float64(),
|
||||
Volume: ticks[i].Amount.Float64(),
|
||||
QuoteVolume: ticks[i].Volume.Float64(),
|
||||
Open: ticks[i].Open.Float64(),
|
||||
Close: ticks[i].Close.Float64(),
|
||||
Bid: ticks[i].Bid[0],
|
||||
@@ -439,12 +439,11 @@ func (h *HUOBI) UpdateTickers(ctx context.Context, a asset.Item) error {
|
||||
}
|
||||
continue
|
||||
}
|
||||
tt := time.UnixMilli(ticks[i].Timestamp)
|
||||
err = ticker.ProcessTicker(&ticker.Price{
|
||||
High: ticks[i].High.Float64(),
|
||||
Low: ticks[i].Low.Float64(),
|
||||
Volume: ticks[i].Volume.Float64(),
|
||||
QuoteVolume: ticks[i].Amount.Float64(),
|
||||
Volume: ticks[i].Amount.Float64(),
|
||||
QuoteVolume: ticks[i].Volume.Float64(),
|
||||
Open: ticks[i].Open.Float64(),
|
||||
Close: ticks[i].Close.Float64(),
|
||||
Bid: ticks[i].Bid[0],
|
||||
@@ -454,7 +453,7 @@ func (h *HUOBI) UpdateTickers(ctx context.Context, a asset.Item) error {
|
||||
Pair: cp,
|
||||
ExchangeName: h.Name,
|
||||
AssetType: a,
|
||||
LastUpdated: tt,
|
||||
LastUpdated: time.UnixMilli(ticks[i].Timestamp),
|
||||
})
|
||||
if err != nil {
|
||||
errs = common.AppendError(errs, err)
|
||||
@@ -483,7 +482,8 @@ func (h *HUOBI) UpdateTicker(ctx context.Context, p currency.Pair, a asset.Item)
|
||||
err = ticker.ProcessTicker(&ticker.Price{
|
||||
High: tickerData.Tick.High,
|
||||
Low: tickerData.Tick.Low,
|
||||
Volume: tickerData.Tick.Volume,
|
||||
Volume: tickerData.Tick.Amount,
|
||||
QuoteVolume: tickerData.Tick.Volume,
|
||||
Open: tickerData.Tick.Open,
|
||||
Close: tickerData.Tick.Close,
|
||||
Pair: p,
|
||||
@@ -509,7 +509,8 @@ func (h *HUOBI) UpdateTicker(ctx context.Context, p currency.Pair, a asset.Item)
|
||||
err = ticker.ProcessTicker(&ticker.Price{
|
||||
High: marketData.Tick.High,
|
||||
Low: marketData.Tick.Low,
|
||||
Volume: marketData.Tick.Vol,
|
||||
Volume: marketData.Tick.Amount,
|
||||
QuoteVolume: marketData.Tick.Vol,
|
||||
Open: marketData.Tick.Open,
|
||||
Close: marketData.Tick.Close,
|
||||
Pair: p,
|
||||
@@ -530,7 +531,8 @@ func (h *HUOBI) UpdateTicker(ctx context.Context, p currency.Pair, a asset.Item)
|
||||
err = ticker.ProcessTicker(&ticker.Price{
|
||||
High: marketData.Tick.High,
|
||||
Low: marketData.Tick.Low,
|
||||
Volume: marketData.Tick.Vol,
|
||||
Volume: marketData.Tick.Amount,
|
||||
QuoteVolume: marketData.Tick.Vol,
|
||||
Open: marketData.Tick.Open,
|
||||
Close: marketData.Tick.Close,
|
||||
Pair: p,
|
||||
|
||||
Reference in New Issue
Block a user