question

Upvotes
Accepted
3 0 0 2

How to contribute data to RIC on ATS using C#?

Hi,

I'm new to RTSDK and I want to contribute market data to RIC defined in ATS using C#. Should I use EMA, ETA or WebSocket API? Could you explain me step by step how to contribute market data to RICs defined in ATS?


Best regards.

#technologyema-apiwebsocketseta-api.netcontributionsmarket-priceric
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 @wojciech.kowalik ,

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

@kowalikw

Hi,

Thank you for your participation in the forum.

Are any of the replies below satisfactory in resolving your query?

If yes please click the 'Accept' text next to the most appropriate reply. This will guide all community members who have a similar question.

Otherwise please post again offering further insight into your question.

Thanks,

AHS

@kowalikw

Hi,

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

Thanks,

AHS

Upvotes
Accepted
79.2k 251 52 74

@kowalikw

According to the stream ID#5, you are using the on-stream posting to contribute data.

This means the application can establish the stream ID#5 for CTBTST= so the user have permission to subscribe to this item. Then, the application got the NAK when contributing data.

AckMsg
    streamId="5"
    domain="MarketPrice Domain"
    ackId="1"
    nackCode="AccessDenied"
    text="Access Denied: User req to DTS for Specialist e.g. - xxxxx"
    name="CTBTST="
    serviceId="258"
    serviceName="DTS"
    Payload dataType="NoData"
        NoData
        NoDataEnd
    PayloadEnd
AckMsgEnd

This error may indicate that the user may not have permission to contribute data. This message is typically from DACS. First, please contact the helpdesk via MyRefinitiv to verify DACS permission settings.

To check the DACS lock, the buffer of that lock should contain these bytes.

03 01 02 30 00 C0



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
24.7k 54 17 14

Hello @wojciech.kowalik

Thank you for reaching out to us.

The easiest API is the EMA API. The reason is EMA is the ease-of-use API that manage a connection and subscription for you. While the ETA and WebSocket are considered "low-level API" that you need to manage everything by yourself.

About contribution data to ATS, the EMA API can do it via the OMM Post message with the following connection scenarios:

  • Direct connection: EMA API --> ATS
  • Via RTDS: EMA API --> RTDS --> ATS

There is the EMA API contribution to ATS resources as follows:

The code example in the articles above are EMA Java and EMA C++, but the API interfaces are almost identical to the EMA C#.

About the EMA C# API, the API resources and generic Posting examples are as follows:

  • EMA C# Tutorials
  • EMA C#: Cons340 (340_MP_OnStreamPost) in the RTSDK C# package
  • EMA C#: Cons341 (341_MP_OffStreamPost) in the RTSDK C# package <-- the recommend one.

You can apply the logic of Cons341 example with the logic from the ATS articles above.

I hope this information helps.

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
3 0 0 2

Hello @wasin.w

I'm trying to build a solution based on EMA C#: Cons340 and EMA C#: Cons341 examples. I have connection to ATS I can "read" RICs but I stuck with the posting message. I have an error:

"A29: Post message did not contain permission data.".

I know I have to pass permission data to post message but I don't know how to do that. The permission method argument is EmaBuffer and I didn' find any C# examples how to create one and pass as permission data. Could you help me with that?

Thanks.

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
3 0 0 2

Finally I created EnumBuffer using RFA AuthorizationLock, bot now I have a new type of error Below I attach my AuthLock code:

int serviceId = 258;
int peOperator = AuthorizationLock.OperatorEnum.OR;
List<uint> peList = new List<uint>();
peList.Add(3000);
            
AuthorizationLock authLock = new AuthorizationLock(serviceId, peOperator, peList);
AuthorizationLockData lockData = new AuthorizationLockData();
AuthorizationLockStatus retStatus = new AuthorizationLockStatus();
AuthorizationLockData.LockResultEnum result = authLock.GetLock(lockData, retStatus);
if (result != AuthorizationLockData.LockResultEnum.LOCK_SUCCESS)
{
    authLock.Dispose();
}
byte[] c_LockData = lockData.LockData;
int c_LockDataSize = lockData.Size;

var buffer = new EmaBuffer(c_LockData, 0, c_LockDataSize);

And the AckMessage:

AckMsg
    streamId="5"
    domain="MarketPrice Domain"
    ackId="1"
    nackCode="AccessDenied"
    text="Access Denied: User req to DTS for Specialist e.g. - xxxxx"
    name="CTBTST="
    serviceId="258"
    serviceName="DTS"
    Payload dataType="NoData"
        NoData
        NoDataEnd
    PayloadEnd
AckMsgEnd


I've checked permissions to the specified RIC with admin team in my company and it looks I have permission to that RIC. Any ideas?

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.

@kowalikw

This error is from DACS. Please contact the helpdesk support team via MyRefinitiv to verify the permission setttings.

Upvotes
3 0 0 2

I checked permissions with admins and everything looks ok. I suspect that the PROD PERM field is missing, I am not sure how should I set this field correctly? Do you have any examples using C#? Or can you give me another tips to move on?

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
3 0 0 2

Finally we found a solution with our admin team - they needed to extend permission on cascade and add perrmission to contribution. Now I can contribute data to specified RIC but with ACK message I receive status: "Contribution Partially Accepted". I wonder how can I find out a reason of "partially" not "fully" acceptance.

AckMsg
    streamId="1"
    domain="MarketPrice Domain"
    ackId="1"
    text="[2]: Contribution Partially Accepted"
    name="GTRWIBIDON="
    nameType="1"
    serviceId="258"
    Payload dataType="NoData"
        NoData
        NoDataEnd
    PayloadEnd
AckMsgEnd
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.

@kowalikw

As far as I know, some fields aren't accepted by ATS.

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.