Open countblackjack opened 3 years ago
I'm getting this error when sending
params={
'symbol': SYMBOL_TO_TRADE,
'side': tp_sl_side,
'quantity': str(quantity),
'price': str(tp_price),
'stopPrice': str(tp_stop_price),
'stopLimitPrice': str(sl_price),
'stopLimitTimeInForce':'GTC',
'isIsolated': isIsolated,
'sideEffectType': 'MARGIN_BUY'
}
oco_order = cls.client._post('margin/order/oco', True, data=params)
Did you find a solution?
Traceback (most recent call last):
File "/Users/harshdeep.sangwan/PycharmProjects/pythonProject1/binance futures.py", line 264, in
I'm getting this error
.venv/lib/python3.10/site-packages/binance/client.py", line 368, in _handle_response raise BinanceAPIException(response, response.status_code, response.text) binance.exceptions.BinanceAPIException: APIError(code=0): Invalid JSON error message from Binance:
Note that this is my first python program and my first post on github. The code used to work fine, all of the sudden it doesnt work anymore. It could be due to the things that are going on with binance and options, just want to make sure that it is not something I overlooked.
Code used to run fine, now suddenly returns " APIError(code=0): Invalid JSON error message from Binance:"
To Reproduce
Expected behavior Should return order book
Environment (please complete the following information):
Logs or Additional context binance.exceptions.BinanceAPIException: APIError(code=0): Invalid JSON error message from Binance: <!DOCTYPE html>