{
  "$schema": "http://json-schema.org/draft-07/schema#",
  "$id": "https://fdc3.finos.org/schemas/2.2/context/instrumentList.schema.json",
  "type": "object",
  "title": "InstrumentList",
  "description": "A collection of instruments. Use this type for use cases that require not just a single instrument, but multiple (e.g. to populate a watchlist). However, when holding information for each instrument is required, it is recommended to use the [Portfolio](Portfolio) type.\n\nThe instrument list schema does not explicitly include identifiers in the `id` section, as there is not a common standard for such identifiers. Applications can, however, populate this part of the contract with custom identifiers if so desired.",
  "allOf": [
    {
      "type": "object",
      "properties": {
        "type": {
          "const": "fdc3.instrumentList"
        },
        "id": {
          "type": "object",
          "additionalProperties": {
            "type": "string"
          },
          "title": "Instrument List Identifiers",
          "description": "One or more identifiers that refer to the instrument list in an OMS, EMS or related system. Specific key names for systems are expected to be standardized in future."
        },
        "name": {
          "type": "string",
          "title": "Name",
          "description": "An optional human-readable summary of the instrument list"
        },
        "instruments": {
          "type": "array",
          "title": "List of instruments",
          "description": "An array of instrument contexts that forms the list.",
          "items": {
            "$ref": "instrument.schema.json#"
          }
        }
      },
      "required": [
        "instruments"
      ]
    },
    { "$ref": "context.schema.json#/definitions/BaseContext" }
  ],
  "examples": [
    {
      "type": "fdc3.instrumentList",
      "instruments": [
        {
          "type": "fdc3.instrument",
          "id": {
            "ticker": "AAPL"
          },
          "market": {
            "MIC": "XNAS"
          }
        },
        {
          "type": "fdc3.instrument",
          "id": {
            "ISIN": "US5949181045"
          }
        }
      ]
    }
  ]
}
