mirror of
https://github.com/c9s/bbgo.git
synced 2024-11-26 16:55:15 +00:00
Merge pull request #259 from jnlin/fix/ftx-kline
fix(ftx): klines should not be empty
This commit is contained in:
commit
d6fc89d18a
|
@ -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