문제

Venue 1 may use a a specific message to request say Market Data, whilst venue 2 may use another message for the same task. Now what is the best way of mapping this? Any suggestions would be appreciated

Plus is it sensible to append extra fields to a venues message, to make mapping easier?

Can anyone provide insight on how an exchange performs this task? As an exchange which is connected to multiple venues must surely have to parse and translate each venues spec.

도움이 되었습니까?

해결책

Unfortunately, the flexible nature of FIX doesn't really make this an easy task. My other answer goes into more detail on why converting between FIX versions is not feasible and how two venues using the same FIX version can actually be radically incompatible.

In my experience, you really have to write a custom adapter for each venue. One way is to create a venue-independent set of data objects for your app to use, and then implement conversions between your objects and the FIX messages to/from the venue. The app would see the converter as only a generic interface; it doesn't need to know whether the target venue is 4.2 or 4.4 or whatnot.

For instance, you could create a GenericNewOrder class and an IConverter interface with a method SendNewOrder(GenericNewOrder). The IConverter has an implementation for each venue, e.g. VenueAConverter and VenueBConverter. VenueAConverter creates a new order message appropriate for VenueA, and VenueBConverter creates one for VenueB. If you ever have to add a new venue, just implement a new IConverter.

That's the best pattern I've been able to come up with.

(Questions like yours actually come up semi-frequently on the QuickFIX mailing lists.)

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top