python-binance icon indicating copy to clipboard operation
python-binance copied to clipboard

APIError(code=-1100): Illegal characters found in parameter 'price'

Open kuratkull opened this issue 5 years ago • 1 comments

Here's what's wrong with the price parameter. can i get information

      `
      symbolTicker = 'BNBBTC'
      quantity = 1
      prev_symbolPrice = 0

    list_of_tickers = client.get_all_tickers()
    for tick_2 in list_of_tickers:
        if tick_2["symbol"] == symbolTicker:
            prev_symbolPrice = float(tick_2["price"])
    
    order = client.create_order(
        symbol = symbolTicker,
        side = 'BUY',
        type = 'STOP_LOSS_LIMIT',
        quantity = quantity,
        price = round(prev_symbolPrice*1.001,7),
        stopPrice = round(prev_symbolPrice*1.002,7),
        timeInForce = 'GTC'
    )

`

kuratkull avatar Mar 31 '21 17:03 kuratkull

can you print the price? it could be converted to scientific notation. print it and see.print(str(round(prev_symbolPrice*1.001,7)))

Bob12345 avatar Mar 31 '21 21:03 Bob12345