Build the FIX Message

The table in this example shows the step-by-step conversion for each field of the FAST message into the FIX format.

The following steps describe the actions taken to obtain the data shown in the Message Decoding Process table.

Step 1. Decoding begins with the identification of the Pmap bit for each field.

Step 2. The encoded FAST 7-bit binary values are obtained as shown in the “Encoded FAST 7-Bit Binary Value” column.

Step 3. The encoded FAST 7-bit binary values from step 2 are deserialized based on the data type specified in the template.

Step 4. The decoder maintains the state of prior values for each field throughout decoding and applies them for fields having operators of Delta, Copy, or Increment.

Step 5. Obtain fully decoded values.

Message Decoding Process Table

 

 

 

 

Step 1

Step 2

Step 3

Step 4

Step 5

#

Field Name

Presence*

Data Type/Field Operator

Pmap Bit

Encoded FAST Hex/Binary Value

Deserialized Encoded Value

Prior Value

Initial Value

Decoded Value

BIT STREAM = 11000000 10011110 100000011

1

Template ID

M

uint32/copy

1

0x9e – 10011110

30

 

 

TID = 30

2

MsgType

M

string/constant

No bit

None

None

 

X

35=X

3

NoMDEnt

M

uint32/no operator

No bit

0x83 - 10000011

3

 

 

268=3

Repeating Group 1 - Trade

BIT STREAM =

10101100 10000010 00111001 01100000 11001010 10000101 10000000 00110000 01101010 11111011 10000000

4

UpdateAction

M

uint32/copy

0

None

None

 

0

279=0

5

EntryType

M

uint/copy

1

0x82 - 10000010

2

 

0

269=2

6

EntryPrice

M

Exp: int32/copy Mant: int64/delta

Exp – 0 Mant – No bit

Exp: None

Mant: 0x39 0x60 0xca – 0111001 01100000 11001010

Exp = None

Mantissa =

946250

 

-2

270=9462.50

7

EntrySize

M

int32/delta

No bit

0x85 - 10000101

5

 

 

271=5

8

PriceLevel

O

uint32/increment

1

0x80 – 10000000

NULL

 

1

1023=No Value

9

SecurityID

M

uint32/copy

1

0x30 0x6a 0xfb -00110000 01101010 11111011

800123

 

 

48=800123

Repeating Group 2 – New Bid 1

BIT STREAM = 10101000 10000000 11001110 00000001 10101010 10000010 10010000

11

UpdateAction

M

uint32/copy

0

None

None

0

 

279=0

12

EntryType

M

uint/copy

1

0x80 - 10000000

0

2

 

269=0

13

EntryPrice

M

Exp: int32/copy

Mant: int64/delta

0

No bit

Exp: None

Mant: 0xce - 11001110

Exp = None

Mantissa = -50

-2946250

 

270=9462.00

14

EntrySize

M

int32/delta

No bit

0x01 0xaa –00000001 10101010

170

5

 

271=175

15

PriceLevel

O

uint32/increment

1

0x02 – 10000010

2*

NULL

 

1023=1

16

SecurityID

M

uint32/copy

0

None

None

800123

 

48=800123

Repeating Group 3 – New Bid 2

BIT STREAM = 10000000 11001110 11010110 11111101

18

UpdateAction

M

uint32/copy

0

None

None

0

 

279=0

19

EntryType

M

uint/copy

0

None

None

0

 

269=0

20

EntryPrice

M

Exp: int32/copy

Mant: int64/delta

0

No bit

Exp: None

Mant: 0xce-11001110

Exp: None

Mantissa=-50

-2946200

 

270=9461.50

21

EntrySize

M

int32/delta

No bit

0xd6 – 11010110

-42

175

 

271=133

22

PriceLevel

O

uint32/increment

0

None

1

1

 

1023=2

23

SecurityID

M

uint32/copy

0

None

None

800123

 

48=800123

*M=mandatory O=optional

**Subtract 1 from non-negative optional integer fields

***For delta fields, if a null is received, the prior value in the dictionary is not changed. In this case, the initial value was not specified in the template, so the initial value is set to ‘0’. The first encoded field received has a value of null, so the prior value is ‘0’ when decoding the second instance of this field.

Result – Decoded Values

35=x|268=3 (message header)

279=0|269=2|270=9462.50|271=5|48=8001234 (trade)

279=0|269=0|270=9462.00|271=175|1023=1|48=8001234(new bid 1)

279=0|269=0|270=9461.50|271=133|1023=2|48=8001234(new bid 2)