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

Overview |  Quickstart |  Documentation |  Downloads |  Tutorials |  Articles

question

Upvotes
Accepted
5 2 2 3

DeniedBySrc publication error

We get following error when we are testing price publication via websocket on TREP platform.

{'ID': 2, 'Type': 'Ack', 'AckID': 1, 'NakCode': 'DeniedBySrc', 'Text': 'Unable to find item stream.', 'Key': {'Service': 'xxxx', 'Name': 'FDXU8'}}

What does these ‘DeniedBySrc’ and 'Unable to find item stream’ error message mean?

Here is an example of what we send and receive:

post: {"ID": 2, "PostID": 1, "Ack": true, "Type": "Post", "PostUserInfo": {"Address": "xxxx", "UserID": xxxx}, "Key": {"Service": "xxxx", "Name": "FDXU8"}, "Message": {"ID": 1, "Type": "Update", "Fields": {"BID": 12595.5, "BIDSIZE": 1, "ASK": 12601.5, "ASKSIZE": 1}}}

response: [{'ID': 2, 'Type': 'Ack', 'AckID': 1, 'NakCode': 'DeniedBySrc', 'Text': 'Unable to find item stream.', 'Key': {'Service': 'xxxx', 'Name': 'FDXU8'}}]

treprdp-apiwebsocketsrrtodenied-by-src
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.

Upvotes
Accepted
25.3k 87 12 25

Hi @chbailly

Is this an OffStream post (using the Login stream) or an OnStream post (where you subscribe to the item first and then post on the open item stream).

You are using ID:2 which could suggest On-Stream - but have you first subscribed to FDXU8 first and created an open item stream using Stream ID:2 ?

If you do not want to subscribe to the item first, then you can use OffStream - where you open a Login Stream (i.e. Login successfully) which would be ID:1 and then send your Posts using Stream ID:1 - i.e. using the Login Stream for your posts.

If you refer to the Websocket API interactive documentation for Posting, that demonstrates OnStream posting - where you Login (ID:1), then make a MarketPrice request (ID:2) and then send a Post on the opened MarketPrice item stream (ID:2)

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.

Upvotes
5 2 2 3

Thanks a lot, this is clear

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.

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.