Eikon Python API - ticks received once every 3 sec instead of few ticks in a second

Hello. I am trying to retrieve current prices using the Python example you provided, but getting responds every 3 sec, while in the Eikon I see few ticks every sec.
import eikon as ek
from datetime import datetime
def display_fields(streaming_prices, instrument_name, fields):
print(datetime.now(), " Fields received for", instrument_name, ":", fields)
if __name__ == "__main__":
print("Starting")
ek.set_app_key('xxx)
print("Connected")
streaming = ek.StreamingPrices(
instruments=['EUR='],
service = 'IDN_RDFNTS_CF',
fields=['SALTIM', 'CF_BID', 'CF_ASK', 'OPEN_PRC', 'CF_HIGH', 'CF_LOW', 'CF_CLOSE'],
on_refresh=lambda streaming_prices, instrument_name, fields:
display_fields(streaming_prices, instrument_name, fields),
on_update=lambda streaming_prices, instrument_name, fields:
display_fields(streaming_prices, instrument_name, fields)
)
streaming.open()
while True:
if streaming.state != "Open":
streaming.open()
streaming.close()
Best Answer
-
Thank you @Umer Nalla for your assistance. After the issue was reviewed by Eikon Technical team, the cause was identified, addressed, and fixed by the Refinitiv Development team and will be released globally soon with Eikon API Proxy version 1.1.0.91.
0
Answers
-
The code you are using looks fine, if I use the same code I get updates approx 2-3 times a second e.g.
2020-06-04 10:53:00.439994 Fields received for EUR= : {'CF_BID': 1.1198, 'CF_ASK': 1.1199} 2020-06-04 10:53:00.715981 Fields received for EUR= : {'CF_BID': 1.1196, 'CF_ASK': 1.12} 2020-06-04 10:53:01.060276 Fields received for EUR= : {'CF_BID': 1.1197, 'CF_ASK': 1.12} 2020-06-04 10:53:01.324176 Fields received for EUR= : {'CF_BID': 1.1196, 'CF_ASK': 1.1199} 2020-06-04 10:53:01.612824 Fields received for EUR= : {'CF_BID': 1.1198, 'CF_ASK': 1.1199} 2020-06-04 10:53:01.950824 Fields received for EUR= : {'CF_BID': 1.1197, 'CF_ASK': 1.1201} 2020-06-04 10:53:02.371836 Fields received for EUR= : {'CF_BID': 1.1197, 'CF_ASK': 1.12} 2020-06-04 10:53:02.691826 Fields received for EUR= : {'CF_BID': 1.1197, 'CF_ASK': 1.12} 2020-06-04 10:53:02.981823 Fields received for EUR= : {'CF_BID': 1.1196, 'CF_ASK': 1.12} 2020-06-04 10:53:04.062825 Fields received for EUR= : {'CF_BID': 1.1197, 'CF_ASK': 1.12} 2020-06-04 10:53:04.641828 Fields received for EUR= : {'CF_BID': 1.1196, 'CF_ASK': 1.12}
All I can assume is that your local Eikon install is conflating locally perhaps?
Does the same happen if run in a Jupyter Notebook vs standalone .py script?
I have reached out to some Eikon experts as well - in case they can shed some light on this.
0 -
"All I can assume is that your local Eikon install is conflating locally perhaps? "
Can you elaborate?
Can it be some Eikon API preferences?
0 -
Sometimes users are connected to an internal TREP for the realtime data - this seemed unlikely given the service name but I wanted to check. A colleague has checked and you are using a hosted connection (i.e. internet) so that is not the case.
As another test, can you please remove all the following block of code
streaming.open()
while True:
if streaming.state != "Open":
streaming.open()
streaming.close()and replace with the following code:
streaming.open()
asyncio.get_event_loop().run_until_complete(asyncio.sleep(180))
streaming.close()you will, of course, need to import asyncio
If that does not help - just for testing purposes, please try the following changes to your StreamingPrice request and see if you get more frequent updates?:
...
instruments=['EUR='],
service = 'IDN_RDF',
fields=['BID', 'ASK'],
....Please report back with the results of both the above tests so we can try and assist further.
If both the above changes make no difference to the outcome, please upload a txt file containing the console output from the script for a few minutes of runtime.
Thanks.
0 -
Hello. We tried both your sugestions and was unable to resolve the issue. Please see attached files with the results.
0 -
Thanks for trying the alternatives.
Given that your issue does not appear to be an API functionality/coding type issue - I have opened a ticket for you with our helpdesk so it can be investigated by the Eikon Technical support team. They will be able to investigate this offline and help resolve the issue you are facing.
The ticket number is 08794823 - if you need to chase this ticket up please visit My Refinitiv and login/create an account using your corporate email address.
0 -
This issue has already been addressed and fixed Eikon APIProxy version 1.1.0.91 which will be released globally soon.
0
Categories
- All Categories
- 3 Polls
- 6 AHS
- 36 Alpha
- 166 App Studio
- 6 Block Chain
- 4 Bot Platform
- 18 Connected Risk APIs
- 47 Data Fusion
- 34 Data Model Discovery
- 685 Datastream
- 1.4K DSS
- 616 Eikon COM
- 5.2K Eikon Data APIs
- 10 Electronic Trading
- Generic FIX
- 7 Local Bank Node API
- 3 Trading API
- 2.9K Elektron
- 1.4K EMA
- 252 ETA
- 556 WebSocket API
- 38 FX Venues
- 14 FX Market Data
- 1 FX Post Trade
- 1 FX Trading - Matching
- 12 FX Trading – RFQ Maker
- 5 Intelligent Tagging
- 2 Legal One
- 23 Messenger Bot
- 3 Messenger Side by Side
- 9 ONESOURCE
- 7 Indirect Tax
- 60 Open Calais
- 275 Open PermID
- 44 Entity Search
- 2 Org ID
- 1 PAM
- PAM - Logging
- 6 Product Insight
- Project Tracking
- ProView
- ProView Internal
- 22 RDMS
- 1.9K Refinitiv Data Platform
- 652 Refinitiv Data Platform Libraries
- 4 LSEG Due Diligence
- LSEG Due Diligence Portal API
- 4 Refinitiv Due Dilligence Centre
- Rose's Space
- 1.2K Screening
- 18 Qual-ID API
- 13 Screening Deployed
- 23 Screening Online
- 12 World-Check Customer Risk Screener
- 1K World-Check One
- 46 World-Check One Zero Footprint
- 45 Side by Side Integration API
- 2 Test Space
- 3 Thomson One Smart
- 10 TR Knowledge Graph
- 151 Transactions
- 143 REDI API
- 1.8K TREP APIs
- 4 CAT
- 27 DACS Station
- 121 Open DACS
- 1.1K RFA
- 104 UPA
- 193 TREP Infrastructure
- 228 TRKD
- 917 TRTH
- 5 Velocity Analytics
- 9 Wealth Management Web Services
- 90 Workspace SDK
- 11 Element Framework
- 5 Grid
- 18 World-Check Data File
- 1 Yield Book Analytics
- 46 中文论坛