开云体育

ctrl + shift + ? for shortcuts
© 2025 开云体育

Re: reqMktData() - not receiving open price ...

 

Maybe one of the options practitioners can add a more definitive answer, but it looks to me as if your program is correct and that no Open tick #14 is sent for certain or all option contracts. That may be an issue with the IBKR feed or just something unique to instruments of secType OPT and FOP or the exchanges.

I tried three options with my data record (one STK OPT via SMART, one ES FOP on CME, one SPX OPT on CBOE) and got these "welcome" ticks upon successful reqMktData subscription:
  • BidPrice, AskPrice - a price of -1 when exchange is closed
  • BidSize, AskSize, LastSize - a size of 0 when exchange is closed
  • Close, MarkPrice - values that look like real/correct prices
  • Halted , OptionCallOpenInterest, OptionPutOpenInterest, OptionImpliedVolatility
  • and in some cases tickOptionComputation callbacks.
闯ü谤驳别苍
?
?
?
On Tue, Oct 22, 2024 at 08:51 PM, bdcoder wrote:

Using the Interactive Brokers C# TWS API Version 10.19.04? (very new to this API).
?
I am using the reqMktData() method to retrieve market data for some option contracts.? ?I do receive live data, however, I never seem to receive the open price -- from what I can tell , the "Open Tick" tick type (14) should be included automatically when the reqMktData() method is used, but I never seem to receive this tick type.
?
Is this a bug in the API or is there something I need to do in order to retrieve this tick type?
?
Thanks in advance.


Re: Java tws api 972.03 too old? Causing errorCode 505 not found

 

开云体育

On 22-10-2024 23:05, 闯ü谤驳别苍 Reinold via groups.io wrote:

What is most amazing to me is that API 972.03 has worked for you this long, Raoul. And proof that TWS API messages can really be understood by clients and TWS/IBGW that are years apart.

Looking back at all the changes, it is indeed surprising to see that things just kept running without any issues. I vaguely remember that in the past, tws would warn if the api version is no? longer supported or upgrade is strongly suggested. Some people on the mailinglist have seen this message pop up as well.

Eventually you should consider adopting a more modern API version, but I can see at least two scenarios that could buy you some time:
  • It sounds like you had no problems with the most recent stable TWS/IBGW version 10.19.2p. If you still have an installer (or can get your hands on one) TWS 10.19.2p will probably be able to run for several more months before IBKR requires an update. In these cases it is always advantageous to run the "standalone" versions that do not automatically update.

That should probably work for a while, but I like how tws is running nicely with the auto update and all.

  • I recently moved from TWS 10.19.2p to 10.30.1l myself (standalone versions) and I saw an option in the API Global Configuration that I had not noticed before. Is is called "Maintain connection upon receiving incorrectly formatted fields" and is disabled by default. Assuming your mismatch does not cause any functional issues, enabling this option may at least maintain the connection to TWS/IBGW

Nice suggestion you found there, but unfortunately it didn't prevent the disconnect (all my tws interactions are within try catch). The weird thing is that the order is placed correctly, which seems like the most critical part to me, but yet there's some other fatality.

I'll take the big jump to the current stable version instead and start reading through the (updated) manual.

But it sound like there is a "long weekend and several six packs" event coming up for you.


Oh I like those weekends, even more so with an api upgrade ;-)

As always, thanks again for your help 闯ü谤驳别苍!

Greetings,
Raoul


reqMktData() - not receiving open price ...

bdcoder
 

Using the Interactive Brokers C# TWS API Version 10.19.04? (very new to this API).
?
I am using the reqMktData() method to retrieve market data for some option contracts.? ?I do receive live data, however, I never seem to receive the open price -- from what I can tell , the "Open Tick" tick type (14) should be included automatically when the reqMktData() method is used, but I never seem to receive this tick type.
?
Is this a bug in the API or is there something I need to do in order to retrieve this tick type?
?
Thanks in advance.


Re: Finstat query not working

 

These are strong words, Marc, that really have no place here in our group.

From your last two posts it seems to me that there is a significant discrepancy between your expectations and what TWS API really is. I understand that is frustrating but it does not give you the right to dump your frustration onto our 6,000++ members.

I have put your account "on moderation" for now.

As we discussed in the topic "Is reqFundamentalData broken?" in June, reqFundamentalData() has been deprecated for a while now so that you had to be prepared for degraded service or termination at any time. I don't have the exact deprecation notice in front of me, but it was some time after TWS 10.10 when the Wall Street Horizon (WSH) data offerings became more complete and stable.

The TWS API documentation chapter "Fundamental Data" exclusively speaks about the WSH offerings and reqFundamentalData() has not been mentioned in a very long time.

And while IBKR support is in no way perfect, please keep in mind that they work within the scope that is clearly defined in the Introduction section of the TWS API documentation:

The TWS API is a message protocol as its core, ...

Our TWS API components are aimed at experienced professional developers ... . Before you use TWS API, please make sure you fully understand the concepts of OOP and other Computer Science Concepts. Regrettably, Interactive Brokers cannot offer any programming consulting.?

"Professional" is probably not required, but I do agree that experience specifically in message/event driven designs (or at least the willingness to learn) is essential. If that is not for you, clearly, TWS API is not for you either.

For most of us, TWS API has proven itself a high performance, extremely flexible, and very robust offering that can be adapted to any application architecture and virtually any programming language and style. And that for more than two decades.

闯ü谤驳别苍


Re: Finstat query not working

 

FUCK INTERACTIVE BROKERS!?

This shit support in fact told me that they shut off their fundamental data API.

I'm quite sure there is a way to further fetch financial Statements but they do not want to tell me how.?

I'll leave this fucking shit Broker!!!!

ApiMadness via <mwboxtwo=[email protected]> schrieb am Di., 22. Okt. 2024, 08:52:

@闯ü谤驳别苍: Many thanks for this information! I didn?t recall that thread opened by Jende before.?

Would be nice to know which version he reinstalled but I?ll try a reinstall as well and hope it works.?

This API is the most frustrating thing I?ve ever worked with! One issue after another and super complicated to use for non professionell coders.?

It?s unbelievable sometimes and their support sucks so much!

P.S. I?ll mind your note as well!

Cheers
Marc

Am Di., 22. Okt. 2024 um 04:20?Uhr schrieb 闯ü谤驳别苍 Reinold via <TwsApiOnGroupsIo=[email protected]>:
You may recall the thread "Is reqFundamentalData broken?" from June. My results today with TWS 10.30.1l are identical to those I got in June with 10.19:
?
?
闯ü谤驳别苍
?
PS. Let's not start multiple threads for the same problem. I will merge your thread "430 Error Missing report type" from this morning into this one.
?
On Mon, Oct 21, 2024 at 06:43 PM, ApiMadness wrote:
Please can someone tell me if fundamental data request with report type "finstat" is working on your TWS?
?
Since my last TWS update I get a 430 error, telling me that fundamental data is not available, no matter which ticker I try. Estimates and snapshot requests work fine.?
?
Cheers
Marc?


Re: Java tws api 972.03 too old? Causing errorCode 505 not found

 

What is most amazing to me is that API 972.03 has worked for you this long, Raoul. And proof that TWS API messages can really be understood by clients and TWS/IBGW that are years apart.

API 972.03 must be somewhere around API level 105, just shortly after the magic V100 level that made it possible for clients and TWS/IBGW to understand vastly different protocol levels.? API 10.30.1 is level 187 and has undergone more than 80 sometimes radical changes. Among them the chance from int to long for size fields, the subsequent change to a Decimal type, and the introduction of may new fields in Contract and Order objects.

Eventually you should consider adopting a more modern API version, but I can see at least two scenarios that could buy you some time:
  • It sounds like you had no problems with the most recent stable TWS/IBGW version 10.19.2p. If you still have an installer (or can get your hands on one) TWS 10.19.2p will probably be able to run for several more months before IBKR requires an update. In these cases it is always advantageous to run the "standalone" versions that do not automatically update.
  • I recently moved from TWS 10.19.2p to 10.30.1l myself (standalone versions) and I saw an option in the API Global Configuration that I had not noticed before. Is is called "Maintain connection upon receiving incorrectly formatted fields" and is disabled by default. Assuming your mismatch does not cause any functional issues, enabling this option may at least maintain the connection to TWS/IBGW

But it sound like there is a "long weekend and several six packs" event coming up for you.

闯ü谤驳别苍
?
On Tue, Oct 22, 2024 at 03:22 PM, Raoul Suurmeijer wrote:

Hello,

Starting today, after placing an order I'm getting this strange error all of a sudden:

id=-1 errorCode=505 msg=Fatal Error: Unknown message id.

It comes back via the general error method??public void error(Exception e) in the implementation of EWrapper. Nothing has changed in the code, it's the same binary jar.

The order is placed correctly though, but after the error, tws disconnects.? From the 972 api doc, there does not seem to be an error code 505. And the more current documenation (IBKR Campus) this error says indeed Fatal Error: Unknown message id.

My TWS is on 10.30.1l of Aug 13 2024. My feeling is that the 972 api is just too old, but I may have missed something. I believe tws would show a warning when an certain api is getting outdated.

Is anyone else working succesfully with api 972.03 and tws 10.30.1l ?

Changing everything to api 1019.04 does have a big impact so it seems. It's not just a few parameters and types, but reqMktData and depth seem to work in a different way. The demo client app 1019.04 works fine, so I'll just have step through that I think.

Or is there an api version that does work, but with lower impact? So that I have more time to make the big jump to 1019.04 which will happen some day of course.

Thanks for any advice!

Greetings,
Raoul









Java tws api 972.03 too old? Causing errorCode 505 not found

 

开云体育

Hello,

Starting today, after placing an order I'm getting this strange error all of a sudden:

id=-1 errorCode=505 msg=Fatal Error: Unknown message id.

It comes back via the general error method??public void error(Exception e) in the implementation of EWrapper. Nothing has changed in the code, it's the same binary jar.

The order is placed correctly though, but after the error, tws disconnects.? From the 972 api doc, there does not seem to be an error code 505. And the more current documenation (IBKR Campus) this error says indeed Fatal Error: Unknown message id.

My TWS is on 10.30.1l of Aug 13 2024. My feeling is that the 972 api is just too old, but I may have missed something. I believe tws would show a warning when an certain api is getting outdated.

Is anyone else working succesfully with api 972.03 and tws 10.30.1l ?

Changing everything to api 1019.04 does have a big impact so it seems. It's not just a few parameters and types, but reqMktData and depth seem to work in a different way. The demo client app 1019.04 works fine, so I'll just have step through that I think.

Or is there an api version that does work, but with lower impact? So that I have more time to make the big jump to 1019.04 which will happen some day of course.

Thanks for any advice!

Greetings,
Raoul









Re: All or None order for multi-leg options trades

 

It depends. If you submit a standard spread like for example a call spread that is supported by the exchange you can submit it as guaranteed. Then yo ucan be sure that you don't end up with a "half-filled" spread.
?
More exotic combos are always not-guaranteed. However in liquid instruments this usually is no problem. I've submitted countless non-guaranteed spreads and I actually can't remember that one was only filled partially.


Re: Finstat query not working

 

@闯ü谤驳别苍: Many thanks for this information! I didn?t recall that thread opened by Jende before.?

Would be nice to know which version he reinstalled but I?ll try a reinstall as well and hope it works.?

This API is the most frustrating thing I?ve ever worked with! One issue after another and super complicated to use for non professionell coders.?

It?s unbelievable sometimes and their support sucks so much!

P.S. I?ll mind your note as well!

Cheers
Marc

Am Di., 22. Okt. 2024 um 04:20?Uhr schrieb 闯ü谤驳别苍 Reinold via <TwsApiOnGroupsIo=[email protected]>:

You may recall the thread "Is reqFundamentalData broken?" from June. My results today with TWS 10.30.1l are identical to those I got in June with 10.19:
?
?
闯ü谤驳别苍
?
PS. Let's not start multiple threads for the same problem. I will merge your thread "430 Error Missing report type" from this morning into this one.
?
On Mon, Oct 21, 2024 at 06:43 PM, ApiMadness wrote:
Please can someone tell me if fundamental data request with report type "finstat" is working on your TWS?
?
Since my last TWS update I get a 430 error, telling me that fundamental data is not available, no matter which ticker I try. Estimates and snapshot requests work fine.?
?
Cheers
Marc?


Re: Finstat query not working

 

You may recall the thread "Is reqFundamentalData broken?" from June. My results today with TWS 10.30.1l are identical to those I got in June with 10.19:
?
?
闯ü谤驳别苍
?
PS. Let's not start multiple threads for the same problem. I will merge your thread "430 Error Missing report type" from this morning into this one.
?
On Mon, Oct 21, 2024 at 06:43 PM, ApiMadness wrote:

Please can someone tell me if fundamental data request with report type "finstat" is working on your TWS?
?
Since my last TWS update I get a 430 error, telling me that fundamental data is not available, no matter which ticker I try. Estimates and snapshot requests work fine.?
?
Cheers
Marc?


Finstat query not working

 

Please can someone tell me if fundamental data request with report type "finstat" is working on your TWS?

Since my last TWS update I get a 430 error, telling me that fundamental data is not available, no matter which ticker I try. Estimates and snapshot requests work fine.?

Cheers
Marc?


Interactive Brokers TWS API - how are standard deviation moves being calculated?

bdcoder
 

Using the Interactive Brokers C# TWS API Version 10.19.04, I am wanting to calculate the min and max values for the various standard deviation groups as displayed in the Trader WorkStation (TWS) for option chains, i.e.:
?
?

In the screen snapshot above the strike prices are grouped by color to indicate the number of standard deviation moves (I added the red lines to separate the color groups).

I want to know how the min and max values in each group are calculated or is there an API call that does this for you?

Unfortunately, the TWS code is NOT open source (as far as I know), so I was hoping someone could shed some light on how this is calculated or provide a resource or algorithm for doing so.

Thanks in advance.


Re: Finstat query not working

 

Update: I updated my API Version now and tried to fetch data with their current ActiveX sample file.?

All queries work fine except "finstat".

TWS throws the same error as mentioned before.

I guess they do have a temporary interruption of this service.

Would be very nice to learn if someone else has the same issue.

Cheers
Marc

Am Mo., 21. Okt. 2024 um 18:37?Uhr schrieb ApiMadness via <mwboxtwo=[email protected]>:

Hi guys,

after my TWS stable Version has been updated with todays start all over sudden my API doesn?t deliver any fundamental data no more.

Doesn?t matter which stock I try, I always receive an error which literally translated says: "430 - No fundamental data available for this security. Missing reportType"

Is somebody dealing with the same issue today?

Cheers
Marc




Finstat query not working

 

Hi guys,

after my TWS stable Version has been updated with todays start all over sudden my API doesn?t deliver any fundamental data no more.

Doesn?t matter which stock I try, I always receive an error which literally translated says: "430 - No fundamental data available for this security. Missing reportType"

Is somebody dealing with the same issue today?

Cheers
Marc




Re: Error 105 - Order being modified does not match original order

 

12 years later, but what a life savor I refactored my code and couldn't modify the bag! You saved me!!!!


Re: what data subscription do I need to get real-time data via the TWS API?

 

开云体育

This historical data request works fine for me, returning five 1-minute bars to 20241017 15:59:00 US/Eastern (or to 20241018 05:50:00 if “Use RTH=0”):

?

Contract.Symbol=QQQ

Contract.Sectype=STK

Contract.Exchange=SMART

Contract.Currency=USD

Include expired=0

End date=20241018 05:50:19 US/Eastern

Bar Size=1 min

Duration=300 S

Use RTH=1

What to show=TRADES

Date format=1

KeepUpToDate=0

Options=

?

If you use reqMktData, you have to build the bars yourself from the tick data stream. This is more work. If you only need completed bars, and the delay in retrieving the historical data is acceptable, then the historical data should be fine (and will actually be more accurate, since the realtime data doesn’t include all price ticks, so occasionally bar highs and lows may be a tick or two out for bars constructed from the tick stream).

?

Richard

?

?

From: [email protected] <[email protected]> On Behalf Of ?kos Maróy
Sent: 18 October 2024 11:32
To: [email protected]
Subject: Re: [TWS API] what data subscription do I need to get real-time data via the TWS API?

?

I'm requesting 'recent' market data in 1 minute trade bars, that is, from the past few minutes, as this is what my algorithm needs. and I'm getting this error message if the requested timeframe?is less than 15 minutes,?while beyond this timeframe I'm getting the trade bars requested. Would reqMktData give me desired results?

?

On Fri, Oct 18, 2024 at 11:58?AM bespalex via <besp.mail=[email protected]> wrote:

Looks like you are trying to request historical data, not "live" data.

Use reqMktData to subscribe and tickPrice to receive streaming market data.

?

?


Re: what data subscription do I need to get real-time data via the TWS API?

 

I'm requesting 'recent' market data in 1 minute trade bars, that is, from the past few minutes, as this is what my algorithm needs. and I'm getting this error message if the requested timeframe?is less than 15 minutes,?while beyond this timeframe I'm getting the trade bars requested. Would reqMktData give me desired results?


On Fri, Oct 18, 2024 at 11:58?AM bespalex via <besp.mail=[email protected]> wrote:
Looks like you are trying to request historical data, not "live" data.
Use reqMktData to subscribe and tickPrice to receive streaming market data.
?
?


Re: what data subscription do I need to get real-time data via the TWS API?

 

Looks like you are trying to request historical data, not "live" data.
Use reqMktData to subscribe and tickPrice to receive streaming market data.
?
?


what data subscription do I need to get real-time data via the TWS API?

 

Hi,

What kind of data subscription do I need to be able to access live market data through the TWS API in python? This is for US stock data such as QQQ or NVDA.


I've subscribed to the following data packages:

NASDAQ (Network C/UTP)(NP,L1)
NYSE (Network A/CTA) (NP,L1)
NYSE American, BATS, ARCA, IEX, and Regional Exchanges (Network B) (NP,L1)

But when I'm requesting live or close to live data via the python API, I'm not getting any data back, but I'm getting an error, for example:

ERROR Error 162, reqId 35: Historical Market Data Service error message:HMDS query returned no data: QQQ@SMART Trades, contract: Stock(symbol='QQQ', exchange='SMART', currency='USD')

I seem to be getting the live data in Trader Workstation. I spent over an hour reading up on your market data offerings, but I just can't figure out what I need to do.

Can you please share specifics?

Best regards,

?kos


Re: Close Orders Rejected

 

Thank you all for the valuable information. I knew that I would get more information here than from IBKR support. I've just lowered the trading size until
It didn't happen anymore.