question

Upvotes
Accepted
13 2 3 8

real time API questions

RIC码:

XAG=、XAGON=R、XAGSW=R、XAG1M=R、XAG3M=R、XAG6M=R、XAG9M=R、XAG1Y=R、

XAU=、XAUON=R、XAUSW=R、XAU1M=R、XAU3M=R、XAU6M=R、XAU9M=R、XAU1Y=R


一、MsgType.REFRESH_RESP数据是否随市场行情波动实时刷新,推送频率如何?应用是否需要每天定时订阅触发,以接收REFRESH_RESP数据?


二、MsgType.UPDATE_RESP的行情数据如何识别是哪个RIC码的数据更新?目前是根据Payload的DSPLY_NAME进行判断的,这个理解是否正确?


三、UPDATE数据的频率较高,同一时刻是否会收到多笔数据,高并发的情况下,这边收到的数据是否会比较杂乱?


四、Login请求里面有个application参数,这边理解这个参数是标识我是哪个应用,应用端自定义即可。这种理解是否正确?还是说这个参数是被统一管理的?

rfa-api
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.

Hello @tao.su

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

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

Thanks,
AHS

Upvotes
Accepted
79.2k 251 52 74

@tao.su

Thanks for reaching out to us.

1. The refresh message is often provided as an initial response for a request message or when an upstream source requires a data resynchronization point. Typically, the application will retrieve a refresh response as the first message after subscribing to an item. Moreover, the server can also send refresh responses to synchronize the data. The refresh message contains data in its payload which contains all available fields of that item.

2. The update message conveys changes to data associated with an item stream. When streaming, update messages typically flow after the delivery of a refresh response. Its payload contains only updated fields. For example, the following is a sample update message of XAUON=R.


    Payload dataType="FieldList"
        FieldList
            FieldEntry fid="22" name="BID" dataType="Real" value="16.0099"
            FieldEntry fid="393" name="PRIMACT_1" dataType="Real" value="16.0099"
            FieldEntry fid="25" name="ASK" dataType="Real" value="16.3846"
            FieldEntry fid="275" name="SEC_ACT_1" dataType="Real" value="16.3846"
            FieldEntry fid="11" name="NETCHNG_1" dataType="Real" value="-0.0471"
            FieldEntry fid="56" name="PCTCHNG" dataType="Real" value="-0.29"
            FieldEntry fid="115" name="BID_TICK_1" dataType="Enum" value="2"
            FieldEntry fid="270" name="ACT_TP_1" dataType="Enum" value="27"
            FieldEntry fid="875" name="VALUE_DT1" dataType="Date" value="19 OCT 2022"
            FieldEntry fid="1010" name="VALUE_TS1" dataType="Time" value="05:42:02:000:000:000"
            FieldEntry fid="68" name="MATUR_DATE" dataType="Date" value="20 OCT 2022"
            FieldEntry fid="996" name="GEN_VAL1" dataType="Real" value="1646.4040"
            FieldEntry fid="997" name="GEN_VAL2" dataType="Real" value="1647.2949"
            FieldEntry fid="1028" name="GV1_DATE" dataType="Date" value="19 OCT 2022"
            FieldEntry fid="1051" name="GV2_DATE" dataType="Date" value="20 OCT 2022"
            FieldEntry fid="116" name="DAYS_MAT" dataType="Real" value="1"
            FieldEntry fid="281" name="SC_ACT_TP2" dataType="Enum" value="0"
            FieldEntry fid="3791" name="START_DT" dataType="Date" value="19 OCT 2022"
        FieldListEnd

    PayloadEnd


3. In RFA, the message is in an event that is added to an event queue. The application needs to dispatch events from an event queue and the application will get one event from an event queue at a time. Next, the application needs to process that event and then dispatch the subsequent events. If the update rate is high and the application is a slow consumer, there will be a lot of events in the event queue waiting to be dispatched and the application will use a lot of memory to store those events.

4. The login request message contains a username and other attributes. Typically, the application needs to change the username in the login request message. You can change other attributes, such as ApplicationId, and Position. You can refer to the RDM Usage Guide in the API package for all available attributes in the login request message.

Please feel free to reach out if you have any further questions.

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.

您好,请问下,以这个UPDATE_RESP为例,我是通过什么知道是哪个RIC码呀?

MESSAGE

Msg Type: MsgType.UPDATE_RESP

Msg Model Type: MARKET_PRICE

Indication Flags: DO_NOT_CONFLATE

Hint Flags: HAS_RESP_TYPE_NUM | HAS_SEQ_NUM

SeqNum: 42222

RespTypeNum: 0 (UNSPECIFIED)

Payload: 163 bytes

FIELD_LIST

FIELD_ENTRY 3/DSPLY_NAME: EBS LON

FIELD_ENTRY 5/TIMACT: 05:34

FIELD_ENTRY 11/NETCHNG_1: 0.0047

FIELD_ENTRY 17/ACTIV_DATE: 22 AUG 2022

FIELD_ENTRY 22/BID: 19.0300

FIELD_ENTRY 23/BID_1: 19.0256

FIELD_ENTRY 25/ASK: 19.0600

FIELD_ENTRY 26/ASK_1: 19.0556

FIELD_ENTRY 56/PCTCHNG: 0.02

FIELD_ENTRY 78/OFFCL_CODE:

FIELD_ENTRY 105/BCKGRNDPAG: EBS

FIELD_ENTRY 114/BID_NET_CH: 0.0047

FIELD_ENTRY 115/BID_TICK_1: Þ (1)

FIELD_ENTRY 134/MID_PRICE: 19.05

FIELD_ENTRY 275/SEC_ACT_1: 19.0600

FIELD_ENTRY 393/PRIMACT_1: 19.0300

FIELD_ENTRY 1352/DSPLY_NMLL:

FIELD_ENTRY 7854/PREREAL415: 0.02


Upvotes
79.2k 251 52 74

@zhujx

By default, you will get the RIC name in the Refresh response only. It is in the attribute info.

    if(respMsg.getHintMask() & RespMsg::AttribInfoFlag)
    {
        const AttribInfo& attribInfo = respMsg.getAttribInfo();
        UInt32 hint = attribInfo.getHintMask();
        if(hint & AttribInfo::ServiceNameFlag)
        {
            text += "\n    serviceName : ";
            text += attribInfo.getServiceName();
        }
        if(hint & AttribInfo::NameFlag)
        {
            text += "\n    symbolName  : ";
            text += attribInfo.getName();
        }
    }

Typically, there are three methods to map an update response to a RIC.

1. The application needs to maintain a map of handles and RICs. Each item stream will have a unique handle. Therefore, from the refresh response, you will get a RIC name from the attribute info and a handle from the event.getHandle() method.

2. The application can specify an item name in a closure, when calling the registerClient method to subscribe to an item. Then, the application can get a closure (an item name) from the event.getClosure() method. However, this method will not work with a batch request.

3. The application can set the AttribInfo In Updates flag in the request message. For example:

//RFA C++
reqMsg.setIndicationMask(reqMsg.getIndicationMask() | ReqMsg::AttribInfoInUpdatesFlag);
//RFA Java
ommmsg.setIndicationFlags(OMMMsg.Indication.REFRESH | OMMMsg.Indication.ATTRIB_INFO_IN_UPDATES);

With this method, the update message will contain an item name in the attribute info.

2022 Oct 20 08:55:06.175 ST GMT+07:00 15A30 4ED0   595 TRACE <- Received MMT_MARKET_PRICE Update XAUON=R
    serviceName : ELEKTRON_DD
    symbolName  : XAUON=R.
    FieldList: standard data count = 18

If you have any further questions, please specify which RFA (RFA C++, RFA Java, or RFA.NET) you are using.


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.