mirror of
https://github.com/c9s/bbgo.git
synced 2024-11-22 06:53:52 +00:00
query markets and assign into the exchange session
This commit is contained in:
parent
c167b2f303
commit
113cc8ee48
|
@ -103,6 +103,13 @@ func (environ *Environment) Init(ctx context.Context) (err error) {
|
||||||
loadedSymbols[sub.Symbol] = struct{}{}
|
loadedSymbols[sub.Symbol] = struct{}{}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
markets, err := session.Exchange.QueryMarkets(ctx)
|
||||||
|
if err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
|
||||||
|
session.Markets = markets
|
||||||
|
|
||||||
for symbol := range loadedSymbols {
|
for symbol := range loadedSymbols {
|
||||||
if err := environ.TradeSync.Sync(ctx, session.Exchange, symbol, startTime); err != nil {
|
if err := environ.TradeSync.Sync(ctx, session.Exchange, symbol, startTime); err != nil {
|
||||||
return err
|
return err
|
||||||
|
|
Loading…
Reference in New Issue
Block a user