UPetit / python-binance-profit

Script to submit a buy order followed by an automatic sell OCO order
MIT License
47 stars 15 forks source link

KeyError: sell_order["orderReports"] #30

Closed royaloctave closed 2 years ago

royaloctave commented 2 years ago

(Code 400) Illegal characters found in parameter 'side'; legal range is '^[a-zA-Z]{1,36}$'. Traceback (most recent call last): File "execute_orders.py", line 139, in <module> main(input_args=input_args_validated) File "execute_orders.py", line 67, in main stop_loss_limit_order, limit_maker_order = client.execute_sell_strategy( File "/home/python-binance-profit/app/client.py", line 435, in execute_sell_strategy sell_orders = sell_order["orderReports"] KeyError: 'orderReports'

The buy works perfectly but sell order doesn't work and gives error. How can I solve this issue? Thanks

royaloctave commented 2 years ago

Solve the issue! Problem is that the input to sell function is <SideEnum.sell: 'SELL'>! Only inputting SELL solved the problem.

UPetit commented 2 years ago

Hey @royaloctave, Thank you for reporting this issue. I'm glad you fixed it :) Is is something you fixed in the code?