{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://raw.githubusercontent.com/api-evangelist/moment/main/json-schema/moment-prices-response-schema.json",
  "title": "PricesResponse",
  "x-generated": "2026-10-14",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/moment-data-api-openapi.yml#/components/schemas/PricesResponse",
  "type": "object",
  "properties": {
    "count": {
      "type": "integer",
      "description": "The total number of price observations found that match the query."
    },
    "next": {
      "type": [
        "string",
        "null"
      ],
      "format": "URL",
      "description": "The URL to the next page of results (if any exist). Null if no more pages."
    },
    "prev": {
      "type": [
        "string",
        "null"
      ],
      "format": "URL",
      "description": "The URL to the previous page of results (if any exist). Null if no earlier pages."
    },
    "data": {
      "type": "array",
      "uniqueItems": true,
      "description": "The array of price data",
      "items": {
        "$ref": "#/$defs/Price"
      }
    }
  },
  "required": [
    "isin",
    "cusip",
    "data"
  ],
  "$defs": {
    "Price": {
      "title": "Price",
      "type": "object",
      "description": "The prices API returns aggregate data for the requested security.\n",
      "properties": {
        "timestamp": {
          "type": "string",
          "description": "Timestamp in RFC-3339 format with nanosecond precision.",
          "format": "date-time"
        },
        "price": {
          "type": "number",
          "description": "Evaluated price for market mid."
        },
        "yield_to_worst": {
          "type": [
            "number",
            "null"
          ],
          "description": "Evaluated yield to worst for market mid."
        },
        "yield_to_maturity": {
          "type": [
            "number",
            "null"
          ],
          "description": "Evaluated yield to maturity for market mid."
        }
      },
      "required": [
        "timestamp",
        "price",
        "yield_to_worst"
      ]
    }
  }
}