A Matter of Semantics
Deutsche Börse’s Hanno Klein, Co-Chair of the FPL Global Technical Committee, expounds on the role of FIX semantics in standardised access to trading and clearing services.
Why are Interface Semantics Important?
Semantics represent the look and feel of an interface from a nontechnical perspective, but can influence overall implementation and testing effort much more than the syntax. If you will, semantics are the interface language and standardization is about speaking the same language, for example FIX.
The Difference between the FIX Syntax and FIX Semantics
Syntax is the encoding of bits and bytes on the wire; for example, whether you use ASCII or binary values for numbers or whether you have a FIX tag=value syntax or an XML syntax like FIXML. The syntax consists of messages, components, fields and valid values that are the building blocks for the semantics. FIX semantics is about the business functionality and how it is expressed within the building blocks of FIX. FIX Semantics relates to the elements with which information is conveyed and about the flows through which these elements are passed back and forth between two or more parties. Let me give you some examples.
- A combination of “35=D” and “35=8” is the tag=value syntax for the semantic “submission of a new order for a simple instrument followed by a confirmation or rejection being returned”. Readers probably know these tags by the more familiar terms NewOrderSingle and ExecutionReport.
- 59=4” is the tag=value syntax for the semantic “order needs to be filled completely upon entry or cancelled immediately”. The FIXML syntax for the same semantic is TmInForce=”4”.The corresponding term for the order, Fill-Or-Kill (FOK) is a well known part of the FIX language.
- “38=1000|1138=100|1083=1|108 4=3|1085=50|1086=80” stands for “reserve order of 1000 that is to be displayed initially with 100 and to be replenished whenever a fill occurs with a randomly chosen quantity between 50 and 80”. Some might be more familiar with the term “iceberg order” which is not used by FIX.
The mapping of semantics to syntaxis not trivial and standardization is about using the same map for the same semantics to ease the burden for the software developer and reduce costs.
How can FIX semantics be used more effectively?
Greater effectiveness will come through an increasing awareness of the importance of FIX semantics for true standardization. FIX training courses could be offered with a focus on semantics and put less emphasis on the technical aspects of the protocol such as the encoding or the session layer mechanics. Usage guidelines for new and existing functionalities can help to understand the semantics behind FIX message layouts.
Without semantics it is impossible to determine which FIX fields or valid values will be present in which contexts. The syntax will merely show all possible values of a field, which may be sufficient for the developer, but not for the person who then wants to test the interface.