开云体育

ctrl + shift + ? for shortcuts
© 2025 Groups.io

Re: reqSecDefOptionParams returns wrong trading class

 

Also if i try getting data for AAPL, TSLA, and other stocks i get back trading class as AAPL, TSLA, and was thinking is there any method in which we can define that we just need the same trading class back as what we have provided.
?


Re: reqSecDefOptionParams returns wrong trading class

 

?
so this is NVDA
and this is 2NVDA, i meant there is nothing in 2NVDA
and even though market is closed u can get historical data for the stock, so basically why u getting 0s for everything is not because market is closed because 2nvda doesnt have anything
?


Re: reqSecDefOptionParams returns wrong trading class

 

开云体育

If I call reqMktData with this contract:

?

厂测尘产辞濒=”狈痴顿础”

厂别肠迟测辫别=”厂罢碍”

Lasttradedator contract monthe=”20250425”

Strike=124

搁颈驳丑迟=”颁础尝尝”

贰虫肠丑补苍驳别=”厂惭础搁罢”

颁耻谤谤别苍肠测=”鲍厂顿”

罢谤补诲颈苍驳肠濒补蝉蝉=”2狈痴顿础”

?

I get this data returned:

?

20250414 20:38:40.292? id=5 MarketDataType=Realtime

20250414 20:38:40.292? id=3 Bid=-1 size=0 Can Auto Execute

20250414 20:38:40.292? id=3 Ask=-1 size=0 Can Auto Execute

20250414 20:38:40.292? id=3 BidSize=0

20250414 20:38:40.292? id=3 AskSize=0

20250414 20:38:40.293? id=3 LastSize=0

20250414 20:38:40.293? id=3 Close=0.85 size=0

20250414 20:38:40.293? id=3 Halted=0

20250414 20:38:40.293? id=0 Bid=-1 size=0 Can Auto Execute

20250414 20:38:40.293? id=0 Ask=-1 size=0 Can Auto Execute

20250414 20:38:40.293? id=0 BidSize=0

20250414 20:38:40.293? id=0 AskSize=0

20250414 20:38:40.293? id=0 LastSize=0

20250414 20:38:40.293? id=0 Close=0.85 size=0

20250414 20:38:40.293? id=0 Halted=0

20250414 20:38:40.293? id=5 Bid=-1 size=0 Can Auto Execute

20250414 20:38:40.293? id=5 Ask=-1 size=0 Can Auto Execute

20250414 20:38:40.293? id=5 BidSize=0

20250414 20:38:40.293? id=5 AskSize=0

20250414 20:38:40.293? id=5 LastSize=0

20250414 20:38:40.293? id=5 Close=0.85 size=0

20250414 20:38:40.293? id=5 Halted=0

20250414 20:38:41.296? id=5 Halted=0

?

Not very interesting data because the market is closed, but it rather indicates that your claim of no data is incorrect.

?

Richard

?

?

?

From: twsapi@groups.io <twsapi@groups.io> On Behalf Of skateriit via groups.io
Sent: 14 April 2025 20:42
To: twsapi@groups.io
Subject: [TWS API] reqSecDefOptionParams returns wrong trading class

?

Hi guys,?

?

so i have a complete pipeline setup for the data back and through my application for options data.

The only problem i am facing right now is that if i am trying to get data for NVDA via reqSecDefOptionParam, i am getting back 2NVDA as trading class and that doesnt have data.

Now i am stuck what to do, its similar with AMZN, i am getting back 2AMZN as trading class with no data.

?

?


reqSecDefOptionParams returns wrong trading class

 

Hi guys,?
?
so i have a complete pipeline setup for the data back and through my application for options data.
The only problem i am facing right now is that if i am trying to get data for NVDA via reqSecDefOptionParam, i am getting back 2NVDA as trading class and that doesnt have data.
Now i am stuck what to do, its similar with AMZN, i am getting back 2AMZN as trading class with no data.
?
?


Re: reqContractDetails for past dates

 

You get what you ask for based upon the useRTH parameter in your request.

闯ü谤驳别苍

?

On Mon, Apr 14, 2025 at 08:10 AM, Yonatan Doron wrote:

Thanks! That is close to what I'm looking for.
However it seems that only the trading hours are returned but not liquid hours (market).
For example, this is a sample of the returned data, whereas I'm looking to also get something like the 9:30-16:00 time range.
Am I missing anything?
?


Re: reqContractDetails for past dates

 

Thanks! That is close to what I'm looking for.
However it seems that only the trading hours are returned but not liquid hours (market).
For example, this is a sample of the returned data, whereas I'm looking to also get something like the 9:30-16:00 time range.
Am I missing anything?

?[
? ? ? ? {
? ? ? ? ? ? "startDateTime": "20230131-04:00:00",
? ? ? ? ? ? "endDateTime": "20230131-20:00:00",
? ? ? ? ? ? "refDate": "20230131"
? ? ? ? },
? ? ? ? {
? ? ? ? ? ? "startDateTime": "20230201-04:00:00",
? ? ? ? ? ? "endDateTime": "20230201-20:00:00",
? ? ? ? ? ? "refDate": "20230201"
? ? ? ? },
? ? ? ? .....
]

On Sun, Apr 13, 2025 at 5:42?PM 闯ü谤驳别苍 Reinold via <TwsApiOnGroupsIo=Reinold.org@groups.io> wrote:

Take a look at whatToShow "SCHEDULE" for . You will receive HistoricalSession objects via the callback.
?
闯ü谤驳别苍
?
?
On Sun, Apr 13, 2025 at 08:49 AM, <yonatand80@...> wrote:
I have historical trading data from past years (received with reqHistoricalData) for a specific contract.
I need to know the trading hours / liquid hours for this contract for each day in this historical period.
?
The reqContractDetails only returns trading hours for the upcoming few days, but I need it for past periods.
Is there any way to get this information?


Re: very different trade volume data compared to other data providers

 

You should take a look at our archive. There are many detailed discussions about this topic, but here the highlights:
  • There is no standard which trades are included
  • When you request data, are you limiting the request contract to just one exchange or do you get data for all exchanges
  • IBKR generally does only include volume from "reportable trades" in historical bar data. The non-reportable volume of an instrument can be sizable.
You could grab for QQQ for one of the days. The cumulative volume will likely be very close or even identical to the data you received from the other provider. The and fields in the objects will tell you exactly which trades were non-reportable and for what reason. You will probably see a few large block transfers, odd-lots, and the auctions at market open/close.
?
闯ü谤驳别苍
?
On Sun, Apr 13, 2025 at 09:14 AM, ?kos Maróy wrote:

Hi,
?
I'm wondering why I'd be getting very different trade volume data from IB via TWS when compared to other data providers? Here's a sample for 1 day trade bar 'volume' data for QQQ, the first data column is the one from another reputable data provider while the second data column is what IB is returning:
?
2024-12-10? 24237090.0 16029341.0
2024-12-11? 32098579.0 19361377.0
2024-12-12? 23492804.0 12993718.0
2024-12-13? 28656855.0 16873336.0
2024-12-16? 31918863.0 17959509.0
2024-12-17? 28106770.0 17517398.0
2024-12-18? 54521255.0 33075903.0
2024-12-19? 46005404.0 29951593.0
2024-12-20? 60086561.0 30793425.0
2024-12-23? 29346800.0 16918299.0
?
Using useRTH=False returns somewhat higher volumes, but still not close to other sources.
?
Otherwise, the open high low close values are very similar, at most a $.02 difference for most rows.
?
I wonder what the source of the difference could be?
?
?
?kos
?
?


Re: reqContractDetails for past dates

 

Take a look at whatToShow "SCHEDULE" for . You will receive HistoricalSession objects via the callback.
?
闯ü谤驳别苍
?
?
On Sun, Apr 13, 2025 at 08:49 AM, <yonatand80@...> wrote:

I have historical trading data from past years (received with reqHistoricalData) for a specific contract.
I need to know the trading hours / liquid hours for this contract for each day in this historical period.
?
The reqContractDetails only returns trading hours for the upcoming few days, but I need it for past periods.
Is there any way to get this information?


very different trade volume data compared to other data providers

 

Hi,

I'm wondering why I'd be getting very different trade volume data from IB via TWS when compared to other data providers? Here's a sample for 1 day trade bar 'volume' data for QQQ, the first data column is the one from another reputable data provider while the second data column is what IB is returning:

2024-12-10? 24237090.0 16029341.0
2024-12-11? 32098579.0 19361377.0
2024-12-12? 23492804.0 12993718.0
2024-12-13? 28656855.0 16873336.0
2024-12-16? 31918863.0 17959509.0
2024-12-17? 28106770.0 17517398.0
2024-12-18? 54521255.0 33075903.0
2024-12-19? 46005404.0 29951593.0
2024-12-20? 60086561.0 30793425.0
2024-12-23? 29346800.0 16918299.0

Using useRTH=False returns somewhat higher volumes, but still not close to other sources.

Otherwise, the open high low close values are very similar, at most a $.02 difference for most rows.

I wonder what the source of the difference could be?


?kos



reqContractDetails for past dates

 

I have historical trading data from past years (received with reqHistoricalData) for a specific contract.
I need to know the trading hours / liquid hours for this contract for each day in this historical period.
?
The reqContractDetails only returns trading hours for the upcoming few days, but I need it for past periods.
Is there any way to get this information?


Re: Google Protocol Buffers usage in the latest Java API

 

It will take a while to convert over to this new API design.?? I think its a mistake to be doing this to a mature product that essentially has no new or important trading method additions pending any time soon.
?
But it does give me an opportunity to erase so much old code.? By making the next release a 10.35++ only and forcing a cutoff point, I can eliminate hundreds of? "if ServerVer > x" tests and plenty of "if ServerVer < 201" code too.
?
It would be nice to know how much of this API this ProtoBuf will eventually be applied too.? Obviously this first version is just the starting point.


Re: TWS Time zone

 

My problem is TWS is showing CDT after logon, even though it's configured to EDT in the "more options" screen available at logon.? I have another Window's 11 computer that doesn't have this problem.


Re: Google Protocol Buffers usage in the latest Java API

 

开云体育

Hi 闯ü谤驳别苍,

?

Many thanks. So, it appears we have some time but perhaps not to get third party frameworks up to date.

?

?

Pranav


Re: Google Protocol Buffers usage in the latest Java API

 

Yes, Pranav. All TWS API clients that want to communicate with the capabilities of API 10.35.01 (server version 201) and higher will have to be able to send and receive protobuf formatted messages. IBKR has made those changes for all languages they support (including the IBKR Python API), but independently developed APIs including ib_async will have to add those capabilities eventually as well, or they are limited to requests, responses, and classes available in 10.34.02.

For the foreseeable future, clients that implement API 10.34.02 or below will still be able to communicate with TWS/IBGW 10.35 and above. That may be sufficient for many users for quite some time.

In API 10.35.01, IBKR has added protobuf formatted messages for the following items (though the original messages are still supported for clients with APs below 10.35):

  • one request: reqExecutions()
  • two responses: execDetails() and execDetailsEnd()
  • five classes: ComboLeg, Contract, DeltaNeutralContract, Execution, and ExecutionFilter

The classes and functionality of the request and the responses are identical to those in 10.34.02, except that ExecutionFilter in 10.35 has two new fields: the interger field "lastNDays" and the list "specificDates".

闯ü谤驳别苍

?

?
On Thu, Apr 3, 2025 at 07:20 PM, Pranav Lal wrote:

Hi Richard,

I see from the documentation that python is supported by protocol buffers. Does this mean that third party APIs like ib_async are impacted by this change?

Pranav


Re: TWS Time zone

 

TWS switched mostly to canonical tz-database designations some time ago. America/New_York is in EDT, together with a few other US and non-US canonical regions from Canada and the Caribbean, so a any of these are equivalent to EDT.
--
Best,
DS


Re: Google Protocol Buffers usage in the latest Java API

 

Hi Richard,

I see from the documentation that python is supported by protocol buffers. Does this mean that third party APIs like ib_async are impacted by this change?

Pranav


Re: Google Protocol Buffers usage in the latest Java API

 

开云体育

No, the ActiveX API is a wrapper around the C-Sharp API, and this change is internal to the C-Sharp API so it won’t look any different to the ActiveX code.

?

Richard

?

From: twsapi@groups.io <twsapi@groups.io> On Behalf Of joanmarcel119 via groups.io
Sent: 03 April 2025 22:31
To: twsapi@groups.io
Subject: Re: [TWS API] Google Protocol Buffers usage in the latest Java API

?

What about the API implementations for Excel & vba? Are those affected?

?

Thank you


Re: Google Protocol Buffers usage in the latest Java API

 

What about the API implementations for Excel & vba? Are those affected?

Thank you

El jue, 3 abr 2025 a las 22:09, noreply.section+dev via (<noreply.section+dev=gmail.com@groups.io>) escribió:

On this topic, I also enquired with IB about some mechanism to opt-in/opt-out protobuf, possibly via a connection option or a TWS configuration setting, but they said no.

So, even though your client can still decide whether or not to use protobuf when sending a request, TWS responses will automatically use protobuf regardless, if API version ≥ MIN_SERVER_VER_PROTOBUF.


Re: Google Protocol Buffers usage in the latest Java API

 

On this topic, I also enquired with IB about some mechanism to opt-in/opt-out protobuf, possibly via a connection option or a TWS configuration setting, but they said no.

So, even though your client can still decide whether or not to use protobuf when sending a request, TWS responses will automatically use protobuf regardless, if API version ≥ MIN_SERVER_VER_PROTOBUF.


Re: Google Protocol Buffers usage in the latest Java API

 

开云体育

Ross

?

You’re absolutely right!

?

I was too lenient in my earlier post, because after a cursory glance a couple of weeks back I had mistakenly thought that the EClient.useProtoBuf() function was a settable attribute of EClient. But of course it’s not…

?

So it looks like I’m pretty much shafted by this. One of my API implementations is actually written in Visual Basic 6 (believe it or not, lots of history there) and is still a vital component in my trading platform, but there’s seems to be no chance of using protobuf in that. My other API implementation is .Net based, so there is a way forward there.

?

Oh well, life is full of surprises…

?

Richard

?

?

?

From: twsapi@groups.io <twsapi@groups.io> On Behalf Of rossh_yh via groups.io
Sent: 03 April 2025 17:56
To: twsapi@groups.io
Subject: Re: [TWS API] Google Protocol Buffers usage in the latest Java API

?

I see in 10.35 in the C++, there is no option to ignore this ProtoBuf.? 10.35 is version 201 (MIN_SERVER_VER_PROTOBUF), and its all coded into the source.? It does not seem there is way to avoid this mistake.? Looks like 10.34 will be the max build version for some time for many of us.