@boarteam/fix-dict-fix44 0.2.0 → 2.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -1,13 +1,12 @@
1
1
  # @boarteam/fix-dict-fix44
2
2
 
3
- The **complete FIX 4.4 dictionary as data** (912 fields / 26 components / 93 messages / 25
3
+ The **complete FIX 4.4 dictionary as data** (912 fields / 93 messages / 105 components / 23
4
4
  datatypes) for the [`@boarteam/fix`](https://www.npmjs.com/package/@boarteam/fix) engine.
5
- Generated from the FIX 4.4 specification and cross-checked against the QuickFIX `FIX44.xml`
6
- dictionary by a CI drift gate — never hand-maintained.
5
+ Generated directly from the QuickFIX `FIX44.xml` data dictionary never hand-maintained.
7
6
 
8
7
  On a 0.x line and actively developed. See the
9
- [project README](https://github.com/boarteam/fix-protocol#readme) for coverage, the cross-check
10
- report, and declared coverage gaps.
8
+ [project README](https://github.com/boarteam/fix-protocol#readme) for coverage and declared
9
+ coverage gaps.
11
10
 
12
11
  ```ts
13
12
  import { createFixEngine } from '@boarteam/fix';
@@ -17,8 +16,42 @@ const fix = createFixEngine(dictionary);
17
16
  const wire = fix.encode({ msgType: MsgType.NewOrderSingle, fields: { [Tags.ClOrdID]: 'A1' } });
18
17
  ```
19
18
 
20
- Exports: `dictionary` (the data), `Tags` (field name tag), `MsgType` (message name
21
- MsgType value), and `DICTIONARY_VERSION`.
19
+ Or build the same message with the **typed `message` factory** statically typed to each
20
+ message's fields/groups, rendering byte-identical to `encode`:
21
+
22
+ ```ts
23
+ import { message, MsgType } from '@boarteam/fix-dict-fix44';
24
+
25
+ const wire = message(MsgType.NewOrderSingle)
26
+ .set('ClOrdID', 'A1')
27
+ .set('Side', '1') // typed to the Side value union
28
+ .render({
29
+ SenderCompID: 'ME',
30
+ TargetCompID: 'YOU',
31
+ MsgSeqNum: 1,
32
+ SendingTime: '20260716-12:00:00',
33
+ });
34
+ ```
35
+
36
+ Exports: `dictionary` (the data), `Tags` (field name → tag), `TagNames` (tag → field
37
+ name), `MsgType` (message name → MsgType value), `MsgTypeNames` (MsgType value →
38
+ message name), `Enums` (field name → spec value name → wire string, e.g.
39
+ `Enums.MDEntryType.BID === '0'`), a top-level const per enumerated field (`Side`,
40
+ `OrdType`, `MDEntryType`, ...), and `DICTIONARY_VERSION`. `MsgType` and every
41
+ per-field const are also same-name types — unions of their wire values — so
42
+ `msgType: MsgType` and `side: Side` work in type positions. The one enumerated
43
+ field without a top-level const is `MsgType` (tag 35), whose name belongs to the
44
+ message-type map: use `Enums.MsgType`.
45
+
46
+ For the typed encode side it also exports `message` (a factory bound to this dictionary),
47
+ `MessageBodies` (the `MsgType` value → body-type registry), and a named body type per message
48
+ (`NewOrderSingleBody`, `MarketDataSnapshotFullRefreshBody`, …) plus augmentable per-container
49
+ group/component `interface`s (`SecListGrp_NoRelatedSymEntry`, `InstrumentFields`, …) that venue
50
+ extensions patch via declaration merging. For the read side it exports `isMessageType` — a type
51
+ guard that narrows a `MessageView<any>` of unknown type to a specific message's body keyed on its
52
+ `MsgType` value (so `get()` becomes typed) — and `MessageOf<M>`, the matching annotation alias.
53
+ See the [`@boarteam/fix` README](https://www.npmjs.com/package/@boarteam/fix) for the
54
+ typed-message API.
22
55
 
23
56
  Requires `@boarteam/fix` as a peer dependency.
24
57