Can you use the .COM API or Data API to pull intraday mid-prices? Just need the field in Python is t
Best Answer
-
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.
0
Answers
-
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
0 -
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.
1 -
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))1
Categories
- All Categories
- 6 AHS
- 39 Alpha
- 162 App Studio
- 4 Block Chain
- 5 Bot Platform
- 17 Connected Risk APIs
- 47 Data Fusion
- 30 Data Model Discovery
- 608 Datastream
- 1.3K DSS
- 577 Eikon COM
- 4.9K Eikon Data APIs
- 7 Electronic Trading
- Generic FIX
- 7 Local Bank Node API
- Trading API
- 2.7K Elektron
- 1.3K EMA
- 236 ETA
- 519 WebSocket API
- 33 FX Venues
- 10 FX Market Data
- 1 FX Post Trade
- 1 FX Trading - Matching
- 12 FX Trading – RFQ Maker
- 5 Intelligent Tagging
- 2 Legal One
- 20 Messenger Bot
- 2 Messenger Side by Side
- 9 ONESOURCE
- 7 Indirect Tax
- 59 Open Calais
- 264 Open PermID
- 39 Entity Search
- 2 Org ID
- PAM
- PAM - Logging
- 8.4K Private Comments
- 6 Product Insight
- Project Tracking
- ProView
- ProView Internal
- 20 RDMS
- 1.4K Refinitiv Data Platform
- 370 Refinitiv Data Platform Libraries
- 3 Refinitiv Due Diligence
- LSEG Due Diligence Portal API
- 3 Refinitiv Due Dilligence Centre
- Rose's Space
- 1.1K Screening
- 18 Qual-ID API
- 13 Screening Deployed
- 23 Screening Online
- 10 World-Check Customer Risk Screener
- 990 World-Check One
- 44 World-Check One Zero Footprint
- 45 Side by Side Integration API
- Test Space
- 3 Thomson One Smart
- 1.2K TR Internal
- Global Hackathon 2015
- 2 Specialists Who Code
- 10 TR Knowledge Graph
- 150 Transactions
- 142 REDI API
- 1.7K TREP APIs
- 4 CAT
- 21 DACS Station
- 117 Open DACS
- 1.1K RFA
- 103 UPA
- 172 TREP Infrastructure
- 224 TRKD
- 886 TRTH
- 5 Velocity Analytics
- 5 Wealth Management Web Services
- 60 Workspace SDK
- 9 Element Framework
- 5 Grid
- 13 World-Check Data File
- Yield Book Analytics
- 46 中文论坛