How can I correctly obtain your HPA Java SDK tool?

We are using Java and we expect to use RESTful HTTP requests to retrieve the K-line data for stocks. Here is an example: https://api.refinitiv.com/data/historical-pricing/v1/views/intraday-summaries/0700.HK?interval=PT5M&start=2023-08-01T00:00:00.000000000Z&end=2023-10-30T18:00:00.000000000Z&fields=BID,ASK,OPEN_PRC. Our project is built with Maven, and we are looking for an SDK that provides this HTTP request utility class. You should have this dependency, right? Could you please provide it to us along with a user manual? Thank you!

Best Answer

Answers

  • Hello @guoshuai

    The API Playground page (https://apidocs.refinitiv.com/Apps/ApiDocs) also has a feature to generate the source code for each API endpoint.

    You can click the "code": button under the URL as follows:

    code.png

  • 1713925865518.png

    this is our machineId:

    GE-A-10288435-3-16229

    Unable to get data. Code 403, Message: {"error":{"id":"d5163dd0-de03-4860-b6ff-475a1e12766c","code":"insufficient_scope","message":"access denied. Scopes required to access the resource: [trapi.data.historical-pricing.events.read]. Missing scopes: [trapi.data.historical-pricing.events.read]","status":"Forbidden"}}



    1713925898832.png

  • @guoshuai

    The error indicates that this machine Id doesn't have permission to access the historical-pricing service.

    "access denied. Scopes required to access the resource: [trapi.data.historical-pricing.events.read]. Missing scopes: [trapi.data.historical-pricing.events.read]","status":"Forbidden"

    Please contact your LSEG account team or sales team directly to verify the permission.

    You may also check the authentication request.

    1713928174167.png

    Set the scope in the body to trapi. The response will list all permissioned scopes.

    If you have permission to access the historical pricing APIs, you should see the trapi.data.historical-pricing.xxx in the response.

  • In this situation, it might be necessary to contact the account manager to directly address this error.

    Requesting your response.




    1713955572706.png

  • Hello @guoshuai

    Please check the Limitations and Guidelines for the RDP Authentication Service article on the "Session Limits" section. The error indicates that you already have one active session and you try to login with the Password Grant for other sessions.

    You can invalidate the current active session by using one of the following methods.

    • Set the takeExclusiveSignOnControl parameter to true when using the password grant with the /token endpoint. This parameter will kill the current session if the number of allowed sessions has been reached. Then, a new refresh token and access token are created and sent to an application. After that, the previous refresh token is revoked and can’t be used to renew an access token.
    • Call the /revoke endpoint with the refresh token of the active session to invalidate the refresh token and access tokens associated with that refresh token

    I hope this information helps.


  • Yacine TV (ياسين تيفي) has established itself as a prominent player in the digital entertainment arena as a streaming application. Recognized predominantly for its dedication to sports content, it caters to a specific demographic of sports enthusiasts, providing live streaming services with a particular emphasis on football (soccer). Live NetTV