mirror of
https://github.com/c9s/bbgo.git
synced 2024-11-26 08:45:16 +00:00
fix(ftx): always update since to avoid infinite loop
This commit is contained in:
parent
bca57e017b
commit
2e749bb7a8
|
@ -267,6 +267,9 @@ func (e *Exchange) QueryTrades(ctx context.Context, symbol string, options *type
|
||||||
})
|
})
|
||||||
|
|
||||||
for _, r := range resp.Result {
|
for _, r := range resp.Result {
|
||||||
|
// always update since to avoid infinite loop
|
||||||
|
since = r.Time.Time
|
||||||
|
|
||||||
if _, ok := tradeIDs[r.TradeId]; ok {
|
if _, ok := tradeIDs[r.TradeId]; ok {
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
|
@ -276,7 +279,6 @@ func (e *Exchange) QueryTrades(ctx context.Context, symbol string, options *type
|
||||||
}
|
}
|
||||||
tradeIDs[r.TradeId] = struct{}{}
|
tradeIDs[r.TradeId] = struct{}{}
|
||||||
lastTradeID = r.TradeId
|
lastTradeID = r.TradeId
|
||||||
since = r.Time.Time
|
|
||||||
|
|
||||||
t, err := toGlobalTrade(r)
|
t, err := toGlobalTrade(r)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
|
Loading…
Reference in New Issue
Block a user