You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: v2-0-RC1/doc/02FieldEncoding.md
+12-9Lines changed: 12 additions & 9 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -11,11 +11,12 @@ and message schema but are introduced here as an overview.
11
11
12
12
### Semantic data type
13
13
14
-
The FIX semantic data type of a field tells a data domain interpreted at the application layer, for example, whether it is numeric or character data, or whether it represents a time or price. Simple Binary Encoding represents all of
14
+
The FIX semantic data type of a field tells a data domain interpreted at the application layer, for example, whether it is numeric or character data, or whether it represents a time or price. Simple Binary Encoding represents most of
15
15
the semantic data types that FIX protocol has defined across all
16
-
encodings. In message specifications, FIX data type is declared with
17
-
attribute semanticType. See the section 2.2 below for a listing of those
18
-
FIX types.
16
+
encodings. In field specifications, FIX data type is declared with
17
+
attribute `semanticType`.
18
+
19
+
See the "Data type summary" below for a listing of FIX types with the usual mapping to SBE encodings. Implementations should not restrict a semantic type to a specific encoding. Message designers may wish to imply a conversion or specialized interpretation at the application layer.
19
20
20
21
### Encoding
21
22
@@ -74,10 +75,10 @@ value of an optional field does not necessarily imply that a default
74
75
value should be applied. Rather, default handling is left to application
FIX semantic types are mapped to binary field encodings as follows. See
81
+
FIX semantic types are typically mapped to binary field encodings as follows. See
81
82
sections below for more detail about each type.
82
83
83
84
Schema attributes may restrict the range of valid values for a field.
@@ -92,7 +93,7 @@ See Common field schema attributes below.
92
93
| NumInGroup | Group dimension encoding | 3.4.8 | A counter representing the number of entries in a repeating group. Value must be positive. |
93
94
| DayOfMonth | Integer encoding | 2.4 | A field representing a day during a particular month (values 1 to 31). |
94
95
| Qty | Decimal encoding | 2.5 | A number representing quantity of a security, such as shares. The encoding may constrain values to integers, if desired. |
95
-
| float | Float encoding | 2.5 | A real number with binary representation of specified precision|
96
+
| float | Float or Decimal| 2.5 | A real number with binary representation of specified precision. Alternatively, Decimal encoding is preferred for exact decimal numbers.|
96
97
| Price | Decimal encoding | 2.5 | A decimal number representing a price |
97
98
| PriceOffset | Decimal encoding | 2.5 | A decimal number representing a price offset, which can be mathematically added to a Price. |
98
99
| Amt | Decimal encoding | 2.5 | A field typically representing a Price times a Qty. |
@@ -139,12 +140,12 @@ Attributes are optional unless specified otherwise.
139
140
| nullValue | A special value that indicates that an optional value is not set. See encodings below for default nullValue for each type. Mutually exclusive with presence=required and constant. |
140
141
| minValue | The lowest valid value of a range. Applies to scalar data types, but not to String or data types. |
141
142
| maxValue | The highest valid value of a range (inclusive unless specified otherwise). Applies to scalar data types, but not to String or data types. |
142
-
| semanticType | Tells the FIX semantic type of a field or encoding. It may be specified on either a field or its encoding. |
143
+
| semanticType | Tells the semantic interpretation of a field in the FIX data type taxonomy.|
143
144
144
145
### Non-FIX types
145
146
146
147
Encodings may be added to SBE messages that do not correspond to listed
147
-
FIX data types. In that case, the fields that use the encoding will not have a semanticType attribute.
148
+
FIX data types. In that case, the fields that use the encoding will not have a `semanticType` attribute.
Designers should determine whether a field of FIX data type float should be represented by a binary floating point number or an exact decimal number. If it is the latter, then see "Decimal encoding" above.
454
+
452
455
### Examples of floating point fields
453
456
454
457
Examples show encoded bytes on the wire as hexadecimal digits,
0 commit comments