sammchardy / python-binance

Binance Exchange API python implementation for automated trading
https://python-binance.readthedocs.io/en/latest/
MIT License
5.91k stars 2.19k forks source link

client order_market_buy call is failing #568

Open iamveritas opened 3 years ago

iamveritas commented 3 years ago

The client order_market_buy call is failing with this error binance.exceptions.BinanceAPIException: APIError(code=-1106): Parameter 'quoteOrderQty' sent when not required.

To Reproduce api_test_key = 'sjdflkdsjf' api_test_secret = 'klfdsajflk' client = Client(api_test_key, api_test_secret) client.API_URL = 'https://testnet.binance.vision/api' client.order_market_buy( quantity= 1, quoteOrderQty = 10, symbol='BTCUSDT')

Expected behavior The order should be placed on the test chain and I should be able to inspect its status using its id. According to documentation the quantity will be calculated based on the quoteOrderQty and the market availability.

Environment (please complete the following information):

rati3l commented 3 years ago

Can you share the documentation part where it says that binance demo is supported? AFAIK API works only for the live version.

iamveritas commented 3 years ago

it is mentioned in several places, here's one of them: https://pypi.org/project/binance-connector-python/ also, placing a sell works fine, only placing a buy fails.

PeterGardas commented 3 years ago

I tested the code and I am having the same issue. The sell order works fine but the buy order status is EXPIRED.