Insufficient Scope Error (trapi.streaming.pricing.read) When Using LSEG Data Library with ld.get_dat

Dear LSEG Developer Community,

I am encountering an "insufficient scope" error when using the LSEG Data Library for Python (version 2.1.1) to retrieve snapshot pricing data for EUR= and GBP= via ld.get_data. Despite successful authentication and session opening, the request fails with a 403 Forbidden error due to missing the trapi.streaming.pricing.read scope. I would appreciate your guidance on resolving this issue.

Environment

  • LSEG Data Library: 2.1.1
  • Python: 3.12.3
  • OS: Linux (Ubuntu)
  • Configuration: Using platform.rdp session with lseg-data.config.json
  • Client ID: [MASKED]

Source Code

Below is the Python script (test_jpy.py) I am running, based on LD Lib. Python Tutorial 3 - get_data.ipynb:

Error Log

Here is the relevant error output from the latest run (sensitive information masked):

textCopyOpening session...[2025-05-11T02:56:16.019846+08:00] - [DEBUG] - [ld] - [132973301784704] | MainThreadLD version is 2.1.1; Python version is 3.12.3[2025-05-11T02:56:16.071211+08:00] - [DEBUG] - [ld] - [132973301784704] | MainThreadRead configs: /home/ian/rdp_v2_project/lseg-data.config.json, /home/ian/lseg-data.config.json[2025-05-11T02:56:17.011363+08:00] - [DEBUG] - [sessions.platform.rdp.0] - [132973027874496] | AuthManager-ThreadHTTP Response id 0 status_code = 200 text = { "expires_in":7199, "token_type":"Bearer", "access_token":"[MASKED]"}[2025-05-11T02:56:17.030189+08:00] - [DEBUG] - [sessions.platform.rdp.0] - [132973301784704] | MainThreadOpened sessionSession opened successfully.Fetching data for EUR= and GBP=...[2025-05-11T02:56:18.122872+08:00] - [DEBUG] - [sessions.platform.rdp.0] - [132972705924800] | OpenUniverseStreams-Thread_0HTTP Response id 1 status_code = 403 text = {"error":{"id":"9a1ea292-7db7-497f-983c-b9674afa8d65","code":"insufficient_scope","message":"access denied. Scopes required to access the resource: [trapi.streaming.pricing.read]. Missing scopes: [trapi.streaming.pricing.read]","status":"Forbidden"}}[2025-05-11T02:56:18.135051+08:00] - [DEBUG] - [sessions.platform.rdp.0] - [132973301784704] | MainThreadFailure retrieving data for ['EUR=', 'GBP=']: Insufficient scope for key=/streaming/pricing/v1/, method=GET.Required scopes: {'trapi.streaming.pricing.read'}Available scopes: {}Missing scopes: {'trapi.streaming.pricing.read'}An error occurred: Insufficient scope for key=/streaming/pricing/v1/, method=GET.Required scopes: {'trapi.streaming.pricing.read'}Available scopes: {}Missing scopes: {'trapi.streaming.pricing.read'}Closing session...Session closed.

Issue Description

  • Problem: The script fails at ld.get_data with a 403 Forbidden error, indicating that my account lacks the trapi.streaming.pricing.read scope required for the /streaming/pricing/v1/ endpoint.
  • Observations:
    • Authentication succeeds, and the session opens correctly.
    • The error occurs when requesting pricing data for EUR= and GBP= with fields BID and ASK.
    • Previous attempts with other RICs (e.g., JPY=) yielded the same error.
    • Multiple config files are loaded (/home/ian/rdp_v2_project/lseg-data.config.json and /home/ian/lseg-data.config.json), which may cause conflicts.
  • Previous Attempts:
    • Verified lseg-data.config.json with signon_control: true.
    • Updated lseg-data to 2.1.1 and fixed setuptools warnings.
    • Syntax errors (e.g., unclosed lists, try-except issues) were resolved based on Pylance feedback.

Questions

  1. How can I obtain the trapi.streaming.pricing.read scope for my account? Do I need a specific subscription for real-time forex data (EUR=, GBP=)? Whom should I contact to update my account permissions?
  2. Is there a workaround to retrieve BID and ASK for EUR= and GBP= without this scope (e.g., using historical pricing or another endpoint)?
  3. Does lseg-data 2.1.1 support the Pricing interface for streaming data? If so, what is the correct import path (e.g., lseg.data.streaming.Pricing)?
  4. Could the multiple config files cause this issue? Should I remove /home/ian/lseg-data.config.json?

Best Answer

Answers

  • ianzhu
    ianzhu LSEG

    import lseg.data as ld
    import pandas as pd

    try:
    # Open session
    print("Opening session...")
    session = ld.open_session('platform.rdp')
    print("Session opened successfully.")

    # Define query
    instruments = ['EUR=', 'GBP=']  # RICs from tutorial
    fields = ['BID', 'ASK']  # Fields from tutorial
    
    # Fetch snapshot data
    print("Fetching data for EUR= and GBP=...")
    data = ld.get_data(
        universe=instruments,
        fields=fields
    )
    
    # Output results
    print("Data retrieved:")
    print(data)
    

    except Exception as e:
    print(f"An error occurred: {str(e)}")

    finally:
    # Close session
    try:
    print("Closing session...")
    session.close()
    print("Session closed.")
    except NameError:
    print("Session was not created.")

  • Hello @ianzhu,

    Insufficient scope trapi.streaming.pricing.read implies that your account does not have permission to invoke real time endpoint. For getting real time data, you will need 1. access to this scope, and 2. entitlement to get real time data from particular venue. Since you are only requesting FX quotes, this (2) should not matter. But for other instrument like IBM.N, your ID will also need access to NYSE markets.

    You can raise a Service Now ticket to get this access.

  • ianzhu
    ianzhu LSEG

    Thank you, @Gurpreet. ServiceNow helped me fix it a bit. However, I’ve noticed a new error now—could this still be a permissions issue? "Text': "Login Rejected. Watchlist size of 0 for 'WS JSON2' connection is outside of range [1,3000] supported for this ADS fanout tier for this type of connection."}}"

    "

    Opening session...[2025-05-16T23:56:56.639620+08:00] - [DEBUG] - [ld] - [135710918840448] | MainThreadLD version is 2.1.1; Python version is 3.12.3 (main, Feb 4 2025, 14:48:35) [GCC 13.3.0][2025-05-16T23:56:56.721667+08:00] - [DEBUG] - [ld] - [135710918840448] | MainThreadInstalled packages (45): anyio==4.9.0,appdirs==1.4.4,autocommand==2.2.2,backports.tarfile==1.2.0,certifi==2025.4.26,charset-normalizer==3.4.1,h11==0.16.0,httpcore==1.0.9,httpx==0.27.2,idna==3.10,importlib-metadata==8.0.0,inflect==7.3.1,jaraco.collections==5.1.0,jaraco.context==5.3.0,jaraco.functools==4.0.1,jaraco.text==3.12.1,jinja2==3.1.6,lseg-data==2.1.1,markupsafe==3.0.2,more-itertools==10.3.0,numpy==2.2.5,packaging==24.2,pandas==2.2.3,pip==24.0,platformdirs==4.2.2,pyee==12.0.0,pyhumps==3.8.0,python-dateutil==2.9.0.post0,pytz==2025.2,requests==2.32.3,scipy==1.15.2,setuptools==80.4.0,simplejson==3.20.1,six==1.17.0,sniffio==1.3.1,tenacity==9.1.2,tomli==2.0.1,typeguard==4.3.0,typing-extensions==4.13.2,tzdata==2025.2,urllib3==2.4.0,watchdog==6.0.0,websocket-client==1.8.0,wheel==0.45.1,zipp==3.19.2[2025-05-16T23:56:56.721979+08:00] - [DEBUG] - [ld] - [135710918840448] | MainThreadRead configs: /home/ian/rdp_v2_project/lseg-data.config.json, /home/ian/lseg-data.config.json[2025-05-16T23:56:56.928924+08:00] - [DEBUG] - [session] - [135710918840448] | MainThreadCreating session "sessions.platform.rdp.0" based on session.platform.Definition("platform.rdp")[2025-05-16T23:56:56.932742+08:00] - [DEBUG] - [sessions.platform.rdp.0] - [135710918840448] | MainThreadCreated session connection SessionCxnType.PLATFORM_DATA[2025-05-16T23:56:56.932967+08:00] - [DEBUG] - [sessions.platform.rdp.0] - [135710918840448] | MainThreadSession created: PlatformSession name = rdp connection = PlatformDataConnection stream_auto_reconnection = True authentication_token_endpoint_url = https://api.refinitiv.com/auth/oauth2/v2/token signon_control = True server_mode = False state = OpenState.Closed session_id = 0 logger_name = sessions.platform.rdp.0[2025-05-16T23:56:56.933232+08:00] - [DEBUG] - [sessions.platform.rdp.0] - [135710918840448] | MainThreadOpen session[2025-05-16T23:56:57.200536+08:00] - [DEBUG] - [sessions.platform.rdp.0] - [135710918840448] | MainThreadAuthManager: start authorize[2025-05-16T23:56:57.201017+08:00] - [DEBUG] - [sessions.platform.rdp.0] - [135710644983488] | AuthManager-ThreadAuthManager: Access token will be requested in 1e-05 seconds[2025-05-16T23:56:57.201476+08:00] - [DEBUG] - [sessions.platform.rdp.0] - [135710644983488] | AuthManager-ThreadHTTP Request id 0 url = https://api.refinitiv.com/auth/oauth2/v2/token method = POST headers = {'Accept': 'application/json', 'x-tr-applicationid': '58e6dadc79234418a02cae2b5615cad8252181fb'} data = {'scope': 'trapi', 'grant_type': 'client_credentials', 'client_id': 'GE-TQGHYFOHM4VU', 'client_secret': ********}[2025-05-16T23:56:58.093390+08:00] - [DEBUG] - [sessions.platform.rdp.0] - [135710644983488] | AuthManager-ThreadHTTP Response id 0 status_code = 200 text = { "expires_in":7199, "token_type":"Bearer", "access_token":"xtsaWNDMOPjgdMAgK8cGiSFH8llH"}[2025-05-16T23:56:58.093733+08:00] - [DEBUG] - [sessions.platform.rdp.0] - [135710644983488] | AuthManager-ThreadLatency: 0.8924112319946289 sec.Access token response: { "expires_in":7199, "token_type":"Bearer", "access_token":"xtsaWNDMOPjgdMAgK8cGiSFH8llH"}[2025-05-16T23:56:58.094211+08:00] - [DEBUG] - [sessions.platform.rdp.0] - [135710644983488] | AuthManager-ThreadAuthManager: Access token handler, event: access_token_success, message: All is well[2025-05-16T23:56:58.094637+08:00] - [DEBUG] - [sessions.platform.rdp.0] - [135710644983488] | AuthManager-ThreadAccess token xtsaWNDMOPjgdMAgK8cGiSFH8llH. Expire in 7199.0 seconds[2025-05-16T23:56:58.094980+08:00] - [DEBUG] - [sessions.platform.rdp.0] - [135710644983488] | AuthManager-ThreadSession.update_access_token(access_token='xtsaWNDMOPjgdMAgK8cGiSFH8llH'[2025-05-16T23:56:58.113914+08:00] - [DEBUG] - [sessions.platform.rdp.0] - [135710644983488] | AuthManager-ThreadAuthManager: Refresh token will be requested in 6298 seconds[2025-05-16T23:56:58.114329+08:00] - [DEBUG] - [sessions.platform.rdp.0] - [135710918840448] | MainThreadAuthManager: end authorize, result True[2025-05-16T23:56:58.115232+08:00] - [DEBUG] - [sessions.platform.rdp.0] - [135710918840448] | MainThreadOpened sessionSession opened successfully.

    Fetching forex data for EUR= and GBP=...[2025-05-16T23:56:59.160443+08:00] - [INFO] - [sessions.platform.rdp.0] - [135710918840448] | MainThreadRequesting pricing info for fields=['BID', 'ASK'] via websocket[2025-05-16T23:56:59.160603+08:00] - [DEBUG] - [sessions.platform.rdp.0] - [135710918840448] | MainThreadMixedStreams id=0 universe=['EUR=', 'GBP='] initialized to state=UnopenedUniverseStreamsSt[2025-05-16T23:56:59.160747+08:00] - [DEBUG] - [sessions.platform.rdp.0] - [135710918840448] | MainThreadMixedStreams id=0 universe=['EUR=', 'GBP='] state=UnopenedUniverseStreamsSt open kwargs={'with_updates': False}[2025-05-16T23:56:59.160891+08:00] - [DEBUG] - [sessions.platform.rdp.0] - [135710918840448] | MainThreadMixedStreams id=0 universe=['EUR=', 'GBP='] transition UnopenedUniverseStreamsSt -> OpeningUniverseStreamsSt[2025-05-16T23:56:59.161370+08:00] - [DEBUG] - [sessions.platform.rdp.0] - [135710918840448] | MainThread_UniverseStream owner.id=0 id=5 name='EUR=' initialized to state=UnopenedOMMStreamSt[2025-05-16T23:56:59.162085+08:00] - [DEBUG] - [sessions.platform.rdp.0] - [135710918840448] | MainThread_UniverseStream owner.id=0 id=6 name='GBP=' initialized to state=UnopenedOMMStreamSt[2025-05-16T23:56:59.162204+08:00] - [DEBUG] - [sessions.platform.rdp.0] - [135710918840448] | MainThreadMixedStreams id=0 universe=['EUR=', 'GBP='] start open ['EUR=', 'GBP='][2025-05-16T23:56:59.162836+08:00] - [DEBUG] - [sessions.platform.rdp.0] - [135710322939584] | OpenUniverseStreams-Thread_0_UniverseStream owner.id=0 id=5 name='EUR=' state=UnopenedOMMStreamSt open kwargs={'with_updates': False}[2025-05-16T23:56:59.162957+08:00] - [DEBUG] - [sessions.platform.rdp.0] - [135710322939584] | OpenUniverseStreams-Thread_0_UniverseStream owner.id=0 id=5 name='EUR=' transition UnopenedOMMStreamSt -> OpeningOMMStreamSt[2025-05-16T23:56:59.163107+08:00] - [DEBUG] - [sessions.platform.rdp.0] - [135710322939584] | OpenUniverseStreams-Thread_0_UniverseStream owner.id=0 id=5 name='EUR=' request cxn[2025-05-16T23:56:59.165051+08:00] - [DEBUG] - [sessions.platform.rdp.0] - [135710322939584] | OpenUniverseStreams-Thread_0Scope for key=/streaming/pricing/v1/, method=GET not found.[2025-05-16T23:56:59.165558+08:00] - [DEBUG] - [sessions.platform.rdp.0] - [135710322939584] | OpenUniverseStreams-Thread_0HTTP Request id 1 url = https://api.refinitiv.com/streaming/pricing/v1/ method = GET headers = {'Authorization': 'Bearer xtsaWNDMOPjgdMAgK8cGiSFH8llH', 'x-tr-applicationid': '58e6dadc79234418a02cae2b5615cad8252181fb'}[2025-05-16T23:56:59.166464+08:00] - [DEBUG] - [RetryTransportBase] - [135710322939584] | OpenUniverseStreams-Thread_0Sending request to https://api.refinitiv.com/streaming/pricing/v1/[2025-05-16T23:56:59.167000+08:00] - [DEBUG] - [sessions.platform.rdp.0] - [135710314546880] | OpenUniverseStreams-Thread_1_UniverseStream owner.id=0 id=6 name='GBP=' state=UnopenedOMMStreamSt open kwargs={'with_updates': False}[2025-05-16T23:56:59.167953+08:00] - [DEBUG] - [sessions.platform.rdp.0] - [135710314546880] | OpenUniverseStreams-Thread_1_UniverseStream owner.id=0 id=6 name='GBP=' transition UnopenedOMMStreamSt -> OpeningOMMStreamSt[2025-05-16T23:56:59.168114+08:00] - [DEBUG] - [sessions.platform.rdp.0] - [135710314546880] | OpenUniverseStreams-Thread_1_UniverseStream owner.id=0 id=6 name='GBP=' request cxn[2025-05-16T23:57:01.043303+08:00] - [DEBUG] - [sessions.platform.rdp.0] - [135710322939584] | OpenUniverseStreams-Thread_0HTTP Response id 1 status_code = 200 text = {"services":[{"port":14002,"location":["ap-northeast-1a"],"transport":"tcp","provider":"aws","endpoint":"ap-northeast-1-aws-1-sm.optimized-pricing-api.refinitiv.net","dataFormat":["rwf"]},{"port":14002,"location":["ap-northeast-1a","ap-northeast-1b"],"transport":"tcp","provider":"aws","endpoint":"ap-northeast-1-aws-3-sm.optimized-pricing-api.refinitiv.net","dataFormat":["rwf"]},{"port":14002,"location":["ap-northeast-1b"],"transport":"tcp","provider":"aws","endpoint":"ap-northeast-1-aws-2-sm.optimized-pricing-api.refinitiv.net","dataFormat":["rwf"]},{"port":14002,"location":["ap-southeast-1a"],"transport":"tcp","provider":"aws","endpoint":"ap-southeast-1-aws-1-sm.optimized-pricing-api.refinitiv.net","dataFormat":["rwf"]},{"port":14002,"location":["ap-southeast-1a","ap-southeast-1b"],"transport":"tcp","provider":"aws","endpoint":"ap-southeast-1-aws-3-sm.optimized-pricing-api.refinitiv.net","dataFormat":["rwf"]},{"port":14002,"location":["ap-southeast-1b"],"transport":"tcp","provider":"aws","endpoint":"ap-southeast-1-aws-2-sm.optimized-pricing-api.refinitiv.net","dataFormat":["rwf"]},{"port":14002,"location":["eu-central-1a"],"transport":"tcp","provider":"aws","endpoint":"eu-central-1-aws-1-sm.optimized-pricing-api.refinitiv.net","dataFormat":["rwf"]},{"port":14002,"location":["eu-central-1a","eu-central-1b"],"transport":"tcp","provider":"aws","endpoint":"eu-central-1-aws-3-sm.optimized-pricing-api.refinitiv.net","dataFormat":["rwf"]},{"port":14002,"location":["eu-central-1b"],"transport":"tcp","provider":"aws","endpoint":"eu-central-1-aws-2-sm.optimized-pricing-api.refinitiv.net","dataFormat":["rwf"]},{"port":14002,"location":["eu-west-1a"],"transport":"tcp","provider":"aws","endpoint":"eu-west-1-aws-1-sm.optimized-pricing-api.refinitiv.net","dataFormat":["rwf"]},{"port":14002,"location":["eu-west-1a","eu-west-1b"],"transport":"tcp","provider":"aws","endpoint":"eu-west-1-aws-3-sm.optimized-pricing-api.refinitiv.net","dataFormat":["rwf"]},{"port":14002,"location":["eu-west-1b"],"transport":"tcp","provider":"aws","endpoint":"eu-west-1-aws-2-sm.optimized-pricing-api.refinitiv.net","dataFormat":["rwf"]},{"port":14002,"location":["us-east-1a"],"transport":"tcp","provider":"aws","endpoint":"us-east-1-aws-1-sm.optimized-pricing-api.refinitiv.net","dataFormat":["rwf"]},{"port":14002,"location":["us-east-1a","us-east-1b"],"transport":"tcp","provider":"aws","endpoint":"us-east-1-aws-3-sm.optimized-pricing-api.refinitiv.net","dataFormat":["rwf"]},{"port":14002,"location":["us-east-1b"],"transport":"tcp","provider":"aws","endpoint":"us-east-1-aws-2-sm.optimized-pricing-api.refinitiv.net","dataFormat":["rwf"]},{"port":14002,"location":["us-east-2a"],"transport":"tcp","provider":"aws","endpoint":"us-east-2-aws-1-sm.optimized-pricing-api.refinitiv.net","dataFormat":["rwf"]},{"port":14002,"location":["us-east-2a","us-east-2b"],"transport":"tcp","provider":"aws","endpoint":"us-east-2-aws-3-sm.optimized-pricing-api.refinitiv.net","dataFormat":["rwf"]},{"port":14002,"location":["us-east-2b"],"transport":"tcp","provider":"aws","endpoint":"us-east-2-aws-2-sm.optimized-pricing-api.refinitiv.net","dataFormat":["rwf"]},{"port":443,"location":["ap-northeast-1a"],"transport":"websocket","provider":"aws","endpoint":"ap-northeast-1-aws-1-sm.optimized-pricing-api.refinitiv.net","dataFormat":["tr_json2"]},{"port":443,"location":["ap-northeast-1a","ap-northeast-1b"],"transport":"websocket","provider":"aws","endpoint":"ap-northeast-1-aws-3-sm.optimized-pricing-api.refinitiv.net","dataFormat":["tr_json2"]},{"port":443,"location":["ap-northeast-1b"],"transport":"websocket","provider":"aws","endpoint":"ap-northeast-1-aws-2-sm.optimized-pricing-api.refinitiv.net","dataFormat":["tr_json2"]},{"port":443,"location":["ap-southeast-1a"],"transport":"websocket","provider":"aws","endpoint":"ap-southeast-1-aws-1-sm.optimized-pricing-api.refinitiv.net","dataFormat":["tr_json2"]},{"port":443,"location":["ap-southeast-1a","ap-southeast-1b"],"transport":"websocket","provider":"aws","endpoint":"ap-southeast-1-aws-3-sm.optimized-pricing-api.refinitiv.net","dataFormat":["tr_json2"]},{"port":443,"location":["ap-southeast-1b"],"transport":"websocket","provider":"aws","endpoint":"ap-southeast-1-aws-2-sm.optimized-pricing-api.refinitiv.net","dataFormat":["tr_json2"]},{"port":443,"location":["eu-central-1a"],"transport":"websocket","provider":"aws","endpoint":"eu-central-1-aws-1-sm.optimized-pricing-api.refinitiv.net","dataFormat":["tr_json2"]},{"port":443,"location":["eu-central-1a","eu-central-1b"],"transport":"websocket","provider":"aws","endpoint":"eu-central-1-aws-3-sm.optimized-pricing-api.refinitiv.net","dataFormat":["tr_json2"]},{"port":443,"location":["eu-central-1b"],"transport":"websocket","provider":"aws","endpoint":"eu-central-1-aws-2-sm.optimized-pricing-api.refinitiv.net","dataFormat":["tr_json2"]},{"port":443,"location":["eu-west-1a"],"transport":"websocket","provider":"aws","endpoint":"eu-west-1-aws-1-sm.optimized-pricing-api.refinitiv.net","dataFormat":["tr_json2"]},{"port":443,"location":["eu-west-1a","eu-west-1b"],"transport":"websocket","provider":"aws","endpoint":"eu-west-1-aws-3-sm.optimized-pricing-api.refinitiv.net","dataFormat":["tr_json2"]},{"port":443,"location":["eu-west-1b"],"transport":"websocket","provider":"aws","endpoint":"eu-west-1-aws-2-sm.optimized-pricing-api.refinitiv.net","dataFormat":["tr_json2"]},{"port":443,"location":["us-east-1a"],"transport":"websocket","provider":"aws","endpoint":"us-east-1-aws-1-sm.optimized-pricing-api.refinitiv.net","dataFormat":["tr_json2"]},{"port":443,"location":["us-east-1a","us-east-1b"],"transport":"websocket","provider":"aws","endpoint":"us-east-1-aws-3-sm.optimized-pricing-api.refinitiv.net","dataFormat":["tr_json2"]},{"port":443,"location":["us-east-1b"],"transport":"websocket","provider":"aws","endpoint":"us-east-1-aws-2-sm.optimized-pricing-api.refinitiv.net","dataFormat":["tr_json2"]},{"port":443,"location":["us-east-2a"],"transport":"websocket","provider":"aws","endpoint":"us-east-2-aws-1-sm.optimized-pricing-api.refinitiv.net","dataFormat":["tr_json2"]},{"port":443,"location":["us-east-2a","us-east-2b"],"transport":"websocket","provider":"aws","endpoint":"us-east-2-aws-3-sm.optimized-pricing-api.refinitiv.net","dataFormat":["tr_json2"]},{"port":443,"location":["us-east-2b"],"transport":"websocket","provider":"aws","endpoint":"us-east-2-aws-2-sm.optimized-pricing-api.refinitiv.net","dataFormat":["tr_json2"]}]}[2025-05-16T23:57:01.046631+08:00] - [DEBUG] - [ld.stream-factory] - [135710322939584] | OpenUniverseStreams-Thread_0 + Created: cxn : OMMStreamConnection name : ThreadOMMSTREAMING_PRICING_0.0 state : StreamCxnState.Initial subprotocol : tr_json2 is_auto_reconnect: True can_reconnect : True num_attempt : 0 config : PlatformStreamCxnConfig headers=[],data_formats=['tr_json2'],supported_protocols=['OMM'],data_fmt=tr_json2 urls : wss://ap-northeast-1-aws-1-sm.optimized-pricing-api.refinitiv.net:443/WebSocket wss://ap-northeast-1-aws-3-sm.optimized-pricing-api.refinitiv.net:443/WebSocket wss://ap-northeast-1-aws-2-sm.optimized-pricing-api.refinitiv.net:443/WebSocket wss://ap-southeast-1-aws-1-sm.optimized-pricing-api.refinitiv.net:443/WebSocket wss://ap-southeast-1-aws-3-sm.optimized-pricing-api.refinitiv.net:443/WebSocket wss://ap-southeast-1-aws-2-sm.optimized-pricing-api.refinitiv.net:443/WebSocket wss://eu-central-1-aws-1-sm.optimized-pricing-api.refinitiv.net:443/WebSocket wss://eu-central-1-aws-3-sm.optimized-pricing-api.refinitiv.net:443/WebSocket wss://eu-central-1-aws-2-sm.optimized-pricing-api.refinitiv.net:443/WebSocket wss://eu-west-1-aws-1-sm.optimized-pricing-api.refinitiv.net:443/WebSocket wss://eu-west-1-aws-3-sm.optimized-pricing-api.refinitiv.net:443/WebSocket wss://eu-west-1-aws-2-sm.optimized-pricing-api.refinitiv.net:443/WebSocket wss://us-east-1-aws-1-sm.optimized-pricing-api.refinitiv.net:443/WebSocket wss://us-east-1-aws-3-sm.optimized-pricing-api.refinitiv.net:443/WebSocket wss://us-east-1-aws-2-sm.optimized-pricing-api.refinitiv.net:443/WebSocket wss://us-east-2-aws-1-sm.optimized-pricing-api.refinitiv.net:443/WebSocket wss://us-east-2-aws-3-sm.optimized-pricing-api.refinitiv.net:443/WebSocket wss://us-east-2-aws-2-sm.optimized-pricing-api.refinitiv.net:443/WebSocket[2025-05-16T23:57:01.048319+08:00] - [DEBUG] - [sessions.platform.rdp.0] - [135710322939584] | OpenUniverseStreams-Thread_0 + StreamCxnCache created new connection: id=0, daemon=False, content_type=ContentType.STREAMING_PRICING, protocol_type=ProtocolType.OMM[2025-05-16T23:57:01.048731+08:00] - [DEBUG] - [sessions.platform.rdp.0] - [135710322939584] | OpenUniverseStreams-Thread_0StreamCxnCache wait for connection: id=0, content_type=ContentType.STREAMING_PRICING, protocol_type=ProtocolType.OMM[2025-05-16T23:57:01.050020+08:00] - [DEBUG] - [sessions.platform.rdp.0] - [135710306154176] | ThreadOMMSTREAMING_PRICING_0.0[OMMSTREAMING_PRICING_0.0] wait start connecting[2025-05-16T23:57:01.051093+08:00] - [DEBUG] - [sessions.platform.rdp.0] - [135710306154176] | ThreadOMMSTREAMING_PRICING_0.0[OMMSTREAMING_PRICING_0.0] is connecting[2025-05-16T23:57:01.051530+08:00] - [DEBUG] - [sessions.platform.rdp.0] - [135710306154176] | ThreadOMMSTREAMING_PRICING_0.0[OMMSTREAMING_PRICING_0.0] connect num_attempt : 0 url : wss://ap-northeast-1-aws-1-sm.optimized-pricing-api.refinitiv.net:443/WebSocket headers : ['User-Agent: Python'] cookies : None transport : websocket subprotocols: ['tr_json2'][2025-05-16T23:57:02.199724+08:00] - [DEBUG] - [sessions.platform.rdp.0] - [135710306154176] | ThreadOMMSTREAMING_PRICING_0.0[OMMSTREAMING_PRICING_0.0] on_ws_open[2025-05-16T23:57:02.200194+08:00] - [DEBUG] - [sessions.platform.rdp.0] - [135710306154176] | ThreadOMMSTREAMING_PRICING_0.0[OMMSTREAMING_PRICING_0.0] send login message {'Domain': 'Login', 'ID': 2, 'Key': {'Elements': {'AuthenticationToken': 'xtsaWNDMOPjgdMAgK8cGiSFH8llH', 'ApplicationId': '256', 'Position': '127.0.0.1/ian-ThinkPad-T460s'}, 'NameType': 'AuthnToken'}}[2025-05-16T23:57:02.988380+08:00] - [DEBUG] - [sessions.platform.rdp.0] - [135710306154176] | ThreadOMMSTREAMING_PRICING_0.0[OMMSTREAMING_PRICING_0.0] on_ws_message [{"ID": 2, "Type": "Status", "Domain": "Login", "Key": {"Name": "aes.304568b33253939a1f011ad38d3adf9ecc496106d97c8563c744401bd40eafbb2cfe4e03f23f368c9898bdcfb2bd1af7"}, "State": {"Stream": "Closed", "Data": "Suspect", "Code": "UsageError", "Text": "Login Rejected. Watchlist size of 0 for 'WS JSON2' connection is outside of range [1,3000] supported for this ADS fanout tier for this type of connection."}}][2025-05-16T23:57:02.989132+08:00] - [DEBUG] - [sessions.platform.rdp.0] - [135710306154176] | ThreadOMMSTREAMING_PRICING_0.0[OMMSTREAMING_PRICING_0.0] received a closing message: state=StreamCxnState.Connecting, message={'ID': 2, 'Type': 'Status', 'Domain': 'Login', 'Key': {'Name': 'aes.304568b33253939a1f011ad38d3adf9ecc496106d97c8563c744401bd40eafbb2cfe4e03f23f368c9898bdcfb2bd1af7'}, 'State': {'Stream': 'Closed', 'Data': 'Suspect', 'Code': 'UsageError', 'Text': "Login Rejected. Watchlist size of 0 for 'WS JSON2' connection is outside of range [1,3000] supported for this ADS fanout tier for this type of connection."}}^C[2025-05-16T23:57:03.334620+08:00] - [DEBUG] - [sessions.platform.rdp.0] - [135710306154176] | ThreadOMMSTREAMING_PRICING_0.0[OMMSTREAMING_PRICING_0.0] on_ws_close: close_status_code=None, close_msg=None, state=StreamCxnState.Disconnected[2025-05-16T23:57:03.335264+08:00] - [DEBUG] - [sessions.platform.rdp.0] - [135710306154176] | ThreadOMMSTREAMING_PRICING_0.0[OMMSTREAMING_PRICING_0.0] try to reconnect over url wss://ap-northeast-1-aws-3-sm.optimized-pricing-api.refinitiv.net:443/WebSocket[2025-05-16T23:57:03.335647+08:00] - [DEBUG] - [sessions.platform.rdp.0] - [135710306154176] | ThreadOMMSTREAMING_PRICING_0.0[OMMSTREAMING_PRICING_0.0] wait start connecting[2025-05-16T23:57:03.337572+08:00] - [DEBUG] - [sessions.platform.rdp.0] - [135710306154176] | ThreadOMMSTREAMING_PRICING_0.0[OMMSTREAMING_PRICING_0.0] is connecting[2025-05-16T23:57:03.339468+08:00] - [DEBUG] - [sessions.platform.rdp.0] - [135710306154176] | ThreadOMMSTREAMING_PRICING_0.0[OMMSTREAMING_PRICING_0.0] connect num_attempt : 0 url : wss://ap-northeast-1-aws-3-sm.optimized-pricing-api.refinitiv.net:443/WebSocket headers : ['User-Agent: Python'] cookies : None transport : websocket subprotocols: ['tr_json2']^C[2025-05-16T23:57:03.435313+08:00] - [DEBUG] - [sessions.platform.rdp.0] - [135710918840448] | MainThreadMixedStreams id=0 universe=['EUR=', 'GBP='] state=OpeningUniverseStreamsSt close [2025-05-16T23:57:03.436210+08:00] - [DEBUG] - [sessions.platform.rdp.0] - [135710918840448] | MainThreadMixedStreams id=0 universe=['EUR=', 'GBP='] transition OpeningUniverseStreamsSt -> CloseUniverseStreamsSt[2025-05-16T23:57:03.437521+08:00] - [DEBUG] - [sessions.platform.rdp.0] - [135710918840448] | MainThreadMixedStreams id=0 universe=['EUR=', 'GBP='] start close[2025-05-16T23:57:03.438142+08:00] - [DEBUG] - [sessions.platform.rdp.0] - [135710078129856] | CloseUniverseStreams-Thread_0_UniverseStream owner.id=0 id=5 name='EUR=' state=OpeningOMMStreamSt close [2025-05-16T23:57:03.438782+08:00] - [DEBUG] - [sessions.platform.rdp.0] - [135710078129856] | CloseUniverseStreams-Thread_0_UniverseStream owner.id=0 id=5 name='EUR=' transition OpeningOMMStreamSt -> CloseOMMStreamSt[2025-05-16T23:57:03.439203+08:00] - [DEBUG] - [sessions.platform.rdp.0] - [135710069737152] | CloseUniverseStreams-Thread_1_UniverseStream owner.id=0 id=6 name='GBP=' state=OpeningOMMStreamSt close [2025-05-16T23:57:03.440133+08:00] - [DEBUG] - [sessions.platform.rdp.0] - [135710069737152] | CloseUniverseStreams-Thread_1_UniverseStream owner.id=0 id=6 name='GBP=' transition OpeningOMMStreamSt -> CloseOMMStreamSt[2025-05-16T23:57:03.441351+08:00] - [DEBUG] - [sessions.platform.rdp.0] - [135710918840448] | MainThreadMixedStreams id=0 universe=['EUR=', 'GBP='] end close

    Closing session...