RDP API Keeping the session open

HI,
I am using the RDP API to get bar data for several algos we are running. Until now my code work flow has been to Login, get bars, Logout. But I am running into Login limits, exceeding the allowable limits.
So I need to able to keep a session open and request bars as and when I need them from the same session.
Can you tell me what the mechanism is for refreshing a session token to allow it to stay open for multiple requests?
Not sure if the category is correct, couldn't find RDI API
Thanks
Best Answers
-
Thank you for reaching out to us.
Please check this article: Limitations and Guidelines for the RDP Authentication Service.
After authenticating, an application will receive an access token with an expiration period. The access token can be used with other RDP endpoints to retrieve data.
Therefore, instead of repeatedly getting a new access token, an application can reuse the previously retrieved access token with other RDP endpoints until it expires.
1 -
Hello @gordon.konheiser
Before the session expires (based on the
expires_in
parameter, in seconds), an application needs to send request message to RDP Authentication service to get a new access token before further request data from the platform.The method is depending on which type of the Authentication that you are using. Are you using the Machine-ID (GE-A-XXXXXXXX-X-XXXX)/email-based username or Service-ID (GE-XXXXXXXXXXXX) username? (see the Account authorization V1 to V2 migration cheat sheet article).
If you are using the Machine-ID/Email-based username:
You can send a Refresh Token request message to the RDP Authentication Service V1 to get a new access token.
The Refresh TokenHTTP request for the RDP APIs Authentication service is as follows:
POST /auth/oauth2/v1/token HTTP/1.1
Accept: */*
Content-Type: application/x-www-form-urlencoded
Host: api.refinitiv.com:443
Content-Length: XXX
refresh_token={current_refresh_token}
&grant_type=refresh_token
&client_id=RDP_APP_KEYOnce the authentication success, the function gets access_token, refresh_token, and expires_in data from the RDP Auth service response message, the same as the initial RDP Authentication call. An application must keep those value for the next Refresh Token call.
See section "Refreshing the Token" on the RDP APIs tutorial: Authorization - All about tokens page.
If you are using the Service-ID username:
You can send the same authentication request message with client-id and client-secret to the RDP Authentication Service V2 to get a new access token.
The HTTP request for the RDP APIs Authentication service is as follows:
POST /auth/oauth2/v2/token HTTP/1.1 Accept: */* Content-Type: application/x-www-form-urlencoded Host: api.refinitiv.com:443 Content-Length: XXX client_id=[service-id] &client_secret=[client-secret] &grant_type=client_credentials &scope=trapi &takeExclusiveSignOnControl=true
1
Answers
-
Thanks very much guys that answers my question.
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
- 615 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 中文论坛