mirror of
https://github.com/c9s/bbgo.git
synced 2024-11-25 16:25:16 +00:00
make markets field private
This commit is contained in:
parent
dab264a4ad
commit
f826bb014a
|
@ -71,7 +71,7 @@ func (environ *Environment) Init(ctx context.Context) (err error) {
|
|||
return err
|
||||
}
|
||||
|
||||
session.Markets = markets
|
||||
session.markets = markets
|
||||
|
||||
for symbol := range loadedSymbols {
|
||||
log.Infof("syncing trades from %s for symbol %s...", session.Exchange.Name(), symbol)
|
||||
|
|
|
@ -21,8 +21,8 @@ type ExchangeSession struct {
|
|||
|
||||
Exchange types.Exchange
|
||||
|
||||
// Markets defines market configuration of a symbol
|
||||
Markets map[string]types.Market
|
||||
// markets defines market configuration of a symbol
|
||||
markets map[string]types.Market
|
||||
|
||||
lastPrices map[string]float64
|
||||
|
||||
|
@ -38,7 +38,7 @@ func NewExchangeSession(name string, exchange types.Exchange) *ExchangeSession {
|
|||
Name: name,
|
||||
Exchange: exchange,
|
||||
Subscriptions: make(map[types.Subscription]types.Subscription),
|
||||
Markets: make(map[string]types.Market),
|
||||
markets: make(map[string]types.Market),
|
||||
Trades: make(map[string][]types.Trade),
|
||||
lastPrices: make(map[string]float64),
|
||||
marketDataStores: make(map[string]*store.MarketDataStore),
|
||||
|
@ -56,7 +56,7 @@ func (session *ExchangeSession) LastPrice(symbol string) (price float64, ok bool
|
|||
}
|
||||
|
||||
func (session *ExchangeSession) Market(symbol string) (market types.Market, ok bool) {
|
||||
market, ok = session.Markets[symbol]
|
||||
market, ok = session.markets[symbol]
|
||||
return market, ok
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user