mirror of
https://github.com/c9s/bbgo.git
synced 2024-11-13 02:23:51 +00:00
minor tweaks
This commit is contained in:
parent
61c98432f2
commit
6655e16889
|
@ -494,7 +494,7 @@ func (session *ExchangeSession) UpdatePrices(ctx context.Context) (err error) {
|
||||||
|
|
||||||
symbols := make([]string, len(balances))
|
symbols := make([]string, len(balances))
|
||||||
for _, b := range balances {
|
for _, b := range balances {
|
||||||
symbols[len(symbols)] = b.Currency + "USDT"
|
symbols = append(symbols, b.Currency + "USDT")
|
||||||
}
|
}
|
||||||
|
|
||||||
tickers, err := session.Exchange.QueryTickers(ctx, symbols...)
|
tickers, err := session.Exchange.QueryTickers(ctx, symbols...)
|
||||||
|
|
|
@ -100,7 +100,7 @@ var PnLCmd = &cobra.Command{
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
|
||||||
currentTick, ok := tickers[strings.ToUpper(symbol)]
|
currentTick, ok := tickers[symbol]
|
||||||
|
|
||||||
if !ok {
|
if !ok {
|
||||||
return errors.New("no ticker data for current price")
|
return errors.New("no ticker data for current price")
|
||||||
|
|
Loading…
Reference in New Issue
Block a user