"basicConsumer" "login" "options" help! Python ok. market_price_rdpgw_client_cred_auth.py retrieves
Am having trouble figuring out how to run basicConsumer examples in the EMAJ tutorial. Unlike python. With the python client market_price_rdpgw_client_cred_auth.py I can retrieve prices:
python3 ./M_market_price_rdpgw_client_cred_auth.py --clientid 12-34-56 --clientsecret 1234-5678 --hostname us-east-1-aws-3-med.optimized-pricing-api.refinitiv.net
results in
2024-02-27 15:36:32.287728 Refinitiv Data Platform Authentication succeeded. RECEIVED:
{
"access_token":"xtsacPx8p51EezA7SIk43TSIJ3ke",
"expires_in":7199,
"token_type":"Bearer"
}
2024-02-27 15:36:32.288714 Session1: Connecting WebSocket to wss://us-east-1-aws-3-med.optimized-pricing-api.refinitiv.net:443/WebSocket...
2024-02-27 15:36:32.307977 Session1: WebSocket successfully connected!
2024-02-27 15:36:32.308124 SENT on Session1:
...
"Key":{
"Elements":{
"AllowSuspectData":1,
"ApplicationId":"256",
"ApplicationName":"RTO",
"AuthenticationErrorCode":0,
... and prices for my requested rics:
{
"DoNotConflate":true,
"Fields":{
"TRADE_DATE":"2024-02-27",
"TRDPRC_1":18016.5,
"TRDVOL_1":2
},
"ID":5,
"Key":{
"Name":"NQH24",
"Service":"ELEKTRON_DD"
},
"SeqNumber":43646,
"Type":"Update",
"UpdateType":"Trade"
}
However, when I try anything with the basicConsumer which I managed to properly build and get to run yesterday I get missing parameters. According to Refinitiv Devportal I should be calling runConsumer like so: https://developers.lseg.com/en/api-catalog/refinitiv-real-time-opnsrc/rt-sdk-java/tutorials#ema-consumer-requesting-and-displaying-market-price-data
./runConsumer.ksh 2 -username 12-34-56 -password 1234-5678 -clientId 256 -location us-east -service ELEKTRON_DD -itemName NQH24
Running tutorial 2...
Missing required parameters.
Options (Connecting into Real-Time -- Optimized):
-username Machine ID to perform authorization with the token service. Required. [null]
-password Password to perform authorization with the token service. Required. [null]
-clientId Client ID, or Appkey. Required. [null]
-location Location to get an endpoint from RDP service discovery. Default: [us-east]
-service Name of service providing market data. Default: [ELEKTRON_DD]
-itemName Request item name. Default: [IBM.N]
Options (Connecting into a deployed RTDS):
-host Hostname or IP address and port of the deployed server (Eg: ads:14002). Required. [null]
-username Username to connect into the deployed streaming server. [null]
-service Name of service providing market data. Default: [ELEKTRON_DD]
-itemName Request item name. Default: [IBM.N]
Processing complete
According to the Tutorials webportal the command should be run like this, with ID being the clientId corresponging to the app_id, which I assumed from the successful python script's output.
> runConsumer 2 -username XX-Y-01234567-1-1234 -password <passwd> -clientId <appkey>
Any help would be greatly appreciated.
Thanks
JT
Best Answer
-
Hi @JTSV,
We are migrating from a V1 authentication system which uses OAuth Password Grant (username, password and clientID) to a V2 system - which uses OAuth Client Credentials (clientID, clientSecret). Due to this some of the tutorials are still pending update.
You have a V2 account, and the sample you are trying to run only uses V1 login options. I would recommend that you use the EMA Example 450 Service Discovery which comes with the EMA SDK, while we update the old tutorials. This example can be run with both V1 and V2 options - so be sure to use clientID and clientSecret command line options here.
0
Answers
-
Hello Gurpreet,
Thank you! I will take a look.
Off the top of your head, is there an example to pull in prices which I can combine with Example 450 to create a Franken-client that will pull in baskets/views, recover from dropped connections, the works?
I took some notes about modifications I made to the basicConsumer classpath to get it humming. I could share them if you like. I've seen there's an email to send them to. It might help others.
You and I were on a call with Frank on Friday at 15:00 GMT (10:00 your time?), by the way. Thank you for your suggestion to move to the SDKs.
Thanks,
Joaquin
0 -
Hi Joaquin, I remember the call now.
Ex450 will get you quite a way there - with login, endpoint service discovery, and subscribing to a single instrument. The connection recovery is automatic and part of the EMA SDK - the client application will get status messages regarding connection down/up etc.
Adding a batch and view is not a lot of code after that.
PS: I realized that Ex 451 is even better (simpler) example of use of client credentials.
0 -
Additional details -
While the examples listed earlier show how to do things programmatically, this all can be simplified by moving configuration into the EMAConfig.xml file and using a simple Ex113 MP Session Management and strip out all the configuration code as well.
1 -
Thank you Gurpreet! All of this will greatly help. Jumping into it now.
0
Categories
- All Categories
- 6 AHS
- 37 Alpha
- 161 App Studio
- 4 Block Chain
- 4 Bot Platform
- 16 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
- 367 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
- 59 Workspace SDK
- 9 Element Framework
- 5 Grid
- 13 World-Check Data File
- Yield Book Analytics
- 46 中文论坛