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.
@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 PayloadEndAckMsgEnd
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
Hello @kowalikw
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:
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:
You can apply the logic of Cons341 example with the logic from the ATS articles above.
I hope this information helps.
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.
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:
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?
This error is from DACS. Please contact the helpdesk support team via MyRefinitiv to verify the permission setttings.
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?
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 PayloadEndAckMsgEnd
As far as I know, some fields aren't accepted by ATS.