mirror of
https://github.com/c9s/bbgo.git
synced 2024-11-10 09:11:55 +00:00
all: add more futures channel types
This commit is contained in:
parent
e607fc19ac
commit
98b0ffa510
|
@ -107,12 +107,6 @@ func (s *Strategy) CrossSubscribe(sessions map[string]*bbgo.ExchangeSession) {
|
|||
}
|
||||
|
||||
func (s *Strategy) Subscribe(session *bbgo.ExchangeSession) {
|
||||
// session.Subscribe(types.BookChannel, s.Symbol, types.SubscribeOptions{})
|
||||
|
||||
// session.Subscribe(types.KLineChannel, s.Symbol, types.SubscribeOptions{
|
||||
// Interval: string(s.Interval),
|
||||
// })
|
||||
|
||||
for _, detection := range s.SupportDetection {
|
||||
session.Subscribe(types.KLineChannel, s.Symbol, types.SubscribeOptions{
|
||||
Interval: detection.Interval,
|
||||
|
|
|
@ -2,8 +2,15 @@ package types
|
|||
|
||||
type Channel string
|
||||
|
||||
var BookChannel = Channel("book")
|
||||
var KLineChannel = Channel("kline")
|
||||
var BookTickerChannel = Channel("bookticker")
|
||||
var MarketTradeChannel = Channel("trade")
|
||||
var AggTradeChannel = Channel("aggTrade")
|
||||
const (
|
||||
BookChannel = Channel("book")
|
||||
KLineChannel = Channel("kline")
|
||||
BookTickerChannel = Channel("bookTicker")
|
||||
MarketTradeChannel = Channel("trade")
|
||||
AggTradeChannel = Channel("aggTrade")
|
||||
|
||||
// channels for futures
|
||||
MarkPriceChannel = Channel("markPrice")
|
||||
LiquidationOrderChannel = Channel("liquidationOrder")
|
||||
ContractChannel = Channel("contract")
|
||||
)
|
||||
|
|
Loading…
Reference in New Issue
Block a user