From 1fadf58ab74b48fe217255d5704695584fa00d2d Mon Sep 17 00:00:00 2001 From: Tyler Goodlet Date: Fri, 28 Oct 2022 17:50:09 -0400 Subject: [PATCH] Add todo for order duration setting `goodTillDuration` --- piker/brokers/ib/api.py | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/piker/brokers/ib/api.py b/piker/brokers/ib/api.py index b285ff44..9448d1f6 100644 --- a/piker/brokers/ib/api.py +++ b/piker/brokers/ib/api.py @@ -855,9 +855,7 @@ class Client: # async to be consistent for the client proxy, and cuz why not. def submit_limit( self, - # ignored since ib doesn't support defining your - # own order id - oid: str, + oid: str, # ignored since doesn't support defining your own symbol: str, price: float, action: str, @@ -873,6 +871,9 @@ class Client: ''' Place an order and return integer request id provided by client. + Relevant docs: + - https://interactivebrokers.github.io/tws-api/order_limitations.html + ''' try: contract = self._contracts[symbol] @@ -898,6 +899,9 @@ class Client: optOutSmartRouting=True, routeMarketableToBbo=True, designatedLocation='SMART', + # TODO: make all orders GTC? + # https://interactivebrokers.github.io/tws-api/classIBApi_1_1Order.html#a95539081751afb9980f4c6bd1655a6ba + # goodTillDate=f"yyyyMMdd-HH:mm:ss", ), ) except AssertionError: # errrg insync..