areed1192 / interactive-broker-python-api

A python packaged used to interact with the Interactive Brokers REST API.
MIT License
374 stars 122 forks source link

Example for placing the order #11

Closed nbl2010 closed 3 years ago

nbl2010 commented 3 years ago

Do you have example of placing order or modify order using this lib? I am getting bad request error. Perhaps the format of the order is not correct. I would like to see if you have a working example.

Thanks.

valkenzz commented 3 years ago

that work for me : a={"conid": 7516, #it is General Electric "secType": "STK", "cOID": "1200011", "orderType": "MKT", "side": "BUY", "quantity": 1, "tif": "DAY" } ib_client.place_order(account_id="hereYourIdAccount", order=a)

make sure to have enough USD