Re: How to link 2 orders on 2 different contracts so that the 2nd one is executed only if the 1st one gets filled and have this sit on the IB side?
Bart, There is no problem buying any multileg combo since there is always an ask even for OTM strikes. Getting out of a spread/combo when there is no bid on any one leg is impossible even with a
By
Ace
·
#51995
·
|
Re: How to link 2 orders on 2 different contracts so that the 2nd one is executed only if the 1st one gets filled and have this sit on the IB side?
Ace, I see - these are liquidity and margin-requirement issues with trading individual legs of a spread. Which is why I had in my example vertical spreads for both orders, so you have ¡°defined
By
Bart D
·
#51994
·
|
Re: How to link 2 orders on 2 different contracts so that the 2nd one is executed only if the 1st one gets filled and have this sit on the IB side?
All of this is because 0DTE SPY/QQQ options combos exit orders oftentimes don't get executed because a long leg has totally decayed and has no bid. That's why I want to manage each leg instead of the
By
Ace
·
#51993
·
|
Re: How to link 2 orders on 2 different contracts so that the 2nd one is executed only if the 1st one gets filled and have this sit on the IB side?
Jurgen, Do you think it checks for any execution or a full order filled? Because if as soon as one contract of the main order is filled the companion market order gets triggered with more contracts,
By
Ace
·
#51992
·
|
Re: How to link 2 orders on 2 different contracts so that the 2nd one is executed only if the 1st one gets filled and have this sit on the IB side?
This seems to confirm what I thought: They don¡¯t do string validation on the entered ¡®symbol¡¯ when entering it via the API so it just accepts anything and since it¡¯s called ¡®underlying¡¯ in
By
Bart D
·
#51991
·
|
Re: How to link 2 orders on 2 different contracts so that the 2nd one is executed only if the 1st one gets filled and have this sit on the IB side?
Thank you for letting us know. The local symbol does not seem to work and it probably needs to be what the contract calls "symbol" (though please try yourself and confirm). I tried it Sunday evening
By
J¨¹rgen Reinold
·
#51990
·
|
Re: How to link 2 orders on 2 different contracts so that the 2nd one is executed only if the 1st one gets filled and have this sit on the IB side?
Thanks J¨¹rgen! I made a quick test today an an execution condition on SPY to sell QQQ and it worked. I will try with options tomorrow using the options contract localSymbol as the symbol: IB doesn't
By
Ace
·
#51989
·
|
Re: How to link 2 orders on 2 different contracts so that the 2nd one is executed only if the 1st one gets filled and have this sit on the IB side?
Hi both, This "SPY 231108C00430000" is not the conid because I've always seen a long numeric when looking for the conid of an instrument. You can check also the conid of an options contract by
By
joanmarcel119
·
#51988
·
|
Re: How to link 2 orders on 2 different contracts so that the 2nd one is executed only if the 1st one gets filled and have this sit on the IB side?
Thanks. It will try this in the coming week when the exchange is open. I¡¯m still sceptical for 2 reasons: 1. The TWS dialog specifies to enter the ¡°underlying¡± and so that would be ¡°SPX¡± not
By
Bart D
·
#51987
·
|
Re: How to link 2 orders on 2 different contracts so that the 2nd one is executed only if the 1st one gets filled and have this sit on the IB side?
Just realized you were looking for an SPX option. As expected, TWS accepts an execution condition for "SPXW 231115C04350000" via the API as well:
By
J¨¹rgen Reinold
·
#51986
·
|
Re: How to link 2 orders on 2 different contracts so that the 2nd one is executed only if the 1st one gets filled and have this sit on the IB side?
I don't have too much hands-on experience with options, Bart. But TWS did accept an order I just placed via TWS API in a paper account with this ExecutionCondition: * symbol="SPY 231108C00430000" *
By
J¨¹rgen Reinold
·
#51985
·
|
Re: How to link 2 orders on 2 different contracts so that the 2nd one is executed only if the 1st one gets filled and have this sit on the IB side?
The "Contract ID" (aka conId) uniquely identifies all attributes of an instrument except, potentially, the exchange. When you retrieve contracts for an instrument (
By
J¨¹rgen Reinold
·
#51984
·
|
Re: How to link 2 orders on 2 different contracts so that the 2nd one is executed only if the 1st one gets filled and have this sit on the IB side?
Jurgen, thank you for the suggestion - obviously that should be the 'accepted answer' IF it works. But I'm not sure it does for a specific option contract as the OP asked for. When I try this in TWS,
By
Bart D
·
#51983
·
|
Re: How to link 2 orders on 2 different contracts so that the 2nd one is executed only if the 1st one gets filled and have this sit on the IB side?
Hi Jurgen, I think it doesn't monitor any "conid" execution, instead just symbol, sectype and exchange, does this equals to the conid of an instrument? (<TwsApiOnGroupsIo@...>)
By
joanmarcel119
·
#51982
·
|
Re: How to link 2 orders on 2 different contracts so that the 2nd one is executed only if the 1st one gets filled and have this sit on the IB side?
We don't know all requirements, but a simple Execution Condition ( https://interactivebrokers.github.io/tws-api/order_conditions.html#execution_condition ) on Order 2 should do the trick. Not sure why
By
J¨¹rgen Reinold
·
#51981
·
|
Re: How to link 2 orders on 2 different contracts so that the 2nd one is executed only if the 1st one gets filled and have this sit on the IB side?
Order.hedgeType as pair probably? Never tried this though.
By
bespalex
·
#51980
·
|
Re: Requesting HIstorical Bar Data Slower Lately?
No
By
Evgeni Andreyev
·
#51979
·
|
Requesting HIstorical Bar Data Slower Lately?
In the last two months, I've noticed my code that loops over symbols and requests historical bar data with ib_insync has significantly slowed down.? I'm aware of the pacing guidelines and stay within
By
Adam S.
·
#51978
·
|
Simulate subscription in Paper account
hi there, I have a Paper account. I have set up a subscription for reqHistoricalData as below. the contract I am using is AAPL, exchange="SMART". https://www.youtube.com/watch?v=qqlgiGQA5Vs I get the
By
carpe.spass@...
·
#51977
·
|
Re: TWS API earning dates..
Log in to the Client Portal and go to "Settings". Under "User Settings" go to "Research Subscriptions". Select "Manage Subscriptions". Turn on "Wall Street Horizon Corporate Event Data for Retail
By
Jesse Stone
·
#51976
·
|