FixAlchemy.GroupParser (FIXAlchemy v0.2.4)

View Source

Runtime engine for parsing FIX repeating groups from ordered keyword lists.

Groups in FIX are delimited by the first field in the group definition. Each time the delimiter field reappears, a new group entry begins. Fields not belonging to the group signal the end of the group.

Nested groups are extracted from each entry's ordered fields via recursive descent, so field ordering — which FIX group semantics depend on — is preserved all the way down.

Summary

Functions

Parse a repeating group from an ordered keyword list of fields.

Types

group_spec()

@type group_spec() :: %{
  delimiter: atom(),
  fields: MapSet.t(atom()),
  nested: [{atom(), group_spec()}]
}

Functions

parse(fields, spec)

@spec parse(
  keyword(),
  group_spec()
) :: [map()]

Parse a repeating group from an ordered keyword list of fields.

Returns a list of maps, one per group entry, with nested groups recursively parsed under their count field.