Discover Refinitiv
MyRefinitiv Refinitiv Perspectives Careers
Created with Sketch.
All APIs Questions & Answers  Register |  Login
Ask a question
  • Questions
  • Tags
  • Badges
  • Unanswered
Search:
  • Home /
  • Eikon COM /
avatar image
Question by jeppe · Dec 08, 2016 at 05:44 AM · eikon apieikon-sdkpriceextended hours

Real time last price including extended hours trading

Hi,

I am trying to get the last price for a specific instrument, but I want the price to include prices from extended hours. I have tried two fields: CF_LAST and IRGPRC. The first does not include trades from extended hours, whereas IRGPRC is reset every day, so if no trades have occured today, zero is returned. From excel I have been advised to use the Rhistory function as follows:

=RHistory("AAPL.O","TRDPRC_1.Timestamp;TRDPRC_1.Value;TRDPRC_1.Count","NBROWS:1 ADJUSTED:NO INTERVAL:TAS",,,I7),

since no live data field can give me what I am after, but I have not been able to translate this into a AdxRtHistory query. I have been able to create a historic query using the historic .net api, but I have only been able to do it by requesting data from a specific timestamp and potentially this can be a lot of data. Do you have any suggestions?

Thanks,

Andreas

People who like this

0 Show 0
Comment
10 |1500 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

7 Replies

  • Sort: 
avatar image
REFINITIV
Best Answer
Answer by Alex Putkov. · Dec 09, 2016 at 06:18 PM

My bad. I omitted the filter to include extended hours trade records:

.WithFilter(filter => filter.IncludeOutOfSessionRecords(true))

This should do it.

Comment

People who like this

0 Show 0 · Share
10 |1500 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

avatar image
REFINITIV
Answer by Zhenya Kovalyov · Dec 08, 2016 at 11:19 AM

@jeppe which RIC are you trying to query? Extended traded sessions may affect the live RIC differently on different exchanges.

AdxRtHistory only supports inter-day data, so requesting intraday time series will not work, so the only only API that might be of use for you is .NET.

Comment

People who like this

0 Show 0 · Share
10 |1500 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

avatar image
REFINITIV
Answer by Alex Putkov. · Dec 08, 2016 at 05:33 PM

Hi Andreas,

You're on the right track with this: "I have been able to create a historic query using the historic .net api, but I have only been able to do it by requesting data from a specific timestamp and potentially this can be a lot of data." When setting up timeseries request use the following methods of ITimeSeriesDataRequestSetup interface:

.WithInterval(CommonInterval.Trades)
.To(DateTime.Now)
.WithNumberOfPoints(1)

This will allow you to retrieve the single latest trade.

Comment

People who like this

0 Show 0 · Share
10 |1500 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

avatar image
Answer by jeppe · Dec 09, 2016 at 03:51 AM

That does the trick of getting the latest trades. Thank you. Unfortunately, I get some strange behavior. My request looks like this:

request = timeSeries.SetupDataRequest("MSFT.O")
.WithAllFields()
.To(DateTime.Now)
.WithInterval(CommonInterval.Trades)
.WithNumberOfPoints(59)
.OnDataReceived(DataReceivedCallback)
.CreateAndSend();

With this request I get back 59 data points, but they do not include trades from extended trading hours. If I specify 58 number of points, zero data points are returned. If I instead use .To(DateTime.Today), the requested number of points is returned (still missing extended hours), but by adding seconds (.To(DateTime.Today.AddSeconds(12))) I sometimes get zero sometimes the requested number of data points depending on the requested number and the added seconds.

Comment

People who like this

0 Show 0 · Share
10 |1500 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

avatar image
Answer by jeppe · Dec 12, 2016 at 08:22 AM

It works! Thanks a million!

Do you by any chance have an example console application too? I am having trouble translating the message pump stuff.

Comment

People who like this

0 Show 0 · Share
10 |1500 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

avatar image
REFINITIV
Answer by Alex Putkov. · Dec 12, 2016 at 09:45 AM

Hi Andreas,

All the examples in the downloads section on this API are console applications:

https://developers.thomsonreuters.com/eikon-apis/net-apis-use-custom-applications/downloads

Have you seen these? Anything in particular you're struggling with? There are numerous ways to start Windows message pump. The technique used in the above examples is one way, there are several others, e.g. using Application.Run method.

Comment

People who like this

0 Show 0 · Share
10 |1500 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

avatar image
Answer by jeppe · Dec 13, 2016 at 02:06 AM

I figured out my issues, and those are the examples I have been working on.

Thank you very much for your help.

Comment

People who like this

0 Show 0 · Share
10 |1500 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Watch this question

Add to watch list
Add to your watch list to receive emailed updates for this question. Too many emails? Change your settings >
8 People are following this question.

Related Questions

Getting "ThomsonReuters.Desktop.SDK.DataAccess.TinyIoCResolutionException" in C# ConsoleApp but not WPF

Are there release notes/notifications for new releases of the Eikon .NET and COM API?

Eikon TimeSeries API

Equity data in milliseconds.

Eikon Core and Eikon API

  • Feedback
  • Copyright
  • Cookie Policy
  • Privacy Statement
  • Terms of Use
  • Careers
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Alpha
  • App Studio
  • Block Chain
  • Bot Platform
  • Calais
  • Connected Risk APIs
  • DSS
  • Data Fusion
  • Data Model Discovery
  • Datastream
  • Eikon COM
  • Eikon Data APIs
  • Elektron
    • EMA
    • ETA
    • WebSocket API
  • Legal One
  • Messenger Bot
  • Messenger Side by Side
  • ONESOURCE
    • Indirect Tax
  • Open PermID
    • Entity Search
  • Org ID
  • PAM
    • PAM - Logging
  • ProView
  • ProView Internal
  • Product Insight
  • Project Tracking
  • Refinitiv Data Platform
    • Refinitiv Data Platform Libraries
  • Rose's Space
  • Screening
    • Qual-ID API
    • Screening Deployed
    • Screening Online
    • World-Check One
    • World-Check One Zero Footprint
  • Side by Side Integration API
  • TR Knowledge Graph
  • TREP APIs
    • CAT
    • DACS Station
    • Open DACS
    • RFA
    • UPA
  • TREP Infrastructure
  • TRIT
  • TRKD
  • TRTH
  • Thomson One Smart
  • Transactions
    • REDI API
  • Velocity Analytics
  • Wealth Management Web Services
  • World-Check Data File
  • Explore
  • Tags
  • Questions
  • Badges