{
  "$schema": "http://json-schema.org/draft-07/schema#",
  "$id": "https://fdc3.finos.org/schemas/next/context/tradeList.schema.json",
  "type": "object",
  "title": "TradeList",
  "description": "@experimental A list of trades. Use this type for use cases that require not just a single trade, but multiple.\n\nThe TradeList 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.tradeList"
        },
        "trades": {
          "title": "List of Trades",
          "description": "An array of trade contexts that forms the list.",
          "type": "array",
          "items": {
            "$ref": "trade.schema.json#"
          }
        },
        "id": {
          "title": "Trade List Identifiers",
          "description": "One or more identifiers that refer to the trade list in an OMS, EMS or related system. Specific key names for systems are expected to be standardized in future.",
          "type": "object",
          "additionalProperties": {
            "type": "string"
          }
        },
        "name": {
          "type": "string",
          "title": "Name",
          "description": "An optional human-readable name for the trade list"
        }
      },
      "required": [
        "type",
        "trades"
      ]
    },
    { "$ref": "context.schema.json#/definitions/BaseContext" }
  ],
  "examples": [
    {
      "type": "fdc3.tradeList",
      "trades": [
        {
          "type": "fdc3.trade",
          "name": "...",
          "id": {
            "myEMS": "12345"
          },
          "product": {
            "type": "fdc3.product",
            "id": {
              "productId": "ABC123"
            },
            "instrument": {
              "type": "fdc3.instrument",
              "id": {
                "ticker": "MSFT"
              }
            }
          }
        },
        {
          "type": "fdc3.trade",
          "id": {
            "myEMS": "67890"
          },
          "product": {
            "type": "fdc3.product",
            "id": {
              "productId": "DEF456"
            },
            "instrument": {
              "type": "fdc3.instrument",
              "id": {
                "ticker": "TSLA"
              }
            }
          }
        }
      ]
    }
  ]
}