OCO order example from docs produces APIError(code=-1106): Parameter 'stopLimitTimeInForce' sent when not required. Other options of parameters give 1013 and 1104 #1300
Describe the bug
OCO order example from the docs (client.create_oco_order) produces APIError(code=-1106): Parameter 'stopLimitTimeInForce' sent when not required
from binance.enums import *
order = client.create_oco_order(
symbol='BNBBTC',
side=SIDE_SELL,
stopLimitTimeInForce=TIME_IN_FORCE_GTC,
quantity=100,
stopPrice='0.00001',
price='0.00002')
Expected behavior
Order is created. Other orders work, OCO doesn't.
Environment (please complete the following information):
Python 3.9
Virtual Env
OS: MacOS 12.1
python-binance version: 1.0.16
Client is initiated with testnet=True
Logs or Additional context
If I'm not sending 'stopLimitTimeInForce', I got
APIError(code=-1013): Stop loss orders are not supported for this symbol.
Same error for other symbols (i.e. 'ETHUSDT').
TIME_IN_FORCE_GTC and other constants are loaded before client.create_oco_order is triggered.
If I'm sending timeInForce=TIME_IN_FORCE_GTC, I got
APIError(code=-1104): Not all sent parameters were read; read '7' parameter(s) but was sent '8'.
Describe the bug OCO order example from the docs (client.create_oco_order) produces APIError(code=-1106): Parameter 'stopLimitTimeInForce' sent when not required
To Reproduce Code snippet to reproduce the behavior: Code is taken from docs: https://python-binance.readthedocs.io/en/latest/account.html#id2
Expected behavior Order is created. Other orders work, OCO doesn't.
Environment (please complete the following information):
Logs or Additional context If I'm not sending 'stopLimitTimeInForce', I got
APIError(code=-1013): Stop loss orders are not supported for this symbol.
Same error for other symbols (i.e. 'ETHUSDT').TIME_IN_FORCE_GTC and other constants are loaded before client.create_oco_order is triggered.
If I'm sending timeInForce=TIME_IN_FORCE_GTC, I got
APIError(code=-1104): Not all sent parameters were read; read '7' parameter(s) but was sent '8'.
What I'm doing wrong?