Currency
base: StringFIX 4.4FIX 4.2
Currency is a FIX datatype defined in FIX 4.4 and FIX 4.2, carried on the wire as String. 17 fields use it.
Wire format
- Base type
- String
- Fields
- 17
A three-letter ISO 4217 code.
What the specification says
FIX 4.4
string field representing a currency type using ISO 4217 Currency code (3 character) values (see Appendix 6-A).
FIX 4.2
String field (see definition of "String" above) representing a currency type (see Appendix A-Valid Currency Codes).
Descriptions are quoted from the FIX Orchestra sources under the Apache 2.0 licence.
How @boarteam/fix handles it
@boarteam/fix keeps the value as a string; format rules are checked by validate(), which reports validate/invalid-value rather than throwing.
Fields with this datatype
| Tag | Field | Dialects | Messages |
|---|---|---|---|
| 15 | Currency | FIX 4.4, FIX 4.2 | 45 |
| 120 | SettlCurrency | FIX 4.4, FIX 4.2 | 12 |
| 138 | MiscFeeCurr | FIX 4.4, FIX 4.2 | 9 |
| 220 | BenchmarkCurveCurrency | FIX 4.4 | 22 |
| 318 | UnderlyingCurrency | FIX 4.4, FIX 4.2 | 59 |
| 478 | CashDistribCurr | FIX 4.4 | 1 |
| 479 | CommCurrency | FIX 4.4 | 13 |
| 521 | ContAmtCurr | FIX 4.4 | 2 |
| 556 | LegCurrency | FIX 4.4 | 50 |
| 675 | LegSettlCurrency | FIX 4.4 | 2 |
| 676 | LegBenchmarkCurveCurrency | FIX 4.4 | 5 |
| 736 | AllocSettlCurrency | FIX 4.4 | 11 |
| 767 | AllowableOneSidednessCurr | FIX 4.4 | 1 |
| 918 | AgreementCurrency | FIX 4.4 | 26 |
| 941 | UnderlyingStrikeCurrency | FIX 4.4 | 59 |
| 942 | LegStrikeCurrency | FIX 4.4 | 50 |
| 947 | StrikeCurrency | FIX 4.4 | 59 |
Decode this in your own code
The same engine that produced the decoded example above is an Apache-2.0 npm package with zero runtime dependencies. It runs in Node and in the browser, and parse() returns problems as data instead of throwing.
npm i @boarteam/fix @boarteam/fix-dict-fix44