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 Data APIs /

For a deeper look into our Eikon Data API, look into:

Overview |  Quickstart |  Documentation |  Downloads |  Tutorials |  Articles

avatar image
REFINITIV
Question by danny.mullins1 · Feb 20, 2020 at 03:20 PM · eikoneikon-data-apiworkspacepythonworkspace-data-apirefinitiv-dataplatform-eikonapieikon-com-api

Can you use the .COM API or Data API to pull intraday mid-prices? Just need the field in Python is the end goal.

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.

4 Replies

  • Sort: 
avatar image
REFINITIV
Best Answer
Answer by umer.nalla · Feb 20, 2020 at 04:27 PM

Hi @danny.mullins1

If you just want to snap the Mid price as and when required you can use Eikon Data API get_data function e.g.

ek.get_data(instruments = 'VOD.L',fields = ['TR.MIDPRICE'])

You can get more information on the get_data function here:

https://docs-developers.refinitiv.com/1558082609136/14684/book/en/eikon/index.html#get_data

If you want streaming data i.e. to be informed each time the mid price changes, then you can use the Streaming functionality as described here. There is a link to some examples at the bottom of that page.

Note that for Streaming data, not only will the field names will be different e.g. 'MID_PRICE' instead of TR.MIDPRICE - but also not all exchanges/asset classes provide a MID_PRICE - so you may have to calculate from the BID and ASK price.


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 danny.mullins1 · Feb 20, 2020 at 04:32 PM

Thanks Umer,

I would like streaming for minute by minute for 60 minutes - I tested this out but could not find the solution.

E.g. 60 mins worth of minute bar for mid-price for EUR=... Is this possible or will it just update singular values upon changing?

Happy to talk offline if that's easier.

Best,

Danny

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 umer.nalla · Feb 20, 2020 at 04:58 PM

Hi,

The streaming will send an update as and when the value changes in the market (allowing for conflation on the feed) - not at regular intervals.

Otherwise, you can use the get_data and control the timing yourself e.g. call the get_data method every 60 seconds.

Or, if you don't actually need the data streaming and just want the past 60 minutes of data then you might be able to use timeseries data.

data = ek.get_timeseries("EUR=",  # the RICs
                         count=60,
                         interval = 'minute')  

Whilst this actually returns HIGH,LOW,OPEN and CLOSE for each minute - a quick observation seemed to suggest the HIGH price is the highest MID price - you will need to check with the Content helpdesk to confirm if this is indeed the case.

Comment
danny.mullins1

People who like this

1 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 umer.nalla · Feb 21, 2020 at 10:53 AM

Hi @danny.mullins1

You could also try something like this for get_data approach if the get_timeseries does not work out:

starttime=time.time()
while time.time() < (starttime+3600):
    mid = ek.get_data(instruments = 'VOD.L', fields = ['TR.MIDPRICE'])
    print(mid)
    time.sleep(60.0 - ((time.time() - starttime) % 60.0))


Comment
danny.mullins1

People who like this

1 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 >
10 People are following this question.

Related Questions

Can I retrieve the P/E and Auditor datapoint of a Fund (Unit Trust) in Excel using the API?

Excel continuous retrieval of data

Need Excel API access

data verification

Cannot Match Excel Historical Data Using Python

  • Copyright
  • Cookie Policy
  • Privacy Statement
  • Terms of Use
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Alpha
  • App Studio
  • Block Chain
  • Bot Platform
  • Connected Risk APIs
  • DSS
  • Data Fusion
  • Data Model Discovery
  • Datastream
  • Eikon COM
  • Eikon Data APIs
  • Electronic Trading
    • Generic FIX
    • Local Bank Node API
    • Trading API
  • Elektron
    • EMA
    • ETA
    • WebSocket API
  • Intelligent Tagging
  • Legal One
  • Messenger Bot
  • Messenger Side by Side
  • ONESOURCE
    • Indirect Tax
  • Open Calais
  • Open PermID
    • Entity Search
  • Org ID
  • PAM
    • PAM - Logging
  • ProView
  • ProView Internal
  • Product Insight
  • Project Tracking
  • RDMS
  • 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
  • TRKD
  • TRTH
  • Thomson One Smart
  • Transactions
    • REDI API
  • Velocity Analytics
  • Wealth Management Web Services
  • Workspace SDK
    • Element Framework
    • Grid
  • World-Check Data File
  • 中文论坛
  • Explore
  • Tags
  • Questions
  • Badges