{
  "$schema": "http://json-schema.org/draft-07/schema#",
  "$id": "https://fdc3.finos.org/schemas/2.2/context/valuation.schema.json",
  "type": "object",
  "title": "Valuation",
  "description": "A context type representing the price and value of a holding.",
  "allOf": [
    {
      "type": "object",
      "properties": {
        "type": {
          "const": "fdc3.valuation"
        },
        "value": {
          "type": "number",
          "title": "Value",
          "description": "The value of the holding, expresses in the nominated currency."
        },
        "price": {
          "type": "number",
          "title": "Price per unit",
          "description": "The price per unit the the valuation is based on."
        },
        "CURRENCY_ISOCODE": {
          "type": "string",
          "pattern": "^[A-Z]{3}$",
          "title": "Valuation Currency",
          "description": "The valuation currency, which should conform to 3 character alphabetic codes defined in [ISO 4217](https://www.iso.org/iso-4217-currency-codes.html)"
        },
        "valuationTime": {
          "type": "string",
          "format": "date-time",
          "title": "Valuation time",
          "description": "The time at which the valuation was performed, encoded according to [ISO 8601-1:2019](https://www.iso.org/standard/70907.html) with a timezone indicator included."
        },
        "expiryTime": {
          "type": "string",
          "format": "date-time",
          "title": "Expiry Time",
          "description": "The time at which this valuation expires, encoded according to [ISO 8601-1:2019](https://www.iso.org/standard/70907.html) with a timezone indicator included."
        }
      },
      "required": [
        "value",
        "CURRENCY_ISOCODE"
      ]
    },
    { "$ref": "context.schema.json#/definitions/BaseContext" }
  ],
  "examples": [
    {
      "type": "fdc3.valuation",
      "value": 500.0,
      "price": 5.0,
      "CURRENCY_ISOCODE": "USD",
      "expiryTime": "2022-05-13T16:16:24+01:00"
    }
  ]
}