lseg data platform session api

valstar
valstar Explorer
edited March 27 in Eikon Data APIs

I am experiencing an issue with the LSEG Data Library where my code retrieves data successfully when using Refinitiv Workspace, but when I switch to a platform session (platform.ldp), I receive empty DataFrames for the same requests.

Details:

* Working Setup: Using Refinitiv Workspace, my get_data() requests return the expected data.

* Issue: When switching to a platform session, authentication appears to work, but the same get_data() calls return empty DataFrames.

* Configuration: My lseg-data.config.json file is set up as follows:

{

    "logs": {

        "level": "debug",

        "transports": {

            "console": {

                "enabled": false

            },

            "file": {

                "enabled": false,

                "name": "lseg-data-lib.log"

            }

        }

    },

    "sessions": {

        "default": "platform.ldp",

        "platform": {

            "ldp": {

                "app-key": "*****",

                "username": "****",

                "password": "****"

            }

        }

    }

}

Troubleshooting Steps Taken:

* Confirmed that the session initializes successfully.

* Ensured credentials are correct.

* Checked network connectivity.

Could you please confirm whether my account has the necessary entitlements for API access via platform.ldp? Also, are there any additional configurations required to ensure proper data retrieval in a platform session?

Tagged:

Best Answer

Answers

  • Hi @valstar ,

    Could you print the log and post it here so we can know more information.

    To enable console log, simply change the value of logs.transports.console.enabled to true

    {

    "logs": {

    "level": "debug", "transports": {

    "console": {

    "enabled": true
    },
  • Hello @valstar

    In my experience, this usually happens when the user account does not have the relevant permissions to request the real-time data from the Platform. Desktop and Platform are different products and user's entitlements could be different in both of these.

    To verify, please run the platform session with debug enabled as described by @raksina.samasiri. You might see a message like:

     "State": {"Stream": "Closed", "Data": "Suspect", "Code": "NotEntitled", "Text": "A21: DACS User Profile denied access to vendor\n"}}]
    
  • valstar
    valstar Explorer

    Hello Gurpreet

    Enabling the debug to console I don't get that exact state piece that you posted here, but I get these ones when I make requests, and example below of an attempt on a request to ld.news.get_headlines() which works fine when running the refinitive workspace and not using platform.

    ScopeError Traceback (most recent call last)
    [ … ]

    ScopeError: Insufficient scope for key=/data/news/v1/headlines, method=GET.
    Required scopes: {'trapi.data.news.read'}
    Available scopes: {'trapi.user-framework.mobile.crud', 'trapi.sdbold', 'trapi.data.get.data.read', 'trapi.data.wealth-clients.wfdca', 'trapi.user-framework.recently-used.crud', 'trapi.data.average-volume-analytics.ava_read', 'trapi.search.explore.read', 'trapi.commodities.yesenergy.read', 'trapi.data.historical-pricing.summaries.read', 'trapi.synthetic.crud', 'trapi.cfs.claimcheck.read', 'trapi.messenger', 'trapi.data.api.msr_read', 'trapi.platform.iam.guiss', 'trapi.search.lookup.read', 'trapi.searchcore.read', 'trapi.userdata.lists.write', 'trapi.streaming.synthetic.read', 'trapi.metadata.nsa.read', 'trapi.search.read', 'trapi.alerts.preferences.crud', 'trapi.platform.iam.groups', 'trapi.graphql.subscriber.access', 'trapi.data.symbology.read', 'trapi.user-framework.workspace.crud', 'trapi.research-analytics.fx-impact-intelligence', 'trapi.auth.cloud-credentials', 'trapi.searchcore.lookup.read', 'trapi.tradefeedr.basic.read', 'trapi.search.metadata.read', 'trapi.userdata.lists.read', 'trapi.userdata.portfolio-management.read', 'trapi.data.historical-pricing.events.read', 'trapi.alerts.publication.crud', 'trapi.data.symbology.advanced.read', 'trapi.data.portfolios.write', 'trapi.streaming.pricing.read', 'trapi.searchcore.metadata.read', 'trapi.user-framework.application-metadata.raplib', 'trapi.data.wealth-clients.advisor_dashboard', 'trapi.alerts.history.crud', 'trapi.data.portfolios.read', 'trapi.alerts.subscription.crud', 'trapi.data.benchmark.bmk_read', 'trapi.metadata.read', 'trapi.streaming.prcperf.read', 'trapi.data.quantitative-analytics.read', 'trapi.frtb.sentimarization', 'trapi.platform.iam.acl_service'}
    Missing scopes: {'trapi.data.news.read'}