mirror of
https://github.com/c9s/bbgo.git
synced 2024-11-22 06:53:52 +00:00
improve/sync-futures: do not use GetSessionAttributes()
This commit is contained in:
parent
d2f946e349
commit
90020a65a4
|
@ -30,7 +30,6 @@ package backtest
|
||||||
import (
|
import (
|
||||||
"context"
|
"context"
|
||||||
"fmt"
|
"fmt"
|
||||||
exchange2 "github.com/c9s/bbgo/pkg/exchange"
|
|
||||||
"strconv"
|
"strconv"
|
||||||
"sync"
|
"sync"
|
||||||
"time"
|
"time"
|
||||||
|
@ -382,7 +381,14 @@ func (e *Exchange) SubscribeMarketData(
|
||||||
intervals = append(intervals, interval)
|
intervals = append(intervals, interval)
|
||||||
}
|
}
|
||||||
|
|
||||||
_, isFutures, _, _ := exchange2.GetSessionAttributes(e.publicExchange)
|
//_, isFutures, _, _ := exchange2.GetSessionAttributes(e.publicExchange)
|
||||||
|
var isFutures bool
|
||||||
|
if futuresExchange, ok := e.publicExchange.(types.FuturesExchange); ok {
|
||||||
|
isFutures = futuresExchange.GetFuturesSettings().IsFutures
|
||||||
|
} else {
|
||||||
|
isFutures = false
|
||||||
|
}
|
||||||
|
|
||||||
if isFutures {
|
if isFutures {
|
||||||
log.Infof("querying futures klines from database with exchange: %v symbols: %v and intervals: %v for back-testing", e.Name(), symbols, intervals)
|
log.Infof("querying futures klines from database with exchange: %v symbols: %v and intervals: %v for back-testing", e.Name(), symbols, intervals)
|
||||||
} else {
|
} else {
|
||||||
|
|
Loading…
Reference in New Issue
Block a user