Add todo for order duration setting `goodTillDuration`

ib_1m_hist
Tyler Goodlet 2022-10-28 17:50:09 -04:00
parent ceca0d9fb7
commit 1fadf58ab7
1 changed files with 7 additions and 3 deletions

View File

@ -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..