Im asking a question on this thread since you all seems pretty aware on the subject.
Im getting too some difficulty to place orders with REST API, even if I manage perfectly to get the endpoints. No matter what I try, included the example from the official doc: https://ibkrcampus.com/ibkr-api-page/cpapi-v1/#place-order, I get an error 500: internal server error
Here is my code:
>>> data
{'orders': [{'conid': 136155102, 'orderType': 'MKT', 'quantity': 1, 'side': 'BUY'}]}
>>> url
'https://localhost:5005/v1/api/iserver/account/XXXXXX/orders'
>>> response = requests.post(url, data=data, verify=False)
>>> response.raise_for_status()
raise HTTPError(http_error_msg, response=self)
requests.exceptions.HTTPError: 500 Server Error: Internal Server Error for url: https://localhost:5005/v1/api/iserver/account/XXXXXX/orders
I tried also to specify the acctID in the body but I get the same result. I will keep testing in the coming days, in case this is an issue coming directly from the server -- what I doubt.
Please note that Im currently trying with a paper account.
@Voy, you did a great job on your lib ibind.
Thanks for your help