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

Place order reply should accept `reply` as bool #22

Open odygrd opened 3 years ago

odygrd commented 3 years ago

I was getting a http error 500 when using the order reply request

https://github.com/areed1192/interactive-broker-python-api/blob/0ab98cdf3809dba66bff1c09a62f03be69f5545a/ibw/client.py#L1805

According to ibrk documentation the confirmation should be boolean : https://www.interactivebrokers.co.uk/api/doc.html#tag/Order/paths/~1iserver~1account~1orders~1{faGroup}/post

Changing the function signature makes it work def place_order_reply(self, reply_id: str = None, reply: bool = None):

Please also note that the documentation section of the function looks like it is copy pasted from a different function

unreal79 commented 2 years ago

It's ease to avoid by assigning True to reply:


reply_yes = ib_client.place_order_reply(
    reply_id = buy_order_id,
    reply = True
)```