#Open_position_order function on Binance
def open_position_order(symbol,quantity, side, order_type = ORDER_TYPE_MARKET):try:print("sending order")order = client.create_order(symbol=symbol,side=side,type=order_type,quantity=quantity)print(order)except Exception as e:print('open position order error')return Falsereturn True
You might need to install the following dependency :
pip install python-binance