I am trying to get a stock's intraday prices including the close at 16:00, but seems 16:00 itself is outside of RTH so up to 15:59. For NVDA on 21 Jun, Google and Yahoo show closed at 126.57. When I read 1-min bars from IBKR, I get (date time zone open close) 20240621 09:30:00 America/New_York, 127.11, 126.71 20240621 09:31:00 America/New_York, 126.71, 127.65 20240621 09:32:00 America/New_York, 127.65, 127.65 20240621 09:33:00 America/New_York, 127.65, 127.54 20240621 09:34:00 America/New_York, 127.54, 128.43 20240621 09:35:00 America/New_York, 128.43, 128.3 ........ 20240621 15:55:00 America/New_York, 126.42, 126.52 20240621 15:56:00 America/New_York, 126.52, 126.49 20240621 15:57:00 America/New_York, 126.49, 126.21 20240621 15:58:00 America/New_York, 126.21, 126.15 20240621 15:59:00 America/New_York, 126.15, 127.06 Isn't the close at 15:59:00 of 127.06 the closing price, which was 126.57 in Google Finance? Has SMART to do with it or using TRADES data? For 1hr bars, is the close of 15:00 the closing price of the day? For AAPL, I got 20240621 15:59:00 America/New_York, 208.01, 207.11, while Google shows 207.49. I use Code: private Contract contract = new Contract(); //Contract obj private String ticker = "NVDA"; private String reqEndDateTime = "20240621 16:00:00"; private String reqLookbackWindow = "1 D"; private PriceDataType reqDataType = PriceDataType.TRADES; private String reqBarSize = "1 min"; private void setContract() { this.contract.symbol(this.ticker); this.contract.secType("STK"); this.contract.currency("USD"); this.contract.exchange("SMART"); } private void request() { this.setContract(); this.client.reqHistoricalData(1, this.contract, this.reqEndDateTime, this.reqLookbackWindow, this.reqBarSize, this.reqDataType.name(), 1, 1, false, null); }
Don't know...The market closes at 4pm. The last trade can be at 3:59 and 59 seconds I believe, (not counting after hours of course)...
There's an official closing price for RTH as a result of the closing auction. This is the price that will be quoted on a daily chart or daily historical data. Not sure what the exact request would be to IB via the API to get this price though.
The "close" of the 1-min OHLC bar at 15:59 is just the typical close, not result of the closing auction. How can I get the closing auction price from 1-min intraday day?
As @GaryBtrader stated, the exchange does publish an official closing price, a few minutes after RTH ends. I use NxCore which has a indicator that this is the official closing price. The only way that I know of to get the official closing price from IBkr is to do a reqHistoricalData request, but I don't know how soon after RTH close those prices are available.
%% DONT think you can exactly; GB noted official closing price [AKA settlement price]. Sometimes i just use [My trade notes, some times] I use a non settlement price, since i seldom if ever actually buy or sell a settlement price. I do like the[ official] settlement price on FRI.