question

Upvotes
Accepted
3 0 0 3

Rics createion via Websocket API in C#

How could we use Web API to create rics? Could we create the rics with template?

#technologywebsocketsc#
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.

Upvote
Accepted
86k 292 53 78

@clarence.ho

Sorry for the issue you are facing, let me see if I can help you in resolving this.

You can use post messages to create RICs in ATS or RTDS Cache.

Please refer to the postman example that shows how to connect to ATS and RTDS, and create RICs in those components.

1668590920898.png

You can also refer to the MarketPricePostingExample.cs on GitHub.

However, if it is not about contributing data to ATS or RTDS cache, please let me know the product that you are using.

I hope this will help.


1668590920898.png (131.2 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.

Hi Jirapongse,

Thanks for your prompt reply. When I am trying to create the rics "TestingABC" and

I get error from ATS.

WS Query

{
    "Ack":true,
    "ID":2,
    "Key":{
        "Name":"TestingABC",
        "Serivce":"<Internal Page>"
    },
    "Message":{
        "Fields":{
            "PROD_PERM":null,
            "RDNDISPLAY":null,
            "DSPLY_NAME":null,
            "TIMACT":null,
            "TRDPRC_1":null,
            "TRDPRC_2":null,
            "TRDPRC_3":null,
            "TRDPRC_4":null,
            "TRDPRC_5":null,
            "NETCHNG_1":null,
            "CURRENCY":null
        },
        "Solicted":false,
        "Type":"Refresh",
        "ID":1
    },
    "PostID":2,
    "Type":"Post"
}

Response:

{
  "ID": 2,
  "Type": "Ack",
  "AckID": 2,
  "NakCode": "DeniedBySrc",
  "Text": "Unable to find item stream.",
  "Key": {
    "Service": 0,
    "Name": "TestingABC"
  }
}


Would you kindly advise?

Upvotes
27.5k 67 18 14

Hello @clarence.ho

If you want to create RIC and contribute data to ATS, there are the following resources that might help you:

The articles above give you a brief concept and step-by-step guide on how to create and post data to ATS. Even though the WebSocket example is written in Ruby language, the main concept can be applied to the C# example that was suggested by my colleague.

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.

Upvote
86k 292 53 78

@clarence.ho

To create a new RIC in ATS, you need to use the off-stream posting with stream ID #` ("ID": 1), as shown in the 4. Create an item in ATS example in the Refinitiv Real-Time Distribution Contributions (ATS) postman collection.

{
    "Ack": true,
    "ID": 1,
    "Key": {
        "Name": "ATS_INSERT_S",
        "Service": "{
                {POST_SERVICE}}"
    },
    "Message": {
        
        "Fields": {
            "X_RIC_NAME": "{
                 {POST_ITEM}}",
            "ASK": 451.60,
            "PRIMACT_1": 450.3,
            "SEC_ACT_1": 450.3,
            "DSPLY_NAME": "TEST RIC",
            "BID": 451.55
        },
        "ID": 0,
        "Solicited": false,
        "Type": "Refresh"
    },
    "PostID": 1,
    "Type": "Post"
}

The RIC name is in the X_RIC_NAME field.

To contribute data to existing RICs, you can use either off-stream or on-stream posting.

To use off-stream posting, please refer to the 6. Off-Stream Post example in the Refinitiv Real-Time Distribution Contributions (ATS) postman collection.

{
    "Ack": true,
    "ID": 1,
    "Key": {
        "Name": "{
                {POST_ITEM}}",
        "Service": "{
                {POST_SERVICE}}"
    },
    "Message": {
        "Fields": {
            "ASK": 452.60,
            "PRIMACT_1": 451.3,
            "SEC_ACT_1": 451.3,
            "BID": 452.55
        },
        "ID": 0,
        "Type": "Update"
    },
    "PostID": 10,
    "Type": "Post"
}

To use on-stream posting, first, you need to open a stream by requesting that item.

{
    "ID": 3,
    "Key": {
        "Name": "{
                {POST_ITEM}}",
        "Service": "{
                {POST_SERVICE}}"
    }
}

Then, use the same stream to contribute the data.

{
    "Ack": true,
    "Domain": "MarketPrice",
    "ID": 3,
    "Message": {
        "Domain": "MarketPrice",
        "Fields": {
            "ASK": 453.60,
            "BID": 452.60
        },
        "ID": 0,
        "Type": "Update"
    },
    "PostID": 20,
    "PostUserInfo": {
        "Address": "127.0.0.1",
        "UserID": 10000
    },
    "Type": "Post"
}

For more information, please refer to the 5. Market Price Streaming Request and 7. On-Stream Post examples in the Refinitiv Real-Time Distribution Contributions (ATS) postman collection.

1668681784976.png


1668681784976.png (72.2 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 so much for your help! Its working!

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.