All data platform session queries return None (python)

Hello,
I started using the refinitiv platform session API earlier today and while I am able to start a session and validate that it's been opened, any requests I make - rdp.get_snapshot, etc - return Nonetype objects. I'm assuming there's an issue of some kind with my configuration but I'm unclear as to what kind of error it is since the session appears to open fine. I am using refinitiv-dataplatform 1.0.0-alpha.9 with python 3.9.5.
Sample code:
session = rdp.open_platform_session(
app_key,
rdp.GrantPassword(
mach_id,
mach_pw
)
)
x = rdp.get_snapshot(
universe = ['GBP=','JPY='],
fields = ['BID','ASK']
)
print(x)
rdp.close_session()
Outputs
None
UserWarning: Unclosed <httpx.AsyncClient object at 0x7fe7108dc6a0>. See https://www.python-httpx.org/async/#opening-and-closing-clients for details.
Any help would be appreciated!
Best Answer
-
The fact you see the above insufficient scope message confirms you have a valid machineID and password and that you are authenticating correctly.
The issue is that you are not licenced for whichever data you are trying to request.
I have emailed you directly so I can check your credentials.
0
Answers
-
Please add the following line to help understand why you are receiving no data back.
print(x)
print(rdp.get_last_status())
rdp.close_session()The usual reason is that you are not licenced for the instruments you are requesting e.g. trial account.
you can also try requesting the delayed versions of the same RIC i.e.
universe = ['/GBP=','/JPY='],
If you are licenced for streaming data but not for fee-liable data (e.g. a trial account), then you should be able to get the above RICs.
0 -
You can also try the following - which uses the RDP Snapshot API - whereas the code above is using the Streaming interface to request a snapshot.
universe = ['EUR=']
fields = ['ASK', 'BID']
response = rdp.Pricing.get_snapshot(universe, fields)
print(response.data.df)
print(response.status)If you are not permissioned for either of the above, then you will need to contact your Refinitiv account representative to discuss your licence requirements.
0 -
Both this and the above option return the output {'http_status_code': 403, 'http_reason': 'Forbidden', 'error': {'id': '4d2b3603-221d-441b-b9f9-17873bfb1b5d', 'code': 'insufficient_scope', 'message': 'access denied. Scopes required to access the resource: [trapi.data.pricing.read]. Missing scopes: [trapi.data.pricing.read]', 'status': 'Forbidden'}}. I am using a trial account - would it be best to reach out to our account representative to ask about what apis we do have access to?
0 -
I am not part of the account/sales team - but I did try to check your email address and I don't see any Account Team contact against your details.
Did you actually receive a Welcome Email that contained a MachineID - which looks something like GE-A-xxxxxx-x-xxxx and a link to set a long password (30+ characters)?
If not, then all you may have is a basic My.Refinitiv login - which only allows access to the dev portal documentation, articles and tutorials.
If you want to discuss a free trial etc please use the Contact us | Refinitiv page and your query will be directed to the New Business Team.
0 -
@umer.nalla - I am using a trial account assigned to our institution and we have received both a machine id and a machine password. I am able to generate OAuth2 tokens/establish a connection to the rdp platform using the machine id/password - I am just unable to actually query any data via that connection.Hi0
-
Hi @umer.nalla , I have similar issue.
Can you explain what this error means ?
x = rdp.get_snapshot(
universe = ['GBP=','JPY='],
fields = ['BID','ASK']
)
print(x)
print(rdp.get_last_status())
rdp.close_session()None
{'http_status_code': -1, 'http_reason': b"[Errno 10061] Connect call failed ('127.0.0.1', 9060)"}0 -
Your error message looks quite different to the existing post - therefore, in that case, I would recommend starting a new post for a quick response. Old threads that have an accepted answer are not monitored by the moderators.
Your error message would suggest you are creating a Desktop session, but that the library cannot connect to the Eikon Data API proxy.
Do you have Eikon or Workspace open and running on the same physical PC where you are running the python script?
What response do you get to the following?
http://localhost:9000/ping?all
http://localhost:9060/ping?all
and also:
0 -
The topic is continued here: session open but queries return None / Empty DF using RDP library - Forum | Refinitiv Developer Community
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
- 684 Datastream
- 1.4K DSS
- 614 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
- 248 ETA
- 552 WebSocket API
- 37 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
- 640 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
- 26 DACS Station
- 121 Open DACS
- 1.1K RFA
- 104 UPA
- 191 TREP Infrastructure
- 228 TRKD
- 915 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 中文论坛