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. # async to be consistent for the client proxy, and cuz why not.
def submit_limit( def submit_limit(
self, self,
# ignored since ib doesn't support defining your oid: str, # ignored since doesn't support defining your own
# own order id
oid: str,
symbol: str, symbol: str,
price: float, price: float,
action: str, action: str,
@ -873,6 +871,9 @@ class Client:
''' '''
Place an order and return integer request id provided by client. Place an order and return integer request id provided by client.
Relevant docs:
- https://interactivebrokers.github.io/tws-api/order_limitations.html
''' '''
try: try:
contract = self._contracts[symbol] contract = self._contracts[symbol]
@ -898,6 +899,9 @@ class Client:
optOutSmartRouting=True, optOutSmartRouting=True,
routeMarketableToBbo=True, routeMarketableToBbo=True,
designatedLocation='SMART', 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.. except AssertionError: # errrg insync..