minor tweaks

This commit is contained in:
ycchen 2021-02-08 00:02:08 +01:00
parent 61c98432f2
commit 6655e16889
2 changed files with 2 additions and 2 deletions

View File

@ -494,7 +494,7 @@ func (session *ExchangeSession) UpdatePrices(ctx context.Context) (err error) {
symbols := make([]string, len(balances))
for _, b := range balances {
symbols[len(symbols)] = b.Currency + "USDT"
symbols = append(symbols, b.Currency + "USDT")
}
tickers, err := session.Exchange.QueryTickers(ctx, symbols...)

View File

@ -100,7 +100,7 @@ var PnLCmd = &cobra.Command{
return err
}
currentTick, ok := tickers[strings.ToUpper(symbol)]
currentTick, ok := tickers[symbol]
if !ok {
return errors.New("no ticker data for current price")