{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://402rates.com/schemas/rwa-instrument-v2.json",
  "title": "402rates.com RWA instrument state with access evidence",
  "description": "Opt-in version 2 retains the version 1 financial fields and adds dated access evidence.",
  "oneOf": [
    {
      "$ref": "#/$defs/instrument_response"
    },
    {
      "$ref": "#/$defs/ticker_list_response"
    }
  ],
  "$defs": {
    "status": {
      "type": "string",
      "enum": [
        "known",
        "conditional",
        "conflicting",
        "unknown"
      ]
    },
    "date_or_null": {
      "type": [
        "string",
        "null"
      ],
      "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
    },
    "term_cell": {
      "type": "object",
      "required": [
        "status",
        "issuer_stated",
        "source_url"
      ],
      "properties": {
        "status": {
          "$ref": "#/$defs/status"
        },
        "issuer_stated": {
          "type": [
            "string",
            "null"
          ]
        },
        "source_url": {
          "type": [
            "string",
            "null"
          ],
          "format": "uri"
        }
      },
      "additionalProperties": true
    },
    "meta": {
      "type": "object",
      "required": [
        "capability",
        "schema_version",
        "generated_at",
        "schema",
        "contract",
        "disclaimer",
        "instrument_version"
      ],
      "properties": {
        "capability": {
          "const": "compass.rwa.instrument"
        },
        "schema_version": {
          "const": "0.5.0"
        },
        "generated_at": {
          "type": "string",
          "format": "date-time"
        },
        "schema": {
          "const": "https://402rates.com/schemas/rwa-instrument-v2.json"
        },
        "contract": {
          "type": "object",
          "required": [
            "stability",
            "change_policy"
          ],
          "properties": {
            "stability": {
              "const": "frozen"
            },
            "change_policy": {
              "type": "string",
              "minLength": 1
            }
          },
          "additionalProperties": false
        },
        "disclaimer": {
          "const": "Informational data and calculation service only. Not investment, legal, tax or accounting advice; not an offer, solicitation, recommendation, or determination of eligibility or suitability. Source and onchain data may be inaccurate, incomplete, delayed, stale or conflicting. Verify independently. The caller remains responsible for every decision and action; 402rates.com does not execute investment transactions or hold financial assets on the caller's behalf."
        },
        "instrument_version": {
          "const": "2.0.0"
        }
      },
      "additionalProperties": false
    },
    "terms": {
      "type": "object",
      "required": [
        "schema_version",
        "minimum_subscription",
        "minimum_redemption",
        "subscription_fee_bps",
        "redemption_fee_bps",
        "redemption",
        "access_requirements",
        "token_chains",
        "subscription_chains",
        "redemption_chains"
      ],
      "properties": {
        "schema_version": {
          "type": "string"
        },
        "minimum_subscription": {
          "$ref": "#/$defs/term_cell"
        },
        "minimum_redemption": {
          "$ref": "#/$defs/term_cell"
        },
        "subscription_fee_bps": {
          "$ref": "#/$defs/term_cell"
        },
        "redemption_fee_bps": {
          "$ref": "#/$defs/term_cell"
        },
        "redemption": {
          "$ref": "#/$defs/term_cell"
        },
        "access_requirements": {
          "$ref": "#/$defs/term_cell"
        },
        "token_chains": {
          "$ref": "#/$defs/term_cell"
        },
        "subscription_chains": {
          "$ref": "#/$defs/term_cell"
        },
        "redemption_chains": {
          "$ref": "#/$defs/term_cell"
        }
      },
      "additionalProperties": false
    },
    "yield": {
      "type": "object",
      "required": [
        "basis_name",
        "basis_version",
        "instrument",
        "ticker",
        "issuer",
        "family",
        "currency",
        "yield_basis",
        "yield_pct",
        "issuer_figure",
        "unavailable_reason",
        "deployments"
      ],
      "properties": {
        "basis_name": {
          "const": "Open Treasury Yield Basis"
        },
        "basis_version": {
          "const": "1.1.0"
        },
        "instrument": {
          "type": "string",
          "minLength": 1
        },
        "ticker": {
          "type": "string",
          "minLength": 1
        },
        "issuer": {
          "type": [
            "string",
            "null"
          ]
        },
        "family": {
          "enum": [
            "price_accrual",
            "supply_accrual"
          ]
        },
        "currency": {
          "type": [
            "string",
            "null"
          ]
        },
        "yield_basis": {
          "enum": [
            "measured",
            "quoted",
            "unavailable"
          ]
        },
        "yield_pct": {
          "type": [
            "number",
            "null"
          ]
        },
        "issuer_figure": {
          "type": "object"
        },
        "unavailable_reason": {
          "type": [
            "string",
            "null"
          ]
        },
        "deployments": {
          "type": "array"
        }
      },
      "additionalProperties": true
    },
    "deployment": {
      "type": "object",
      "required": [
        "chain_key",
        "chain",
        "address",
        "decimals",
        "verification",
        "verified_on"
      ],
      "properties": {
        "chain_key": {
          "type": "string",
          "minLength": 1
        },
        "chain": {
          "type": "string",
          "minLength": 1
        },
        "address": {
          "type": "string",
          "minLength": 1
        },
        "decimals": {
          "type": "integer",
          "minimum": 0
        },
        "verification": {
          "enum": [
            "self_onchain",
            "issuer_list"
          ]
        },
        "verified_on": {
          "$ref": "#/$defs/date_or_null"
        }
      },
      "additionalProperties": false
    },
    "size_supply": {
      "type": "object",
      "required": [
        "chain_key",
        "address",
        "total_supply",
        "raw_value",
        "decimals",
        "block",
        "read_at",
        "as_of",
        "age_days",
        "source_id"
      ],
      "properties": {
        "chain_key": {
          "type": "string",
          "minLength": 1
        },
        "address": {
          "type": "string",
          "pattern": "^0x[0-9a-fA-F]{40}$"
        },
        "total_supply": {
          "type": "string",
          "pattern": "^\\d+(?:\\.\\d+)?$"
        },
        "raw_value": {
          "type": "string",
          "pattern": "^\\d+$"
        },
        "decimals": {
          "type": "integer",
          "minimum": 0
        },
        "block": {
          "type": [
            "integer",
            "null"
          ],
          "minimum": 0
        },
        "read_at": {
          "type": "string",
          "format": "date-time"
        },
        "as_of": {
          "type": "string",
          "minLength": 1
        },
        "age_days": {
          "type": "integer",
          "minimum": 0
        },
        "source_id": {
          "type": "string",
          "minLength": 1
        }
      },
      "additionalProperties": false
    },
    "size": {
      "type": "object",
      "required": [
        "status",
        "value_atomic",
        "value_decimals",
        "value",
        "currency",
        "computed_from",
        "scope",
        "deployments_read",
        "deployments_known",
        "note"
      ],
      "properties": {
        "status": {
          "enum": [
            "measured",
            "supply_only",
            "unavailable"
          ]
        },
        "value_atomic": {
          "type": [
            "string",
            "null"
          ],
          "pattern": "^\\d+$"
        },
        "value_decimals": {
          "type": [
            "integer",
            "null"
          ],
          "minimum": 0
        },
        "value": {
          "type": [
            "string",
            "null"
          ],
          "pattern": "^\\d+(?:\\.\\d+)?$"
        },
        "currency": {
          "type": [
            "string",
            "null"
          ]
        },
        "computed_from": {
          "type": "object",
          "required": [
            "nav_per_share",
            "supply"
          ],
          "properties": {
            "nav_per_share": {
              "oneOf": [
                {
                  "type": "null"
                },
                {
                  "type": "object",
                  "required": [
                    "source_id",
                    "as_of",
                    "value",
                    "raw_value",
                    "decimals",
                    "read_at"
                  ],
                  "properties": {
                    "source_id": {
                      "type": "string",
                      "minLength": 1
                    },
                    "as_of": {
                      "$ref": "#/$defs/date_or_null"
                    },
                    "value": {
                      "type": "string",
                      "minLength": 1
                    },
                    "raw_value": {
                      "type": "string",
                      "pattern": "^\\d+$"
                    },
                    "decimals": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "read_at": {
                      "type": "string",
                      "format": "date-time"
                    }
                  },
                  "additionalProperties": false
                }
              ]
            },
            "supply": {
              "type": "array",
              "items": {
                "$ref": "#/$defs/size_supply"
              }
            }
          },
          "additionalProperties": false
        },
        "scope": {
          "const": "deployments_read"
        },
        "deployments_read": {
          "type": "integer",
          "minimum": 0
        },
        "deployments_known": {
          "type": "integer",
          "minimum": 1
        },
        "note": {
          "const": "total across the deployments we read, not the fund's total"
        },
        "reason": {
          "type": "string",
          "minLength": 1
        },
        "age_days": {
          "type": [
            "integer",
            "null"
          ],
          "minimum": 0
        },
        "max_age_days": {
          "type": [
            "integer",
            "null"
          ],
          "minimum": 0
        }
      },
      "additionalProperties": false
    },
    "instrument_response": {
      "type": "object",
      "required": [
        "instrument",
        "yield",
        "size",
        "terms",
        "deployments",
        "evidence",
        "meta",
        "access_evidence"
      ],
      "properties": {
        "instrument": {
          "type": "object",
          "required": [
            "ticker",
            "issuer",
            "family",
            "currency"
          ],
          "properties": {
            "ticker": {
              "type": "string",
              "minLength": 1
            },
            "issuer": {
              "type": [
                "string",
                "null"
              ]
            },
            "family": {
              "enum": [
                "price_accrual",
                "supply_accrual"
              ]
            },
            "currency": {
              "type": [
                "string",
                "null"
              ]
            }
          },
          "additionalProperties": false
        },
        "yield": {
          "$ref": "#/$defs/yield"
        },
        "size": {
          "$ref": "#/$defs/size"
        },
        "terms": {
          "$ref": "#/$defs/terms"
        },
        "deployments": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/deployment"
          }
        },
        "evidence": {
          "type": "object",
          "required": [
            "terms_retrieved_at",
            "yield_computed_at",
            "size_computed_at",
            "last_verified"
          ],
          "properties": {
            "terms_retrieved_at": {
              "$ref": "#/$defs/date_or_null"
            },
            "yield_computed_at": {
              "type": "string",
              "format": "date-time"
            },
            "size_computed_at": {
              "type": "string",
              "format": "date-time"
            },
            "last_verified": {
              "$ref": "#/$defs/date_or_null"
            }
          },
          "additionalProperties": false
        },
        "meta": {
          "$ref": "#/$defs/meta"
        },
        "changes": {
          "type": "object",
          "required": [
            "report_version",
            "status",
            "checked_at",
            "retention_days",
            "truncated",
            "data",
            "limitations"
          ],
          "properties": {
            "report_version": {
              "const": "1.0.0"
            },
            "status": {
              "enum": [
                "available",
                "initializing",
                "stale",
                "unavailable"
              ]
            },
            "checked_at": {
              "type": [
                "string",
                "null"
              ]
            },
            "retention_days": {
              "const": 90
            },
            "truncated": {
              "type": "boolean"
            },
            "data": {
              "type": "array",
              "maxItems": 100,
              "items": {
                "type": "object"
              }
            },
            "limitations": {
              "type": "array",
              "items": {
                "type": "string"
              }
            }
          },
          "additionalProperties": false
        },
        "access_evidence": {
          "type": "object",
          "additionalProperties": false,
          "required": [
            "schema_version",
            "records",
            "sources",
            "limitations"
          ],
          "properties": {
            "schema_version": {
              "const": "2.0.0"
            },
            "records": {
              "type": "array",
              "minItems": 2,
              "maxItems": 2,
              "items": {
                "type": "object",
                "additionalProperties": false,
                "required": [
                  "record_id",
                  "record_type",
                  "name",
                  "evidence_status",
                  "tracked_instrument_id",
                  "ticker",
                  "instrument",
                  "access",
                  "protocol",
                  "event",
                  "source_ids",
                  "limitations"
                ],
                "properties": {
                  "record_id": {
                    "type": "string"
                  },
                  "record_type": {
                    "enum": [
                      "instrument",
                      "access",
                      "protocol",
                      "event"
                    ]
                  },
                  "name": {
                    "type": "string"
                  },
                  "evidence_status": {
                    "type": "string"
                  },
                  "tracked_instrument_id": {
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "ticker": {
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "instrument": {
                    "anyOf": [
                      {
                        "type": "null"
                      },
                      {
                        "type": "object",
                        "additionalProperties": false,
                        "required": [
                          "legal_name",
                          "issuer",
                          "family",
                          "deployments"
                        ],
                        "properties": {
                          "legal_name": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "issuer": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "family": {
                            "type": "string"
                          },
                          "deployments": {
                            "type": "array",
                            "items": {
                              "type": "object",
                              "additionalProperties": false,
                              "required": [
                                "chain",
                                "address",
                                "verification",
                                "verified_on"
                              ],
                              "properties": {
                                "chain": {
                                  "type": "string"
                                },
                                "address": {
                                  "type": "string"
                                },
                                "verification": {
                                  "type": "string"
                                },
                                "verified_on": {
                                  "type": [
                                    "string",
                                    "null"
                                  ],
                                  "format": "date"
                                }
                              }
                            }
                          }
                        }
                      }
                    ]
                  },
                  "access": {
                    "anyOf": [
                      {
                        "type": "null"
                      },
                      {
                        "type": "object",
                        "additionalProperties": false,
                        "required": [
                          "relationship",
                          "candidate_name",
                          "candidate_symbol",
                          "share_class",
                          "legal_claim",
                          "token_contract",
                          "chain",
                          "terms",
                          "investor_categories",
                          "source_ids"
                        ],
                        "properties": {
                          "relationship": {
                            "type": "string"
                          },
                          "candidate_name": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "candidate_symbol": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "share_class": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "legal_claim": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "token_contract": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "chain": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "terms": {
                            "anyOf": [
                              {
                                "type": "null"
                              },
                              {
                                "type": "object",
                                "additionalProperties": false,
                                "required": [
                                  "schema_version",
                                  "minimum_subscription",
                                  "minimum_redemption",
                                  "subscription_fee_bps",
                                  "redemption_fee_bps",
                                  "redemption",
                                  "access_requirements",
                                  "token_chains",
                                  "subscription_chains",
                                  "redemption_chains"
                                ],
                                "properties": {
                                  "schema_version": {
                                    "type": "string"
                                  },
                                  "minimum_subscription": {
                                    "type": "object",
                                    "required": [
                                      "status",
                                      "issuer_stated",
                                      "source_url",
                                      "retrieved_at"
                                    ],
                                    "properties": {
                                      "status": {
                                        "enum": [
                                          "known",
                                          "conditional",
                                          "conflicting",
                                          "unknown"
                                        ]
                                      },
                                      "issuer_stated": {
                                        "type": [
                                          "string",
                                          "null"
                                        ]
                                      },
                                      "source_url": {
                                        "type": [
                                          "string",
                                          "null"
                                        ]
                                      },
                                      "retrieved_at": {
                                        "type": [
                                          "string",
                                          "null"
                                        ]
                                      }
                                    },
                                    "additionalProperties": true
                                  },
                                  "minimum_redemption": {
                                    "type": "object",
                                    "required": [
                                      "status",
                                      "issuer_stated",
                                      "source_url",
                                      "retrieved_at"
                                    ],
                                    "properties": {
                                      "status": {
                                        "enum": [
                                          "known",
                                          "conditional",
                                          "conflicting",
                                          "unknown"
                                        ]
                                      },
                                      "issuer_stated": {
                                        "type": [
                                          "string",
                                          "null"
                                        ]
                                      },
                                      "source_url": {
                                        "type": [
                                          "string",
                                          "null"
                                        ]
                                      },
                                      "retrieved_at": {
                                        "type": [
                                          "string",
                                          "null"
                                        ]
                                      }
                                    },
                                    "additionalProperties": true
                                  },
                                  "subscription_fee_bps": {
                                    "type": "object",
                                    "required": [
                                      "status",
                                      "issuer_stated",
                                      "source_url",
                                      "retrieved_at"
                                    ],
                                    "properties": {
                                      "status": {
                                        "enum": [
                                          "known",
                                          "conditional",
                                          "conflicting",
                                          "unknown"
                                        ]
                                      },
                                      "issuer_stated": {
                                        "type": [
                                          "string",
                                          "null"
                                        ]
                                      },
                                      "source_url": {
                                        "type": [
                                          "string",
                                          "null"
                                        ]
                                      },
                                      "retrieved_at": {
                                        "type": [
                                          "string",
                                          "null"
                                        ]
                                      }
                                    },
                                    "additionalProperties": true
                                  },
                                  "redemption_fee_bps": {
                                    "type": "object",
                                    "required": [
                                      "status",
                                      "issuer_stated",
                                      "source_url",
                                      "retrieved_at"
                                    ],
                                    "properties": {
                                      "status": {
                                        "enum": [
                                          "known",
                                          "conditional",
                                          "conflicting",
                                          "unknown"
                                        ]
                                      },
                                      "issuer_stated": {
                                        "type": [
                                          "string",
                                          "null"
                                        ]
                                      },
                                      "source_url": {
                                        "type": [
                                          "string",
                                          "null"
                                        ]
                                      },
                                      "retrieved_at": {
                                        "type": [
                                          "string",
                                          "null"
                                        ]
                                      }
                                    },
                                    "additionalProperties": true
                                  },
                                  "redemption": {
                                    "type": "object",
                                    "required": [
                                      "status",
                                      "issuer_stated",
                                      "source_url",
                                      "retrieved_at"
                                    ],
                                    "properties": {
                                      "status": {
                                        "enum": [
                                          "known",
                                          "conditional",
                                          "conflicting",
                                          "unknown"
                                        ]
                                      },
                                      "issuer_stated": {
                                        "type": [
                                          "string",
                                          "null"
                                        ]
                                      },
                                      "source_url": {
                                        "type": [
                                          "string",
                                          "null"
                                        ]
                                      },
                                      "retrieved_at": {
                                        "type": [
                                          "string",
                                          "null"
                                        ]
                                      }
                                    },
                                    "additionalProperties": true
                                  },
                                  "access_requirements": {
                                    "type": "object",
                                    "required": [
                                      "status",
                                      "issuer_stated",
                                      "source_url",
                                      "retrieved_at"
                                    ],
                                    "properties": {
                                      "status": {
                                        "enum": [
                                          "known",
                                          "conditional",
                                          "conflicting",
                                          "unknown"
                                        ]
                                      },
                                      "issuer_stated": {
                                        "type": [
                                          "string",
                                          "null"
                                        ]
                                      },
                                      "source_url": {
                                        "type": [
                                          "string",
                                          "null"
                                        ]
                                      },
                                      "retrieved_at": {
                                        "type": [
                                          "string",
                                          "null"
                                        ]
                                      }
                                    },
                                    "additionalProperties": true
                                  },
                                  "token_chains": {
                                    "type": "object",
                                    "required": [
                                      "status",
                                      "issuer_stated",
                                      "source_url",
                                      "retrieved_at"
                                    ],
                                    "properties": {
                                      "status": {
                                        "enum": [
                                          "known",
                                          "conditional",
                                          "conflicting",
                                          "unknown"
                                        ]
                                      },
                                      "issuer_stated": {
                                        "type": [
                                          "string",
                                          "null"
                                        ]
                                      },
                                      "source_url": {
                                        "type": [
                                          "string",
                                          "null"
                                        ]
                                      },
                                      "retrieved_at": {
                                        "type": [
                                          "string",
                                          "null"
                                        ]
                                      }
                                    },
                                    "additionalProperties": true
                                  },
                                  "subscription_chains": {
                                    "type": "object",
                                    "required": [
                                      "status",
                                      "issuer_stated",
                                      "source_url",
                                      "retrieved_at"
                                    ],
                                    "properties": {
                                      "status": {
                                        "enum": [
                                          "known",
                                          "conditional",
                                          "conflicting",
                                          "unknown"
                                        ]
                                      },
                                      "issuer_stated": {
                                        "type": [
                                          "string",
                                          "null"
                                        ]
                                      },
                                      "source_url": {
                                        "type": [
                                          "string",
                                          "null"
                                        ]
                                      },
                                      "retrieved_at": {
                                        "type": [
                                          "string",
                                          "null"
                                        ]
                                      }
                                    },
                                    "additionalProperties": true
                                  },
                                  "redemption_chains": {
                                    "type": "object",
                                    "required": [
                                      "status",
                                      "issuer_stated",
                                      "source_url",
                                      "retrieved_at"
                                    ],
                                    "properties": {
                                      "status": {
                                        "enum": [
                                          "known",
                                          "conditional",
                                          "conflicting",
                                          "unknown"
                                        ]
                                      },
                                      "issuer_stated": {
                                        "type": [
                                          "string",
                                          "null"
                                        ]
                                      },
                                      "source_url": {
                                        "type": [
                                          "string",
                                          "null"
                                        ]
                                      },
                                      "retrieved_at": {
                                        "type": [
                                          "string",
                                          "null"
                                        ]
                                      }
                                    },
                                    "additionalProperties": true
                                  }
                                }
                              }
                            ]
                          },
                          "investor_categories": {
                            "type": "array",
                            "items": {
                              "type": "string"
                            }
                          },
                          "source_ids": {
                            "type": "array",
                            "items": {
                              "type": "string"
                            }
                          }
                        }
                      }
                    ]
                  },
                  "protocol": {
                    "anyOf": [
                      {
                        "type": "null"
                      },
                      {
                        "type": "object",
                        "additionalProperties": false,
                        "required": [
                          "chain",
                          "program_address",
                          "deployment_status",
                          "software_license",
                          "documented_source_revision",
                          "documented_idl_version",
                          "account_name",
                          "account_size_bytes",
                          "upgradeable",
                          "settlement_model",
                          "create_permission",
                          "funding_method",
                          "settlement_signer",
                          "cancel_signer",
                          "reclaim_reject_recover_signers",
                          "blocked_mint_extensions",
                          "token_programs",
                          "source_ids"
                        ],
                        "properties": {
                          "chain": {
                            "type": "string"
                          },
                          "program_address": {
                            "type": "string"
                          },
                          "deployment_status": {
                            "type": "string"
                          },
                          "software_license": {
                            "type": "string"
                          },
                          "documented_source_revision": {
                            "type": "string"
                          },
                          "documented_idl_version": {
                            "type": "string"
                          },
                          "account_name": {
                            "type": "string"
                          },
                          "account_size_bytes": {
                            "type": "integer"
                          },
                          "upgradeable": {
                            "type": "boolean"
                          },
                          "settlement_model": {
                            "type": "string"
                          },
                          "create_permission": {
                            "type": "string"
                          },
                          "funding_method": {
                            "type": "string"
                          },
                          "settlement_signer": {
                            "type": "string"
                          },
                          "cancel_signer": {
                            "type": "string"
                          },
                          "reclaim_reject_recover_signers": {
                            "type": "array",
                            "items": {
                              "type": "string"
                            }
                          },
                          "blocked_mint_extensions": {
                            "type": "array",
                            "items": {
                              "type": "string"
                            }
                          },
                          "token_programs": {
                            "type": "array",
                            "items": {
                              "type": "string"
                            }
                          },
                          "source_ids": {
                            "type": "array",
                            "items": {
                              "type": "string"
                            }
                          }
                        }
                      }
                    ]
                  },
                  "event": {
                    "anyOf": [
                      {
                        "type": "null"
                      },
                      {
                        "type": "object",
                        "additionalProperties": false,
                        "required": [
                          "kind",
                          "occurred_on",
                          "date_basis",
                          "subjects",
                          "summary",
                          "regulatory_effect"
                        ],
                        "properties": {
                          "kind": {
                            "enum": [
                              "cooperation_announced",
                              "regulatory_discussion",
                              "transaction_reported"
                            ]
                          },
                          "occurred_on": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "format": "date"
                          },
                          "date_basis": {
                            "type": "string"
                          },
                          "subjects": {
                            "type": "array",
                            "items": {
                              "type": "string"
                            }
                          },
                          "summary": {
                            "type": "string"
                          },
                          "regulatory_effect": {
                            "type": "string"
                          }
                        }
                      }
                    ]
                  },
                  "source_ids": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  },
                  "limitations": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  }
                },
                "allOf": [
                  {
                    "if": {
                      "properties": {
                        "record_type": {
                          "const": "instrument"
                        }
                      }
                    },
                    "then": {
                      "properties": {
                        "instrument": {
                          "type": "object"
                        },
                        "access": {
                          "type": "null"
                        },
                        "protocol": {
                          "type": "null"
                        },
                        "event": {
                          "type": "null"
                        }
                      }
                    }
                  },
                  {
                    "if": {
                      "properties": {
                        "record_type": {
                          "const": "access"
                        }
                      }
                    },
                    "then": {
                      "properties": {
                        "instrument": {
                          "type": "null"
                        },
                        "access": {
                          "type": "object"
                        },
                        "protocol": {
                          "type": "null"
                        },
                        "event": {
                          "type": "null"
                        }
                      }
                    }
                  },
                  {
                    "if": {
                      "properties": {
                        "record_type": {
                          "const": "protocol"
                        }
                      }
                    },
                    "then": {
                      "properties": {
                        "instrument": {
                          "type": "null"
                        },
                        "access": {
                          "type": "null"
                        },
                        "protocol": {
                          "type": "object"
                        },
                        "event": {
                          "type": "null"
                        }
                      }
                    }
                  },
                  {
                    "if": {
                      "properties": {
                        "record_type": {
                          "const": "event"
                        }
                      }
                    },
                    "then": {
                      "properties": {
                        "instrument": {
                          "type": "null"
                        },
                        "access": {
                          "type": "null"
                        },
                        "protocol": {
                          "type": "null"
                        },
                        "event": {
                          "type": "object"
                        }
                      }
                    }
                  }
                ]
              }
            },
            "sources": {
              "type": "array",
              "items": {
                "type": "object",
                "additionalProperties": false,
                "required": [
                  "source_id",
                  "publisher",
                  "url",
                  "kind",
                  "published_on",
                  "event_on",
                  "checked_on",
                  "checked_at",
                  "check_precision",
                  "read_status",
                  "revision",
                  "note"
                ],
                "properties": {
                  "source_id": {
                    "type": "string"
                  },
                  "publisher": {
                    "type": "string"
                  },
                  "url": {
                    "type": "string",
                    "format": "uri"
                  },
                  "kind": {
                    "type": "string"
                  },
                  "published_on": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "format": "date"
                  },
                  "event_on": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "format": "date"
                  },
                  "checked_on": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "format": "date"
                  },
                  "checked_at": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "format": "date-time"
                  },
                  "check_precision": {
                    "enum": [
                      "date",
                      "timestamp",
                      "unknown"
                    ]
                  },
                  "read_status": {
                    "type": "string"
                  },
                  "revision": {
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "note": {
                    "type": "string"
                  }
                }
              }
            },
            "limitations": {
              "type": "array",
              "items": {
                "type": "string"
              }
            }
          }
        }
      },
      "additionalProperties": false
    },
    "ticker_list_response": {
      "type": "object",
      "required": [
        "known_tickers",
        "meta"
      ],
      "properties": {
        "known_tickers": {
          "type": "array",
          "minItems": 13,
          "uniqueItems": true,
          "items": {
            "type": "string",
            "minLength": 1
          }
        },
        "meta": {
          "$ref": "#/$defs/meta"
        }
      },
      "additionalProperties": false
    }
  }
}
