mirror of
https://github.com/c9s/bbgo.git
synced 2024-11-26 08:45:16 +00:00
fix(ftx): klines should not be empty
This commit is contained in:
parent
7ff4051c61
commit
7abd7225e1
|
@ -139,7 +139,7 @@ func (s *Stream) pollKLines(ctx context.Context) {
|
|||
for _, sub := range s.klineSubscriptions {
|
||||
klines := getLastKLine(s.exchange, ctx, sub.symbol, sub.interval)
|
||||
|
||||
if len(klines) >= 0 {
|
||||
if len(klines) > 0 {
|
||||
// handle mutiple klines, get the latest one
|
||||
s.EmitKLineClosed(klines[len(klines)-1])
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user