Feld not found for tag: 272 for MarketDataIncrementalRefresh

Created at 10 Sep 2016, 16:25
How’s your experience with the cTrader Platform?
Your feedback is crucial to cTrader's development. Please take a few seconds to share your opinion and help us improve your trading experience. Thanks!
MC

mclskan

Joined 10.09.2016

Feld not found for tag: 272 for MarketDataIncrementalRefresh
10 Sep 2016, 16:25


Hello

I am new to FIX and I am trying to get Market Data. However In my test I recieved

 

==========Header::==========
BeginString:: FIX.4.4
BodyLength:: 156
MsgType:: MarketDataIncrementalRefresh (X)
MsgSeqNum:: 2
SenderCompID:: CSERVER
SendingTime:: 20160910-12:51:10.288
TargetCompID:: fxpro.XXXX
==========Body:: ==========
NoMDEntries:: 2
---------- ----------
MDUpdateAction:: NEW(0)
MDEntryType:: BID(0)
MDEntryPx:: 0
==Cracker exception==
QuickFix.FieldNotFoundException: field not found for tag: 272

Does it show because of weekend ? or am I doing something wrong ?


@mclskan
Replies

rmssf
11 Sep 2016, 19:16

You should have received MarketDataSnapshotFullRefresh (W) and not MarketDataIncrementalRefresh (X).

What subscription type have you used? It must be SNAPSHOT_PLUS_UPDATES (1).

Rui

 


@rmssf

rmssf
11 Sep 2016, 19:56

RE:

Ok you must be requesting market depth then.

But I'm not seeing field 272 in the server response in my case.

Have you already tried market spot instead of depth and is it working?

rmssf said:

You should have received MarketDataSnapshotFullRefresh (W) and not MarketDataIncrementalRefresh (X).

What subscription type have you used? It must be SNAPSHOT_PLUS_UPDATES (1).

Rui

 

 


@rmssf

mclskan
11 Sep 2016, 20:22

RE: RE:

   This is the request

 

            MDReqID mdReqID = new MDReqID("EURUSD");
            SubscriptionRequestType subType = new SubscriptionRequestType(SubscriptionRequestType.SNAPSHOT_PLUS_UPDATES);
            MarketDepth marketDepth = new MarketDepth(0);
            QuickFix.FIX44.MarketDataRequest message = new QuickFix.FIX44.MarketDataRequest(mdReqID, subType, marketDepth);


            message.SetField(new MDUpdateType(1));
            QuickFix.FIX44.MarketDataRequest.NoMDEntryTypesGroup group1 = new QuickFix.FIX44.MarketDataRequest.NoMDEntryTypesGroup();
            group1.Set(new MDEntryType('0'));
            message.AddGroup(group1);

            QuickFix.FIX44.MarketDataRequest.NoMDEntryTypesGroup group2 = new QuickFix.FIX44.MarketDataRequest.NoMDEntryTypesGroup();
            group2.Set(new MDEntryType('1'));
            message.AddGroup(group2);

            QuickFix.FIX44.MarketDataRequest.NoRelatedSymGroup symbolGroup = new QuickFix.FIX44.MarketDataRequest.NoRelatedSymGroup();
            symbolGroup.SetField(new Symbol("1"));
            message.AddGroup(symbolGroup);

 

 

rmssf said:

Ok you must be requesting market depth then.

But I'm not seeing field 272 in the server response in my case.

Have you already tried market spot instead of depth and is it working?

rmssf said:

You should have received MarketDataSnapshotFullRefresh (W) and not MarketDataIncrementalRefresh (X).

What subscription type have you used? It must be SNAPSHOT_PLUS_UPDATES (1).

Rui

 

 

 


@mclskan

rmssf
11 Sep 2016, 23:55

Can you try with this:

 

            MDReqID mdReqID = new MDReqID("MARKETDATAID");
            SubscriptionRequestType subType = new SubscriptionRequestType(SubscriptionRequestType.SNAPSHOT_PLUS_UPDATES);
            MarketDepth marketDepth = new MarketDepth(0);

            QuickFix.FIX44.MarketDataRequest.NoMDEntryTypesGroup marketDataEntryGroup = new QuickFix.FIX44.MarketDataRequest.NoMDEntryTypesGroup();
            marketDataEntryGroup.Set(new MDEntryType(MDEntryType.BID));

            QuickFix.FIX44.MarketDataRequest.NoRelatedSymGroup symbolGroup = new QuickFix.FIX44.MarketDataRequest.NoRelatedSymGroup();
            symbolGroup.Set(new Symbol("1"));

            QuickFix.FIX44.MarketDataRequest message = new QuickFix.FIX44.MarketDataRequest(mdReqID, subType, marketDepth);
            message.AddGroup(marketDataEntryGroup);
            message.AddGroup(symbolGroup);

 


@rmssf

rmssf
12 Sep 2016, 00:28

I just tried using your code without any modification, it works fine and still without seeing field 272.

It must be something you have there upstream.


@rmssf

mclskan
12 Sep 2016, 10:19

RE:

rmssf said:

I just tried using your code without any modification, it works fine and still without seeing field 272.

It must be something you have there upstream.

It seems because of weekend I didnt recieve any price data. I recieve it now but the issue is I recieve a lot of bid and ask. It is market depth probably but I didnt want that in the code as I stated.

I dont know which price is real price now.


@mclskan

ianj
12 Sep 2016, 10:23

RE: RE:

I haven't noticed 272 but i haven't subscribed over weekend either and  i haven't tried fxpro at all - ill see if i have my FIX logs enabled (I am tracking several cTrader brokers) - maybe its broker specific 

Some brokers have high tick rates on cTrader, others less so - most in excess of any MT4 feed

mclskan said:

rmssf said:

I just tried using your code without any modification, it works fine and still without seeing field 272.

It must be something you have there upstream.

It seems because of weekend I didnt recieve any price data. I recieve it now but the issue is I recieve a lot of bid and ask. It is market depth probably but I didnt want that in the code as I stated.

I dont know which price is real price now.

 


@ianj

rmssf
12 Sep 2016, 10:26

Your code above is subscribing to market depth (full book):

MarketDepth marketDepth = new MarketDepth(0);

 

To subscribe to spot only (top of book):

MarketDepth marketDepth = new MarketDepth(1);

 


@rmssf

mclskan
12 Sep 2016, 10:53

RE:

rmssf said:

Your code above is subscribing to market depth (full book):

MarketDepth marketDepth = new MarketDepth(0);

 

To subscribe to spot only (top of book):

MarketDepth marketDepth = new MarketDepth(1);

 

Yes now I get the spot. But maybe this error is because of fxpro I am not sure. 

Can you guys add me to skype also to communicate in detail. My skype is legand1234

Its is very hard to find people who know fix protocol.


@mclskan

mclskan
12 Sep 2016, 11:09

Is there a way I can get multiple currency data besides just one ?


@mclskan

rmssf
12 Sep 2016, 11:28

RE:

mclskan said:

Is there a way I can get multiple currency data besides just one ?

 

In the same session or in separate sessions?

 


@rmssf

mclskan
12 Sep 2016, 11:33

RE: RE:

rmssf said:

mclskan said:

Is there a way I can get multiple currency data besides just one ?

 

In the same session or in separate sessions?

 

in the code I send can I somehow add new instrument there or I can copy paste and do for second instrument also?

I can probably copy paste and get the second instrument also but is there a chance with just one marketdatarequest I can get 2 instrument in one message.


@mclskan

rmssf
12 Sep 2016, 11:34

Example for same session (easiest):

 

        private void QueryMarketDataRequest()
        {
            QuickFix.FIX44.MarketDataRequest m1 = QueryMarketDataRequest44("EURUSD", "1", 1);
            QuickFix.FIX44.MarketDataRequest m2 = QueryMarketDataRequest44("GBPAUD", "16", 1);

            if (m1 != null )
                SendMessage(m);
            if (m2 != null)
                SendMessage(m2);
        }


        private QuickFix.FIX44.MarketDataRequest QueryMarketDataRequest44(string id, string symbol, int type)
        {
            MDReqID mdReqID = new MDReqID(id);
            SubscriptionRequestType subType = new SubscriptionRequestType(SubscriptionRequestType.SNAPSHOT_PLUS_UPDATES);
            MarketDepth marketDepth = new MarketDepth(type);

            QuickFix.FIX44.MarketDataRequest.NoMDEntryTypesGroup marketDataEntryGroup = new QuickFix.FIX44.MarketDataRequest.NoMDEntryTypesGroup();
            marketDataEntryGroup.Set(new MDEntryType(MDEntryType.BID));

            QuickFix.FIX44.MarketDataRequest.NoRelatedSymGroup symbolGroup = new QuickFix.FIX44.MarketDataRequest.NoRelatedSymGroup();
            symbolGroup.Set(new Symbol(symbol));

            QuickFix.FIX44.MarketDataRequest message = new QuickFix.FIX44.MarketDataRequest(mdReqID, subType, marketDepth);
            message.AddGroup(marketDataEntryGroup);
            message.AddGroup(symbolGroup);

            return message;
        }

 


@rmssf

mclskan
12 Sep 2016, 11:37

Yes I thought the same Thank you very much for your assistance guys.


@mclskan

rmssf
12 Sep 2016, 11:37

RE: RE: RE:

No, you get 2 streams, one message for each symbol and properly identified with the symbol id.

mclskan said:

rmssf said:

mclskan said:

Is there a way I can get multiple currency data besides just one ?

 

In the same session or in separate sessions?

 

in the code I send can I somehow add new instrument there or I can copy paste and do for second instrument also?

I can probably copy paste and get the second instrument also but is there a chance with just one marketdatarequest I can get 2 instrument in one message.

 


@rmssf

ianj
12 Sep 2016, 18:32

RE: RE: RE: RE:

Yes, In theory you can get a single message with updates for multiple Symbols (hence the spec allowing separate Symbol for each price)

No, in practise i have never seen them mix on the same message - you get a separate message for each symbol

Saying that, i have a current problem with one particular Spotware broker feed - i wonder if this could be happening?

 

rmssf said:

No, you get 2 streams, one message for each symbol and properly identified with the symbol id.

mclskan said:


@ianj

rmssf
12 Sep 2016, 22:59

RE: RE: RE: RE: RE:

In theory? If you know that there is one "tick" for each symbol and they are generated asynchronously in respect to each other, how would multiple symbol quotes work in a single message? Would the message be delayed while waiting for a quote for all symbols to get stacked, or would it send repeated quotes for all symbols each time a new quote for a particular symbol arrives?

ianj said:

Yes, In theory you can get a single message with updates for multiple Symbols (hence the spec allowing separate Symbol for each price)

No, in practise i have never seen them mix on the same message - you get a separate message for each symbol

Saying that, i have a current problem with one particular Spotware broker feed - i wonder if this could be happening?

 

rmssf said:

No, you get 2 streams, one message for each symbol and properly identified with the symbol id.

mclskan said:

 


@rmssf

ianj
13 Sep 2016, 13:11

RE: RE: RE: RE: RE: RE:

If it was not possible (according to the protocol), there would not be a Symbol for EACH price/tier update - there would be a single Symbol for the whole message. The FIX protocol spec does in fact define what it means when the Symbol is absent for each price update - you assume it has not changed since the last price (specifically any non TOP update)

As you suggested "in reality" ticks are usually discrete so the update is pushed out for that symbol only

However, a market making operation would often emit a collection of symbol updates when an underlying currency changes in perceived value - so for example if a lot of GBP was purchased, then there would be affects on GBPUSD, EURGBP, GBPJPY etc and a market maker would/could emit a family of pairs at the same time on the SAME tick (to avoid arbitrage hits) - in theory these could/SHOULD appear in the same message - that is why the FIX protocol allows it

Quotes are delayed and/or reduced (filtered/CONFLATED/time sliced) to offer enhanced value for those who are willing to pay extra and reduce the communication/processing overhead for those unwilling or unable to handle all updates. The brokers also run liquidity aggregation and what and when is emitted is configurable

I am surprised that so many feeds actually are for 1 symbol only

I have an issue with "corruption" on the book on the FIX feed for 1 broker only (FxPig) and it has occurred to be that my own assumption that all updates are for a single Symbol might be the cause - hence my comments here. I will comment again when i have performed some tests over the next day or so 

 

rmssf said:

In theory? If you know that there is one "tick" for each symbol and they are generated asynchronously in respect to each other, how would multiple symbol quotes work in a single message? Would the message be delayed while waiting for a quote for all symbols to get stacked, or would it send repeated quotes for all symbols each time a new quote for a particular symbol arrives?


@ianj

ianj
13 Sep 2016, 13:35

RE: RE: RE: RE: RE: RE:

Price quotes are by default indicative - there is no guarantee that you can execute at that price for any length of time. As long as they don't HAVE to honor the price the prices across multiple symbols do not HAVE to align (though it saves them hassle if they do). Some brokers matching engines are auto-matching so they execute without liquidity supplier intervention - emitting consistent symbol groups prices is then far more important as it requires manual intervention to "break" a trade. 

I rarely see scenarios where repeated quotes are sent just for the sake of it - it adds little information (except perhaps it increases the possibility of executing at the price - the price is less likely to be stale)

The terms i mentioned before are the regular terms used in the industry for these operations: Conflation/Time slicing/Filtering and it is not standardised

rmssf said:

In theory? If you know that there is one "tick" for each symbol and they are generated asynchronously in respect to each other, how would multiple symbol quotes work in a single message? Would the message be delayed while waiting for a quote for all symbols to get stacked, or would it send repeated quotes for all symbols each time a new quote for a particular symbol arrives?

ianj said:

 


@ianj

rmssf
13 Sep 2016, 13:36

RE: RE: RE: RE: RE: RE: RE:

Yes, in theory what you say makes some sense. But price of a currency is always relative to another. So you can't say GBP has valued/devalued in itself, it's always relative to another currency or asset. So if you want to buy 1 lot of GBP, are you buying with what? If the pair is GBPUSD, you are buying with USD, you buy 1 lot of GBP and sell 1 lot of USD. This makes the price of both currencies to move, not just GBP. And in theory it would propagate to all currencies available, so you would get an update for all those currencies in same message.

Yes, in theory it is possible to have multiple currency updates in one message, just because the protocol allows it.
Also because the English grammar allows you to, in theory you can write an entire book using only one sentence.

 

ianj said:

If it was not possible (according to the protocol), there would not be a Symbol for EACH price/tier update - there would be a single Symbol for the whole message. The FIX protocol spec does in fact define what it means when the Symbol is absent for each price update - you assume it has not changed since the last price (specifically any non TOP update)

As you suggested "in reality" ticks are usually discrete so the update is pushed out for that symbol only

However, a market making operation would often emit a collection of symbol updates when an underlying currency changes in perceived value - so for example if a lot of GBP was purchased, then there would be affects on GBPUSD, EURGBP, GBPJPY etc and a market maker would/could emit a family of pairs at the same time on the SAME tick (to avoid arbitrage hits) - in theory these could/SHOULD appear in the same message - that is why the FIX protocol allows it

Quotes are delayed and/or reduced (filtered/CONFLATED/time sliced) to offer enhanced value for those who are willing to pay extra and reduce the communication/processing overhead for those unwilling or unable to handle all updates. The brokers also run liquidity aggregation and what and when is emitted is configurable

I am surprised that so many feeds actually are for 1 symbol only

I have an issue with "corruption" on the book on the FIX feed for 1 broker only (FxPig) and it has occurred to be that my own assumption that all updates are for a single Symbol might be the cause - hence my comments here. I will comment again when i have performed some tests over the next day or so 

 

rmssf said:

In theory? If you know that there is one "tick" for each symbol and they are generated asynchronously in respect to each other, how would multiple symbol quotes work in a single message? Would the message be delayed while waiting for a quote for all symbols to get stacked, or would it send repeated quotes for all symbols each time a new quote for a particular symbol arrives?

 


@rmssf

ianj
13 Sep 2016, 15:23

RE: RE: RE: RE: RE: RE: RE: RE:

If you use unique MdReqId in each market data subscription and ONLY use 1 Symbol in each subscription the updates should come through in separated messages because there is only 1 MdReqId for each market update message

Other than that it is implementation specific

http://btobits.com/fixopaedia/fixdic44/index.html

 


@ianj

rmssf
13 Sep 2016, 15:48

RE: RE: RE: RE: RE: RE: RE: RE: RE:

The FIX protocol as of today is the result of the evolution of itself, and it inherited the basic concepts of a more primitive version.
And this happens pretty much with all other protocols you can find in many other fields of engineering.

The TCP/IP protocol for example, there are many implementations and most of them differ in one aspect or another. That makes possible, for example, for a hacker to figure out what operating system and its version is running in a remote target machine. This is called "OS fingerprinting".

That said, Spotware have their own implementation of the protocol.
I've made a few tests, and apparently the MdReqId field is simply ignored, and it does not accept more than one symbol in each MarketDataRequest, either the additional symbols are ignored, or the message gets rejected.

ianj said:

If you use unique MdReqId in each market data subscription and ONLY use 1 Symbol in each subscription the updates should come through in separated messages because there is only 1 MdReqId for each market update message

Other than that it is implementation specific

http://btobits.com/fixopaedia/fixdic44/index.html

 

 


@rmssf

rmssf
14 Sep 2016, 13:20

Had the time to make a couple more of simple tests.

This implementation, as I see it, is tailored to the retail client, not to trading institutions, and is a very light implementation with a reduced subset of the full functionalities that FIX44 provides.

One big advantage of this is that this simplicity gives faster message processing and thus less latency, compared to a full featured engine.

While I understand why it was made this way, to much simplicity can limit our options too much, and it can even break things.

In fact, this implementation is so light that it breaks the protocol in some situations:

 

The MdReqId field is completely ignored:

8=FIX.4.4|9=121|35=V|34=3|49=fxpig.xxxxxxx|50=QUOTE|52=20160914-10:07:43.832|56=cServer|262=MDReqID-2|263=1|264=1|267=1|269=0|146=1|55=1|10=110|
8=FIX.4.4|9=121|35=V|34=4|49=fxpig.xxxxxxx|50=QUOTE|52=20160914-10:07:44.630|56=cServer|262=MDReqID-3|263=2|264=1|267=1|269=0|146=1|55=1|10=110|

 

And the BusinessMessageReject (j) message from cServer to client is missing a required tag RefMsgType (372) and my client application promptly informs the server that is reject message was rejected:

8=FIX.4.4|9=121|35=V|34=2|49=fxpig.xxxxxxx|50=QUOTE|52=20160914-10:07:43.807|56=cServer|262=MDReqID-1|263=1|264=1|267=1|269=0|146=1|55=1|10=110|
8=FIX.4.4|9=121|35=V|34=3|49=fxpig.xxxxxxx|50=QUOTE|52=20160914-10:07:43.832|56=cServer|262=MDReqID-2|263=1|264=1|267=1|269=0|146=1|55=1|10=110|
8=FIX.4.4|9=150|35=j|34=3|49=cServer|52=20160914-10:07:43.883|56=fxpig.xxxxxxx|57=QUOTE|58=ALREADY_SUBSCRIBED:Try to subscribe on symbol(s) twice|379=MDReqID-2|380=0|10=145|
8=FIX.4.4|9=121|35=3|34=6|49=fxpig.xxxxxxx|50=QUOTE|52=20160914-10:07:44.744|56=cServer|45=3|58=Required tag missing|371=372|372=j|373=1|10=192|

 


@rmssf