Support account passthrough in `.submit_limit()`
parent
ffbfd187ad
commit
d940957455
|
@ -496,6 +496,7 @@ class Client:
|
||||||
price: float,
|
price: float,
|
||||||
action: str,
|
action: str,
|
||||||
size: int,
|
size: int,
|
||||||
|
account: str = '', # if blank the "default" tws account is used
|
||||||
|
|
||||||
# XXX: by default 0 tells ``ib_insync`` methods that there is no
|
# XXX: by default 0 tells ``ib_insync`` methods that there is no
|
||||||
# existing order so ask the client to create a new one (which it
|
# existing order so ask the client to create a new one (which it
|
||||||
|
@ -518,6 +519,7 @@ class Client:
|
||||||
Order(
|
Order(
|
||||||
orderId=reqid or 0, # stupid api devs..
|
orderId=reqid or 0, # stupid api devs..
|
||||||
action=action.upper(), # BUY/SELL
|
action=action.upper(), # BUY/SELL
|
||||||
|
account=account,
|
||||||
orderType='LMT',
|
orderType='LMT',
|
||||||
lmtPrice=price,
|
lmtPrice=price,
|
||||||
totalQuantity=size,
|
totalQuantity=size,
|
||||||
|
|
Loading…
Reference in New Issue