Just came over from the Binance API and I'm just trying to place an order.
Exeption reads as : TypeError: "encoding without a string argument"
def placeTrade(self, params) -> dict: """place trade""" try: res = self._client.place_conditional_order( symbol=params["symbol"], order_type=params["order_type"], side=params["side"], qty=params["qty"], price=params["price"], base_price = params["base_price"], stop_px=params["price"], time_in_force='GoodTillCancel', close_on_trigger=True, reduce_only = False, take_profit=params["take_profit"], stop_loss=params["stop_loss"], trigger_by='last_price') except Exception as e: print(e) return {} else: return res
Sorry - passed an dict HTTP({"api_key": config.API, "api_secret": config.SECRET}) to the HTTP instanciation without errors? resolved with - HTTP(api_key= config.API, api_secret= config.SECRET)
Just came over from the Binance API and I'm just trying to place an order. Exeption reads as : TypeError: "encoding without a string argument"
def placeTrade(self, params) -> dict: """place trade""" try: res = self._client.place_conditional_order( symbol=params["symbol"], order_type=params["order_type"], side=params["side"], qty=params["qty"], price=params["price"], base_price = params["base_price"], stop_px=params["price"], time_in_force='GoodTillCancel', close_on_trigger=True, reduce_only = False, take_profit=params["take_profit"], stop_loss=params["stop_loss"], trigger_by='last_price') except Exception as e: print(e) return {} else: return res