Each field in the FIX protocol is assigned a specific data type, defining the format the data can take. The data type for each field is specified in a FIX dictionary.
There are six primitive data types, and a number of complex data types which extend them and impose further restrictions.
| Type | Description | Example |
|---|---|---|
| string | Text | Hello |
| char | A single character | x |
| int | Integer, positive or negative | -1 |
| float | Floating point number, positive or negative | -1.2 |
| boolean | Y (yes/true) or N (no/false) | Y |
| data | Raw data, must be proceeded by a Length field | ab123^2 |
| Type | Parent type | Description | Example |
|---|---|---|---|
| Length | int | The length in bytes of a Data field | 50 |
| TagNum | int | A field's tag number when using TagValue encoding | 35 |
| SeqNum | int | A message sequence number | 123 |
| NumInGroup | int | The number of entries in a repeating group | 3 |
| DayOfMonth | int | A day during a particular month | 30 |
| Price | float | For certain asset classes prices may be negative values | 1.33153 |
| PriceOffset | float | Can be mathematically added to a Price | 2.2 |
| Quantity | float | A quantity is a value which is either an integer number of "shares", or a decimal value for non-share quantity asset classes | 1.1 |
| Amount | float | A Price multiplied by a Quantity | 1.464683 |
| Percentage | float | e.g. 0.05 represents 5% | 0.05 |
| Country | string | 2-letter country code | US |
| Currency | string | 3-letter currency code | USD |
| Language | string | 2-letter language code | en |
| Exchange | string | 4-character MIC code | HSBC |
| MultipleCharValue | string | Set of character values, separated by a space | 2 A F |
| MultipleStringValue | string | Set of string values, separated by a space | AB CD EF |
| MonthYear | string | Month and year. Optionally, a day of the month or week code can be appended | 201503 |
| UTCTimestamp | string | Date/time combination in UTC | 20150301-01:02:03.000 |
| UTCTimeOnly | string | Time in UTC | 01:02:03.000 |
| UTCDateOnly | string | Date in UTC | 20150301 |
| LocalMktTime | string | Time local to the current market, not UTC | 01:02:03.000 |
| LocalMktDate | string | Date local to the current market, not UTC | 20150301 |
| TZTimeOnly | string | Time plus UTC offset | 01:02:03Z |
| TZTimestamp | string | Date/time combination plus UTC offset | 20150301-01:02:03.000Z |
| XID | string | A unique identifier that's global to a FIX message | XAG3K5N12XZP95 |
| XIDRef | string | A reference to an XID | XAG3K5N12XZP95 |
| XMLData | data | A raw XML document | <doc>text</doc> |