Keyboard Shortcuts
Likes
- Twsapi
- Messages
Search
Re: 10326 - OCA group revision is not allowed
Today,?OcaType 2 works with both 10.30 and 10.34, at least in a paper trading account.? I will try it in a live account with?version 10.30 this evening, and if it works, in a live account during the day tomorrow. On Tue, Feb 11, 2025 at 2:22?PM Jimmy via <jimmydtalbot=[email protected]> wrote:
|
Re: 10326 - OCA group revision is not allowed
If one order gets 1 contract filled, I don't want the other orders in the OCA group to be cancelled immediately; I want the other orders to remain active, with 1 contract to get subtracted from their?quantity.? Only when an entire order in the?OCA group is filled do I want the other orders to be cancelled.? This is the "reduce" behavior I believe (at least it was until now). I could live with OcaType 2 or 3, but right now, as far as I can tell, neither works with TWS 10.30+. On Tue, Feb 11, 2025 at 12:42?PM ´³¨¹°ù²µ±ð²Ô Reinold via <TwsApiOnGroupsIo=[email protected]> wrote:
|
Re: 10326 - OCA group revision is not allowed
Thanks for the clarification, Jimmy. I had responded to when you had said in an earlier reply "I see this message when trying to modify the limit or stop price of an OCA order" What are you trying to achieve with the OCA order? Do you want one and only one of those two orders to fill? If that is the case, wouldn't OCA Type 1 "CancelWithBlocking" be the type you are looking for? Types 2 and 3 are "Reduce" types with and without blocking. ´³¨¹°ù²µ±ð²Ô ? On Tue, Feb 11, 2025 at 11:18 AM, Jimmy wrote:
|
Re: 10326 - OCA group revision is not allowed
Thanks for the reply ´³¨¹°ù²µ±ð²Ô.
?
At this time, I'm not modifying orders. I am just submitting two single-legged option OCA bracket orders, one with a stop price, one with a limit price.
?
I am testing using a paper trading account.
I unchecked the "bypass No Overfill Protection precaution for destinations where implied natively" checkbox in API -> precautions, but I can't get the dialog to come up again (I don't know if the behavior would be the same a live account).
?
I tested with both the current stable version (10.30.1t) and latest (10.34.1b); the results are the same
?
When submitting Option OCA orders with OcaType = 2 (which the precaution dialog implies is what is needed), they get rejected with "OCA handling method mismatch".
When using OcaType = 3, they get rejected with "Invalid parameter for OCA group for exchange SMART".
?
OcaType = 3 works fine in 10.19 and before (that's what I've always used). However, I tried OcaType = 2 with 10.19 in a live account yesterday, and I also got the same error message "Invalid parameter for OCA group for exchange SMART".
?
Is anyone else using OCA orders with options? Is it working for you in 10.30+? What OcaType are you using??
?
Thanks
Jimmy |
Re: 10326 - OCA group revision is not allowed
You can permanently enable/disable various order precautions in the global settings of TWS and IBGW under API --> Precautions. When you call placeOrder() to modify the OCA order, what kind of Order object do you use?
Also, do you modify OCA order before or after the parent order has been filled? ´³¨¹°ù²µ±ð²Ô ? ?
On Mon, Feb 10, 2025 at 07:08 PM, Jimmy wrote:
|
Re: 10326 - OCA group revision is not allowed
Revisiting this as the deadline to upgrade to 10.30.1t looms.
?
Raoul, my OCA orders' parent id is 0 already, so unfortunately I think the issue I'm encountering is different than what your post suggests.
?
The first time I run 10.30.1t and submit (via the API) OCA orders, a dialog comes up that says:
?
Overfill Protection Precaution
Invalid parameter for OCA group for exchange SMART. Overfill protection is implied.
Do you want to apply the correct parameter?
?
I choose yes and check "Don't display this message again".
?
Afterwards, the OCA orders get submitted, but they get rejected with "OCA handling method mismatch".
?
I brought this up with IB in October, yet the issue persists in "stable" version 10.30.1t.
?
Has anyone here figured out a solution to this "OCA handling method mismatch"?
My previous tests showed this was working in 10.32, but I will try this again tomorrow to confirm (likely in the latest offline version 10.34.1a, since 10.32 is not available anymore).
?
Thanks! |
Re: Automatic bid or ask price change until funded
. I found the IB algo etc, but this seems to peg the order to the midpoint and changes the price based on market price changes. Within the api I'd like to give my order a start price and have the algo add say 0.1$ per second until the buy is filled. So regardless of market price changes in that one second. |
Re: TrailStopPrice is not correct in the OrderStatusEvent
¿ªÔÆÌåÓýIs this email intended for me? -- Secured with Tuta Mail: Feb 10, 2025, 01:23 by TwsApiOnGroupsIo@...:
|
Re: TrailStopPrice is not correct in the OrderStatusEvent
You might want to ask this question in the ib_sync/ib_async group. For IBKR provided TWS API implementations., openOrder() callbacks provide updated Order objects each time the trail order stop price has been adjusted. The "trailStopPrice" field of the Order object from the last openOrder() callback before the order executes shows the same price as TWS. ´³¨¹°ù²µ±ð²Ô ? On Sun, Feb 9, 2025 at 09:34 AM, <hadry.hamza@...> wrote:
|
Automatic bid or ask price change until funded
¿ªÔÆÌåÓýTws interactive brokers visual basic api question Is it possible within the IB Api (I use? the VB version) to use an order type that based on a user set bid ( or ask ) price, walks the price up ( or down ) in preset steps until the order is filled?
|
Re: ib market data. is it clean and any good alterantive sources?
¿ªÔÆÌåÓýI used DTN-IQ for many years.? It is very affordable, but it does not give historical BBO data, only trades...On 2/8/2025 3:17 PM, Dale Joyce via
groups.io wrote:
|
TrailStopPrice is not correct in the OrderStatusEvent
Hello, I'm trying to get the trailing trigger price for the filled trail order (not the execution price) for that I'm using the orderStatusEvent : but when checking the TrailStopPrice I don't see the same price as what I see in the TWS app: ? ? here is what I see in the TWS app 'the price = 364.38: ? ? Do you have any idea if this is a common issue here? and how can I get the correct information please? ? Thanks, ? |
Bug and fix in TWS python API 10.34 (unknown module "server_versions")
Hello all - I just wanted to share a bug and fix I found in the latest version. Using both the windows and mac/linux version 10.34 API, you will error out if you do:
?
from ibkr.client import *
?
for not being able to find the "server_versions" module. There's a typo in client.py. The fix is to go to line 138 of client .py and change
?
from server_versions import MIN_SERVER_VER_CURRENT_TIME_
?
to
?
from ibapi.server_versions import MIN_SERVER_VER_CURRENT_TIME_
|
Re: ib market data. is it clean and any good alterantive sources?
I'm using IB to place trades and use a different data source. I pretty much restrict my trading to a handful of US equities. This is not a recommendation to use? the data source I'm using, its just what works well for me. I use the market feed at and have been for about 4 years now. I've noticed some negative posts on different forums about their tech support being non responsive but I believe I haven't had any problems with them.
?
You have to understand a great deal? of IB's customers are in the retail market, and so are the other platforms like Charles Schwab. And so you can expect a level of service commensurate with that model. I'm located in the mid-west so your mileage may vary from mine but I have found that the data from activetick arrives on average between 1 to 1/2 seconds faster than IB delivers it. But IB is faster than any other trading platform I've used. TDAmeritrade under Charles Schwab comes in close to 3 seconds later. It makes me wonder if they are getting their data from the same source.
?
It all depends on your needs. Most traders wont benefit from that. But if yours does, then this approach will put you close to the top of the retail market and just below the big wall street firms.
?
I would be interested in hearing from others that have bench-marked other data providers. But as a rule of thumb, IMHO you can throw out any REST API implementations and certainly an interpreted language like Python. Python is certainly good for back testing, but its obliviously too slow if your needs are receiving active subscription streams, doing complex math on the fly and making a decision to send a position order in real time.
?
Cheers |
Re: ib market data. is it clean and any good alterantive sources?
It seems fairly decent. If you want the best, DTN-IQ can't be beat. On Sat, Feb 8, 2025 at 2:29?PM ds-avatar via <dimsal.public=[email protected]> wrote:
|
Re: ib market data. is it clean and any good alterantive sources?
This really needs to be more specific as to which market data you are particularly interested in. Historical/real-time? Prices, quotes, earnings, ratings, news? For prices - every tick or OHLC bars such as 1-second or EOD? In my own projects, I'm now phasing out any IBKR API market data as a single source since for my purposes (perhaps quite specific ones, admittedly) they time and again proved to be somewhat unreliable, but even then it would be hard for me to give Polygon, which I also use quite a bit, a blanket recommendation because while their data quality seems mostly beyond reproach, some of their services require a lot of incremental labor in my project to be made use of, all the while coming at a pretty steep price. But then I guess compared to Bloomberg Terminal everything must be kind of cheap.
?
--
Best, DS |
Re: API documentation location?
I believe that is all we have now and my only hope is that we will not need one day to pass references to the Wayback machine between each other in order to understand the workings of API beyond those few dumbed-down cheat-sheets and object property dumps? on the "campus".
?
BTW if I may add, I'd appreciate if the group could help find a way to download the original TWS API web site to a local Windows computer for personal use (I'm sure this won't violate any licenses), because I'm really worried this unmaintained piece of precious of knowledge will go down some day still without proper substitute, let alone meaningful improvements. Neither web browsers nor WinHTTack managed to download it completely and with working navigation for me so far.
?
--
Best, DS |
API documentation location?
Hi all, I've been forced to update my code (thanks IB!) but I can't find an up-to-date version of? which is what I used the first time. Any ideas where the newer functionality is documented?? appears to not have a search function and also appears to not define any functions anywhere. Thanks in advance :) M +44 (0) 7528 551604? |