mirror of
https://github.com/c9s/bbgo.git
synced 2024-11-10 09:11:55 +00:00
Merge pull request #269 from jnlin/main
fix FTX API error of empty array
This commit is contained in:
commit
4a0b4aae53
|
@ -166,7 +166,7 @@ func (s *Stream) pollKLines(ctx context.Context) {
|
|||
}
|
||||
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