For a deeper look into our Elektron API, look into:

Overview |  Quickstart |  Documentation |  Downloads |  Tutorials |  Articles

question

Upvotes
Accepted
1 0 1 2

Python websocket-api returned message "unknown to system".


Hi, I'm trying to modify my company's program as the API has changed to V2.

The legacy program received data through API and saved it as a file such as CSV.


1. Here is License

ELEKTRON REAL TIME IN CLOUD STREAM ID: 1
EAL-TIME ID WATCHLIST 2.5K: 1

Status: Assigned
Type: Base



2. I tried to follow this code as best as I could.

https://github.com/Refinitiv/websocket-api/blob/master/Applications/Examples/RDP/python/market_price_rdpgw_client_cred_auth.py



3. my PAA web console information. ( '****' is masking values for asking.)

###################################
# [PAA Service Application]
###################################
Application name: testApplication_23-08-17
Application id: 30bd9669-****-****-a997-89560c584722
Service account name: getAPI
Service ID: GE-EMXIJKYAUR4E
password: ********-***-****-****-6e294fd3c431
Authentication method: Secret
Status: Active




3. I set variables

# Global Default Variables
app_id = '30bd9669-****-****-a997-89560c584722'
auth_token = ''
auth_url = 'https://api.refinitiv.com/auth/oauth2/v2/token'
clientid = ''
client_secret = ''
discovery_url = 'https://api.refinitiv.com/streaming/pricing/v1/'
hostName = ''
hostName2 = ''
hostList = []
backupHostList = []
hotstandby = False
port = 443
port2 = 443
position = ''
region = 'us-east-1'
ric = '/TRI.N'
scope = 'trapi.streaming.pricing.read'
service = 'ELEKTRON_DD'
session2 = None
curTS = 0
tokenTS = 0

#####################
## User Defined Vars
#####################
newPassword = ''
data_path = 'C:\_works\PAA\data'
log_path = 'C:\_works\PAA\logs'
data_dict_size = 52
data_dict_list = []
clientid = 'GE-EMXIJKYAUR4E' 
client_secret = '********-***-****-****-6e294fd3c431'
password = client_secret


4. I Got this messages.

2023-09-06 15:08:41.476531 Session1: Connecting WebSocket to wss://ap-southeast-1-aws-3-sm.optimized-pricing-api.refinitiv.net:443/WebSocket...
2023-09-06 15:08:42.022800 Session1: WebSocket successfully connected!
2023-09-06 15:08:42.022800 SENT on Session1:
{
  "Domain":"Login",
  "ID":1,
  "Key":{
    "Elements":{
      "ApplicationId":"30bd9669-****-****-a997-89560c584722",
      "AuthenticationToken":"xts********0AjKCAnx",
      "Position":"10.168.112.201/laptop-kaydash"
    },
    "NameType":"AuthnToken"
  }
}
2023-09-06 15:08:42.423636 RECEIVED on Session1:
[
  {
    "Domain":"Login",
    "ID":1,
    "Key":{
      "Name":"xts********0AjKCAnx"
    },
    "State":{
      "Code":"Error",
      "Data":"Suspect",
      "Stream":"Closed",
      "Text":"GE-EMXIJKYAUR4E, unknown to system."
    },
    "Type":"Status"
  }
]




Q) What part should I fix?

python#productapiwebsocketserror
icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

<AHS>

The client's token is xtsaSt2F5DK40SKcqafs0AjKCAnx

not working

Hi @shinhanai_d ,

Thank you for your participation in the forum. Is the reply below satisfactory in resolving your query?
If so please can you click the 'Accept' text next to the appropriate reply? This will guide all community members who have a similar question.

Thanks,
AHS

@shinhanai_d

Hi,

Please be informed that a reply has been verified as correct in answering the question, and marked as such.

Thanks,

AHS

Upvote
Accepted
24.7k 54 17 14

Hello @shinhanai_d

Based on the given information, your V2 credential received the Access Token from RDP Auth Service (version 2) successfully and the application did send a valid WebSocket JSON login request message to RTO.


However, the Login status response message "Text":"GE-XXXXXX, unknown to system." indicates that the RTO server does not recognize that GE-XXXXXX username. This message is generated from the RTO side, so I strongly suggest you contact the RTO support team directly to verify this issue on the server side. You can submit a support ticket to the RTO support team via https://my.refinitiv.com/content/mytr/en/helpandsupport.html website.

rrto-ticket.png



rrto-ticket.png (22.1 KiB)
icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

I was really curious as to why I was getting an error with API response. Thank you for interpreting this response.

Upvotes
79.2k 251 52 74

@shinhanai_d

Thank you for reaching out to us.

I got the same error when using your access token.

1693985862593.png

Please contact the Refinitiv Real-Time - Optimized support team directly via MyRefinitiv to verify your account (GE-EMXIJKYAUR4E).


1693985862593.png (112.6 KiB)
icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Thank you very much for your help with verification.

don't use then

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.