Upgrade from Eikon -> Workspace. Learn about programming differences.

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

Overview |  Quickstart |  Documentation |  Downloads |  Tutorials |  Articles

question

Upvotes
Accepted
1 0 0 1

trying to acces Elektron API via python for realtime data

the code i'm running on python is :


import refinitiv.dataplatform as rdp
import pandas as pd

global session
global pricing
global streaming_price
global all_rows_realtime

# 982fe27de05a4ef780a944e67967a470f72338cc
# 4f3a9d30bd02431098678865b31809a89c362153

session = rdp.open_platform_session(
'4f3a9d30bd02431098678865b31809a89c36215',
rdp.GrantPassword(
'x.x@refinitiv.com',
'xxxxxx'
)
)


print(session)


streaming_prices = rdp.StreamingPrices(
universe = ['EUR='],
fields = ['CF_BID'],
on_update = lambda streaming_price, instrument_name, fields :
print("Update received for {}: {}".format(instrument_name, fields))
)

df = streaming_prices.get_snapshot()
print(df)

streaming_prices.open()




Output is :


2019-12-27 13:26:29,078 P[36232] [Thread-17 24556] [Error 400 - access_denied] iPlanet session has been expired.

2019-12-27 13:26:29,078 P[36232] [Thread-17 24556] [Error 400 - access_denied] iPlanet session has been expired.
2019-12-27 13:27:09,432 P[36232] [Thread-9 32708] [Error 400 - access_denied] Refresh token does not exist.
2019-12-27 13:27:40,212 P[36232] [Thread-10 18244] [Error 400 - access_denied] Refresh token does not exist.
2019-12-27 13:28:04,967 P[36232] [Thread-11 4208] [Error 400 - access_denied] Refresh token does not exist.
2019-12-27 13:29:32,052 P[36232] [Thread-13 33972] [Error 400 - access_denied] Refresh token does not exist.
2019-12-27 13:29:51,392 P[36232] [Thread-14 9988] [Error 400 - access_denied] Refresh token does not exist.
2019-12-27 13:29:54,554 P[36232] [Thread-12 36664] [Error 400 - access_denied] Refresh token does not exist.
2019-12-27 13:30:00,300 P[36232] [Thread-8 34124] [Error 400 - access_denied] Refresh token does not exist.
2019-12-27 13:30:34,370 P[36232] [Thread-15 36644] [Error 400 - access_denied] Refresh token does not exist.
2019-12-27 13:30:44,013 P[36232] [Thread-16 31736] [Error 400 - access_denied] Refresh token does not exist.
2019-12-27 13:30:59,675 P[36232] [Thread-17 24556] [Error 400 - access_denied] Refresh token does not exist.

eikoneikon-data-apipythonrefinitiv-dataplatform-eikonworkspaceworkspace-data-apitick-history-rest-api
icon clock
10 |1500

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

@Shah.Riaz

Thank you for your participation in the forum. Is the reply below satisfactory in resolving your query?

If yes, please click the 'Accept' text next to the reply. This will guide all community members who have a similar question. Otherwise please post again offering further insight into your question.

Thanks,

AHS

Please be informed that a reply has been verified as correct in answering the question, and has been marked as such.
Thanks,

AHS


1 Answer

· Write an Answer
Upvotes
Accepted
4.3k 2 4 5

Hi,

The error is received at 2019-12-27 13:26:29.
Could you precise how long the script ran before ?

The error message "[Error 400 - access_denied] iPlanet session has been expired." means that after starting your script, another script or application requested a new platform session with you login/password.

Then, when your script's session tries to keep its token available (by requesting a refresh token for the current session), the platform return a Error 400 with "iPlanet session has been expired."


icon clock
10 |1500

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

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

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