Lesson 02 · 5 min

Reading the Model

Types, fields, cardinality, choices, and conditions: the grammar you need to read any schema.

A grammar with four words

Before touching products and trades, it pays to learn how to read the model. The good news: the whole CDM is written with a tiny grammar. Once you can read one type, you can read all 1,500 of them.

Key ideas
  • Types are the nouns

    A type is a named bundle of fields, like Price or EconomicTerms. Types nest: fields point at other types, and big structures grow from small ones.

  • Every field declares its cardinality

    1..1 means exactly one. 0..1 means optional. 1..* means at least one, no upper bound. The numbers are promises about the data, enforced by validation.

  • Choices are either/or

    Some types say "exactly one of these": a RateSpecification is fixed or floating or inflation, never two at once.

  • Conditions are the fine print

    Beyond shapes, types carry named rules ("if there is an FX feature, quantities must reference two currencies"). Validation runs them automatically.

Reading a field row

Open any type in the explorer and you'll see rows like this one from EconomicTerms:

payout:1..*Payoutthe legs of the product…the field namecardinality: at least one, no upper limitthe type. click it to dive in

Read it left to right: the field is called payout, its cardinality says it must appear at least once (1..*), and each entry is a Payout. The type name is a link; clicking it takes you one level deeper. That is the entire navigation model of the CDM: follow the nouns.

Cardinality in the data itself

Cardinality shows up directly in JSON shape. A 1..1 field is an object; a 1..* field is an array. Compare:

{} cardinality, as it appears on the wire
{  "economicTerms": {    "payout": [      {        "interestRatePayout": {          "dayCountFraction": "30E/360"        }      },      {        "interestRatePayout": {          "dayCountFraction": "ACT/360"        }      }    ],    "terminationDate": {      "adjustableDate": {        "unadjustedDate": "2031-06-15"      }    }  }}
The schema and the JSON are two views of the same promise. If you send a single object where a list is required, validation rejects it before any business logic runs.
Try itOpen EconomicTerms and practice: find one required field, one optional field, and one list. Then click into payout and keep following the nouns.
◆ Checkpoint

01A field is declared as quantity : 0..* Quantity. What does that tell you?

1 / 3