Keyboard Shortcuts
Likes
- Twsapi
- Messages
Search
Re: US futures historical data in exchange time
Thanks for the reply. I'm using .NET C#?"yyyyMMdd HH:mm:ss" format for the?
endDateTime so I guess it is what you meant?? As much as I remember Python (quite rusty) it is the same...? Are you saying IB decides what time zone to send the historical data based on the time string format?? My conversion is: string endDateTime = currentTime.ToString("yyyyMMdd HH:mm:ss"); On Tue, Aug 17, 2021 at 1:58 PM ebtrader <jsiddique@...> wrote:
|
Re: US futures historical data in exchange time
The issue is how you set current time.? Make sure you set your "endDateTime" variable in the following way using the datetime package, if you are using Python (script attached): endDateTime = datetime.now.strftime("%Y%m%d %H:%M:%S") Regards, Javed On Tue, Aug 17, 2021 at 6:21 AM edwardgonen via <edwardgonen=[email protected]> wrote: Hi, |
US futures historical data in exchange time
Hi,
I'm trying to get historical 5 mins bars for US futures, like ES, NQ etc, for several days back. So I'm calling the? reqHistoricalData(tickerId, contract, endDateTime, "2 D", "5 mins", "TRADES", 0, 1, false, historicalDataOptions);
The interesting fact is that the data is reported back for each day in range of 1:00am through 23:55. It is instead of getting it in the exchange time (Chicago) or, preferably in time Zone I want (like EST). As you know there is an one hour break in the futures trading. So it seems like IB treats that break as the beginning of new day. The question is - can I somehow cause the IB to return historical bars in the exchange time zone (or even better - specify the desired timezone like EST)? Or am I doing something wrongly? Thanks Ed ? |
Re: reqFundamentalData not working this week
Nothing major changed on my end. All last week we had two situations: After TWS restart:
All last week, after TWS lost connection with IB briefly during the maintenance window and had to retry a few times to login, only one of the seven would succeed:
´³¨¹°ù²µ±ð²Ô PS. We did update to TWS 985.1k over the weekend and, so far, see the first scenario (four work, three fail) |
Re: How to interpret "Count" & "Volume" in historical data?
Welcome to the group. As far as I know there is no one standard for exactly what is counted in volumes, number of trades, and even OHLC prices. Just like I am often surprised what is being sold as "Bratwurst". The largest chunk of difference comes from the fact that IBKR reports historical bars in "lots of 100" and you get much closer to the number reported on other sites after multiplying the bar lot volume with 100. We don't work with bar data or historical data that much but I happened to have some IBKR historical bar data for IBM in January 2020. For 2020-01-24, for example, IBKR reports for exchange=SMART:
´³¨¹°ù²µ±ð²Ô |
How to interpret "Count" & "Volume" in historical data?
Sorry, I'm new with IB API. Recently started experimenting with historical bar data via??with?whatToShow =?"Trades". It returns prices as expected, but the volumes and trade counts are really weird. E.g. hourly volumes for AAPL are somewhere between 20k-100k for SMART exchange and even lower for NYSE/AMEX/etc - order of magnitude lower than the real data. For other symbols like IBM hourly volume could be in less than 1k. What am I missing here??
|
Re: TWS data providers in the cloud OR " I don't want to run a TWS instance on my machines any more"
¿ªÔÆÌåÓýWe looked at quite a few of the financial data vendors using
websockets it's certainly interesting. Coding it is simple enough
and the one that piqued our interest was then or ?It's certainly a route worth considering. I didn't know about
SSE and thank you for pointing that out. have an excellent one cp ? On 8/15/21 1:59 PM, ´³¨¹°ù²µ±ð²Ô Reinold via
groups.io wrote:
Thank you for your kind words, CP. The group has definitely been valuable to us since many topics triggered reviews of our approaches and often helped us mature our environment. |
Re: TWS data providers in the cloud OR " I don't want to run a TWS instance on my machines any more"
Thank you for your kind words, CP. The group has definitely been valuable to us since many topics triggered reviews of our approaches and often helped us mature our environment.
Many of the more modern market data providers (including the IB Client Portal API) employ for the delivery of data streams. In these cases, no additional software is required on your end other than your decision making tool that receives the ongoing stream. Libraries for pretty much every programming language exist that present data streams to your application in the most natural form of streaming foe the language. are bi-directional and has a nice echo server you can use to try them out. Many web sites and mobile aps use WebSockets for quite a while already. Another standard that I have seen are unidirectional that again, show up as data streams in your application. ´³¨¹°ù²µ±ð²Ô |
Re: TWS data providers in the cloud OR " I don't want to run a TWS instance on my machines any more"
¿ªÔÆÌåÓýfirst of all, congratulations on your new role and thank you for taking the time. I "was" hoping that the sign on to the data vendor would be at level where I subscribed to their "account" with IB not mine. So they would have a relationship with IB and farm out the data using whatever subscription level I signed up for.? That way they wouldn't need to have any access to my account and they could cater to hundreds of NON IB subscribers who just want the data. I have looked at? quite a few market providers and agree that
it's an option. Many of them require some kind of process to run
my end which defeats the object for me. I like the simplicity of
the IB api but don't want to keep supporting the environment. It's
not a HUGE effort to be honest. Start it up on a Sunday and just
let it reboot at 9pm every day, I run it on an old hp 8440p laptop
so it's pretty reliable. ?I don't need the IB client data BUT didn't know about the Client
Portal so I will certainly look into that. Again thank you so much for taking up the new role, this is an excellent forum and I always find the people here helpful and knowledgeable in a respectful and considerate manner. A refreshing change I think. cp
On 8/15/21 11:59 AM, ´³¨¹°ù²µ±ð²Ô Reinold via
groups.io wrote:
I am not aware of any such service and can come up with a long list of reasons why this would probably not be a good idea. One of them is security since that TWS would have to be logged into your IB account and anyone with access to the TWS will have access to your account. |
Re: TWS data providers in the cloud OR " I don't want to run a TWS instance on my machines any more"
I am not aware of any such service and can come up with a long list of reasons why this would probably not be a good idea. One of them is security since that TWS would have to be logged into your IB account and anyone with access to the TWS will have access to your account.
toggle quoted message
Show quoted text
Let me put my system architect hat on for a moment. When you do a quick "what -> why -> how" assessment, TWS is a "how" that provides a large number of different functions and It sounds like you are interested primarily in the market data stream function. So I am wondering whether you would be better served with a dedicated market data stream provider (independent of TWS and IB). It would work very much like you described, but without TWS, IB, or your IB account. Such an approach would likely give you "better" market data streams (richer features, lower real-time latency, broader historical data). Keep in mind that main purpose for IB market data is the support of trading via TWS and is not a general purpose market data service. If you need IB related information as well (such as positions, account related details), maybe the would work for you. But that is less mature than the TWS API, requires a small gateway between your application and IB, and comes with all IB account related limitations. ´³¨¹°ù²µ±ð²Ô On Sun, Aug 15, 2021 at 10:29 AM, comicpilsen wrote:
|
Re: TWS 985 changes quote size units for US stocks
Nick
In the past I was looking at futures so I didn't have the lots/shares issue. Thanks for the heads-up about the change in reporting.
toggle quoted message
Show quoted text
On 8/15/2021 12:11 PM, ´³¨¹°ù²µ±ð²Ô Reinold via groups.io wrote:
Since they are reporting individual trades, TickByTick always reported shares not lots. |
Re: TWS 985 changes quote size units for US stocks
Since they are reporting individual trades, TickByTick always reported shares not lots. That is also true for RtTradeVolume, RtVolume, and Level II data feeds. The way I read the change is that it impacts the size reporting :
Plus reporting in some TWS windows. |
TWS data providers in the cloud OR " I don't want to run a TWS instance on my machines any more"
Hi All I have been running a TWS mosaic session on a machine on my network for some 3 years and it's excellent. I get to see what is going on AND I can use it to get data when I need to using the api using Python. It's almost problem free so that's GREAT!!! BUT I would like to start to investigate vendors of IB data in the cloud without having to maintain a login to my IB account. I know that I could run the TWS in the cloud but that means I still have to maintain it where all I want is the data. I don't even know if there are any vendors that allow access to the TWS api and maintain the environment for me. I thought that someone might have walked this path before and I would appreciate ANY guidance. To make sure I am being clear here is what I would like to do. "start up a program on a machine on MY network which logs into a TWS data vendor's machine. Once the credentials are ratified and the session established I can send API requests to the vendor and receive the STREAM of data back and pump it into reliable queues which populate my decision matrix. I do NOT want to trade on this system as it's used to AUGMENT my trading." I hope this isn't off topic for this forum and if it is please feel free to delete it as a topic. I don't want to interfere with the wonderful flow of this forum. cp |
Re: TWS 985 changes quote size units for US stocks
Nick
¿ªÔÆÌåÓýWith TWS 981.3c and Api 9.73 I am seeing stock bid/ask size for TickByTick data in shares but for MktData I'm seeing it in lots. I don't have any of the related TWS config settings. On 8/15/2021 12:33 AM, ´³¨¹°ù²µ±ð²Ô Reinold
via groups.io wrote:
You may have known this, but we did not. Apparently the US SEC updated some rules last year that lead to IBKR changing the way quote size data is displayed in TWS and reported to the API for US stocks.
|
TWS 985 changes quote size units for US stocks
You may have known this, but we did not. Apparently the US SEC updated some rules last year that lead to IBKR changing the way quote size data is displayed in TWS and reported to the API for US stocks. AskSize, BidSize, and LastSize are now? in #shares not in #lots of 100 any longer. The change was implemented in TWS 985.1k that we installed this week as part of our weekend updates. There is a document that describes the changes: And the . TWS 985.1k provides two new configuration parameters in the API section of the Global Configuration that deal with this change:
IB suggests that API clients migrate to "quotes in shares" at our earliest convenience. Hope this helps, Popup during TWS startupFrom TWS 985 Release notes:US Stock "Size" Quotes Displayed in Shares Previously, US stock size quotes were displayed in round lots (of 100 shares). Effective with TWS release 985 and above, the bid, ask, and last size quotes are displayed in shares instead of lots. API users have the option to configure the TWS API to work in compatibility mode for older programs, but we recommend migrating to "quotes in shares" at your earliest convenience. To use compatibility mode, from the Global Configuration > API > Settings page, check "Bypass US Stocks market data in shares warning for API orders." ? |
Re: TickByTick data outage during the night?
¿ªÔÆÌåÓýHi,Mij tws chart showed the same behavior, but the api kept delivering the correct price and volume data. But in the api, I use tickString for price and volume, so that may be the difference between what's shown in the tws chart versus the api data I collected. Regards, Raoul On 12-08-2021 22:31, ´³¨¹°ù²µ±ð²Ô Reinold via
groups.io wrote:
|
Re: TickByTick data outage during the night?
Nick
¿ªÔÆÌåÓýSure but the OP is talking about several hours of no activity at
all. That is not throttling it's an outage. On 8/13/2021 9:09 AM, YSS wrote:
IB's data feed is not a true tick by tick data feed. |