{
  "openapi": "3.1.0",
  "jsonSchemaDialect": "https://json-schema.org/draft/2020-12/schema",
  "info": {
    "title": "ALT API",
    "version": "2026-11-24",
    "description": "Read-only Go API reference: eight existing private GET operations plus a separate public market-data process for approved summaries, snapshots and bounded real candles, and its local liveness probe. Private runtime source remains 8d08e4a; public source-file contract hashes are recorded separately. This document is a contract, not evidence of rollout or live freshness; deployment acceptance is recorded separately. All examples are synthetic. Financial execution and end-user/account APIs are not implemented.",
    "x-runtime-source": "8d08e4ad3b576aded1cc4c361e34ea09d660c7d8",
    "x-public-contract-source-sha256": {
      "server/alt-backend/internal/backend/public_market_data.go": "21b90bb94f7709e206e7710091a788db367a386a3d01d8d9d3cec44ff13e6897",
      "server/alt-backend/internal/backend/public_candles.go": "a1782134653d818c3c6c03aae1ef43f42e3ca29d8085b1d4aa95aef82d05452b",
      "server/alt-backend/cmd/alt/main.go": "569208dd92d94e5eaa1d6a291aa63152e47b348330bd880ab4898b0f0eb32a6b",
      "server/alt-backend/internal/backend/public_candle_state.go": "edefbfd85a4350e8ba4dca852fe7d4a4e9e7f55b29ae2c5f0978d3493c1af56f"
    }
  },
  "servers": [
    {
      "url": "http://127.0.0.1:8080",
      "description": "Private ALT API through an authorized local SSM port-forwarding session, or local development. Not the documentation origin."
    }
  ],
  "tags": [
    {
      "name": "Health",
      "description": "Minimal process/coverage probes. No account or financial authority."
    },
    {
      "name": "Markets",
      "description": "Exact owner-approved market identities and observed public evidence."
    },
    {
      "name": "Ingestion",
      "description": "Private approved coverage and collector diagnostics."
    },
    {
      "name": "Public market data",
      "description": "Public venue observations from a separate read-only process. No internal bearer token, account data or execution authority."
    }
  ],
  "security": [
    {
      "InternalReadToken": []
    }
  ],
  "paths": {
    "/health": {
      "get": {
        "operationId": "getHealth",
        "summary": "Process liveness",
        "description": "Checks that the API process can respond. It does not read PostgreSQL or establish feed, research, account or trading readiness. Query strings are ignored.",
        "tags": [
          "Health"
        ],
        "responses": {
          "200": {
            "description": "API process is alive.",
            "headers": {
              "Cache-Control": {
                "description": "Responses must not be cached.",
                "schema": {
                  "type": "string",
                  "const": "no-store"
                }
              },
              "X-Content-Type-Options": {
                "description": "Content sniffing is disabled.",
                "schema": {
                  "type": "string",
                  "const": "nosniff"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Health"
                },
                "examples": {
                  "alive": {
                    "summary": "Synthetic liveness response",
                    "value": {
                      "status": "alive",
                      "service": "alt-trading-api"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/400"
          },
          "405": {
            "$ref": "#/components/responses/405"
          },
          "414": {
            "$ref": "#/components/responses/414"
          }
        },
        "x-codeSamples": [
          {
            "lang": "Shell",
            "label": "cURL (authorized SSM tunnel)",
            "source": "curl --fail-with-body --silent --show-error \\\n  'http://127.0.0.1:8080/health'"
          }
        ],
        "security": []
      }
    },
    "/ready": {
      "get": {
        "operationId": "getReadiness",
        "summary": "Collection readiness",
        "description": "Returns only minimal status. Requires the exact approved registry, current collector ownership/coverage, seeded current-generation books and applicable context coverage. Collection readiness can remain true while an idle source book is too old for research. Query strings are ignored. Detailed diagnostics require the private ingestion status route.",
        "tags": [
          "Health"
        ],
        "responses": {
          "200": {
            "description": "Approved collection coverage is ready.",
            "headers": {
              "Cache-Control": {
                "description": "Responses must not be cached.",
                "schema": {
                  "type": "string",
                  "const": "no-store"
                }
              },
              "X-Content-Type-Options": {
                "description": "Content sniffing is disabled.",
                "schema": {
                  "type": "string",
                  "const": "nosniff"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Ready"
                },
                "examples": {
                  "ready": {
                    "summary": "Synthetic readiness response",
                    "value": {
                      "status": "ready"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/400"
          },
          "405": {
            "$ref": "#/components/responses/405"
          },
          "414": {
            "$ref": "#/components/responses/414"
          },
          "503": {
            "description": "Collection coverage is unavailable, or a storage/service check failed.",
            "headers": {
              "Cache-Control": {
                "description": "Responses must not be cached.",
                "schema": {
                  "type": "string",
                  "const": "no-store"
                }
              },
              "X-Content-Type-Options": {
                "description": "Content sniffing is disabled.",
                "schema": {
                  "type": "string",
                  "const": "nosniff"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/NotReady"
                    },
                    {
                      "$ref": "#/components/schemas/ServiceUnavailable"
                    }
                  ]
                },
                "examples": {
                  "notReady": {
                    "summary": "Synthetic unavailable coverage",
                    "value": {
                      "status": "unavailable"
                    }
                  },
                  "serviceError": {
                    "summary": "Sanitized service failure",
                    "value": {
                      "error": "service_unavailable"
                    }
                  }
                }
              }
            }
          }
        },
        "x-codeSamples": [
          {
            "lang": "Shell",
            "label": "cURL (authorized SSM tunnel)",
            "source": "curl --fail-with-body --silent --show-error \\\n  'http://127.0.0.1:8080/ready'"
          }
        ],
        "security": []
      }
    },
    "/v1/markets": {
      "get": {
        "operationId": "listApprovedMarkets",
        "summary": "Approved market catalog",
        "description": "Returns only the compiled owner-approved manifest identities after validating the stored registry. Metadata refresh cannot add a listing or substitute an identity. HTTP 200 may contain stale:true for a retained catalog; it is not a fresh-price guarantee. No query parameters are accepted.",
        "tags": [
          "Markets"
        ],
        "responses": {
          "200": {
            "description": "Approved catalog and registry provenance.",
            "headers": {
              "Cache-Control": {
                "description": "Responses must not be cached.",
                "schema": {
                  "type": "string",
                  "const": "no-store"
                }
              },
              "X-Content-Type-Options": {
                "description": "Content sniffing is disabled.",
                "schema": {
                  "type": "string",
                  "const": "nosniff"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Catalog"
                },
                "examples": {
                  "catalog": {
                    "summary": "Synthetic full approved catalog; prices and contexts unavailable",
                    "value": {
                      "markets": [
                        {
                          "marketType": "spot",
                          "coin": "@142",
                          "dex": "",
                          "assetId": 10142,
                          "isActive": true,
                          "metadata": {
                            "kind": "spot",
                            "displayName": "BTC",
                            "approvalManifestHash": "04c6bf8b7ef675d007704d1ce62940f504a0590f19cf4f10630063b9a841e7e6"
                          },
                          "instrumentGeneration": 1,
                          "context": null,
                          "contextQuality": "invalid_or_unavailable",
                          "contextObservedAt": 1800000000000,
                          "discoveryState": "present"
                        },
                        {
                          "marketType": "spot",
                          "coin": "@151",
                          "dex": "",
                          "assetId": 10151,
                          "isActive": true,
                          "metadata": {
                            "kind": "spot",
                            "displayName": "ETH",
                            "approvalManifestHash": "04c6bf8b7ef675d007704d1ce62940f504a0590f19cf4f10630063b9a841e7e6"
                          },
                          "instrumentGeneration": 1,
                          "context": null,
                          "contextQuality": "invalid_or_unavailable",
                          "contextObservedAt": 1800000000000,
                          "discoveryState": "present"
                        },
                        {
                          "marketType": "spot",
                          "coin": "@156",
                          "dex": "",
                          "assetId": 10156,
                          "isActive": true,
                          "metadata": {
                            "kind": "spot",
                            "displayName": "SOL",
                            "approvalManifestHash": "04c6bf8b7ef675d007704d1ce62940f504a0590f19cf4f10630063b9a841e7e6"
                          },
                          "instrumentGeneration": 1,
                          "context": null,
                          "contextQuality": "invalid_or_unavailable",
                          "contextObservedAt": 1800000000000,
                          "discoveryState": "present"
                        },
                        {
                          "marketType": "spot",
                          "coin": "@107",
                          "dex": "",
                          "assetId": 10107,
                          "isActive": true,
                          "metadata": {
                            "kind": "spot",
                            "displayName": "HYPE",
                            "approvalManifestHash": "04c6bf8b7ef675d007704d1ce62940f504a0590f19cf4f10630063b9a841e7e6"
                          },
                          "instrumentGeneration": 1,
                          "context": null,
                          "contextQuality": "invalid_or_unavailable",
                          "contextObservedAt": 1800000000000,
                          "discoveryState": "present"
                        },
                        {
                          "marketType": "spot",
                          "coin": "@272",
                          "dex": "",
                          "assetId": 10272,
                          "isActive": true,
                          "metadata": {
                            "kind": "spot",
                            "displayName": "ZEC",
                            "approvalManifestHash": "04c6bf8b7ef675d007704d1ce62940f504a0590f19cf4f10630063b9a841e7e6"
                          },
                          "instrumentGeneration": 1,
                          "context": null,
                          "contextQuality": "invalid_or_unavailable",
                          "contextObservedAt": 1800000000000,
                          "discoveryState": "present"
                        },
                        {
                          "marketType": "spot",
                          "coin": "@188",
                          "dex": "",
                          "assetId": 10188,
                          "isActive": true,
                          "metadata": {
                            "kind": "spot",
                            "displayName": "PUMP",
                            "approvalManifestHash": "04c6bf8b7ef675d007704d1ce62940f504a0590f19cf4f10630063b9a841e7e6"
                          },
                          "instrumentGeneration": 1,
                          "context": null,
                          "contextQuality": "invalid_or_unavailable",
                          "contextObservedAt": 1800000000000,
                          "discoveryState": "present"
                        },
                        {
                          "marketType": "spot",
                          "coin": "PURR/USDC",
                          "dex": "",
                          "assetId": 10000,
                          "isActive": true,
                          "metadata": {
                            "kind": "spot",
                            "displayName": "PURR",
                            "approvalManifestHash": "04c6bf8b7ef675d007704d1ce62940f504a0590f19cf4f10630063b9a841e7e6"
                          },
                          "instrumentGeneration": 1,
                          "context": null,
                          "contextQuality": "invalid_or_unavailable",
                          "contextObservedAt": 1800000000000,
                          "discoveryState": "present"
                        },
                        {
                          "marketType": "perp",
                          "coin": "BTC",
                          "dex": "",
                          "assetId": 0,
                          "isActive": true,
                          "metadata": {
                            "kind": "perp",
                            "displayName": "BTC",
                            "approvalManifestHash": "04c6bf8b7ef675d007704d1ce62940f504a0590f19cf4f10630063b9a841e7e6"
                          },
                          "instrumentGeneration": 1,
                          "context": null,
                          "contextQuality": "invalid_or_unavailable",
                          "contextObservedAt": 1800000000000,
                          "discoveryState": "present"
                        },
                        {
                          "marketType": "perp",
                          "coin": "ETH",
                          "dex": "",
                          "assetId": 1,
                          "isActive": true,
                          "metadata": {
                            "kind": "perp",
                            "displayName": "ETH",
                            "approvalManifestHash": "04c6bf8b7ef675d007704d1ce62940f504a0590f19cf4f10630063b9a841e7e6"
                          },
                          "instrumentGeneration": 1,
                          "context": null,
                          "contextQuality": "invalid_or_unavailable",
                          "contextObservedAt": 1800000000000,
                          "discoveryState": "present"
                        },
                        {
                          "marketType": "perp",
                          "coin": "SOL",
                          "dex": "",
                          "assetId": 5,
                          "isActive": true,
                          "metadata": {
                            "kind": "perp",
                            "displayName": "SOL",
                            "approvalManifestHash": "04c6bf8b7ef675d007704d1ce62940f504a0590f19cf4f10630063b9a841e7e6"
                          },
                          "instrumentGeneration": 1,
                          "context": null,
                          "contextQuality": "invalid_or_unavailable",
                          "contextObservedAt": 1800000000000,
                          "discoveryState": "present"
                        },
                        {
                          "marketType": "perp",
                          "coin": "HYPE",
                          "dex": "",
                          "assetId": 159,
                          "isActive": true,
                          "metadata": {
                            "kind": "perp",
                            "displayName": "HYPE",
                            "approvalManifestHash": "04c6bf8b7ef675d007704d1ce62940f504a0590f19cf4f10630063b9a841e7e6"
                          },
                          "instrumentGeneration": 1,
                          "context": null,
                          "contextQuality": "invalid_or_unavailable",
                          "contextObservedAt": 1800000000000,
                          "discoveryState": "present"
                        },
                        {
                          "marketType": "perp",
                          "coin": "ZEC",
                          "dex": "",
                          "assetId": 214,
                          "isActive": true,
                          "metadata": {
                            "kind": "perp",
                            "displayName": "ZEC",
                            "approvalManifestHash": "04c6bf8b7ef675d007704d1ce62940f504a0590f19cf4f10630063b9a841e7e6"
                          },
                          "instrumentGeneration": 1,
                          "context": null,
                          "contextQuality": "invalid_or_unavailable",
                          "contextObservedAt": 1800000000000,
                          "discoveryState": "present"
                        },
                        {
                          "marketType": "perp",
                          "coin": "PUMP",
                          "dex": "",
                          "assetId": 200,
                          "isActive": true,
                          "metadata": {
                            "kind": "perp",
                            "displayName": "PUMP",
                            "approvalManifestHash": "04c6bf8b7ef675d007704d1ce62940f504a0590f19cf4f10630063b9a841e7e6"
                          },
                          "instrumentGeneration": 1,
                          "context": null,
                          "contextQuality": "invalid_or_unavailable",
                          "contextObservedAt": 1800000000000,
                          "discoveryState": "present"
                        },
                        {
                          "marketType": "perp",
                          "coin": "PURR",
                          "dex": "",
                          "assetId": 152,
                          "isActive": true,
                          "metadata": {
                            "kind": "perp",
                            "displayName": "PURR",
                            "approvalManifestHash": "04c6bf8b7ef675d007704d1ce62940f504a0590f19cf4f10630063b9a841e7e6"
                          },
                          "instrumentGeneration": 1,
                          "context": null,
                          "contextQuality": "invalid_or_unavailable",
                          "contextObservedAt": 1800000000000,
                          "discoveryState": "present"
                        },
                        {
                          "marketType": "perp",
                          "coin": "xyz:GOLD",
                          "dex": "xyz",
                          "assetId": 110003,
                          "isActive": true,
                          "metadata": {
                            "kind": "perp",
                            "displayName": "GOLD",
                            "approvalManifestHash": "04c6bf8b7ef675d007704d1ce62940f504a0590f19cf4f10630063b9a841e7e6"
                          },
                          "instrumentGeneration": 1,
                          "context": null,
                          "contextQuality": "invalid_or_unavailable",
                          "contextObservedAt": 1800000000000,
                          "discoveryState": "present"
                        },
                        {
                          "marketType": "perp",
                          "coin": "xyz:SILVER",
                          "dex": "xyz",
                          "assetId": 110026,
                          "isActive": true,
                          "metadata": {
                            "kind": "perp",
                            "displayName": "SILVER",
                            "approvalManifestHash": "04c6bf8b7ef675d007704d1ce62940f504a0590f19cf4f10630063b9a841e7e6"
                          },
                          "instrumentGeneration": 1,
                          "context": null,
                          "contextQuality": "invalid_or_unavailable",
                          "contextObservedAt": 1800000000000,
                          "discoveryState": "present"
                        },
                        {
                          "marketType": "perp",
                          "coin": "xyz:COPPER",
                          "dex": "xyz",
                          "assetId": 110030,
                          "isActive": true,
                          "metadata": {
                            "kind": "perp",
                            "displayName": "COPPER",
                            "approvalManifestHash": "04c6bf8b7ef675d007704d1ce62940f504a0590f19cf4f10630063b9a841e7e6"
                          },
                          "instrumentGeneration": 1,
                          "context": null,
                          "contextQuality": "invalid_or_unavailable",
                          "contextObservedAt": 1800000000000,
                          "discoveryState": "present"
                        },
                        {
                          "marketType": "perp",
                          "coin": "xyz:MU",
                          "dex": "xyz",
                          "assetId": 110015,
                          "isActive": true,
                          "metadata": {
                            "kind": "perp",
                            "displayName": "MU",
                            "approvalManifestHash": "04c6bf8b7ef675d007704d1ce62940f504a0590f19cf4f10630063b9a841e7e6"
                          },
                          "instrumentGeneration": 1,
                          "context": null,
                          "contextQuality": "invalid_or_unavailable",
                          "contextObservedAt": 1800000000000,
                          "discoveryState": "present"
                        },
                        {
                          "marketType": "perp",
                          "coin": "xyz:SKHY",
                          "dex": "xyz",
                          "assetId": 110099,
                          "isActive": true,
                          "metadata": {
                            "kind": "perp",
                            "displayName": "SKHY",
                            "approvalManifestHash": "04c6bf8b7ef675d007704d1ce62940f504a0590f19cf4f10630063b9a841e7e6"
                          },
                          "instrumentGeneration": 1,
                          "context": null,
                          "contextQuality": "invalid_or_unavailable",
                          "contextObservedAt": 1800000000000,
                          "discoveryState": "present"
                        },
                        {
                          "marketType": "perp",
                          "coin": "xyz:GOOGL",
                          "dex": "xyz",
                          "assetId": 110012,
                          "isActive": true,
                          "metadata": {
                            "kind": "perp",
                            "displayName": "GOOGL",
                            "approvalManifestHash": "04c6bf8b7ef675d007704d1ce62940f504a0590f19cf4f10630063b9a841e7e6"
                          },
                          "instrumentGeneration": 1,
                          "context": null,
                          "contextQuality": "invalid_or_unavailable",
                          "contextObservedAt": 1800000000000,
                          "discoveryState": "present"
                        },
                        {
                          "marketType": "perp",
                          "coin": "xyz:DRAM",
                          "dex": "xyz",
                          "assetId": 110065,
                          "isActive": true,
                          "metadata": {
                            "kind": "perp",
                            "displayName": "DRAM",
                            "approvalManifestHash": "04c6bf8b7ef675d007704d1ce62940f504a0590f19cf4f10630063b9a841e7e6"
                          },
                          "instrumentGeneration": 1,
                          "context": null,
                          "contextQuality": "invalid_or_unavailable",
                          "contextObservedAt": 1800000000000,
                          "discoveryState": "present"
                        },
                        {
                          "marketType": "perp",
                          "coin": "xyz:CL",
                          "dex": "xyz",
                          "assetId": 110029,
                          "isActive": true,
                          "metadata": {
                            "kind": "perp",
                            "displayName": "WTI",
                            "approvalManifestHash": "04c6bf8b7ef675d007704d1ce62940f504a0590f19cf4f10630063b9a841e7e6"
                          },
                          "instrumentGeneration": 1,
                          "context": null,
                          "contextQuality": "invalid_or_unavailable",
                          "contextObservedAt": 1800000000000,
                          "discoveryState": "present"
                        },
                        {
                          "marketType": "perp",
                          "coin": "xyz:SNDK",
                          "dex": "xyz",
                          "assetId": 110016,
                          "isActive": true,
                          "metadata": {
                            "kind": "perp",
                            "displayName": "SNDK",
                            "approvalManifestHash": "04c6bf8b7ef675d007704d1ce62940f504a0590f19cf4f10630063b9a841e7e6"
                          },
                          "instrumentGeneration": 1,
                          "context": null,
                          "contextQuality": "invalid_or_unavailable",
                          "contextObservedAt": 1800000000000,
                          "discoveryState": "present"
                        },
                        {
                          "marketType": "perp",
                          "coin": "xyz:AAPL",
                          "dex": "xyz",
                          "assetId": 110009,
                          "isActive": true,
                          "metadata": {
                            "kind": "perp",
                            "displayName": "AAPL",
                            "approvalManifestHash": "04c6bf8b7ef675d007704d1ce62940f504a0590f19cf4f10630063b9a841e7e6"
                          },
                          "instrumentGeneration": 1,
                          "context": null,
                          "contextQuality": "invalid_or_unavailable",
                          "contextObservedAt": 1800000000000,
                          "discoveryState": "present"
                        },
                        {
                          "marketType": "perp",
                          "coin": "xyz:MSFT",
                          "dex": "xyz",
                          "assetId": 110010,
                          "isActive": true,
                          "metadata": {
                            "kind": "perp",
                            "displayName": "MSFT",
                            "approvalManifestHash": "04c6bf8b7ef675d007704d1ce62940f504a0590f19cf4f10630063b9a841e7e6"
                          },
                          "instrumentGeneration": 1,
                          "context": null,
                          "contextQuality": "invalid_or_unavailable",
                          "contextObservedAt": 1800000000000,
                          "discoveryState": "present"
                        },
                        {
                          "marketType": "perp",
                          "coin": "xyz:SPCX",
                          "dex": "xyz",
                          "assetId": 110076,
                          "isActive": true,
                          "metadata": {
                            "kind": "perp",
                            "displayName": "SPCX",
                            "approvalManifestHash": "04c6bf8b7ef675d007704d1ce62940f504a0590f19cf4f10630063b9a841e7e6"
                          },
                          "instrumentGeneration": 1,
                          "context": null,
                          "contextQuality": "invalid_or_unavailable",
                          "contextObservedAt": 1800000000000,
                          "discoveryState": "present"
                        },
                        {
                          "marketType": "perp",
                          "coin": "xyz:TSLA",
                          "dex": "xyz",
                          "assetId": 110001,
                          "isActive": true,
                          "metadata": {
                            "kind": "perp",
                            "displayName": "TSLA",
                            "approvalManifestHash": "04c6bf8b7ef675d007704d1ce62940f504a0590f19cf4f10630063b9a841e7e6"
                          },
                          "instrumentGeneration": 1,
                          "context": null,
                          "contextQuality": "invalid_or_unavailable",
                          "contextObservedAt": 1800000000000,
                          "discoveryState": "present"
                        },
                        {
                          "marketType": "perp",
                          "coin": "xyz:AMZN",
                          "dex": "xyz",
                          "assetId": 110013,
                          "isActive": true,
                          "metadata": {
                            "kind": "perp",
                            "displayName": "AMZN",
                            "approvalManifestHash": "04c6bf8b7ef675d007704d1ce62940f504a0590f19cf4f10630063b9a841e7e6"
                          },
                          "instrumentGeneration": 1,
                          "context": null,
                          "contextQuality": "invalid_or_unavailable",
                          "contextObservedAt": 1800000000000,
                          "discoveryState": "present"
                        },
                        {
                          "marketType": "perp",
                          "coin": "xyz:AMD",
                          "dex": "xyz",
                          "assetId": 110014,
                          "isActive": true,
                          "metadata": {
                            "kind": "perp",
                            "displayName": "AMD",
                            "approvalManifestHash": "04c6bf8b7ef675d007704d1ce62940f504a0590f19cf4f10630063b9a841e7e6"
                          },
                          "instrumentGeneration": 1,
                          "context": null,
                          "contextQuality": "invalid_or_unavailable",
                          "contextObservedAt": 1800000000000,
                          "discoveryState": "present"
                        },
                        {
                          "marketType": "perp",
                          "coin": "xyz:INTC",
                          "dex": "xyz",
                          "assetId": 110005,
                          "isActive": true,
                          "metadata": {
                            "kind": "perp",
                            "displayName": "INTC",
                            "approvalManifestHash": "04c6bf8b7ef675d007704d1ce62940f504a0590f19cf4f10630063b9a841e7e6"
                          },
                          "instrumentGeneration": 1,
                          "context": null,
                          "contextQuality": "invalid_or_unavailable",
                          "contextObservedAt": 1800000000000,
                          "discoveryState": "present"
                        },
                        {
                          "marketType": "perp",
                          "coin": "xyz:META",
                          "dex": "xyz",
                          "assetId": 110008,
                          "isActive": true,
                          "metadata": {
                            "kind": "perp",
                            "displayName": "META",
                            "approvalManifestHash": "04c6bf8b7ef675d007704d1ce62940f504a0590f19cf4f10630063b9a841e7e6"
                          },
                          "instrumentGeneration": 1,
                          "context": null,
                          "contextQuality": "invalid_or_unavailable",
                          "contextObservedAt": 1800000000000,
                          "discoveryState": "present"
                        },
                        {
                          "marketType": "perp",
                          "coin": "xyz:COIN",
                          "dex": "xyz",
                          "assetId": 110007,
                          "isActive": true,
                          "metadata": {
                            "kind": "perp",
                            "displayName": "COIN",
                            "approvalManifestHash": "04c6bf8b7ef675d007704d1ce62940f504a0590f19cf4f10630063b9a841e7e6"
                          },
                          "instrumentGeneration": 1,
                          "context": null,
                          "contextQuality": "invalid_or_unavailable",
                          "contextObservedAt": 1800000000000,
                          "discoveryState": "present"
                        },
                        {
                          "marketType": "perp",
                          "coin": "xyz:HOOD",
                          "dex": "xyz",
                          "assetId": 110004,
                          "isActive": true,
                          "metadata": {
                            "kind": "perp",
                            "displayName": "HOOD",
                            "approvalManifestHash": "04c6bf8b7ef675d007704d1ce62940f504a0590f19cf4f10630063b9a841e7e6"
                          },
                          "instrumentGeneration": 1,
                          "context": null,
                          "contextQuality": "invalid_or_unavailable",
                          "contextObservedAt": 1800000000000,
                          "discoveryState": "present"
                        },
                        {
                          "marketType": "perp",
                          "coin": "xyz:ORCL",
                          "dex": "xyz",
                          "assetId": 110011,
                          "isActive": true,
                          "metadata": {
                            "kind": "perp",
                            "displayName": "ORCL",
                            "approvalManifestHash": "04c6bf8b7ef675d007704d1ce62940f504a0590f19cf4f10630063b9a841e7e6"
                          },
                          "instrumentGeneration": 1,
                          "context": null,
                          "contextQuality": "invalid_or_unavailable",
                          "contextObservedAt": 1800000000000,
                          "discoveryState": "present"
                        },
                        {
                          "marketType": "perp",
                          "coin": "xyz:SP500",
                          "dex": "xyz",
                          "assetId": 110052,
                          "isActive": true,
                          "metadata": {
                            "kind": "perp",
                            "displayName": "SP500",
                            "approvalManifestHash": "04c6bf8b7ef675d007704d1ce62940f504a0590f19cf4f10630063b9a841e7e6"
                          },
                          "instrumentGeneration": 1,
                          "context": null,
                          "contextQuality": "invalid_or_unavailable",
                          "contextObservedAt": 1800000000000,
                          "discoveryState": "present"
                        },
                        {
                          "marketType": "perp",
                          "coin": "xyz:MAGS",
                          "dex": "xyz",
                          "assetId": 110108,
                          "isActive": true,
                          "metadata": {
                            "kind": "perp",
                            "displayName": "MAGS",
                            "approvalManifestHash": "04c6bf8b7ef675d007704d1ce62940f504a0590f19cf4f10630063b9a841e7e6"
                          },
                          "instrumentGeneration": 1,
                          "context": null,
                          "contextQuality": "invalid_or_unavailable",
                          "contextObservedAt": 1800000000000,
                          "discoveryState": "present"
                        },
                        {
                          "marketType": "perp",
                          "coin": "xyz:SOXL",
                          "dex": "xyz",
                          "assetId": 110107,
                          "isActive": true,
                          "metadata": {
                            "kind": "perp",
                            "displayName": "SOXL",
                            "approvalManifestHash": "04c6bf8b7ef675d007704d1ce62940f504a0590f19cf4f10630063b9a841e7e6"
                          },
                          "instrumentGeneration": 1,
                          "context": null,
                          "contextQuality": "invalid_or_unavailable",
                          "contextObservedAt": 1800000000000,
                          "discoveryState": "present"
                        },
                        {
                          "marketType": "perp",
                          "coin": "xyz:EWY",
                          "dex": "xyz",
                          "assetId": 110047,
                          "isActive": true,
                          "metadata": {
                            "kind": "perp",
                            "displayName": "EWY",
                            "approvalManifestHash": "04c6bf8b7ef675d007704d1ce62940f504a0590f19cf4f10630063b9a841e7e6"
                          },
                          "instrumentGeneration": 1,
                          "context": null,
                          "contextQuality": "invalid_or_unavailable",
                          "contextObservedAt": 1800000000000,
                          "discoveryState": "present"
                        }
                      ],
                      "coverage": "approved_launch_universe",
                      "generation": "1",
                      "membershipGeneration": "synthetic-membership-1",
                      "observedAt": 1800000000000,
                      "stale": false,
                      "approvalManifestHash": "04c6bf8b7ef675d007704d1ce62940f504a0590f19cf4f10630063b9a841e7e6"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/400"
          },
          "405": {
            "$ref": "#/components/responses/405"
          },
          "414": {
            "$ref": "#/components/responses/414"
          },
          "401": {
            "$ref": "#/components/responses/401"
          },
          "503": {
            "description": "The exact approved registry is unavailable, or a storage/service operation failed.",
            "headers": {
              "Cache-Control": {
                "description": "Responses must not be cached.",
                "schema": {
                  "type": "string",
                  "const": "no-store"
                }
              },
              "X-Content-Type-Options": {
                "description": "Content sniffing is disabled.",
                "schema": {
                  "type": "string",
                  "const": "nosniff"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/RegistryUnavailable"
                    },
                    {
                      "$ref": "#/components/schemas/ServiceUnavailable"
                    }
                  ]
                },
                "examples": {
                  "registryUnavailable": {
                    "summary": "Missing or mismatched approved registry",
                    "value": {
                      "error": "approved_registry_unavailable"
                    }
                  },
                  "serviceError": {
                    "summary": "Sanitized service failure",
                    "value": {
                      "error": "service_unavailable"
                    }
                  }
                }
              }
            }
          }
        },
        "x-codeSamples": [
          {
            "lang": "Shell",
            "label": "cURL (authorized SSM tunnel)",
            "source": "curl --fail-with-body --silent --show-error --header \"Authorization: Bearer $ALT_READ_TOKEN\" \\\n  'http://127.0.0.1:8080/v1/markets'"
          }
        ]
      }
    },
    "/v1/ingestion/status": {
      "get": {
        "operationId": "getIngestionStatus",
        "summary": "Approved coverage and freshness",
        "description": "Provides private collection readiness, separate research readiness, per-approved-market freshness and bounded collector summaries. Missing/mismatched collector observations do not claim valid current approval. Well-formed query parameters are currently ignored; malformed query encoding returns 400.",
        "tags": [
          "Ingestion"
        ],
        "responses": {
          "200": {
            "description": "Collection coverage is ready; inspect researchReady separately.",
            "headers": {
              "Cache-Control": {
                "description": "Responses must not be cached.",
                "schema": {
                  "type": "string",
                  "const": "no-store"
                }
              },
              "X-Content-Type-Options": {
                "description": "Content sniffing is disabled.",
                "schema": {
                  "type": "string",
                  "const": "nosniff"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/IngestionStatus"
                },
                "examples": {
                  "covered": {
                    "summary": "Synthetic full coverage and fresh research evidence",
                    "value": {
                      "ready": true,
                      "reason": "ready",
                      "scope": "approved",
                      "registryGeneration": "1",
                      "membershipGeneration": "synthetic-membership-1",
                      "registryObservedAt": 1800000000000,
                      "researchReady": true,
                      "approvalManifestHash": "04c6bf8b7ef675d007704d1ce62940f504a0590f19cf4f10630063b9a841e7e6",
                      "coverage": {
                        "approved": 38,
                        "catalog": 38,
                        "active": 38,
                        "covered": 38,
                        "expectedGroups": 1,
                        "reportingGroups": 1
                      },
                      "markets": [
                        {
                          "coin": "@142",
                          "ready": true,
                          "researchReady": true,
                          "bookStale": false,
                          "contextReady": true,
                          "contextQuality": "observed"
                        },
                        {
                          "coin": "@151",
                          "ready": true,
                          "researchReady": true,
                          "bookStale": false,
                          "contextReady": true,
                          "contextQuality": "observed"
                        },
                        {
                          "coin": "@156",
                          "ready": true,
                          "researchReady": true,
                          "bookStale": false,
                          "contextReady": true,
                          "contextQuality": "observed"
                        },
                        {
                          "coin": "@107",
                          "ready": true,
                          "researchReady": true,
                          "bookStale": false,
                          "contextReady": true,
                          "contextQuality": "observed"
                        },
                        {
                          "coin": "@272",
                          "ready": true,
                          "researchReady": true,
                          "bookStale": false,
                          "contextReady": true,
                          "contextQuality": "observed"
                        },
                        {
                          "coin": "@188",
                          "ready": true,
                          "researchReady": true,
                          "bookStale": false,
                          "contextReady": true,
                          "contextQuality": "observed"
                        },
                        {
                          "coin": "PURR/USDC",
                          "ready": true,
                          "researchReady": true,
                          "bookStale": false,
                          "contextReady": true,
                          "contextQuality": "observed"
                        },
                        {
                          "coin": "BTC",
                          "ready": true,
                          "researchReady": true,
                          "bookStale": false,
                          "contextReady": true,
                          "contextQuality": "observed"
                        },
                        {
                          "coin": "ETH",
                          "ready": true,
                          "researchReady": true,
                          "bookStale": false,
                          "contextReady": true,
                          "contextQuality": "observed"
                        },
                        {
                          "coin": "SOL",
                          "ready": true,
                          "researchReady": true,
                          "bookStale": false,
                          "contextReady": true,
                          "contextQuality": "observed"
                        },
                        {
                          "coin": "HYPE",
                          "ready": true,
                          "researchReady": true,
                          "bookStale": false,
                          "contextReady": true,
                          "contextQuality": "observed"
                        },
                        {
                          "coin": "ZEC",
                          "ready": true,
                          "researchReady": true,
                          "bookStale": false,
                          "contextReady": true,
                          "contextQuality": "observed"
                        },
                        {
                          "coin": "PUMP",
                          "ready": true,
                          "researchReady": true,
                          "bookStale": false,
                          "contextReady": true,
                          "contextQuality": "observed"
                        },
                        {
                          "coin": "PURR",
                          "ready": true,
                          "researchReady": true,
                          "bookStale": false,
                          "contextReady": true,
                          "contextQuality": "observed"
                        },
                        {
                          "coin": "xyz:GOLD",
                          "ready": true,
                          "researchReady": true,
                          "bookStale": false,
                          "contextReady": true,
                          "contextQuality": "observed"
                        },
                        {
                          "coin": "xyz:SILVER",
                          "ready": true,
                          "researchReady": true,
                          "bookStale": false,
                          "contextReady": true,
                          "contextQuality": "observed"
                        },
                        {
                          "coin": "xyz:COPPER",
                          "ready": true,
                          "researchReady": true,
                          "bookStale": false,
                          "contextReady": true,
                          "contextQuality": "observed"
                        },
                        {
                          "coin": "xyz:MU",
                          "ready": true,
                          "researchReady": true,
                          "bookStale": false,
                          "contextReady": true,
                          "contextQuality": "observed"
                        },
                        {
                          "coin": "xyz:SKHY",
                          "ready": true,
                          "researchReady": true,
                          "bookStale": false,
                          "contextReady": true,
                          "contextQuality": "observed"
                        },
                        {
                          "coin": "xyz:GOOGL",
                          "ready": true,
                          "researchReady": true,
                          "bookStale": false,
                          "contextReady": true,
                          "contextQuality": "observed"
                        },
                        {
                          "coin": "xyz:DRAM",
                          "ready": true,
                          "researchReady": true,
                          "bookStale": false,
                          "contextReady": true,
                          "contextQuality": "observed"
                        },
                        {
                          "coin": "xyz:CL",
                          "ready": true,
                          "researchReady": true,
                          "bookStale": false,
                          "contextReady": true,
                          "contextQuality": "observed"
                        },
                        {
                          "coin": "xyz:SNDK",
                          "ready": true,
                          "researchReady": true,
                          "bookStale": false,
                          "contextReady": true,
                          "contextQuality": "observed"
                        },
                        {
                          "coin": "xyz:AAPL",
                          "ready": true,
                          "researchReady": true,
                          "bookStale": false,
                          "contextReady": true,
                          "contextQuality": "observed"
                        },
                        {
                          "coin": "xyz:MSFT",
                          "ready": true,
                          "researchReady": true,
                          "bookStale": false,
                          "contextReady": true,
                          "contextQuality": "observed"
                        },
                        {
                          "coin": "xyz:SPCX",
                          "ready": true,
                          "researchReady": true,
                          "bookStale": false,
                          "contextReady": true,
                          "contextQuality": "observed"
                        },
                        {
                          "coin": "xyz:TSLA",
                          "ready": true,
                          "researchReady": true,
                          "bookStale": false,
                          "contextReady": true,
                          "contextQuality": "observed"
                        },
                        {
                          "coin": "xyz:AMZN",
                          "ready": true,
                          "researchReady": true,
                          "bookStale": false,
                          "contextReady": true,
                          "contextQuality": "observed"
                        },
                        {
                          "coin": "xyz:AMD",
                          "ready": true,
                          "researchReady": true,
                          "bookStale": false,
                          "contextReady": true,
                          "contextQuality": "observed"
                        },
                        {
                          "coin": "xyz:INTC",
                          "ready": true,
                          "researchReady": true,
                          "bookStale": false,
                          "contextReady": true,
                          "contextQuality": "observed"
                        },
                        {
                          "coin": "xyz:META",
                          "ready": true,
                          "researchReady": true,
                          "bookStale": false,
                          "contextReady": true,
                          "contextQuality": "observed"
                        },
                        {
                          "coin": "xyz:COIN",
                          "ready": true,
                          "researchReady": true,
                          "bookStale": false,
                          "contextReady": true,
                          "contextQuality": "observed"
                        },
                        {
                          "coin": "xyz:HOOD",
                          "ready": true,
                          "researchReady": true,
                          "bookStale": false,
                          "contextReady": true,
                          "contextQuality": "observed"
                        },
                        {
                          "coin": "xyz:ORCL",
                          "ready": true,
                          "researchReady": true,
                          "bookStale": false,
                          "contextReady": true,
                          "contextQuality": "observed"
                        },
                        {
                          "coin": "xyz:SP500",
                          "ready": true,
                          "researchReady": true,
                          "bookStale": false,
                          "contextReady": true,
                          "contextQuality": "observed"
                        },
                        {
                          "coin": "xyz:MAGS",
                          "ready": true,
                          "researchReady": true,
                          "bookStale": false,
                          "contextReady": true,
                          "contextQuality": "observed"
                        },
                        {
                          "coin": "xyz:SOXL",
                          "ready": true,
                          "researchReady": true,
                          "bookStale": false,
                          "contextReady": true,
                          "contextQuality": "observed"
                        },
                        {
                          "coin": "xyz:EWY",
                          "ready": true,
                          "researchReady": true,
                          "bookStale": false,
                          "contextReady": true,
                          "contextQuality": "observed"
                        }
                      ],
                      "observations": [
                        {
                          "updatedAt": 1800000000000,
                          "status": {
                            "groupIndex": 0,
                            "groupCount": 1,
                            "connected": true,
                            "ingestionReady": true,
                            "researchReady": true,
                            "coverage": {
                              "universeActive": 38,
                              "assigned": 38,
                              "covered": 38,
                              "capacityExceeded": false,
                              "requiredConnections": 1,
                              "requiredSubscriptions": 76
                            },
                            "shardCount": 1,
                            "queueDepth": 0,
                            "queueBytes": 0,
                            "reconnects": 0
                          }
                        }
                      ]
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/400"
          },
          "405": {
            "$ref": "#/components/responses/405"
          },
          "414": {
            "$ref": "#/components/responses/414"
          },
          "401": {
            "$ref": "#/components/responses/401"
          },
          "503": {
            "description": "Collection coverage is not ready. The response retains bounded diagnostics; a service/storage failure instead returns a sanitized error.",
            "headers": {
              "Cache-Control": {
                "description": "Responses must not be cached.",
                "schema": {
                  "type": "string",
                  "const": "no-store"
                }
              },
              "X-Content-Type-Options": {
                "description": "Content sniffing is disabled.",
                "schema": {
                  "type": "string",
                  "const": "nosniff"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/IngestionStatus"
                    },
                    {
                      "$ref": "#/components/schemas/ServiceUnavailable"
                    }
                  ]
                },
                "examples": {
                  "unavailable": {
                    "summary": "Synthetic missing approved registry",
                    "value": {
                      "ready": false,
                      "reason": "approved_registry_unavailable",
                      "scope": "approved",
                      "researchReady": false,
                      "approvalManifestHash": "04c6bf8b7ef675d007704d1ce62940f504a0590f19cf4f10630063b9a841e7e6",
                      "coverage": {
                        "approved": 38,
                        "catalog": 0,
                        "active": 0,
                        "covered": 0,
                        "expectedGroups": 1,
                        "reportingGroups": 0
                      },
                      "markets": [],
                      "observations": []
                    }
                  },
                  "serviceError": {
                    "summary": "Sanitized service failure",
                    "value": {
                      "error": "service_unavailable"
                    }
                  }
                }
              }
            }
          }
        },
        "x-codeSamples": [
          {
            "lang": "Shell",
            "label": "cURL (authorized SSM tunnel)",
            "source": "curl --fail-with-body --silent --show-error --header \"Authorization: Bearer $ALT_READ_TOKEN\" \\\n  'http://127.0.0.1:8080/v1/ingestion/status'"
          }
        ]
      }
    },
    "/v1/markets/{coin}/book": {
      "get": {
        "operationId": "getMarketBook",
        "summary": "Latest observed L2 book",
        "description": "Returns the exact approved instrument’s current-generation snapshot. Registry and collector coverage must be current. Both exchange source time and ALT receipt time must pass freshness checks (default 15 seconds). Unknown source time, stale/inactive data or identity/generation mismatch returns 503. All query parameters are rejected. Retained data in a 503 response must not be used as fresh research evidence.",
        "tags": [
          "Markets"
        ],
        "responses": {
          "200": {
            "description": "Fresh current-instrument book observation.",
            "headers": {
              "Cache-Control": {
                "description": "Responses must not be cached.",
                "schema": {
                  "type": "string",
                  "const": "no-store"
                }
              },
              "X-Content-Type-Options": {
                "description": "Content sniffing is disabled.",
                "schema": {
                  "type": "string",
                  "const": "nosniff"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BookObservation"
                },
                "examples": {
                  "book": {
                    "summary": "Synthetic book; not a live price",
                    "value": {
                      "venue": "hyperliquid",
                      "channel": "l2Book",
                      "coin": "BTC",
                      "dex": "",
                      "exchangeTime": 1799999999900,
                      "receivedAt": 1800000000000,
                      "sourceTimeKnown": true,
                      "ageMs": 100,
                      "stale": false,
                      "data": {
                        "coin": "BTC",
                        "time": 1799999999900,
                        "levels": [
                          [
                            {
                              "px": "100.000000000000000001",
                              "sz": "0.012345678901234567",
                              "n": 1
                            }
                          ],
                          [
                            {
                              "px": "100.100000000000000001",
                              "sz": "1",
                              "n": 2
                            }
                          ]
                        ],
                        "isSnapshot": true
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/400"
          },
          "405": {
            "$ref": "#/components/responses/405"
          },
          "414": {
            "$ref": "#/components/responses/414"
          },
          "401": {
            "$ref": "#/components/responses/401"
          },
          "404": {
            "$ref": "#/components/responses/404"
          },
          "503": {
            "description": "No fresh usable observation, inactive market, unavailable approved registry, or sanitized service failure.",
            "headers": {
              "Cache-Control": {
                "description": "Responses must not be cached.",
                "schema": {
                  "type": "string",
                  "const": "no-store"
                }
              },
              "X-Content-Type-Options": {
                "description": "Content sniffing is disabled.",
                "schema": {
                  "type": "string",
                  "const": "nosniff"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/UnavailableObservation"
                    },
                    {
                      "$ref": "#/components/schemas/MissingObservation"
                    },
                    {
                      "$ref": "#/components/schemas/InactiveMarket"
                    },
                    {
                      "$ref": "#/components/schemas/RegistryUnavailable"
                    },
                    {
                      "$ref": "#/components/schemas/ServiceUnavailable"
                    }
                  ]
                },
                "examples": {
                  "missing": {
                    "summary": "Synthetic missing observation",
                    "value": {
                      "coin": "BTC",
                      "data": null,
                      "stale": true,
                      "error": "market_data_unavailable"
                    }
                  },
                  "retained": {
                    "summary": "Synthetic retained stale book, not usable as fresh evidence",
                    "value": {
                      "venue": "hyperliquid",
                      "channel": "l2Book",
                      "coin": "BTC",
                      "dex": "",
                      "exchangeTime": 1799999999900,
                      "receivedAt": 1800000000000,
                      "sourceTimeKnown": true,
                      "ageMs": 30000,
                      "stale": true,
                      "data": {
                        "coin": "BTC",
                        "time": 1799999999900,
                        "levels": [
                          [
                            {
                              "px": "100.000000000000000001",
                              "sz": "0.012345678901234567",
                              "n": 1
                            }
                          ],
                          [
                            {
                              "px": "100.100000000000000001",
                              "sz": "1",
                              "n": 2
                            }
                          ]
                        ],
                        "isSnapshot": true
                      },
                      "error": "market_data_unavailable"
                    }
                  },
                  "inactive": {
                    "summary": "Synthetic inactive approved instrument",
                    "value": {
                      "coin": "BTC",
                      "stale": true,
                      "error": "market_inactive"
                    }
                  },
                  "registryUnavailable": {
                    "summary": "Missing or mismatched approved registry",
                    "value": {
                      "error": "approved_registry_unavailable"
                    }
                  },
                  "serviceError": {
                    "summary": "Sanitized service failure",
                    "value": {
                      "error": "service_unavailable"
                    }
                  }
                }
              }
            }
          }
        },
        "x-codeSamples": [
          {
            "lang": "Shell",
            "label": "cURL (authorized SSM tunnel)",
            "source": "curl --fail-with-body --silent --show-error --header \"Authorization: Bearer $ALT_READ_TOKEN\" \\\n  'http://127.0.0.1:8080/v1/markets/BTC/book'"
          }
        ],
        "parameters": [
          {
            "name": "coin",
            "in": "path",
            "required": true,
            "description": "Exact approved venue coin, percent-encoded as one path segment. Examples: BTC perp → BTC; BTC spot → @142; PURR spot → PURR%2FUSDC; Alphabet perp → xyz%3AGOOGL. Display aliases do not substitute for venue identities.",
            "schema": {
              "$ref": "#/components/schemas/Coin"
            },
            "examples": {
              "nativePerp": {
                "value": "BTC"
              },
              "spot": {
                "value": "@142"
              },
              "spotWithSlash": {
                "value": "PURR/USDC"
              },
              "builderPerp": {
                "value": "xyz:GOOGL"
              }
            }
          }
        ]
      }
    },
    "/v1/markets/{coin}/context": {
      "get": {
        "operationId": "getMarketContext",
        "summary": "Latest observed spot or perp context",
        "description": "Returns the newest assetContext or historical activeAssetCtx observation for the current approved instrument. Default context freshness is 120 seconds. Current REST contexts have unknown exchange source time; receivedAt describes when ALT observed the response. Perp contexts include funding/openInterest; those fields are not applicable to spot. All query parameters are rejected. Missing, invalid, stale or mismatched contexts return503.",
        "tags": [
          "Markets"
        ],
        "responses": {
          "200": {
            "description": "Usable current-instrument context observation.",
            "headers": {
              "Cache-Control": {
                "description": "Responses must not be cached.",
                "schema": {
                  "type": "string",
                  "const": "no-store"
                }
              },
              "X-Content-Type-Options": {
                "description": "Content sniffing is disabled.",
                "schema": {
                  "type": "string",
                  "const": "nosniff"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ContextObservation"
                },
                "examples": {
                  "perpContext": {
                    "summary": "Synthetic perpetual context; not a live quote",
                    "value": {
                      "venue": "hyperliquid",
                      "channel": "assetContext",
                      "coin": "BTC",
                      "dex": "",
                      "exchangeTime": null,
                      "receivedAt": 1800000000000,
                      "sourceTimeKnown": false,
                      "ageMs": 100,
                      "stale": false,
                      "data": {
                        "coin": "BTC",
                        "ctx": {
                          "funding": "0.00001",
                          "openInterest": "123.45",
                          "markPx": "100.1",
                          "oraclePx": "100"
                        },
                        "source": "rest",
                        "sourceTimeKnown": false,
                        "kind": "perp"
                      }
                    }
                  },
                  "spotContext": {
                    "summary": "Synthetic spot context; funding/open interest not applicable",
                    "value": {
                      "venue": "hyperliquid",
                      "channel": "assetContext",
                      "coin": "@142",
                      "dex": "",
                      "exchangeTime": null,
                      "receivedAt": 1800000000000,
                      "sourceTimeKnown": false,
                      "ageMs": 100,
                      "stale": false,
                      "data": {
                        "coin": "@142",
                        "ctx": {
                          "coin": "@142",
                          "markPx": "100.1",
                          "prevDayPx": "99",
                          "dayNtlVlm": "100000"
                        },
                        "source": "rest",
                        "sourceTimeKnown": false,
                        "kind": "spot"
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/400"
          },
          "405": {
            "$ref": "#/components/responses/405"
          },
          "414": {
            "$ref": "#/components/responses/414"
          },
          "401": {
            "$ref": "#/components/responses/401"
          },
          "404": {
            "$ref": "#/components/responses/404"
          },
          "503": {
            "description": "No fresh usable observation, inactive market, unavailable approved registry, or sanitized service failure.",
            "headers": {
              "Cache-Control": {
                "description": "Responses must not be cached.",
                "schema": {
                  "type": "string",
                  "const": "no-store"
                }
              },
              "X-Content-Type-Options": {
                "description": "Content sniffing is disabled.",
                "schema": {
                  "type": "string",
                  "const": "nosniff"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/UnavailableObservation"
                    },
                    {
                      "$ref": "#/components/schemas/MissingObservation"
                    },
                    {
                      "$ref": "#/components/schemas/InactiveMarket"
                    },
                    {
                      "$ref": "#/components/schemas/RegistryUnavailable"
                    },
                    {
                      "$ref": "#/components/schemas/ServiceUnavailable"
                    }
                  ]
                },
                "examples": {
                  "missing": {
                    "summary": "Synthetic missing observation",
                    "value": {
                      "coin": "BTC",
                      "data": null,
                      "stale": true,
                      "error": "market_data_unavailable"
                    }
                  },
                  "retained": {
                    "summary": "Synthetic retained stale REST context; source time remains unknown",
                    "value": {
                      "venue": "hyperliquid",
                      "channel": "assetContext",
                      "coin": "BTC",
                      "dex": "",
                      "exchangeTime": null,
                      "receivedAt": 1800000000000,
                      "sourceTimeKnown": false,
                      "ageMs": 130000,
                      "stale": true,
                      "data": {
                        "coin": "BTC",
                        "ctx": {
                          "funding": "0.00001",
                          "openInterest": "123.45",
                          "markPx": "100.1",
                          "oraclePx": "100"
                        },
                        "source": "rest",
                        "sourceTimeKnown": false,
                        "kind": "perp"
                      },
                      "error": "market_data_unavailable"
                    }
                  },
                  "inactive": {
                    "summary": "Synthetic inactive approved instrument",
                    "value": {
                      "coin": "BTC",
                      "stale": true,
                      "error": "market_inactive"
                    }
                  },
                  "registryUnavailable": {
                    "summary": "Missing or mismatched approved registry",
                    "value": {
                      "error": "approved_registry_unavailable"
                    }
                  },
                  "serviceError": {
                    "summary": "Sanitized service failure",
                    "value": {
                      "error": "service_unavailable"
                    }
                  }
                }
              }
            }
          }
        },
        "x-codeSamples": [
          {
            "lang": "Shell",
            "label": "cURL (authorized SSM tunnel)",
            "source": "curl --fail-with-body --silent --show-error --header \"Authorization: Bearer $ALT_READ_TOKEN\" \\\n  'http://127.0.0.1:8080/v1/markets/BTC/context'"
          }
        ],
        "parameters": [
          {
            "name": "coin",
            "in": "path",
            "required": true,
            "description": "Exact approved venue coin, percent-encoded as one path segment. Examples: BTC perp → BTC; BTC spot → @142; PURR spot → PURR%2FUSDC; Alphabet perp → xyz%3AGOOGL. Display aliases do not substitute for venue identities.",
            "schema": {
              "$ref": "#/components/schemas/Coin"
            },
            "examples": {
              "nativePerp": {
                "value": "BTC"
              },
              "spot": {
                "value": "@142"
              },
              "spotWithSlash": {
                "value": "PURR/USDC"
              },
              "builderPerp": {
                "value": "xyz:GOOGL"
              }
            }
          }
        ]
      }
    },
    "/v1/markets/{coin}/trades": {
      "get": {
        "operationId": "listObservedTrades",
        "summary": "Observed trade history",
        "description": "Returns current-instrument-generation trades retained in the hot journal, newest first. Coverage is observed_only and historyComplete is always false. Collection gaps are not repaired into a complete history by this endpoint. An empty list can be valid. HTTP 503 can retain observed trades with stale:true if collection coverage is not ready. Only one limit and one before parameter are accepted.",
        "tags": [
          "Markets"
        ],
        "responses": {
          "200": {
            "description": "Bounded observed trades while registry and collection coverage are ready.",
            "headers": {
              "Cache-Control": {
                "description": "Responses must not be cached.",
                "schema": {
                  "type": "string",
                  "const": "no-store"
                }
              },
              "X-Content-Type-Options": {
                "description": "Content sniffing is disabled.",
                "schema": {
                  "type": "string",
                  "const": "nosniff"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Trades"
                },
                "examples": {
                  "trades": {
                    "summary": "Synthetic observed trade; not an order or execution receipt",
                    "value": {
                      "coin": "BTC",
                      "stale": false,
                      "trades": [
                        {
                          "marketType": "perp",
                          "venue": "hyperliquid",
                          "channel": "trades",
                          "coin": "BTC",
                          "dex": "",
                          "eventId": "BTC:g1:1800000000000:42",
                          "exchangeTime": 1800000000000,
                          "receivedAt": 1800000000010,
                          "payload": {
                            "coin": "BTC",
                            "px": "100.000000000000000001",
                            "sz": "0.012345678901234567",
                            "side": "B",
                            "time": 1800000000000,
                            "tid": 42
                          },
                          "instrumentGeneration": 1,
                          "assetId": 0,
                          "registryGeneration": "1"
                        }
                      ],
                      "coverage": "observed_only",
                      "historyComplete": false,
                      "beforeSemantics": "exclusive_exchange_time"
                    }
                  },
                  "empty": {
                    "summary": "Synthetic valid empty trade list",
                    "value": {
                      "coin": "BTC",
                      "stale": false,
                      "trades": [],
                      "coverage": "observed_only",
                      "historyComplete": false,
                      "beforeSemantics": "exclusive_exchange_time"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/400"
          },
          "405": {
            "$ref": "#/components/responses/405"
          },
          "414": {
            "$ref": "#/components/responses/414"
          },
          "401": {
            "$ref": "#/components/responses/401"
          },
          "404": {
            "$ref": "#/components/responses/404"
          },
          "503": {
            "description": "Collection coverage is not ready, the instrument is inactive, the approved registry is unavailable, or a storage/service operation failed.",
            "headers": {
              "Cache-Control": {
                "description": "Responses must not be cached.",
                "schema": {
                  "type": "string",
                  "const": "no-store"
                }
              },
              "X-Content-Type-Options": {
                "description": "Content sniffing is disabled.",
                "schema": {
                  "type": "string",
                  "const": "nosniff"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/Trades"
                    },
                    {
                      "$ref": "#/components/schemas/InactiveMarket"
                    },
                    {
                      "$ref": "#/components/schemas/RegistryUnavailable"
                    },
                    {
                      "$ref": "#/components/schemas/ServiceUnavailable"
                    }
                  ]
                },
                "examples": {
                  "coverageUnavailable": {
                    "summary": "Synthetic retained observations during unavailable coverage",
                    "value": {
                      "coin": "BTC",
                      "stale": true,
                      "trades": [
                        {
                          "marketType": "perp",
                          "venue": "hyperliquid",
                          "channel": "trades",
                          "coin": "BTC",
                          "dex": "",
                          "eventId": "BTC:g1:1800000000000:42",
                          "exchangeTime": 1800000000000,
                          "receivedAt": 1800000000010,
                          "payload": {
                            "coin": "BTC",
                            "px": "100.000000000000000001",
                            "sz": "0.012345678901234567",
                            "side": "B",
                            "time": 1800000000000,
                            "tid": 42
                          },
                          "instrumentGeneration": 1,
                          "assetId": 0,
                          "registryGeneration": "1"
                        }
                      ],
                      "coverage": "observed_only",
                      "historyComplete": false,
                      "beforeSemantics": "exclusive_exchange_time"
                    }
                  },
                  "inactive": {
                    "summary": "Synthetic inactive approved instrument",
                    "value": {
                      "coin": "BTC",
                      "stale": true,
                      "error": "market_inactive"
                    }
                  },
                  "registryUnavailable": {
                    "summary": "Missing or mismatched approved registry",
                    "value": {
                      "error": "approved_registry_unavailable"
                    }
                  },
                  "serviceError": {
                    "summary": "Sanitized service failure",
                    "value": {
                      "error": "service_unavailable"
                    }
                  }
                }
              }
            }
          }
        },
        "x-codeSamples": [
          {
            "lang": "Shell",
            "label": "cURL (authorized SSM tunnel)",
            "source": "curl --fail-with-body --silent --show-error --header \"Authorization: Bearer $ALT_READ_TOKEN\" \\\n  'http://127.0.0.1:8080/v1/markets/BTC/trades?limit=100&before=1800000000000'"
          }
        ],
        "parameters": [
          {
            "name": "coin",
            "in": "path",
            "required": true,
            "description": "Exact approved venue coin, percent-encoded as one path segment. Examples: BTC perp → BTC; BTC spot → @142; PURR spot → PURR%2FUSDC; Alphabet perp → xyz%3AGOOGL. Display aliases do not substitute for venue identities.",
            "schema": {
              "$ref": "#/components/schemas/Coin"
            },
            "examples": {
              "nativePerp": {
                "value": "BTC"
              },
              "spot": {
                "value": "@142"
              },
              "spotWithSlash": {
                "value": "PURR/USDC"
              },
              "builderPerp": {
                "value": "xyz:GOOGL"
              }
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "description": "Single integer parameter. Maximum 500 observed trades; default 100. Zero, decimals, duplicate keys and unsupported keys return 400.",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 500,
              "default": 100
            }
          },
          {
            "name": "before",
            "in": "query",
            "required": false,
            "description": "Single positive Unix epoch-millisecond boundary, exclusive: exchange_time < before. Results sort by exchange_time descending, then internal journal ID descending. This is not a row cursor: trades sharing the boundary timestamp can be omitted when paging. There is no next cursor or complete-history guarantee. Use values <=9007199254740991; currently a larger positive signed-int64 value passes the HTTP parser but fails store validation as 503 service_unavailable.",
            "schema": {
              "$ref": "#/components/schemas/EpochMillis"
            }
          }
        ]
      }
    },
    "/v1/markets/{coin}/features": {
      "get": {
        "operationId": "getMarketFeatures",
        "summary": "Current-book spread and top-five depth features",
        "description": "Calculates l2-top5-v1 from one identity-checked current approved L2 snapshot. Exact rational arithmetic preserves best quotes, midpoint, absolute spread and base-depth sums; spread basis points and depth imbalance use 18 fractional places rounded to nearest with halves away from zero. Both original sides require strictly ordered distinct positive prices and nonnegative sizes, at most 1000 levels per side; zero-size rows are excluded and counted. Full depth requires five positive-size levels on each side. A shorter valid two-sided book returns HTTP 200 quality=partial with quote/spread values and null depth values. Empty/one-sided, crossed/locked, malformed, stale, inactive, disconnected or mismatched inputs return HTTP 503 with all measurements null. Freshness validates source and receipt clocks separately using the configured book threshold (default 15000 ms) and five-second future-clock tolerance. Applicable funding/context availability does not block an independently fresh L2 measurement. All query parameters are rejected; this endpoint does not read trades, execute orders or claim historical completeness.",
        "tags": [
          "Markets"
        ],
        "parameters": [
          {
            "name": "coin",
            "in": "path",
            "required": true,
            "description": "Exact approved venue coin, percent-encoded as one path segment. Examples: BTC perp → BTC; BTC spot → @142; PURR spot → PURR%2FUSDC; Alphabet perp → xyz%3AGOOGL. Display aliases do not substitute for venue identities.",
            "schema": {
              "$ref": "#/components/schemas/Coin"
            },
            "examples": {
              "nativePerp": {
                "value": "BTC"
              },
              "spot": {
                "value": "@142"
              },
              "spotWithSlash": {
                "value": "PURR/USDC"
              },
              "builderPerp": {
                "value": "xyz:GOOGL"
              }
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Fresh valid input: full measurements or partial quote-only measurements. Inspect quality and explicit nulls, not HTTP status alone.",
            "headers": {
              "Cache-Control": {
                "description": "Responses must not be cached.",
                "schema": {
                  "type": "string",
                  "const": "no-store"
                }
              },
              "X-Content-Type-Options": {
                "description": "Content sniffing is disabled.",
                "schema": {
                  "type": "string",
                  "const": "nosniff"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/AvailableBookFeatures"
                    },
                    {
                      "$ref": "#/components/schemas/PartialBookFeatures"
                    }
                  ]
                },
                "examples": {
                  "available": {
                    "summary": "Synthetic full top-five measurement",
                    "description": "Frozen synthetic example, not live market data or execution authority.",
                    "value": {
                      "schemaVersion": "alt.market_features.v1",
                      "coin": "BTC",
                      "dex": "",
                      "marketType": "perp",
                      "assetId": 0,
                      "instrumentGeneration": "1",
                      "registryGeneration": "2",
                      "approvalManifestHash": "04c6bf8b7ef675d007704d1ce62940f504a0590f19cf4f10630063b9a841e7e6",
                      "calculatedAt": 1800000000000,
                      "coverage": "observed_snapshot",
                      "quality": "available",
                      "stale": false,
                      "definition": {
                        "id": "l2-top5-v1",
                        "depthLevels": 5,
                        "ratioDecimalPlaces": 18,
                        "ratioRounding": "nearest_half_away_from_zero"
                      },
                      "source": {
                        "eventId": "BTC:g1:synthetic-feature-input",
                        "registryGeneration": "1",
                        "exchangeTime": 1799999999900,
                        "receivedAt": 1799999999900
                      },
                      "freshness": {
                        "maxAgeMs": 15000,
                        "sourceTimeKnown": true,
                        "sourceAgeMs": 100,
                        "receiptAgeMs": 100,
                        "sourceStale": false,
                        "receiptStale": false
                      },
                      "units": {
                        "price": "quote_asset_per_base_asset",
                        "baseDepth": "base_asset",
                        "spreadBps": "basis_points",
                        "depthImbalance": "ratio"
                      },
                      "depth": {
                        "requiredLevels": 5,
                        "bidAvailableLevels": 5,
                        "askAvailableLevels": 5,
                        "bidLevelsUsed": 5,
                        "askLevelsUsed": 5,
                        "bidZeroSizeExcluded": 0,
                        "askZeroSizeExcluded": 0,
                        "complete": true
                      },
                      "values": {
                        "bestBid": "100",
                        "bestAsk": "100.1",
                        "mid": "100.05",
                        "spread": "0.1",
                        "spreadBps": "9.995002498750624688",
                        "bidBaseDepth": "15",
                        "askBaseDepth": "10",
                        "depthImbalance": "0.200000000000000000"
                      }
                    }
                  },
                  "partial": {
                    "summary": "Synthetic short book: quotes available, depth explicitly null",
                    "description": "Frozen synthetic example, not live market data or execution authority.",
                    "value": {
                      "schemaVersion": "alt.market_features.v1",
                      "coin": "BTC",
                      "dex": "",
                      "marketType": "perp",
                      "assetId": 0,
                      "instrumentGeneration": "1",
                      "registryGeneration": "2",
                      "approvalManifestHash": "04c6bf8b7ef675d007704d1ce62940f504a0590f19cf4f10630063b9a841e7e6",
                      "calculatedAt": 1800000000000,
                      "coverage": "observed_snapshot",
                      "quality": "partial",
                      "stale": false,
                      "definition": {
                        "id": "l2-top5-v1",
                        "depthLevels": 5,
                        "ratioDecimalPlaces": 18,
                        "ratioRounding": "nearest_half_away_from_zero"
                      },
                      "source": {
                        "eventId": "BTC:g1:synthetic-feature-input",
                        "registryGeneration": "1",
                        "exchangeTime": 1799999999900,
                        "receivedAt": 1799999999900
                      },
                      "freshness": {
                        "maxAgeMs": 15000,
                        "sourceTimeKnown": true,
                        "sourceAgeMs": 100,
                        "receiptAgeMs": 100,
                        "sourceStale": false,
                        "receiptStale": false
                      },
                      "units": {
                        "price": "quote_asset_per_base_asset",
                        "baseDepth": "base_asset",
                        "spreadBps": "basis_points",
                        "depthImbalance": "ratio"
                      },
                      "depth": {
                        "requiredLevels": 5,
                        "bidAvailableLevels": 5,
                        "askAvailableLevels": 2,
                        "bidLevelsUsed": 5,
                        "askLevelsUsed": 2,
                        "bidZeroSizeExcluded": 0,
                        "askZeroSizeExcluded": 0,
                        "complete": false
                      },
                      "values": {
                        "bestBid": "100",
                        "bestAsk": "100.1",
                        "mid": "100.05",
                        "spread": "0.1",
                        "spreadBps": "9.995002498750624688",
                        "bidBaseDepth": null,
                        "askBaseDepth": null,
                        "depthImbalance": null
                      },
                      "reason": "insufficient_depth"
                    }
                  },
                  "zeroSizeExcluded": {
                    "summary": "Synthetic zero-size row excluded; only five positive levels used",
                    "description": "Frozen synthetic example, not live market data or execution authority.",
                    "value": {
                      "schemaVersion": "alt.market_features.v1",
                      "coin": "BTC",
                      "dex": "",
                      "marketType": "perp",
                      "assetId": 0,
                      "instrumentGeneration": "1",
                      "registryGeneration": "2",
                      "approvalManifestHash": "04c6bf8b7ef675d007704d1ce62940f504a0590f19cf4f10630063b9a841e7e6",
                      "calculatedAt": 1800000000000,
                      "coverage": "observed_snapshot",
                      "quality": "available",
                      "stale": false,
                      "definition": {
                        "id": "l2-top5-v1",
                        "depthLevels": 5,
                        "ratioDecimalPlaces": 18,
                        "ratioRounding": "nearest_half_away_from_zero"
                      },
                      "source": {
                        "eventId": "BTC:g1:synthetic-feature-input",
                        "registryGeneration": "1",
                        "exchangeTime": 1799999999900,
                        "receivedAt": 1799999999900
                      },
                      "freshness": {
                        "maxAgeMs": 15000,
                        "sourceTimeKnown": true,
                        "sourceAgeMs": 100,
                        "receiptAgeMs": 100,
                        "sourceStale": false,
                        "receiptStale": false
                      },
                      "units": {
                        "price": "quote_asset_per_base_asset",
                        "baseDepth": "base_asset",
                        "spreadBps": "basis_points",
                        "depthImbalance": "ratio"
                      },
                      "depth": {
                        "requiredLevels": 5,
                        "bidAvailableLevels": 5,
                        "askAvailableLevels": 6,
                        "bidLevelsUsed": 5,
                        "askLevelsUsed": 5,
                        "bidZeroSizeExcluded": 1,
                        "askZeroSizeExcluded": 0,
                        "complete": true
                      },
                      "values": {
                        "bestBid": "100",
                        "bestAsk": "100.1",
                        "mid": "100.05",
                        "spread": "0.1",
                        "spreadBps": "9.995002498750624688",
                        "bidBaseDepth": "15",
                        "askBaseDepth": "10",
                        "depthImbalance": "0.200000000000000000"
                      }
                    }
                  },
                  "beyondFloatPrecision": {
                    "summary": "Exact sub-18-place spread; declared ratio rounding can produce zero",
                    "description": "Frozen synthetic example, not live market data or execution authority.",
                    "value": {
                      "schemaVersion": "alt.market_features.v1",
                      "coin": "BTC",
                      "dex": "",
                      "marketType": "perp",
                      "assetId": 0,
                      "instrumentGeneration": "1",
                      "registryGeneration": "2",
                      "approvalManifestHash": "04c6bf8b7ef675d007704d1ce62940f504a0590f19cf4f10630063b9a841e7e6",
                      "calculatedAt": 1800000000000,
                      "coverage": "observed_snapshot",
                      "quality": "partial",
                      "stale": false,
                      "definition": {
                        "id": "l2-top5-v1",
                        "depthLevels": 5,
                        "ratioDecimalPlaces": 18,
                        "ratioRounding": "nearest_half_away_from_zero"
                      },
                      "source": {
                        "eventId": "BTC:g1:synthetic-feature-input",
                        "registryGeneration": "1",
                        "exchangeTime": 1799999999900,
                        "receivedAt": 1799999999900
                      },
                      "freshness": {
                        "maxAgeMs": 15000,
                        "sourceTimeKnown": true,
                        "sourceAgeMs": 100,
                        "receiptAgeMs": 100,
                        "sourceStale": false,
                        "receiptStale": false
                      },
                      "units": {
                        "price": "quote_asset_per_base_asset",
                        "baseDepth": "base_asset",
                        "spreadBps": "basis_points",
                        "depthImbalance": "ratio"
                      },
                      "depth": {
                        "requiredLevels": 5,
                        "bidAvailableLevels": 1,
                        "askAvailableLevels": 1,
                        "bidLevelsUsed": 1,
                        "askLevelsUsed": 1,
                        "bidZeroSizeExcluded": 0,
                        "askZeroSizeExcluded": 0,
                        "complete": false
                      },
                      "values": {
                        "bestBid": "9007199254740993.000000000000000001",
                        "bestAsk": "9007199254740993.000000000000000003",
                        "mid": "9007199254740993.000000000000000002",
                        "spread": "0.000000000000000002",
                        "spreadBps": "0.000000000000000000",
                        "bidBaseDepth": null,
                        "askBaseDepth": null,
                        "depthImbalance": null
                      },
                      "reason": "insufficient_depth"
                    }
                  },
                  "negativeRepeatingRatio": {
                    "summary": "Synthetic signed repeating imbalance rounded to 18 places",
                    "description": "Frozen synthetic example, not live market data or execution authority.",
                    "value": {
                      "schemaVersion": "alt.market_features.v1",
                      "coin": "BTC",
                      "dex": "",
                      "marketType": "perp",
                      "assetId": 0,
                      "instrumentGeneration": "1",
                      "registryGeneration": "2",
                      "approvalManifestHash": "04c6bf8b7ef675d007704d1ce62940f504a0590f19cf4f10630063b9a841e7e6",
                      "calculatedAt": 1800000000000,
                      "coverage": "observed_snapshot",
                      "quality": "available",
                      "stale": false,
                      "definition": {
                        "id": "l2-top5-v1",
                        "depthLevels": 5,
                        "ratioDecimalPlaces": 18,
                        "ratioRounding": "nearest_half_away_from_zero"
                      },
                      "source": {
                        "eventId": "BTC:g1:synthetic-feature-input",
                        "registryGeneration": "1",
                        "exchangeTime": 1799999999900,
                        "receivedAt": 1799999999900
                      },
                      "freshness": {
                        "maxAgeMs": 15000,
                        "sourceTimeKnown": true,
                        "sourceAgeMs": 100,
                        "receiptAgeMs": 100,
                        "sourceStale": false,
                        "receiptStale": false
                      },
                      "units": {
                        "price": "quote_asset_per_base_asset",
                        "baseDepth": "base_asset",
                        "spreadBps": "basis_points",
                        "depthImbalance": "ratio"
                      },
                      "depth": {
                        "requiredLevels": 5,
                        "bidAvailableLevels": 5,
                        "askAvailableLevels": 5,
                        "bidLevelsUsed": 5,
                        "askLevelsUsed": 5,
                        "bidZeroSizeExcluded": 0,
                        "askZeroSizeExcluded": 0,
                        "complete": true
                      },
                      "values": {
                        "bestBid": "100",
                        "bestAsk": "100.1",
                        "mid": "100.05",
                        "spread": "0.1",
                        "spreadBps": "9.995002498750624688",
                        "bidBaseDepth": "1",
                        "askBaseDepth": "2",
                        "depthImbalance": "-0.333333333333333333"
                      }
                    }
                  },
                  "allowedClockSkew": {
                    "summary": "Valid timestamps within the five-second future-clock tolerance have age zero",
                    "description": "Frozen synthetic example, not live market data or execution authority.",
                    "value": {
                      "schemaVersion": "alt.market_features.v1",
                      "coin": "BTC",
                      "dex": "",
                      "marketType": "perp",
                      "assetId": 0,
                      "instrumentGeneration": "1",
                      "registryGeneration": "2",
                      "approvalManifestHash": "04c6bf8b7ef675d007704d1ce62940f504a0590f19cf4f10630063b9a841e7e6",
                      "calculatedAt": 1800000000000,
                      "coverage": "observed_snapshot",
                      "quality": "available",
                      "stale": false,
                      "definition": {
                        "id": "l2-top5-v1",
                        "depthLevels": 5,
                        "ratioDecimalPlaces": 18,
                        "ratioRounding": "nearest_half_away_from_zero"
                      },
                      "source": {
                        "eventId": "BTC:g1:synthetic-feature-input",
                        "registryGeneration": "1",
                        "exchangeTime": 1800000001000,
                        "receivedAt": 1800000000500
                      },
                      "freshness": {
                        "maxAgeMs": 15000,
                        "sourceTimeKnown": true,
                        "sourceAgeMs": 0,
                        "receiptAgeMs": 0,
                        "sourceStale": false,
                        "receiptStale": false
                      },
                      "units": {
                        "price": "quote_asset_per_base_asset",
                        "baseDepth": "base_asset",
                        "spreadBps": "basis_points",
                        "depthImbalance": "ratio"
                      },
                      "depth": {
                        "requiredLevels": 5,
                        "bidAvailableLevels": 5,
                        "askAvailableLevels": 5,
                        "bidLevelsUsed": 5,
                        "askLevelsUsed": 5,
                        "bidZeroSizeExcluded": 0,
                        "askZeroSizeExcluded": 0,
                        "complete": true
                      },
                      "values": {
                        "bestBid": "100",
                        "bestAsk": "100.1",
                        "mid": "100.05",
                        "spread": "0.1",
                        "spreadBps": "9.995002498750624688",
                        "bidBaseDepth": "15",
                        "askBaseDepth": "10",
                        "depthImbalance": "0.200000000000000000"
                      }
                    }
                  }
                }
              }
            }
          },
          "503": {
            "description": "Unavailable input/coverage with a typed all-null feature envelope, or a sanitized registry/service error before calculation. This response cannot be used as fresh research evidence.",
            "headers": {
              "Cache-Control": {
                "description": "Responses must not be cached.",
                "schema": {
                  "type": "string",
                  "const": "no-store"
                }
              },
              "X-Content-Type-Options": {
                "description": "Content sniffing is disabled.",
                "schema": {
                  "type": "string",
                  "const": "nosniff"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/UnavailableBookFeatures"
                    },
                    {
                      "$ref": "#/components/schemas/RegistryUnavailable"
                    },
                    {
                      "$ref": "#/components/schemas/ServiceUnavailable"
                    }
                  ]
                },
                "examples": {
                  "inactive": {
                    "summary": "Synthetic inactive approved market",
                    "description": "Frozen synthetic example, not live market data or execution authority.",
                    "value": {
                      "schemaVersion": "alt.market_features.v1",
                      "coin": "BTC",
                      "dex": "",
                      "marketType": "perp",
                      "assetId": 0,
                      "instrumentGeneration": "1",
                      "registryGeneration": "2",
                      "approvalManifestHash": "04c6bf8b7ef675d007704d1ce62940f504a0590f19cf4f10630063b9a841e7e6",
                      "calculatedAt": 1800000000000,
                      "coverage": "observed_snapshot",
                      "quality": "unavailable",
                      "stale": true,
                      "definition": {
                        "id": "l2-top5-v1",
                        "depthLevels": 5,
                        "ratioDecimalPlaces": 18,
                        "ratioRounding": "nearest_half_away_from_zero"
                      },
                      "source": null,
                      "freshness": {
                        "maxAgeMs": 15000,
                        "sourceTimeKnown": false,
                        "sourceAgeMs": null,
                        "receiptAgeMs": null,
                        "sourceStale": true,
                        "receiptStale": true
                      },
                      "units": {
                        "price": "quote_asset_per_base_asset",
                        "baseDepth": "base_asset",
                        "spreadBps": "basis_points",
                        "depthImbalance": "ratio"
                      },
                      "depth": {
                        "requiredLevels": 5,
                        "bidAvailableLevels": 0,
                        "askAvailableLevels": 0,
                        "bidLevelsUsed": 0,
                        "askLevelsUsed": 0,
                        "bidZeroSizeExcluded": 0,
                        "askZeroSizeExcluded": 0,
                        "complete": false
                      },
                      "values": {
                        "bestBid": null,
                        "bestAsk": null,
                        "mid": null,
                        "spread": null,
                        "spreadBps": null,
                        "bidBaseDepth": null,
                        "askBaseDepth": null,
                        "depthImbalance": null
                      },
                      "reason": "market_inactive",
                      "error": "market_data_unavailable"
                    }
                  },
                  "missingBook": {
                    "summary": "Synthetic missing input book",
                    "description": "Frozen synthetic example, not live market data or execution authority.",
                    "value": {
                      "schemaVersion": "alt.market_features.v1",
                      "coin": "BTC",
                      "dex": "",
                      "marketType": "perp",
                      "assetId": 0,
                      "instrumentGeneration": "1",
                      "registryGeneration": "2",
                      "approvalManifestHash": "04c6bf8b7ef675d007704d1ce62940f504a0590f19cf4f10630063b9a841e7e6",
                      "calculatedAt": 1800000000000,
                      "coverage": "observed_snapshot",
                      "quality": "unavailable",
                      "stale": true,
                      "definition": {
                        "id": "l2-top5-v1",
                        "depthLevels": 5,
                        "ratioDecimalPlaces": 18,
                        "ratioRounding": "nearest_half_away_from_zero"
                      },
                      "source": null,
                      "freshness": {
                        "maxAgeMs": 15000,
                        "sourceTimeKnown": false,
                        "sourceAgeMs": null,
                        "receiptAgeMs": null,
                        "sourceStale": true,
                        "receiptStale": true
                      },
                      "units": {
                        "price": "quote_asset_per_base_asset",
                        "baseDepth": "base_asset",
                        "spreadBps": "basis_points",
                        "depthImbalance": "ratio"
                      },
                      "depth": {
                        "requiredLevels": 5,
                        "bidAvailableLevels": 0,
                        "askAvailableLevels": 0,
                        "bidLevelsUsed": 0,
                        "askLevelsUsed": 0,
                        "bidZeroSizeExcluded": 0,
                        "askZeroSizeExcluded": 0,
                        "complete": false
                      },
                      "values": {
                        "bestBid": null,
                        "bestAsk": null,
                        "mid": null,
                        "spread": null,
                        "spreadBps": null,
                        "bidBaseDepth": null,
                        "askBaseDepth": null,
                        "depthImbalance": null
                      },
                      "reason": "book_unavailable",
                      "error": "market_data_unavailable"
                    }
                  },
                  "identityMismatch": {
                    "summary": "Synthetic input identity or evidence id cannot be trusted",
                    "description": "Frozen synthetic example, not live market data or execution authority.",
                    "value": {
                      "schemaVersion": "alt.market_features.v1",
                      "coin": "BTC",
                      "dex": "",
                      "marketType": "perp",
                      "assetId": 0,
                      "instrumentGeneration": "1",
                      "registryGeneration": "2",
                      "approvalManifestHash": "04c6bf8b7ef675d007704d1ce62940f504a0590f19cf4f10630063b9a841e7e6",
                      "calculatedAt": 1800000000000,
                      "coverage": "observed_snapshot",
                      "quality": "unavailable",
                      "stale": true,
                      "definition": {
                        "id": "l2-top5-v1",
                        "depthLevels": 5,
                        "ratioDecimalPlaces": 18,
                        "ratioRounding": "nearest_half_away_from_zero"
                      },
                      "source": null,
                      "freshness": {
                        "maxAgeMs": 15000,
                        "sourceTimeKnown": false,
                        "sourceAgeMs": null,
                        "receiptAgeMs": null,
                        "sourceStale": true,
                        "receiptStale": true
                      },
                      "units": {
                        "price": "quote_asset_per_base_asset",
                        "baseDepth": "base_asset",
                        "spreadBps": "basis_points",
                        "depthImbalance": "ratio"
                      },
                      "depth": {
                        "requiredLevels": 5,
                        "bidAvailableLevels": 0,
                        "askAvailableLevels": 0,
                        "bidLevelsUsed": 0,
                        "askLevelsUsed": 0,
                        "bidZeroSizeExcluded": 0,
                        "askZeroSizeExcluded": 0,
                        "complete": false
                      },
                      "values": {
                        "bestBid": null,
                        "bestAsk": null,
                        "mid": null,
                        "spread": null,
                        "spreadBps": null,
                        "bidBaseDepth": null,
                        "askBaseDepth": null,
                        "depthImbalance": null
                      },
                      "reason": "input_identity_unavailable",
                      "error": "market_data_unavailable"
                    }
                  },
                  "registryStale": {
                    "summary": "Synthetic registry stale while both input clocks are fresh",
                    "description": "Frozen synthetic example, not live market data or execution authority.",
                    "value": {
                      "schemaVersion": "alt.market_features.v1",
                      "coin": "BTC",
                      "dex": "",
                      "marketType": "perp",
                      "assetId": 0,
                      "instrumentGeneration": "1",
                      "registryGeneration": "2",
                      "approvalManifestHash": "04c6bf8b7ef675d007704d1ce62940f504a0590f19cf4f10630063b9a841e7e6",
                      "calculatedAt": 1800000000000,
                      "coverage": "observed_snapshot",
                      "quality": "unavailable",
                      "stale": true,
                      "definition": {
                        "id": "l2-top5-v1",
                        "depthLevels": 5,
                        "ratioDecimalPlaces": 18,
                        "ratioRounding": "nearest_half_away_from_zero"
                      },
                      "source": {
                        "eventId": "BTC:g1:synthetic-feature-input",
                        "registryGeneration": "1",
                        "exchangeTime": 1799999999900,
                        "receivedAt": 1799999999900
                      },
                      "freshness": {
                        "maxAgeMs": 15000,
                        "sourceTimeKnown": true,
                        "sourceAgeMs": 100,
                        "receiptAgeMs": 100,
                        "sourceStale": false,
                        "receiptStale": false
                      },
                      "units": {
                        "price": "quote_asset_per_base_asset",
                        "baseDepth": "base_asset",
                        "spreadBps": "basis_points",
                        "depthImbalance": "ratio"
                      },
                      "depth": {
                        "requiredLevels": 5,
                        "bidAvailableLevels": 0,
                        "askAvailableLevels": 0,
                        "bidLevelsUsed": 0,
                        "askLevelsUsed": 0,
                        "bidZeroSizeExcluded": 0,
                        "askZeroSizeExcluded": 0,
                        "complete": false
                      },
                      "values": {
                        "bestBid": null,
                        "bestAsk": null,
                        "mid": null,
                        "spread": null,
                        "spreadBps": null,
                        "bidBaseDepth": null,
                        "askBaseDepth": null,
                        "depthImbalance": null
                      },
                      "reason": "registry_stale",
                      "error": "market_data_unavailable"
                    }
                  },
                  "collectionUnavailable": {
                    "summary": "Synthetic disconnected or unavailable collection with fresh input clocks",
                    "description": "Frozen synthetic example, not live market data or execution authority.",
                    "value": {
                      "schemaVersion": "alt.market_features.v1",
                      "coin": "BTC",
                      "dex": "",
                      "marketType": "perp",
                      "assetId": 0,
                      "instrumentGeneration": "1",
                      "registryGeneration": "2",
                      "approvalManifestHash": "04c6bf8b7ef675d007704d1ce62940f504a0590f19cf4f10630063b9a841e7e6",
                      "calculatedAt": 1800000000000,
                      "coverage": "observed_snapshot",
                      "quality": "unavailable",
                      "stale": true,
                      "definition": {
                        "id": "l2-top5-v1",
                        "depthLevels": 5,
                        "ratioDecimalPlaces": 18,
                        "ratioRounding": "nearest_half_away_from_zero"
                      },
                      "source": {
                        "eventId": "BTC:g1:synthetic-feature-input",
                        "registryGeneration": "1",
                        "exchangeTime": 1799999999900,
                        "receivedAt": 1799999999900
                      },
                      "freshness": {
                        "maxAgeMs": 15000,
                        "sourceTimeKnown": true,
                        "sourceAgeMs": 100,
                        "receiptAgeMs": 100,
                        "sourceStale": false,
                        "receiptStale": false
                      },
                      "units": {
                        "price": "quote_asset_per_base_asset",
                        "baseDepth": "base_asset",
                        "spreadBps": "basis_points",
                        "depthImbalance": "ratio"
                      },
                      "depth": {
                        "requiredLevels": 5,
                        "bidAvailableLevels": 0,
                        "askAvailableLevels": 0,
                        "bidLevelsUsed": 0,
                        "askLevelsUsed": 0,
                        "bidZeroSizeExcluded": 0,
                        "askZeroSizeExcluded": 0,
                        "complete": false
                      },
                      "values": {
                        "bestBid": null,
                        "bestAsk": null,
                        "mid": null,
                        "spread": null,
                        "spreadBps": null,
                        "bidBaseDepth": null,
                        "askBaseDepth": null,
                        "depthImbalance": null
                      },
                      "reason": "collection_unavailable",
                      "error": "market_data_unavailable"
                    }
                  },
                  "payloadMismatch": {
                    "summary": "Synthetic input payload coin/time mismatches its envelope",
                    "description": "Frozen synthetic example, not live market data or execution authority.",
                    "value": {
                      "schemaVersion": "alt.market_features.v1",
                      "coin": "BTC",
                      "dex": "",
                      "marketType": "perp",
                      "assetId": 0,
                      "instrumentGeneration": "1",
                      "registryGeneration": "2",
                      "approvalManifestHash": "04c6bf8b7ef675d007704d1ce62940f504a0590f19cf4f10630063b9a841e7e6",
                      "calculatedAt": 1800000000000,
                      "coverage": "observed_snapshot",
                      "quality": "unavailable",
                      "stale": true,
                      "definition": {
                        "id": "l2-top5-v1",
                        "depthLevels": 5,
                        "ratioDecimalPlaces": 18,
                        "ratioRounding": "nearest_half_away_from_zero"
                      },
                      "source": {
                        "eventId": "BTC:g1:synthetic-feature-input",
                        "registryGeneration": "1",
                        "exchangeTime": 1799999999900,
                        "receivedAt": 1799999999900
                      },
                      "freshness": {
                        "maxAgeMs": 15000,
                        "sourceTimeKnown": true,
                        "sourceAgeMs": 100,
                        "receiptAgeMs": 100,
                        "sourceStale": false,
                        "receiptStale": false
                      },
                      "units": {
                        "price": "quote_asset_per_base_asset",
                        "baseDepth": "base_asset",
                        "spreadBps": "basis_points",
                        "depthImbalance": "ratio"
                      },
                      "depth": {
                        "requiredLevels": 5,
                        "bidAvailableLevels": 0,
                        "askAvailableLevels": 0,
                        "bidLevelsUsed": 0,
                        "askLevelsUsed": 0,
                        "bidZeroSizeExcluded": 0,
                        "askZeroSizeExcluded": 0,
                        "complete": false
                      },
                      "values": {
                        "bestBid": null,
                        "bestAsk": null,
                        "mid": null,
                        "spread": null,
                        "spreadBps": null,
                        "bidBaseDepth": null,
                        "askBaseDepth": null,
                        "depthImbalance": null
                      },
                      "reason": "input_payload_mismatch",
                      "error": "market_data_unavailable"
                    }
                  },
                  "invalidBook": {
                    "summary": "Synthetic malformed, unsorted, duplicate-price or invalid-decimal book",
                    "description": "Frozen synthetic example, not live market data or execution authority.",
                    "value": {
                      "schemaVersion": "alt.market_features.v1",
                      "coin": "BTC",
                      "dex": "",
                      "marketType": "perp",
                      "assetId": 0,
                      "instrumentGeneration": "1",
                      "registryGeneration": "2",
                      "approvalManifestHash": "04c6bf8b7ef675d007704d1ce62940f504a0590f19cf4f10630063b9a841e7e6",
                      "calculatedAt": 1800000000000,
                      "coverage": "observed_snapshot",
                      "quality": "unavailable",
                      "stale": true,
                      "definition": {
                        "id": "l2-top5-v1",
                        "depthLevels": 5,
                        "ratioDecimalPlaces": 18,
                        "ratioRounding": "nearest_half_away_from_zero"
                      },
                      "source": {
                        "eventId": "BTC:g1:synthetic-feature-input",
                        "registryGeneration": "1",
                        "exchangeTime": 1799999999900,
                        "receivedAt": 1799999999900
                      },
                      "freshness": {
                        "maxAgeMs": 15000,
                        "sourceTimeKnown": true,
                        "sourceAgeMs": 100,
                        "receiptAgeMs": 100,
                        "sourceStale": false,
                        "receiptStale": false
                      },
                      "units": {
                        "price": "quote_asset_per_base_asset",
                        "baseDepth": "base_asset",
                        "spreadBps": "basis_points",
                        "depthImbalance": "ratio"
                      },
                      "depth": {
                        "requiredLevels": 5,
                        "bidAvailableLevels": 0,
                        "askAvailableLevels": 0,
                        "bidLevelsUsed": 0,
                        "askLevelsUsed": 0,
                        "bidZeroSizeExcluded": 0,
                        "askZeroSizeExcluded": 0,
                        "complete": false
                      },
                      "values": {
                        "bestBid": null,
                        "bestAsk": null,
                        "mid": null,
                        "spread": null,
                        "spreadBps": null,
                        "bidBaseDepth": null,
                        "askBaseDepth": null,
                        "depthImbalance": null
                      },
                      "reason": "invalid_book",
                      "error": "market_data_unavailable"
                    }
                  },
                  "sourceStale": {
                    "summary": "Synthetic stale source with a fresh receipt",
                    "description": "Frozen synthetic example, not live market data or execution authority.",
                    "value": {
                      "schemaVersion": "alt.market_features.v1",
                      "coin": "BTC",
                      "dex": "",
                      "marketType": "perp",
                      "assetId": 0,
                      "instrumentGeneration": "1",
                      "registryGeneration": "2",
                      "approvalManifestHash": "04c6bf8b7ef675d007704d1ce62940f504a0590f19cf4f10630063b9a841e7e6",
                      "calculatedAt": 1800000000000,
                      "coverage": "observed_snapshot",
                      "quality": "unavailable",
                      "stale": true,
                      "definition": {
                        "id": "l2-top5-v1",
                        "depthLevels": 5,
                        "ratioDecimalPlaces": 18,
                        "ratioRounding": "nearest_half_away_from_zero"
                      },
                      "source": {
                        "eventId": "BTC:g1:synthetic-feature-input",
                        "registryGeneration": "1",
                        "exchangeTime": 1799999970000,
                        "receivedAt": 1799999999900
                      },
                      "freshness": {
                        "maxAgeMs": 15000,
                        "sourceTimeKnown": true,
                        "sourceAgeMs": 30000,
                        "receiptAgeMs": 100,
                        "sourceStale": true,
                        "receiptStale": false
                      },
                      "units": {
                        "price": "quote_asset_per_base_asset",
                        "baseDepth": "base_asset",
                        "spreadBps": "basis_points",
                        "depthImbalance": "ratio"
                      },
                      "depth": {
                        "requiredLevels": 5,
                        "bidAvailableLevels": 0,
                        "askAvailableLevels": 0,
                        "bidLevelsUsed": 0,
                        "askLevelsUsed": 0,
                        "bidZeroSizeExcluded": 0,
                        "askZeroSizeExcluded": 0,
                        "complete": false
                      },
                      "values": {
                        "bestBid": null,
                        "bestAsk": null,
                        "mid": null,
                        "spread": null,
                        "spreadBps": null,
                        "bidBaseDepth": null,
                        "askBaseDepth": null,
                        "depthImbalance": null
                      },
                      "reason": "book_stale",
                      "error": "market_data_unavailable"
                    }
                  },
                  "receiptStale": {
                    "summary": "Synthetic fresh source with a stale receipt; flags stay independent",
                    "description": "Frozen synthetic example, not live market data or execution authority.",
                    "value": {
                      "schemaVersion": "alt.market_features.v1",
                      "coin": "BTC",
                      "dex": "",
                      "marketType": "perp",
                      "assetId": 0,
                      "instrumentGeneration": "1",
                      "registryGeneration": "2",
                      "approvalManifestHash": "04c6bf8b7ef675d007704d1ce62940f504a0590f19cf4f10630063b9a841e7e6",
                      "calculatedAt": 1800000000000,
                      "coverage": "observed_snapshot",
                      "quality": "unavailable",
                      "stale": true,
                      "definition": {
                        "id": "l2-top5-v1",
                        "depthLevels": 5,
                        "ratioDecimalPlaces": 18,
                        "ratioRounding": "nearest_half_away_from_zero"
                      },
                      "source": {
                        "eventId": "BTC:g1:synthetic-feature-input",
                        "registryGeneration": "1",
                        "exchangeTime": 1799999993000,
                        "receivedAt": 1799999984000
                      },
                      "freshness": {
                        "maxAgeMs": 15000,
                        "sourceTimeKnown": true,
                        "sourceAgeMs": 7000,
                        "receiptAgeMs": 16000,
                        "sourceStale": false,
                        "receiptStale": true
                      },
                      "units": {
                        "price": "quote_asset_per_base_asset",
                        "baseDepth": "base_asset",
                        "spreadBps": "basis_points",
                        "depthImbalance": "ratio"
                      },
                      "depth": {
                        "requiredLevels": 5,
                        "bidAvailableLevels": 0,
                        "askAvailableLevels": 0,
                        "bidLevelsUsed": 0,
                        "askLevelsUsed": 0,
                        "bidZeroSizeExcluded": 0,
                        "askZeroSizeExcluded": 0,
                        "complete": false
                      },
                      "values": {
                        "bestBid": null,
                        "bestAsk": null,
                        "mid": null,
                        "spread": null,
                        "spreadBps": null,
                        "bidBaseDepth": null,
                        "askBaseDepth": null,
                        "depthImbalance": null
                      },
                      "reason": "book_stale",
                      "error": "market_data_unavailable"
                    }
                  },
                  "unknownSource": {
                    "summary": "Unknown source time never borrows the receipt age",
                    "description": "Frozen synthetic example, not live market data or execution authority.",
                    "value": {
                      "schemaVersion": "alt.market_features.v1",
                      "coin": "BTC",
                      "dex": "",
                      "marketType": "perp",
                      "assetId": 0,
                      "instrumentGeneration": "1",
                      "registryGeneration": "2",
                      "approvalManifestHash": "04c6bf8b7ef675d007704d1ce62940f504a0590f19cf4f10630063b9a841e7e6",
                      "calculatedAt": 1800000000000,
                      "coverage": "observed_snapshot",
                      "quality": "unavailable",
                      "stale": true,
                      "definition": {
                        "id": "l2-top5-v1",
                        "depthLevels": 5,
                        "ratioDecimalPlaces": 18,
                        "ratioRounding": "nearest_half_away_from_zero"
                      },
                      "source": {
                        "eventId": "BTC:g1:synthetic-feature-input",
                        "registryGeneration": "1",
                        "exchangeTime": null,
                        "receivedAt": 1799999999900
                      },
                      "freshness": {
                        "maxAgeMs": 15000,
                        "sourceTimeKnown": false,
                        "sourceAgeMs": null,
                        "receiptAgeMs": 100,
                        "sourceStale": true,
                        "receiptStale": false
                      },
                      "units": {
                        "price": "quote_asset_per_base_asset",
                        "baseDepth": "base_asset",
                        "spreadBps": "basis_points",
                        "depthImbalance": "ratio"
                      },
                      "depth": {
                        "requiredLevels": 5,
                        "bidAvailableLevels": 0,
                        "askAvailableLevels": 0,
                        "bidLevelsUsed": 0,
                        "askLevelsUsed": 0,
                        "bidZeroSizeExcluded": 0,
                        "askZeroSizeExcluded": 0,
                        "complete": false
                      },
                      "values": {
                        "bestBid": null,
                        "bestAsk": null,
                        "mid": null,
                        "spread": null,
                        "spreadBps": null,
                        "bidBaseDepth": null,
                        "askBaseDepth": null,
                        "depthImbalance": null
                      },
                      "reason": "book_stale",
                      "error": "market_data_unavailable"
                    }
                  },
                  "invalidSourceClock": {
                    "summary": "Present source timestamp beyond future tolerance is known but invalid",
                    "description": "Frozen synthetic example, not live market data or execution authority.",
                    "value": {
                      "schemaVersion": "alt.market_features.v1",
                      "coin": "BTC",
                      "dex": "",
                      "marketType": "perp",
                      "assetId": 0,
                      "instrumentGeneration": "1",
                      "registryGeneration": "2",
                      "approvalManifestHash": "04c6bf8b7ef675d007704d1ce62940f504a0590f19cf4f10630063b9a841e7e6",
                      "calculatedAt": 1800000000000,
                      "coverage": "observed_snapshot",
                      "quality": "unavailable",
                      "stale": true,
                      "definition": {
                        "id": "l2-top5-v1",
                        "depthLevels": 5,
                        "ratioDecimalPlaces": 18,
                        "ratioRounding": "nearest_half_away_from_zero"
                      },
                      "source": {
                        "eventId": "BTC:g1:synthetic-feature-input",
                        "registryGeneration": "1",
                        "exchangeTime": 1800000005001,
                        "receivedAt": 1799999999900
                      },
                      "freshness": {
                        "maxAgeMs": 15000,
                        "sourceTimeKnown": true,
                        "sourceAgeMs": null,
                        "receiptAgeMs": 100,
                        "sourceStale": true,
                        "receiptStale": false
                      },
                      "units": {
                        "price": "quote_asset_per_base_asset",
                        "baseDepth": "base_asset",
                        "spreadBps": "basis_points",
                        "depthImbalance": "ratio"
                      },
                      "depth": {
                        "requiredLevels": 5,
                        "bidAvailableLevels": 0,
                        "askAvailableLevels": 0,
                        "bidLevelsUsed": 0,
                        "askLevelsUsed": 0,
                        "bidZeroSizeExcluded": 0,
                        "askZeroSizeExcluded": 0,
                        "complete": false
                      },
                      "values": {
                        "bestBid": null,
                        "bestAsk": null,
                        "mid": null,
                        "spread": null,
                        "spreadBps": null,
                        "bidBaseDepth": null,
                        "askBaseDepth": null,
                        "depthImbalance": null
                      },
                      "reason": "book_stale",
                      "error": "market_data_unavailable"
                    }
                  },
                  "invalidReceiptClock": {
                    "summary": "Invalid receipt clock does not mark a fresh source as stale",
                    "description": "Frozen synthetic example, not live market data or execution authority.",
                    "value": {
                      "schemaVersion": "alt.market_features.v1",
                      "coin": "BTC",
                      "dex": "",
                      "marketType": "perp",
                      "assetId": 0,
                      "instrumentGeneration": "1",
                      "registryGeneration": "2",
                      "approvalManifestHash": "04c6bf8b7ef675d007704d1ce62940f504a0590f19cf4f10630063b9a841e7e6",
                      "calculatedAt": 1800000000000,
                      "coverage": "observed_snapshot",
                      "quality": "unavailable",
                      "stale": true,
                      "definition": {
                        "id": "l2-top5-v1",
                        "depthLevels": 5,
                        "ratioDecimalPlaces": 18,
                        "ratioRounding": "nearest_half_away_from_zero"
                      },
                      "source": {
                        "eventId": "BTC:g1:synthetic-feature-input",
                        "registryGeneration": "1",
                        "exchangeTime": 1799999999900,
                        "receivedAt": 1800000005001
                      },
                      "freshness": {
                        "maxAgeMs": 15000,
                        "sourceTimeKnown": true,
                        "sourceAgeMs": 100,
                        "receiptAgeMs": null,
                        "sourceStale": false,
                        "receiptStale": true
                      },
                      "units": {
                        "price": "quote_asset_per_base_asset",
                        "baseDepth": "base_asset",
                        "spreadBps": "basis_points",
                        "depthImbalance": "ratio"
                      },
                      "depth": {
                        "requiredLevels": 5,
                        "bidAvailableLevels": 0,
                        "askAvailableLevels": 0,
                        "bidLevelsUsed": 0,
                        "askLevelsUsed": 0,
                        "bidZeroSizeExcluded": 0,
                        "askZeroSizeExcluded": 0,
                        "complete": false
                      },
                      "values": {
                        "bestBid": null,
                        "bestAsk": null,
                        "mid": null,
                        "spread": null,
                        "spreadBps": null,
                        "bidBaseDepth": null,
                        "askBaseDepth": null,
                        "depthImbalance": null
                      },
                      "reason": "book_stale",
                      "error": "market_data_unavailable"
                    }
                  },
                  "oneSided": {
                    "summary": "Synthetic zero-size-only bid side makes all values unavailable",
                    "description": "Frozen synthetic example, not live market data or execution authority.",
                    "value": {
                      "schemaVersion": "alt.market_features.v1",
                      "coin": "BTC",
                      "dex": "",
                      "marketType": "perp",
                      "assetId": 0,
                      "instrumentGeneration": "1",
                      "registryGeneration": "2",
                      "approvalManifestHash": "04c6bf8b7ef675d007704d1ce62940f504a0590f19cf4f10630063b9a841e7e6",
                      "calculatedAt": 1800000000000,
                      "coverage": "observed_snapshot",
                      "quality": "unavailable",
                      "stale": true,
                      "definition": {
                        "id": "l2-top5-v1",
                        "depthLevels": 5,
                        "ratioDecimalPlaces": 18,
                        "ratioRounding": "nearest_half_away_from_zero"
                      },
                      "source": {
                        "eventId": "BTC:g1:synthetic-feature-input",
                        "registryGeneration": "1",
                        "exchangeTime": 1799999999900,
                        "receivedAt": 1799999999900
                      },
                      "freshness": {
                        "maxAgeMs": 15000,
                        "sourceTimeKnown": true,
                        "sourceAgeMs": 100,
                        "receiptAgeMs": 100,
                        "sourceStale": false,
                        "receiptStale": false
                      },
                      "units": {
                        "price": "quote_asset_per_base_asset",
                        "baseDepth": "base_asset",
                        "spreadBps": "basis_points",
                        "depthImbalance": "ratio"
                      },
                      "depth": {
                        "requiredLevels": 5,
                        "bidAvailableLevels": 0,
                        "askAvailableLevels": 5,
                        "bidLevelsUsed": 0,
                        "askLevelsUsed": 0,
                        "bidZeroSizeExcluded": 5,
                        "askZeroSizeExcluded": 0,
                        "complete": false
                      },
                      "values": {
                        "bestBid": null,
                        "bestAsk": null,
                        "mid": null,
                        "spread": null,
                        "spreadBps": null,
                        "bidBaseDepth": null,
                        "askBaseDepth": null,
                        "depthImbalance": null
                      },
                      "reason": "one_sided_or_empty_book",
                      "error": "market_data_unavailable"
                    }
                  },
                  "crossedOrLocked": {
                    "summary": "Synthetic crossed or locked best quote makes all values unavailable",
                    "description": "Frozen synthetic example, not live market data or execution authority.",
                    "value": {
                      "schemaVersion": "alt.market_features.v1",
                      "coin": "BTC",
                      "dex": "",
                      "marketType": "perp",
                      "assetId": 0,
                      "instrumentGeneration": "1",
                      "registryGeneration": "2",
                      "approvalManifestHash": "04c6bf8b7ef675d007704d1ce62940f504a0590f19cf4f10630063b9a841e7e6",
                      "calculatedAt": 1800000000000,
                      "coverage": "observed_snapshot",
                      "quality": "unavailable",
                      "stale": true,
                      "definition": {
                        "id": "l2-top5-v1",
                        "depthLevels": 5,
                        "ratioDecimalPlaces": 18,
                        "ratioRounding": "nearest_half_away_from_zero"
                      },
                      "source": {
                        "eventId": "BTC:g1:synthetic-feature-input",
                        "registryGeneration": "1",
                        "exchangeTime": 1799999999900,
                        "receivedAt": 1799999999900
                      },
                      "freshness": {
                        "maxAgeMs": 15000,
                        "sourceTimeKnown": true,
                        "sourceAgeMs": 100,
                        "receiptAgeMs": 100,
                        "sourceStale": false,
                        "receiptStale": false
                      },
                      "units": {
                        "price": "quote_asset_per_base_asset",
                        "baseDepth": "base_asset",
                        "spreadBps": "basis_points",
                        "depthImbalance": "ratio"
                      },
                      "depth": {
                        "requiredLevels": 5,
                        "bidAvailableLevels": 5,
                        "askAvailableLevels": 5,
                        "bidLevelsUsed": 0,
                        "askLevelsUsed": 0,
                        "bidZeroSizeExcluded": 0,
                        "askZeroSizeExcluded": 0,
                        "complete": false
                      },
                      "values": {
                        "bestBid": null,
                        "bestAsk": null,
                        "mid": null,
                        "spread": null,
                        "spreadBps": null,
                        "bidBaseDepth": null,
                        "askBaseDepth": null,
                        "depthImbalance": null
                      },
                      "reason": "crossed_or_locked_book",
                      "error": "market_data_unavailable"
                    }
                  },
                  "registryUnavailable": {
                    "summary": "Approved registry missing or mismatched",
                    "description": "Frozen synthetic example, not live market data or execution authority.",
                    "value": {
                      "error": "approved_registry_unavailable"
                    }
                  },
                  "serviceUnavailable": {
                    "summary": "Sanitized service/storage failure",
                    "description": "Frozen synthetic example, not live market data or execution authority.",
                    "value": {
                      "error": "service_unavailable"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/400"
          },
          "401": {
            "$ref": "#/components/responses/401"
          },
          "404": {
            "$ref": "#/components/responses/404"
          },
          "405": {
            "$ref": "#/components/responses/405"
          },
          "414": {
            "$ref": "#/components/responses/414"
          }
        },
        "x-codeSamples": [
          {
            "lang": "Shell",
            "label": "cURL (authorized local API tunnel)",
            "source": "curl --fail-with-body --silent --show-error --header \"Authorization: Bearer $ALT_READ_TOKEN\" \\\n  'http://127.0.0.1:8080/v1/markets/BTC/features'"
          }
        ]
      }
    },
    "/v1/market-data/summaries": {
      "get": {
        "operationId": "getPublicMarketSummaries",
        "summary": "Approved market quotes and statistics",
        "description": "Returns exactly 38 owner-approved identities in manifest order. Values derive from current-generation ingested contexts; fresh receipts do not create exchange timestamps. Price/24hchange/quotevolume/funding/baseOI/mark-valuedOI are nullable by availability and applicability. Component unavailability is HTTP200 with quality=unavailable and null values. No account, health diagnostics or raw metadata is exposed. Internal cache 1 second; max 600 public requests/minute and 8 active distinct data reads.",
        "tags": [
          "Public market data"
        ],
        "security": [],
        "servers": [
          {
            "url": "https://docs.altliquid.xyz",
            "description": "Public market-data origin after rollout; static documentation is a separate container."
          }
        ],
        "parameters": [],
        "responses": {
          "200": {
            "description": "Public venue observation; per-component quality and source clocks must be checked.",
            "headers": {
              "Cache-Control": {
                "description": "Responses must not be cached.",
                "schema": {
                  "type": "string",
                  "const": "no-store"
                }
              },
              "X-Content-Type-Options": {
                "description": "Content sniffing is disabled.",
                "schema": {
                  "type": "string",
                  "const": "nosniff"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicMarketSummaries"
                },
                "examples": {
                  "synthetic": {
                    "summary": "Synthetic contract example; no live price",
                    "value": {
                      "schemaVersion": "alt.public_market_data.v1",
                      "approvalManifestHash": "04c6bf8b7ef675d007704d1ce62940f504a0590f19cf4f10630063b9a841e7e6",
                      "observedAt": 1800000000000,
                      "markets": [
                        {
                          "identity": {
                            "coin": "@142",
                            "dex": "",
                            "marketType": "spot",
                            "assetId": 10142,
                            "instrumentGeneration": "1"
                          },
                          "displayName": "BTC",
                          "isActive": true,
                          "quality": "available",
                          "price": "110.123456789012345678",
                          "priceKind": "mark",
                          "previousDayPrice": "100",
                          "change24hPercent": "10.123456789012345678",
                          "volume24hQuote": "123456789.123456789012345678",
                          "openInterestBase": null,
                          "openInterestQuote": null,
                          "hourlyFundingRate": null,
                          "source": {
                            "channel": "assetContext",
                            "eventId": "synthetic-public-context",
                            "exchangeTime": null,
                            "receivedAt": 1799999999900,
                            "sourceTimeKnown": false,
                            "maxAgeMs": 120000,
                            "stale": false
                          }
                        },
                        {
                          "identity": {
                            "coin": "@151",
                            "dex": "",
                            "marketType": "spot",
                            "assetId": 10151,
                            "instrumentGeneration": "1"
                          },
                          "displayName": "ETH",
                          "isActive": true,
                          "quality": "available",
                          "price": "110.123456789012345678",
                          "priceKind": "mark",
                          "previousDayPrice": "100",
                          "change24hPercent": "10.123456789012345678",
                          "volume24hQuote": "123456789.123456789012345678",
                          "openInterestBase": null,
                          "openInterestQuote": null,
                          "hourlyFundingRate": null,
                          "source": {
                            "channel": "assetContext",
                            "eventId": "synthetic-public-context",
                            "exchangeTime": null,
                            "receivedAt": 1799999999900,
                            "sourceTimeKnown": false,
                            "maxAgeMs": 120000,
                            "stale": false
                          }
                        },
                        {
                          "identity": {
                            "coin": "@156",
                            "dex": "",
                            "marketType": "spot",
                            "assetId": 10156,
                            "instrumentGeneration": "1"
                          },
                          "displayName": "SOL",
                          "isActive": true,
                          "quality": "available",
                          "price": "110.123456789012345678",
                          "priceKind": "mark",
                          "previousDayPrice": "100",
                          "change24hPercent": "10.123456789012345678",
                          "volume24hQuote": "123456789.123456789012345678",
                          "openInterestBase": null,
                          "openInterestQuote": null,
                          "hourlyFundingRate": null,
                          "source": {
                            "channel": "assetContext",
                            "eventId": "synthetic-public-context",
                            "exchangeTime": null,
                            "receivedAt": 1799999999900,
                            "sourceTimeKnown": false,
                            "maxAgeMs": 120000,
                            "stale": false
                          }
                        },
                        {
                          "identity": {
                            "coin": "@107",
                            "dex": "",
                            "marketType": "spot",
                            "assetId": 10107,
                            "instrumentGeneration": "1"
                          },
                          "displayName": "HYPE",
                          "isActive": true,
                          "quality": "available",
                          "price": "110.123456789012345678",
                          "priceKind": "mark",
                          "previousDayPrice": "100",
                          "change24hPercent": "10.123456789012345678",
                          "volume24hQuote": "123456789.123456789012345678",
                          "openInterestBase": null,
                          "openInterestQuote": null,
                          "hourlyFundingRate": null,
                          "source": {
                            "channel": "assetContext",
                            "eventId": "synthetic-public-context",
                            "exchangeTime": null,
                            "receivedAt": 1799999999900,
                            "sourceTimeKnown": false,
                            "maxAgeMs": 120000,
                            "stale": false
                          }
                        },
                        {
                          "identity": {
                            "coin": "@272",
                            "dex": "",
                            "marketType": "spot",
                            "assetId": 10272,
                            "instrumentGeneration": "1"
                          },
                          "displayName": "ZEC",
                          "isActive": true,
                          "quality": "available",
                          "price": "110.123456789012345678",
                          "priceKind": "mark",
                          "previousDayPrice": "100",
                          "change24hPercent": "10.123456789012345678",
                          "volume24hQuote": "123456789.123456789012345678",
                          "openInterestBase": null,
                          "openInterestQuote": null,
                          "hourlyFundingRate": null,
                          "source": {
                            "channel": "assetContext",
                            "eventId": "synthetic-public-context",
                            "exchangeTime": null,
                            "receivedAt": 1799999999900,
                            "sourceTimeKnown": false,
                            "maxAgeMs": 120000,
                            "stale": false
                          }
                        },
                        {
                          "identity": {
                            "coin": "@188",
                            "dex": "",
                            "marketType": "spot",
                            "assetId": 10188,
                            "instrumentGeneration": "1"
                          },
                          "displayName": "PUMP",
                          "isActive": true,
                          "quality": "available",
                          "price": "110.123456789012345678",
                          "priceKind": "mark",
                          "previousDayPrice": "100",
                          "change24hPercent": "10.123456789012345678",
                          "volume24hQuote": "123456789.123456789012345678",
                          "openInterestBase": null,
                          "openInterestQuote": null,
                          "hourlyFundingRate": null,
                          "source": {
                            "channel": "assetContext",
                            "eventId": "synthetic-public-context",
                            "exchangeTime": null,
                            "receivedAt": 1799999999900,
                            "sourceTimeKnown": false,
                            "maxAgeMs": 120000,
                            "stale": false
                          }
                        },
                        {
                          "identity": {
                            "coin": "PURR/USDC",
                            "dex": "",
                            "marketType": "spot",
                            "assetId": 10000,
                            "instrumentGeneration": "1"
                          },
                          "displayName": "PURR",
                          "isActive": true,
                          "quality": "available",
                          "price": "110.123456789012345678",
                          "priceKind": "mark",
                          "previousDayPrice": "100",
                          "change24hPercent": "10.123456789012345678",
                          "volume24hQuote": "123456789.123456789012345678",
                          "openInterestBase": null,
                          "openInterestQuote": null,
                          "hourlyFundingRate": null,
                          "source": {
                            "channel": "assetContext",
                            "eventId": "synthetic-public-context",
                            "exchangeTime": null,
                            "receivedAt": 1799999999900,
                            "sourceTimeKnown": false,
                            "maxAgeMs": 120000,
                            "stale": false
                          }
                        },
                        {
                          "identity": {
                            "coin": "BTC",
                            "dex": "",
                            "marketType": "perp",
                            "assetId": 0,
                            "instrumentGeneration": "1"
                          },
                          "displayName": "BTC",
                          "isActive": true,
                          "quality": "available",
                          "price": "110.123456789012345678",
                          "priceKind": "mark",
                          "previousDayPrice": "100",
                          "change24hPercent": "10.123456789012345678",
                          "volume24hQuote": "123456789.123456789012345678",
                          "openInterestBase": "12.000000000000000001",
                          "openInterestQuote": "1321.481481468148148246123456789012345678",
                          "hourlyFundingRate": "-0.000012345678901234",
                          "source": {
                            "channel": "assetContext",
                            "eventId": "synthetic-public-context",
                            "exchangeTime": null,
                            "receivedAt": 1799999999900,
                            "sourceTimeKnown": false,
                            "maxAgeMs": 120000,
                            "stale": false
                          }
                        },
                        {
                          "identity": {
                            "coin": "ETH",
                            "dex": "",
                            "marketType": "perp",
                            "assetId": 1,
                            "instrumentGeneration": "1"
                          },
                          "displayName": "ETH",
                          "isActive": true,
                          "quality": "available",
                          "price": "110.123456789012345678",
                          "priceKind": "mark",
                          "previousDayPrice": "100",
                          "change24hPercent": "10.123456789012345678",
                          "volume24hQuote": "123456789.123456789012345678",
                          "openInterestBase": "12.000000000000000001",
                          "openInterestQuote": "1321.481481468148148246123456789012345678",
                          "hourlyFundingRate": "-0.000012345678901234",
                          "source": {
                            "channel": "assetContext",
                            "eventId": "synthetic-public-context",
                            "exchangeTime": null,
                            "receivedAt": 1799999999900,
                            "sourceTimeKnown": false,
                            "maxAgeMs": 120000,
                            "stale": false
                          }
                        },
                        {
                          "identity": {
                            "coin": "SOL",
                            "dex": "",
                            "marketType": "perp",
                            "assetId": 5,
                            "instrumentGeneration": "1"
                          },
                          "displayName": "SOL",
                          "isActive": true,
                          "quality": "available",
                          "price": "110.123456789012345678",
                          "priceKind": "mark",
                          "previousDayPrice": "100",
                          "change24hPercent": "10.123456789012345678",
                          "volume24hQuote": "123456789.123456789012345678",
                          "openInterestBase": "12.000000000000000001",
                          "openInterestQuote": "1321.481481468148148246123456789012345678",
                          "hourlyFundingRate": "-0.000012345678901234",
                          "source": {
                            "channel": "assetContext",
                            "eventId": "synthetic-public-context",
                            "exchangeTime": null,
                            "receivedAt": 1799999999900,
                            "sourceTimeKnown": false,
                            "maxAgeMs": 120000,
                            "stale": false
                          }
                        },
                        {
                          "identity": {
                            "coin": "HYPE",
                            "dex": "",
                            "marketType": "perp",
                            "assetId": 159,
                            "instrumentGeneration": "1"
                          },
                          "displayName": "HYPE",
                          "isActive": true,
                          "quality": "available",
                          "price": "110.123456789012345678",
                          "priceKind": "mark",
                          "previousDayPrice": "100",
                          "change24hPercent": "10.123456789012345678",
                          "volume24hQuote": "123456789.123456789012345678",
                          "openInterestBase": "12.000000000000000001",
                          "openInterestQuote": "1321.481481468148148246123456789012345678",
                          "hourlyFundingRate": "-0.000012345678901234",
                          "source": {
                            "channel": "assetContext",
                            "eventId": "synthetic-public-context",
                            "exchangeTime": null,
                            "receivedAt": 1799999999900,
                            "sourceTimeKnown": false,
                            "maxAgeMs": 120000,
                            "stale": false
                          }
                        },
                        {
                          "identity": {
                            "coin": "ZEC",
                            "dex": "",
                            "marketType": "perp",
                            "assetId": 214,
                            "instrumentGeneration": "1"
                          },
                          "displayName": "ZEC",
                          "isActive": true,
                          "quality": "available",
                          "price": "110.123456789012345678",
                          "priceKind": "mark",
                          "previousDayPrice": "100",
                          "change24hPercent": "10.123456789012345678",
                          "volume24hQuote": "123456789.123456789012345678",
                          "openInterestBase": "12.000000000000000001",
                          "openInterestQuote": "1321.481481468148148246123456789012345678",
                          "hourlyFundingRate": "-0.000012345678901234",
                          "source": {
                            "channel": "assetContext",
                            "eventId": "synthetic-public-context",
                            "exchangeTime": null,
                            "receivedAt": 1799999999900,
                            "sourceTimeKnown": false,
                            "maxAgeMs": 120000,
                            "stale": false
                          }
                        },
                        {
                          "identity": {
                            "coin": "PUMP",
                            "dex": "",
                            "marketType": "perp",
                            "assetId": 200,
                            "instrumentGeneration": "1"
                          },
                          "displayName": "PUMP",
                          "isActive": true,
                          "quality": "available",
                          "price": "110.123456789012345678",
                          "priceKind": "mark",
                          "previousDayPrice": "100",
                          "change24hPercent": "10.123456789012345678",
                          "volume24hQuote": "123456789.123456789012345678",
                          "openInterestBase": "12.000000000000000001",
                          "openInterestQuote": "1321.481481468148148246123456789012345678",
                          "hourlyFundingRate": "-0.000012345678901234",
                          "source": {
                            "channel": "assetContext",
                            "eventId": "synthetic-public-context",
                            "exchangeTime": null,
                            "receivedAt": 1799999999900,
                            "sourceTimeKnown": false,
                            "maxAgeMs": 120000,
                            "stale": false
                          }
                        },
                        {
                          "identity": {
                            "coin": "PURR",
                            "dex": "",
                            "marketType": "perp",
                            "assetId": 152,
                            "instrumentGeneration": "1"
                          },
                          "displayName": "PURR",
                          "isActive": true,
                          "quality": "available",
                          "price": "110.123456789012345678",
                          "priceKind": "mark",
                          "previousDayPrice": "100",
                          "change24hPercent": "10.123456789012345678",
                          "volume24hQuote": "123456789.123456789012345678",
                          "openInterestBase": "12.000000000000000001",
                          "openInterestQuote": "1321.481481468148148246123456789012345678",
                          "hourlyFundingRate": "-0.000012345678901234",
                          "source": {
                            "channel": "assetContext",
                            "eventId": "synthetic-public-context",
                            "exchangeTime": null,
                            "receivedAt": 1799999999900,
                            "sourceTimeKnown": false,
                            "maxAgeMs": 120000,
                            "stale": false
                          }
                        },
                        {
                          "identity": {
                            "coin": "xyz:GOLD",
                            "dex": "xyz",
                            "marketType": "perp",
                            "assetId": 110003,
                            "instrumentGeneration": "1"
                          },
                          "displayName": "GOLD",
                          "isActive": true,
                          "quality": "available",
                          "price": "110.123456789012345678",
                          "priceKind": "mark",
                          "previousDayPrice": "100",
                          "change24hPercent": "10.123456789012345678",
                          "volume24hQuote": "123456789.123456789012345678",
                          "openInterestBase": "12.000000000000000001",
                          "openInterestQuote": "1321.481481468148148246123456789012345678",
                          "hourlyFundingRate": "-0.000012345678901234",
                          "source": {
                            "channel": "assetContext",
                            "eventId": "synthetic-public-context",
                            "exchangeTime": null,
                            "receivedAt": 1799999999900,
                            "sourceTimeKnown": false,
                            "maxAgeMs": 120000,
                            "stale": false
                          }
                        },
                        {
                          "identity": {
                            "coin": "xyz:SILVER",
                            "dex": "xyz",
                            "marketType": "perp",
                            "assetId": 110026,
                            "instrumentGeneration": "1"
                          },
                          "displayName": "SILVER",
                          "isActive": true,
                          "quality": "available",
                          "price": "110.123456789012345678",
                          "priceKind": "mark",
                          "previousDayPrice": "100",
                          "change24hPercent": "10.123456789012345678",
                          "volume24hQuote": "123456789.123456789012345678",
                          "openInterestBase": "12.000000000000000001",
                          "openInterestQuote": "1321.481481468148148246123456789012345678",
                          "hourlyFundingRate": "-0.000012345678901234",
                          "source": {
                            "channel": "assetContext",
                            "eventId": "synthetic-public-context",
                            "exchangeTime": null,
                            "receivedAt": 1799999999900,
                            "sourceTimeKnown": false,
                            "maxAgeMs": 120000,
                            "stale": false
                          }
                        },
                        {
                          "identity": {
                            "coin": "xyz:COPPER",
                            "dex": "xyz",
                            "marketType": "perp",
                            "assetId": 110030,
                            "instrumentGeneration": "1"
                          },
                          "displayName": "COPPER",
                          "isActive": true,
                          "quality": "available",
                          "price": "110.123456789012345678",
                          "priceKind": "mark",
                          "previousDayPrice": "100",
                          "change24hPercent": "10.123456789012345678",
                          "volume24hQuote": "123456789.123456789012345678",
                          "openInterestBase": "12.000000000000000001",
                          "openInterestQuote": "1321.481481468148148246123456789012345678",
                          "hourlyFundingRate": "-0.000012345678901234",
                          "source": {
                            "channel": "assetContext",
                            "eventId": "synthetic-public-context",
                            "exchangeTime": null,
                            "receivedAt": 1799999999900,
                            "sourceTimeKnown": false,
                            "maxAgeMs": 120000,
                            "stale": false
                          }
                        },
                        {
                          "identity": {
                            "coin": "xyz:MU",
                            "dex": "xyz",
                            "marketType": "perp",
                            "assetId": 110015,
                            "instrumentGeneration": "1"
                          },
                          "displayName": "MU",
                          "isActive": true,
                          "quality": "available",
                          "price": "110.123456789012345678",
                          "priceKind": "mark",
                          "previousDayPrice": "100",
                          "change24hPercent": "10.123456789012345678",
                          "volume24hQuote": "123456789.123456789012345678",
                          "openInterestBase": "12.000000000000000001",
                          "openInterestQuote": "1321.481481468148148246123456789012345678",
                          "hourlyFundingRate": "-0.000012345678901234",
                          "source": {
                            "channel": "assetContext",
                            "eventId": "synthetic-public-context",
                            "exchangeTime": null,
                            "receivedAt": 1799999999900,
                            "sourceTimeKnown": false,
                            "maxAgeMs": 120000,
                            "stale": false
                          }
                        },
                        {
                          "identity": {
                            "coin": "xyz:SKHY",
                            "dex": "xyz",
                            "marketType": "perp",
                            "assetId": 110099,
                            "instrumentGeneration": "1"
                          },
                          "displayName": "SKHY",
                          "isActive": true,
                          "quality": "available",
                          "price": "110.123456789012345678",
                          "priceKind": "mark",
                          "previousDayPrice": "100",
                          "change24hPercent": "10.123456789012345678",
                          "volume24hQuote": "123456789.123456789012345678",
                          "openInterestBase": "12.000000000000000001",
                          "openInterestQuote": "1321.481481468148148246123456789012345678",
                          "hourlyFundingRate": "-0.000012345678901234",
                          "source": {
                            "channel": "assetContext",
                            "eventId": "synthetic-public-context",
                            "exchangeTime": null,
                            "receivedAt": 1799999999900,
                            "sourceTimeKnown": false,
                            "maxAgeMs": 120000,
                            "stale": false
                          }
                        },
                        {
                          "identity": {
                            "coin": "xyz:GOOGL",
                            "dex": "xyz",
                            "marketType": "perp",
                            "assetId": 110012,
                            "instrumentGeneration": "1"
                          },
                          "displayName": "GOOGL",
                          "isActive": true,
                          "quality": "available",
                          "price": "110.123456789012345678",
                          "priceKind": "mark",
                          "previousDayPrice": "100",
                          "change24hPercent": "10.123456789012345678",
                          "volume24hQuote": "123456789.123456789012345678",
                          "openInterestBase": "12.000000000000000001",
                          "openInterestQuote": "1321.481481468148148246123456789012345678",
                          "hourlyFundingRate": "-0.000012345678901234",
                          "source": {
                            "channel": "assetContext",
                            "eventId": "synthetic-public-context",
                            "exchangeTime": null,
                            "receivedAt": 1799999999900,
                            "sourceTimeKnown": false,
                            "maxAgeMs": 120000,
                            "stale": false
                          }
                        },
                        {
                          "identity": {
                            "coin": "xyz:DRAM",
                            "dex": "xyz",
                            "marketType": "perp",
                            "assetId": 110065,
                            "instrumentGeneration": "1"
                          },
                          "displayName": "DRAM",
                          "isActive": true,
                          "quality": "available",
                          "price": "110.123456789012345678",
                          "priceKind": "mark",
                          "previousDayPrice": "100",
                          "change24hPercent": "10.123456789012345678",
                          "volume24hQuote": "123456789.123456789012345678",
                          "openInterestBase": "12.000000000000000001",
                          "openInterestQuote": "1321.481481468148148246123456789012345678",
                          "hourlyFundingRate": "-0.000012345678901234",
                          "source": {
                            "channel": "assetContext",
                            "eventId": "synthetic-public-context",
                            "exchangeTime": null,
                            "receivedAt": 1799999999900,
                            "sourceTimeKnown": false,
                            "maxAgeMs": 120000,
                            "stale": false
                          }
                        },
                        {
                          "identity": {
                            "coin": "xyz:CL",
                            "dex": "xyz",
                            "marketType": "perp",
                            "assetId": 110029,
                            "instrumentGeneration": "1"
                          },
                          "displayName": "WTI",
                          "isActive": true,
                          "quality": "available",
                          "price": "110.123456789012345678",
                          "priceKind": "mark",
                          "previousDayPrice": "100",
                          "change24hPercent": "10.123456789012345678",
                          "volume24hQuote": "123456789.123456789012345678",
                          "openInterestBase": "12.000000000000000001",
                          "openInterestQuote": "1321.481481468148148246123456789012345678",
                          "hourlyFundingRate": "-0.000012345678901234",
                          "source": {
                            "channel": "assetContext",
                            "eventId": "synthetic-public-context",
                            "exchangeTime": null,
                            "receivedAt": 1799999999900,
                            "sourceTimeKnown": false,
                            "maxAgeMs": 120000,
                            "stale": false
                          }
                        },
                        {
                          "identity": {
                            "coin": "xyz:SNDK",
                            "dex": "xyz",
                            "marketType": "perp",
                            "assetId": 110016,
                            "instrumentGeneration": "1"
                          },
                          "displayName": "SNDK",
                          "isActive": true,
                          "quality": "available",
                          "price": "110.123456789012345678",
                          "priceKind": "mark",
                          "previousDayPrice": "100",
                          "change24hPercent": "10.123456789012345678",
                          "volume24hQuote": "123456789.123456789012345678",
                          "openInterestBase": "12.000000000000000001",
                          "openInterestQuote": "1321.481481468148148246123456789012345678",
                          "hourlyFundingRate": "-0.000012345678901234",
                          "source": {
                            "channel": "assetContext",
                            "eventId": "synthetic-public-context",
                            "exchangeTime": null,
                            "receivedAt": 1799999999900,
                            "sourceTimeKnown": false,
                            "maxAgeMs": 120000,
                            "stale": false
                          }
                        },
                        {
                          "identity": {
                            "coin": "xyz:AAPL",
                            "dex": "xyz",
                            "marketType": "perp",
                            "assetId": 110009,
                            "instrumentGeneration": "1"
                          },
                          "displayName": "AAPL",
                          "isActive": true,
                          "quality": "available",
                          "price": "110.123456789012345678",
                          "priceKind": "mark",
                          "previousDayPrice": "100",
                          "change24hPercent": "10.123456789012345678",
                          "volume24hQuote": "123456789.123456789012345678",
                          "openInterestBase": "12.000000000000000001",
                          "openInterestQuote": "1321.481481468148148246123456789012345678",
                          "hourlyFundingRate": "-0.000012345678901234",
                          "source": {
                            "channel": "assetContext",
                            "eventId": "synthetic-public-context",
                            "exchangeTime": null,
                            "receivedAt": 1799999999900,
                            "sourceTimeKnown": false,
                            "maxAgeMs": 120000,
                            "stale": false
                          }
                        },
                        {
                          "identity": {
                            "coin": "xyz:MSFT",
                            "dex": "xyz",
                            "marketType": "perp",
                            "assetId": 110010,
                            "instrumentGeneration": "1"
                          },
                          "displayName": "MSFT",
                          "isActive": true,
                          "quality": "available",
                          "price": "110.123456789012345678",
                          "priceKind": "mark",
                          "previousDayPrice": "100",
                          "change24hPercent": "10.123456789012345678",
                          "volume24hQuote": "123456789.123456789012345678",
                          "openInterestBase": "12.000000000000000001",
                          "openInterestQuote": "1321.481481468148148246123456789012345678",
                          "hourlyFundingRate": "-0.000012345678901234",
                          "source": {
                            "channel": "assetContext",
                            "eventId": "synthetic-public-context",
                            "exchangeTime": null,
                            "receivedAt": 1799999999900,
                            "sourceTimeKnown": false,
                            "maxAgeMs": 120000,
                            "stale": false
                          }
                        },
                        {
                          "identity": {
                            "coin": "xyz:SPCX",
                            "dex": "xyz",
                            "marketType": "perp",
                            "assetId": 110076,
                            "instrumentGeneration": "1"
                          },
                          "displayName": "SPCX",
                          "isActive": true,
                          "quality": "available",
                          "price": "110.123456789012345678",
                          "priceKind": "mark",
                          "previousDayPrice": "100",
                          "change24hPercent": "10.123456789012345678",
                          "volume24hQuote": "123456789.123456789012345678",
                          "openInterestBase": "12.000000000000000001",
                          "openInterestQuote": "1321.481481468148148246123456789012345678",
                          "hourlyFundingRate": "-0.000012345678901234",
                          "source": {
                            "channel": "assetContext",
                            "eventId": "synthetic-public-context",
                            "exchangeTime": null,
                            "receivedAt": 1799999999900,
                            "sourceTimeKnown": false,
                            "maxAgeMs": 120000,
                            "stale": false
                          }
                        },
                        {
                          "identity": {
                            "coin": "xyz:TSLA",
                            "dex": "xyz",
                            "marketType": "perp",
                            "assetId": 110001,
                            "instrumentGeneration": "1"
                          },
                          "displayName": "TSLA",
                          "isActive": true,
                          "quality": "available",
                          "price": "110.123456789012345678",
                          "priceKind": "mark",
                          "previousDayPrice": "100",
                          "change24hPercent": "10.123456789012345678",
                          "volume24hQuote": "123456789.123456789012345678",
                          "openInterestBase": "12.000000000000000001",
                          "openInterestQuote": "1321.481481468148148246123456789012345678",
                          "hourlyFundingRate": "-0.000012345678901234",
                          "source": {
                            "channel": "assetContext",
                            "eventId": "synthetic-public-context",
                            "exchangeTime": null,
                            "receivedAt": 1799999999900,
                            "sourceTimeKnown": false,
                            "maxAgeMs": 120000,
                            "stale": false
                          }
                        },
                        {
                          "identity": {
                            "coin": "xyz:AMZN",
                            "dex": "xyz",
                            "marketType": "perp",
                            "assetId": 110013,
                            "instrumentGeneration": "1"
                          },
                          "displayName": "AMZN",
                          "isActive": true,
                          "quality": "available",
                          "price": "110.123456789012345678",
                          "priceKind": "mark",
                          "previousDayPrice": "100",
                          "change24hPercent": "10.123456789012345678",
                          "volume24hQuote": "123456789.123456789012345678",
                          "openInterestBase": "12.000000000000000001",
                          "openInterestQuote": "1321.481481468148148246123456789012345678",
                          "hourlyFundingRate": "-0.000012345678901234",
                          "source": {
                            "channel": "assetContext",
                            "eventId": "synthetic-public-context",
                            "exchangeTime": null,
                            "receivedAt": 1799999999900,
                            "sourceTimeKnown": false,
                            "maxAgeMs": 120000,
                            "stale": false
                          }
                        },
                        {
                          "identity": {
                            "coin": "xyz:AMD",
                            "dex": "xyz",
                            "marketType": "perp",
                            "assetId": 110014,
                            "instrumentGeneration": "1"
                          },
                          "displayName": "AMD",
                          "isActive": true,
                          "quality": "available",
                          "price": "110.123456789012345678",
                          "priceKind": "mark",
                          "previousDayPrice": "100",
                          "change24hPercent": "10.123456789012345678",
                          "volume24hQuote": "123456789.123456789012345678",
                          "openInterestBase": "12.000000000000000001",
                          "openInterestQuote": "1321.481481468148148246123456789012345678",
                          "hourlyFundingRate": "-0.000012345678901234",
                          "source": {
                            "channel": "assetContext",
                            "eventId": "synthetic-public-context",
                            "exchangeTime": null,
                            "receivedAt": 1799999999900,
                            "sourceTimeKnown": false,
                            "maxAgeMs": 120000,
                            "stale": false
                          }
                        },
                        {
                          "identity": {
                            "coin": "xyz:INTC",
                            "dex": "xyz",
                            "marketType": "perp",
                            "assetId": 110005,
                            "instrumentGeneration": "1"
                          },
                          "displayName": "INTC",
                          "isActive": true,
                          "quality": "available",
                          "price": "110.123456789012345678",
                          "priceKind": "mark",
                          "previousDayPrice": "100",
                          "change24hPercent": "10.123456789012345678",
                          "volume24hQuote": "123456789.123456789012345678",
                          "openInterestBase": "12.000000000000000001",
                          "openInterestQuote": "1321.481481468148148246123456789012345678",
                          "hourlyFundingRate": "-0.000012345678901234",
                          "source": {
                            "channel": "assetContext",
                            "eventId": "synthetic-public-context",
                            "exchangeTime": null,
                            "receivedAt": 1799999999900,
                            "sourceTimeKnown": false,
                            "maxAgeMs": 120000,
                            "stale": false
                          }
                        },
                        {
                          "identity": {
                            "coin": "xyz:META",
                            "dex": "xyz",
                            "marketType": "perp",
                            "assetId": 110008,
                            "instrumentGeneration": "1"
                          },
                          "displayName": "META",
                          "isActive": true,
                          "quality": "available",
                          "price": "110.123456789012345678",
                          "priceKind": "mark",
                          "previousDayPrice": "100",
                          "change24hPercent": "10.123456789012345678",
                          "volume24hQuote": "123456789.123456789012345678",
                          "openInterestBase": "12.000000000000000001",
                          "openInterestQuote": "1321.481481468148148246123456789012345678",
                          "hourlyFundingRate": "-0.000012345678901234",
                          "source": {
                            "channel": "assetContext",
                            "eventId": "synthetic-public-context",
                            "exchangeTime": null,
                            "receivedAt": 1799999999900,
                            "sourceTimeKnown": false,
                            "maxAgeMs": 120000,
                            "stale": false
                          }
                        },
                        {
                          "identity": {
                            "coin": "xyz:COIN",
                            "dex": "xyz",
                            "marketType": "perp",
                            "assetId": 110007,
                            "instrumentGeneration": "1"
                          },
                          "displayName": "COIN",
                          "isActive": true,
                          "quality": "available",
                          "price": "110.123456789012345678",
                          "priceKind": "mark",
                          "previousDayPrice": "100",
                          "change24hPercent": "10.123456789012345678",
                          "volume24hQuote": "123456789.123456789012345678",
                          "openInterestBase": "12.000000000000000001",
                          "openInterestQuote": "1321.481481468148148246123456789012345678",
                          "hourlyFundingRate": "-0.000012345678901234",
                          "source": {
                            "channel": "assetContext",
                            "eventId": "synthetic-public-context",
                            "exchangeTime": null,
                            "receivedAt": 1799999999900,
                            "sourceTimeKnown": false,
                            "maxAgeMs": 120000,
                            "stale": false
                          }
                        },
                        {
                          "identity": {
                            "coin": "xyz:HOOD",
                            "dex": "xyz",
                            "marketType": "perp",
                            "assetId": 110004,
                            "instrumentGeneration": "1"
                          },
                          "displayName": "HOOD",
                          "isActive": true,
                          "quality": "available",
                          "price": "110.123456789012345678",
                          "priceKind": "mark",
                          "previousDayPrice": "100",
                          "change24hPercent": "10.123456789012345678",
                          "volume24hQuote": "123456789.123456789012345678",
                          "openInterestBase": "12.000000000000000001",
                          "openInterestQuote": "1321.481481468148148246123456789012345678",
                          "hourlyFundingRate": "-0.000012345678901234",
                          "source": {
                            "channel": "assetContext",
                            "eventId": "synthetic-public-context",
                            "exchangeTime": null,
                            "receivedAt": 1799999999900,
                            "sourceTimeKnown": false,
                            "maxAgeMs": 120000,
                            "stale": false
                          }
                        },
                        {
                          "identity": {
                            "coin": "xyz:ORCL",
                            "dex": "xyz",
                            "marketType": "perp",
                            "assetId": 110011,
                            "instrumentGeneration": "1"
                          },
                          "displayName": "ORCL",
                          "isActive": true,
                          "quality": "available",
                          "price": "110.123456789012345678",
                          "priceKind": "mark",
                          "previousDayPrice": "100",
                          "change24hPercent": "10.123456789012345678",
                          "volume24hQuote": "123456789.123456789012345678",
                          "openInterestBase": "12.000000000000000001",
                          "openInterestQuote": "1321.481481468148148246123456789012345678",
                          "hourlyFundingRate": "-0.000012345678901234",
                          "source": {
                            "channel": "assetContext",
                            "eventId": "synthetic-public-context",
                            "exchangeTime": null,
                            "receivedAt": 1799999999900,
                            "sourceTimeKnown": false,
                            "maxAgeMs": 120000,
                            "stale": false
                          }
                        },
                        {
                          "identity": {
                            "coin": "xyz:SP500",
                            "dex": "xyz",
                            "marketType": "perp",
                            "assetId": 110052,
                            "instrumentGeneration": "1"
                          },
                          "displayName": "SP500",
                          "isActive": true,
                          "quality": "available",
                          "price": "110.123456789012345678",
                          "priceKind": "mark",
                          "previousDayPrice": "100",
                          "change24hPercent": "10.123456789012345678",
                          "volume24hQuote": "123456789.123456789012345678",
                          "openInterestBase": "12.000000000000000001",
                          "openInterestQuote": "1321.481481468148148246123456789012345678",
                          "hourlyFundingRate": "-0.000012345678901234",
                          "source": {
                            "channel": "assetContext",
                            "eventId": "synthetic-public-context",
                            "exchangeTime": null,
                            "receivedAt": 1799999999900,
                            "sourceTimeKnown": false,
                            "maxAgeMs": 120000,
                            "stale": false
                          }
                        },
                        {
                          "identity": {
                            "coin": "xyz:MAGS",
                            "dex": "xyz",
                            "marketType": "perp",
                            "assetId": 110108,
                            "instrumentGeneration": "1"
                          },
                          "displayName": "MAGS",
                          "isActive": true,
                          "quality": "available",
                          "price": "110.123456789012345678",
                          "priceKind": "mark",
                          "previousDayPrice": "100",
                          "change24hPercent": "10.123456789012345678",
                          "volume24hQuote": "123456789.123456789012345678",
                          "openInterestBase": "12.000000000000000001",
                          "openInterestQuote": "1321.481481468148148246123456789012345678",
                          "hourlyFundingRate": "-0.000012345678901234",
                          "source": {
                            "channel": "assetContext",
                            "eventId": "synthetic-public-context",
                            "exchangeTime": null,
                            "receivedAt": 1799999999900,
                            "sourceTimeKnown": false,
                            "maxAgeMs": 120000,
                            "stale": false
                          }
                        },
                        {
                          "identity": {
                            "coin": "xyz:SOXL",
                            "dex": "xyz",
                            "marketType": "perp",
                            "assetId": 110107,
                            "instrumentGeneration": "1"
                          },
                          "displayName": "SOXL",
                          "isActive": true,
                          "quality": "available",
                          "price": "110.123456789012345678",
                          "priceKind": "mark",
                          "previousDayPrice": "100",
                          "change24hPercent": "10.123456789012345678",
                          "volume24hQuote": "123456789.123456789012345678",
                          "openInterestBase": "12.000000000000000001",
                          "openInterestQuote": "1321.481481468148148246123456789012345678",
                          "hourlyFundingRate": "-0.000012345678901234",
                          "source": {
                            "channel": "assetContext",
                            "eventId": "synthetic-public-context",
                            "exchangeTime": null,
                            "receivedAt": 1799999999900,
                            "sourceTimeKnown": false,
                            "maxAgeMs": 120000,
                            "stale": false
                          }
                        },
                        {
                          "identity": {
                            "coin": "xyz:EWY",
                            "dex": "xyz",
                            "marketType": "perp",
                            "assetId": 110047,
                            "instrumentGeneration": "1"
                          },
                          "displayName": "EWY",
                          "isActive": true,
                          "quality": "available",
                          "price": "110.123456789012345678",
                          "priceKind": "mark",
                          "previousDayPrice": "100",
                          "change24hPercent": "10.123456789012345678",
                          "volume24hQuote": "123456789.123456789012345678",
                          "openInterestBase": "12.000000000000000001",
                          "openInterestQuote": "1321.481481468148148246123456789012345678",
                          "hourlyFundingRate": "-0.000012345678901234",
                          "source": {
                            "channel": "assetContext",
                            "eventId": "synthetic-public-context",
                            "exchangeTime": null,
                            "receivedAt": 1799999999900,
                            "sourceTimeKnown": false,
                            "maxAgeMs": 120000,
                            "stale": false
                          }
                        }
                      ]
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/PublicMarket400"
          },
          "404": {
            "$ref": "#/components/responses/PublicMarket404"
          },
          "405": {
            "$ref": "#/components/responses/PublicMarket405"
          },
          "414": {
            "$ref": "#/components/responses/PublicMarket414"
          },
          "429": {
            "$ref": "#/components/responses/PublicMarket429"
          },
          "503": {
            "$ref": "#/components/responses/PublicMarket503"
          }
        },
        "x-codeSamples": [
          {
            "lang": "Shell",
            "label": "Public read; no token",
            "source": "curl --fail-with-body 'https://docs.altliquid.xyz/v1/market-data/summaries'"
          }
        ]
      }
    },
    "/v1/market-data/{coin}/snapshot": {
      "get": {
        "operationId": "getPublicMarketSnapshot",
        "summary": "Market book, statistics and observed trades",
        "description": "Exact-identity current summary plus top 20 positive-size book levels per side and at most 50 recent observed trades. Source/receipt clocks and context/book freshness stay independent (120 seconds/15 seconds defaults). Invalid/stale books emit no levels. Trade history is observed-only, never a user position or fill ledger. No query parameters.",
        "tags": [
          "Public market data"
        ],
        "security": [],
        "servers": [
          {
            "url": "https://docs.altliquid.xyz",
            "description": "Public market-data origin after rollout; static documentation is a separate container."
          }
        ],
        "parameters": [
          {
            "name": "coin",
            "in": "path",
            "required": true,
            "description": "Exact owner-approved coin; URL-encode once (PURR%2FUSDC,xyz%3AGOOGL,@188). Display symbols never substitute identities.",
            "schema": {
              "$ref": "#/components/schemas/Coin"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Public venue observation; per-component quality and source clocks must be checked.",
            "headers": {
              "Cache-Control": {
                "description": "Responses must not be cached.",
                "schema": {
                  "type": "string",
                  "const": "no-store"
                }
              },
              "X-Content-Type-Options": {
                "description": "Content sniffing is disabled.",
                "schema": {
                  "type": "string",
                  "const": "nosniff"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicMarketSnapshot"
                },
                "examples": {
                  "synthetic": {
                    "summary": "Synthetic contract example; no live price",
                    "value": {
                      "schemaVersion": "alt.public_market_data.v1",
                      "approvalManifestHash": "04c6bf8b7ef675d007704d1ce62940f504a0590f19cf4f10630063b9a841e7e6",
                      "observedAt": 1800000000000,
                      "market": {
                        "identity": {
                          "coin": "BTC",
                          "dex": "",
                          "marketType": "perp",
                          "assetId": 0,
                          "instrumentGeneration": "1"
                        },
                        "displayName": "BTC",
                        "isActive": true,
                        "quality": "available",
                        "price": "110.123456789012345678",
                        "priceKind": "mark",
                        "previousDayPrice": "100",
                        "change24hPercent": "10.123456789012345678",
                        "volume24hQuote": "123456789.123456789012345678",
                        "openInterestBase": "12.000000000000000001",
                        "openInterestQuote": "1321.481481468148148246123456789012345678",
                        "hourlyFundingRate": "-0.000012345678901234",
                        "source": {
                          "channel": "assetContext",
                          "eventId": "synthetic-public-context",
                          "exchangeTime": null,
                          "receivedAt": 1799999999900,
                          "sourceTimeKnown": false,
                          "maxAgeMs": 120000,
                          "stale": false
                        }
                      },
                      "book": {
                        "quality": "available",
                        "bids": [
                          {
                            "price": "110",
                            "size": "1",
                            "orderCount": 1
                          }
                        ],
                        "asks": [
                          {
                            "price": "110.2",
                            "size": "2",
                            "orderCount": 1
                          }
                        ],
                        "source": {
                          "channel": "l2Book",
                          "eventId": "synthetic-public-book",
                          "exchangeTime": 1799999999900,
                          "receivedAt": 1799999999900,
                          "sourceTimeKnown": true,
                          "maxAgeMs": 15000,
                          "stale": false
                        },
                        "spread": "0.2",
                        "midpoint": "110.1"
                      },
                      "trades": [
                        {
                          "price": "110.1",
                          "size": "0.001",
                          "side": "buy",
                          "exchangeTime": 1799999999000,
                          "receivedAt": 1799999999010
                        }
                      ],
                      "tradesCoverage": "observed_only"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/PublicMarket400"
          },
          "404": {
            "$ref": "#/components/responses/PublicMarket404"
          },
          "405": {
            "$ref": "#/components/responses/PublicMarket405"
          },
          "414": {
            "$ref": "#/components/responses/PublicMarket414"
          },
          "429": {
            "$ref": "#/components/responses/PublicMarket429"
          },
          "503": {
            "$ref": "#/components/responses/PublicMarket503"
          }
        },
        "x-codeSamples": [
          {
            "lang": "Shell",
            "label": "Public read; no token",
            "source": "curl --fail-with-body 'https://docs.altliquid.xyz/v1/market-data/BTC/snapshot'"
          }
        ]
      }
    },
    "/v1/market-data/{coin}/candles": {
      "get": {
        "operationId": "getPublicMarketCandles",
        "summary": "Real venue candlesticks and missing ranges",
        "description": "Fetches bounded actual Hyperliquid candleSnapshot history for the exact approved coin. Only the venue most recent 5000 candles are available; ALT exposes at most 500 per request and always historyComplete=false. Missing buckets remain explicit half-open gaps. Provider empty success is quality=empty; timeout/throttle/owner/budget failures return 503, never an invented empty chart. Coalesced cache 20 seconds retains actual receivedAt. Global public candle reserve 180 weight per 61 seconds; eachmiss reserves 30 weight including failures, alongside a qualified collector cap of 1000 out of 1200. A unique PostgreSQL session lock and 61-second startup quiet period protect replacement-process admission; no replica may bypass that contract. Read-only data access does not authorize orders. Retry-After cooldowns persist in a dedicated private state file. An admitted read writes a one-hour pending marker before provider I/O; an uncertain interrupted provider read conservatively blocks later candle misses for that hour. Normal client navigation does not abort this bounded shared provider read. Known responses clear pending state after the actual durable cooldown is recorded. Reservations remain charged for 61 seconds after the bounded provider request completes, including persistence, ownership, network delays and failures; admission time cannot expire before the actual send window. Known Retry-After integer seconds and HTTP-date deadlines are both persisted without a one-hour cap. The one-hour fence only covers an unknown interrupted response and cannot establish the deadline of an unseen longer restriction; investigate before overriding it. Current approved registry and qualified current-generation collector membership/subscriptions are required; a retained registry after metadata/identity validation failure cannot authorize a candle request. A book need not have a new price tick merely to view historical candles.",
        "tags": [
          "Public market data"
        ],
        "security": [],
        "servers": [
          {
            "url": "https://docs.altliquid.xyz",
            "description": "Public market-data origin after rollout; static documentation is a separate container."
          }
        ],
        "parameters": [
          {
            "name": "coin",
            "in": "path",
            "required": true,
            "description": "Exact owner-approved coin; URL-encode once (PURR%2FUSDC,xyz%3AGOOGL,@188). Display symbols never substitute identities.",
            "schema": {
              "$ref": "#/components/schemas/Coin"
            }
          },
          {
            "name": "interval",
            "in": "query",
            "required": true,
            "description": "Fixed venue candle interval; calendar1M and multi-day/week intervals are not exposed.",
            "schema": {
              "type": "string",
              "enum": [
                "1m",
                "3m",
                "5m",
                "15m",
                "30m",
                "1h",
                "2h",
                "4h",
                "8h",
                "12h",
                "1d"
              ]
            }
          },
          {
            "name": "startTime",
            "in": "query",
            "required": true,
            "description": "Positive epoch milliseconds; bucket floor is used for the provider request. At most500 inclusive buckets.",
            "schema": {
              "$ref": "#/components/schemas/EpochMillis"
            }
          },
          {
            "name": "endTime",
            "in": "query",
            "required": true,
            "description": "Positive epoch milliseconds >= startTime and <=server now + 5000 ms. Max 500 inclusive buckets; an unfinished current bucket may be returned.",
            "schema": {
              "$ref": "#/components/schemas/EpochMillis"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Public venue observation; per-component quality and source clocks must be checked.",
            "headers": {
              "Cache-Control": {
                "description": "Responses must not be cached.",
                "schema": {
                  "type": "string",
                  "const": "no-store"
                }
              },
              "X-Content-Type-Options": {
                "description": "Content sniffing is disabled.",
                "schema": {
                  "type": "string",
                  "const": "nosniff"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicCandles"
                },
                "examples": {
                  "synthetic": {
                    "summary": "Synthetic contract example; no live price",
                    "value": {
                      "schemaVersion": "alt.public_market_data.v1",
                      "approvalManifestHash": "04c6bf8b7ef675d007704d1ce62940f504a0590f19cf4f10630063b9a841e7e6",
                      "observedAt": 1800000000000,
                      "identity": {
                        "coin": "BTC",
                        "dex": "",
                        "marketType": "perp",
                        "assetId": 0,
                        "instrumentGeneration": "1"
                      },
                      "interval": "1m",
                      "startTime": 1799999880000,
                      "endTime": 1800000000000,
                      "receivedAt": 1800000000000,
                      "quality": "available",
                      "historyComplete": false,
                      "coverage": "provider_recent_5000",
                      "candles": [
                        {
                          "openTime": 1799999880000,
                          "closeTime": 1799999939999,
                          "open": "100",
                          "high": "110",
                          "low": "99",
                          "close": "105",
                          "volumeBase": "0.001",
                          "tradeCount": 3,
                          "isClosed": true
                        },
                        {
                          "openTime": 1800000000000,
                          "closeTime": 1800000059999,
                          "open": "105",
                          "high": "110",
                          "low": "100",
                          "close": "107",
                          "volumeBase": "0.0001",
                          "tradeCount": 1,
                          "isClosed": false
                        }
                      ],
                      "gaps": [
                        {
                          "startTime": 1799999940000,
                          "endTime": 1800000000000
                        }
                      ]
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/PublicMarket400"
          },
          "404": {
            "$ref": "#/components/responses/PublicMarket404"
          },
          "405": {
            "$ref": "#/components/responses/PublicMarket405"
          },
          "414": {
            "$ref": "#/components/responses/PublicMarket414"
          },
          "429": {
            "$ref": "#/components/responses/PublicMarket429"
          },
          "503": {
            "$ref": "#/components/responses/PublicMarket503"
          }
        },
        "x-codeSamples": [
          {
            "lang": "Shell",
            "label": "Public read; no token",
            "source": "curl --fail-with-body 'https://docs.altliquid.xyz/v1/market-data/BTC/candles?interval=1m&startTime=1799999880000&endTime=1800000000000'"
          }
        ]
      }
    },
    "/healthz": {
      "get": {
        "operationId": "getPublicMarketProcessHealth",
        "summary": "Public data process liveness",
        "description": "Operator-only liveness for the separate market-api process. Does not read storage or prove market/provider/readiness. The ALB routes only /v1/market-data/* publicly, so this local probe is not a public Internet API. Querystrings are ignored.",
        "tags": [
          "Public market data"
        ],
        "security": [],
        "servers": [
          {
            "url": "http://127.0.0.1:8081",
            "description": "Separate public-data process on local operator transport; not the private API."
          }
        ],
        "parameters": [],
        "responses": {
          "200": {
            "description": "Public venue observation; per-component quality and source clocks must be checked.",
            "headers": {
              "Cache-Control": {
                "description": "Responses must not be cached.",
                "schema": {
                  "type": "string",
                  "const": "no-store"
                }
              },
              "X-Content-Type-Options": {
                "description": "Content sniffing is disabled.",
                "schema": {
                  "type": "string",
                  "const": "nosniff"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicMarketHealth"
                },
                "examples": {
                  "synthetic": {
                    "summary": "Synthetic contract example; no live price",
                    "value": {
                      "status": "alive"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/PublicMarket400"
          },
          "404": {
            "$ref": "#/components/responses/PublicMarket404"
          },
          "405": {
            "$ref": "#/components/responses/PublicMarket405"
          },
          "414": {
            "$ref": "#/components/responses/PublicMarket414"
          },
          "503": {
            "$ref": "#/components/responses/PublicMarket503"
          }
        },
        "x-codeSamples": [
          {
            "lang": "Shell",
            "label": "Local process probe",
            "source": "curl --fail 'http://127.0.0.1:8081/healthz'"
          }
        ]
      }
    }
  },
  "components": {
    "securitySchemes": {
      "InternalReadToken": {
        "type": "http",
        "scheme": "bearer",
        "description": "Internal read credential, configured outside the documentation. Not a JWT, end-user session, wallet signature or trade permission."
      }
    },
    "responses": {
      "400": {
        "description": "Unexpected request body, malformed query, invalid market encoding or unsupported query parameters.",
        "headers": {
          "Cache-Control": {
            "description": "Responses must not be cached.",
            "schema": {
              "type": "string",
              "const": "no-store"
            }
          },
          "X-Content-Type-Options": {
            "description": "Content sniffing is disabled.",
            "schema": {
              "type": "string",
              "const": "nosniff"
            }
          }
        },
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Error"
            },
            "examples": {
              "unexpected_body": {
                "summary": "unexpected_body",
                "value": {
                  "error": "unexpected_body"
                }
              },
              "invalid_query": {
                "summary": "invalid_query",
                "value": {
                  "error": "invalid_query"
                }
              },
              "invalid_market": {
                "summary": "invalid_market",
                "value": {
                  "error": "invalid_market"
                }
              }
            }
          }
        }
      },
      "401": {
        "description": "Missing or invalid internal bearer credential. Authentication is checked before private storage reads.",
        "headers": {
          "Cache-Control": {
            "description": "Responses must not be cached.",
            "schema": {
              "type": "string",
              "const": "no-store"
            }
          },
          "X-Content-Type-Options": {
            "description": "Content sniffing is disabled.",
            "schema": {
              "type": "string",
              "const": "nosniff"
            }
          }
        },
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Error"
            },
            "examples": {
              "unauthorized": {
                "summary": "unauthorized",
                "value": {
                  "error": "unauthorized"
                }
              }
            }
          }
        }
      },
      "404": {
        "description": "Unknown route or instrument outside the approved manifest.",
        "headers": {
          "Cache-Control": {
            "description": "Responses must not be cached.",
            "schema": {
              "type": "string",
              "const": "no-store"
            }
          },
          "X-Content-Type-Options": {
            "description": "Content sniffing is disabled.",
            "schema": {
              "type": "string",
              "const": "nosniff"
            }
          }
        },
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Error"
            },
            "examples": {
              "not_found": {
                "summary": "not_found",
                "value": {
                  "error": "not_found"
                }
              },
              "unknown_market": {
                "summary": "unknown_market",
                "value": {
                  "error": "unknown_market"
                }
              }
            }
          }
        }
      },
      "405": {
        "description": "Only GET is implemented; HEAD and OPTIONS are not implemented.",
        "headers": {
          "Cache-Control": {
            "description": "Responses must not be cached.",
            "schema": {
              "type": "string",
              "const": "no-store"
            }
          },
          "X-Content-Type-Options": {
            "description": "Content sniffing is disabled.",
            "schema": {
              "type": "string",
              "const": "nosniff"
            }
          },
          "Allow": {
            "description": "Allowed request method.",
            "schema": {
              "const": "GET"
            }
          }
        },
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Error"
            },
            "examples": {
              "method_not_allowed": {
                "summary": "method_not_allowed",
                "value": {
                  "error": "method_not_allowed"
                }
              }
            }
          }
        }
      },
      "414": {
        "description": "Request URI exceeds 2,048 characters.",
        "headers": {
          "Cache-Control": {
            "description": "Responses must not be cached.",
            "schema": {
              "type": "string",
              "const": "no-store"
            }
          },
          "X-Content-Type-Options": {
            "description": "Content sniffing is disabled.",
            "schema": {
              "type": "string",
              "const": "nosniff"
            }
          }
        },
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Error"
            },
            "examples": {
              "uri_too_long": {
                "summary": "uri_too_long",
                "value": {
                  "error": "uri_too_long"
                }
              }
            }
          }
        }
      },
      "PublicMarket400": {
        "description": "Invalid/duplicate/unsupported query parameters or a request body.",
        "headers": {
          "Cache-Control": {
            "description": "Responses must not be cached.",
            "schema": {
              "type": "string",
              "const": "no-store"
            }
          },
          "X-Content-Type-Options": {
            "description": "Content sniffing is disabled.",
            "schema": {
              "type": "string",
              "const": "nosniff"
            }
          }
        },
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/PublicMarketError"
            },
            "examples": {
              "invalid_query": {
                "summary": "invalid_query",
                "value": {
                  "error": "invalid_query"
                }
              },
              "unexpected_body": {
                "summary": "unexpected_body",
                "value": {
                  "error": "unexpected_body"
                }
              },
              "invalid_market": {
                "summary": "invalid_market",
                "value": {
                  "error": "invalid_market"
                }
              }
            }
          }
        }
      },
      "PublicMarket404": {
        "description": "Unknown route or unapproved coin.",
        "headers": {
          "Cache-Control": {
            "description": "Responses must not be cached.",
            "schema": {
              "type": "string",
              "const": "no-store"
            }
          },
          "X-Content-Type-Options": {
            "description": "Content sniffing is disabled.",
            "schema": {
              "type": "string",
              "const": "nosniff"
            }
          }
        },
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/PublicMarketError"
            },
            "examples": {
              "not_found": {
                "summary": "not_found",
                "value": {
                  "error": "not_found"
                }
              },
              "unknown_market": {
                "summary": "unknown_market",
                "value": {
                  "error": "unknown_market"
                }
              }
            }
          }
        }
      },
      "PublicMarket405": {
        "description": "GET only; Allow: GET.",
        "headers": {
          "Cache-Control": {
            "description": "Responses must not be cached.",
            "schema": {
              "type": "string",
              "const": "no-store"
            }
          },
          "X-Content-Type-Options": {
            "description": "Content sniffing is disabled.",
            "schema": {
              "type": "string",
              "const": "nosniff"
            }
          },
          "Allow": {
            "schema": {
              "type": "string",
              "const": "GET"
            }
          }
        },
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/PublicMarketError"
            },
            "examples": {
              "method_not_allowed": {
                "summary": "method_not_allowed",
                "value": {
                  "error": "method_not_allowed"
                }
              }
            }
          }
        }
      },
      "PublicMarket414": {
        "description": "URI exceeds 2048 characters.",
        "headers": {
          "Cache-Control": {
            "description": "Responses must not be cached.",
            "schema": {
              "type": "string",
              "const": "no-store"
            }
          },
          "X-Content-Type-Options": {
            "description": "Content sniffing is disabled.",
            "schema": {
              "type": "string",
              "const": "nosniff"
            }
          }
        },
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/PublicMarketError"
            },
            "examples": {
              "uri_too_long": {
                "summary": "uri_too_long",
                "value": {
                  "error": "uri_too_long"
                }
              }
            }
          }
        }
      },
      "PublicMarket429": {
        "description": "Global public read limit: 600 requests perUTCminute. Retry-After: 60.",
        "headers": {
          "Cache-Control": {
            "description": "Responses must not be cached.",
            "schema": {
              "type": "string",
              "const": "no-store"
            }
          },
          "X-Content-Type-Options": {
            "description": "Content sniffing is disabled.",
            "schema": {
              "type": "string",
              "const": "nosniff"
            }
          },
          "Retry-After": {
            "schema": {
              "type": "string",
              "const": "60"
            }
          }
        },
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/PublicMarketError"
            },
            "examples": {
              "public_read_rate_limited": {
                "summary": "public_read_rate_limited",
                "value": {
                  "error": "public_read_rate_limited"
                }
              }
            }
          }
        }
      },
      "PublicMarket503": {
        "description": "Sanitized unavailable data/store/owner/provider/budget or max 8 distinct active reads.",
        "headers": {
          "Cache-Control": {
            "description": "Responses must not be cached.",
            "schema": {
              "type": "string",
              "const": "no-store"
            }
          },
          "X-Content-Type-Options": {
            "description": "Content sniffing is disabled.",
            "schema": {
              "type": "string",
              "const": "nosniff"
            }
          }
        },
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/PublicMarketError"
            },
            "examples": {
              "public_reads_busy": {
                "summary": "public_reads_busy",
                "value": {
                  "error": "public_reads_busy"
                }
              },
              "market_data_unavailable": {
                "summary": "market_data_unavailable",
                "value": {
                  "error": "market_data_unavailable"
                }
              },
              "candle_data_unavailable": {
                "summary": "candle_data_unavailable",
                "value": {
                  "error": "candle_data_unavailable"
                }
              }
            }
          }
        }
      }
    },
    "schemas": {
      "EpochMillis": {
        "type": "integer",
        "format": "int64",
        "minimum": 1,
        "maximum": 9007199254740991,
        "description": "Positive Unix epoch milliseconds within the backend safe-integer range. Not seconds or an ISO8601 string."
      },
      "NullableEpochMillis": {
        "oneOf": [
          {
            "$ref": "#/components/schemas/EpochMillis"
          },
          {
            "type": "null"
          }
        ]
      },
      "DecimalString": {
        "type": "string",
        "maxLength": 100,
        "pattern": "^-?(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?$",
        "description": "Lossless source decimal string. Preserve precision; do not parse as a binary floating-point value. Scientific notation is not accepted. Individual price/size fields apply additional positive/nonnegative rules."
      },
      "Generation": {
        "type": [
          "integer",
          "string",
          "null"
        ],
        "description": "Instrument incarnation identifier. Current Go writes a JSON integer; historical string IDs are retained without floating-point conversion. Null is reserved for absent historical generations and cannot establish a usable current instrument."
      },
      "Coin": {
        "type": "string",
        "enum": [
          "@142",
          "@151",
          "@156",
          "@107",
          "@272",
          "@188",
          "PURR/USDC",
          "BTC",
          "ETH",
          "SOL",
          "HYPE",
          "ZEC",
          "PUMP",
          "PURR",
          "xyz:GOLD",
          "xyz:SILVER",
          "xyz:COPPER",
          "xyz:MU",
          "xyz:SKHY",
          "xyz:GOOGL",
          "xyz:DRAM",
          "xyz:CL",
          "xyz:SNDK",
          "xyz:AAPL",
          "xyz:MSFT",
          "xyz:SPCX",
          "xyz:TSLA",
          "xyz:AMZN",
          "xyz:AMD",
          "xyz:INTC",
          "xyz:META",
          "xyz:COIN",
          "xyz:HOOD",
          "xyz:ORCL",
          "xyz:SP500",
          "xyz:MAGS",
          "xyz:SOXL",
          "xyz:EWY"
        ],
        "description": "Exact owner-approved venue coin identifier. Display symbols are not interchangeable with spot pair IDs or builder DEX prefixes."
      },
      "ProviderObject": {
        "type": "object",
        "additionalProperties": true,
        "description": "Extensible provider metadata/context object. Decimal-valued fields remain source strings. Unknown vendor fields are retained; no fixed closed vendor schema is promised."
      },
      "Error": {
        "type": "object",
        "required": [
          "error"
        ],
        "properties": {
          "error": {
            "type": "string",
            "enum": [
              "approved_registry_unavailable",
              "invalid_market",
              "invalid_query",
              "market_inactive",
              "method_not_allowed",
              "not_found",
              "service_unavailable",
              "unauthorized",
              "unexpected_body",
              "unknown_market",
              "uri_too_long"
            ]
          }
        },
        "additionalProperties": false,
        "description": "Sanitized request/service error. No raw database, provider or credential values are returned."
      },
      "ServiceUnavailable": {
        "type": "object",
        "properties": {
          "error": {
            "const": "service_unavailable"
          }
        },
        "required": [
          "error"
        ],
        "additionalProperties": false
      },
      "RegistryUnavailable": {
        "type": "object",
        "properties": {
          "error": {
            "const": "approved_registry_unavailable"
          }
        },
        "required": [
          "error"
        ],
        "additionalProperties": false
      },
      "Health": {
        "type": "object",
        "properties": {
          "status": {
            "const": "alive"
          },
          "service": {
            "const": "alt-trading-api"
          }
        },
        "required": [
          "status",
          "service"
        ],
        "additionalProperties": false
      },
      "Ready": {
        "type": "object",
        "properties": {
          "status": {
            "const": "ready"
          }
        },
        "required": [
          "status"
        ],
        "additionalProperties": false
      },
      "NotReady": {
        "type": "object",
        "properties": {
          "status": {
            "const": "unavailable"
          }
        },
        "required": [
          "status"
        ],
        "additionalProperties": false
      },
      "RegistryMarket": {
        "type": "object",
        "properties": {
          "marketType": {
            "type": "string",
            "enum": [
              "spot",
              "perp"
            ]
          },
          "coin": {
            "$ref": "#/components/schemas/Coin"
          },
          "dex": {
            "type": "string",
            "enum": [
              "",
              "xyz"
            ],
            "description": "Empty for Hyperliquid native markets; xyz for trade.xyz HIP-3."
          },
          "assetId": {
            "type": "integer",
            "format": "int64",
            "minimum": 0
          },
          "isActive": {
            "type": "boolean"
          },
          "metadata": {
            "$ref": "#/components/schemas/ProviderObject"
          },
          "instrumentGeneration": {
            "$ref": "#/components/schemas/Generation"
          },
          "context": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/ProviderObject"
              },
              {
                "type": "null"
              }
            ]
          },
          "contextObservedAt": {
            "$ref": "#/components/schemas/EpochMillis"
          },
          "contextQuality": {
            "type": "string",
            "enum": [
              "observed",
              "inactive",
              "invalid_or_unavailable"
            ]
          },
          "discoveryState": {
            "type": "string",
            "description": "Current metadata validation emits present. Metadata validation does not grant admission to unapproved listings."
          }
        },
        "required": [
          "marketType",
          "coin",
          "dex",
          "assetId",
          "isActive",
          "metadata",
          "instrumentGeneration",
          "context"
        ],
        "additionalProperties": true,
        "description": "Pinned approved identity plus observed metadata. The catalog can be retained and stale; use observedAt/stale and the market observation endpoints. Unknown historical fields may be preserved."
      },
      "Catalog": {
        "type": "object",
        "properties": {
          "markets": {
            "type": "array",
            "minItems": 38,
            "maxItems": 38,
            "items": {
              "$ref": "#/components/schemas/RegistryMarket"
            }
          },
          "coverage": {
            "const": "approved_launch_universe"
          },
          "generation": {
            "type": "string"
          },
          "membershipGeneration": {
            "type": "string"
          },
          "observedAt": {
            "$ref": "#/components/schemas/EpochMillis"
          },
          "stale": {
            "type": "boolean"
          },
          "approvalManifestHash": {
            "type": "string",
            "pattern": "^[0-9a-f]{64}$"
          }
        },
        "required": [
          "markets",
          "coverage",
          "generation",
          "membershipGeneration",
          "observedAt",
          "stale",
          "approvalManifestHash"
        ],
        "additionalProperties": false
      },
      "BookLevel": {
        "type": "object",
        "properties": {
          "px": {
            "$ref": "#/components/schemas/PositiveDecimalString"
          },
          "sz": {
            "$ref": "#/components/schemas/NonnegativeDecimalString"
          },
          "n": {
            "type": "integer",
            "minimum": 0
          }
        },
        "required": [
          "px",
          "sz",
          "n"
        ],
        "additionalProperties": true,
        "description": "An aggregated price level. px is positive; sz is nonnegative; n is the provider order count."
      },
      "BookPayload": {
        "type": "object",
        "properties": {
          "coin": {
            "$ref": "#/components/schemas/Coin"
          },
          "time": {
            "$ref": "#/components/schemas/EpochMillis"
          },
          "levels": {
            "type": "array",
            "minItems": 2,
            "maxItems": 2,
            "items": {
              "type": "array",
              "maxItems": 1000,
              "items": {
                "$ref": "#/components/schemas/BookLevel"
              }
            },
            "description": "Exactly two sides: bids followed by asks. The current collector validates at most 1,000 levels on each side."
          },
          "isSnapshot": {
            "const": true
          }
        },
        "required": [
          "coin",
          "time",
          "levels",
          "isSnapshot"
        ],
        "additionalProperties": true,
        "description": "Full observed L2 snapshot, not an incremental order-book delta. Provider fields may be added. An interrupted feed cannot reconstruct unobserved historical books."
      },
      "PerpContext": {
        "type": "object",
        "properties": {
          "funding": {
            "$ref": "#/components/schemas/DecimalString"
          },
          "openInterest": {
            "$ref": "#/components/schemas/NonnegativeDecimalString"
          },
          "markPx": {
            "$ref": "#/components/schemas/PositiveDecimalString"
          },
          "oraclePx": {
            "$ref": "#/components/schemas/PositiveDecimalString"
          },
          "prevDayPx": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/NonnegativeDecimalString"
              },
              {
                "type": "null"
              }
            ]
          },
          "dayNtlVlm": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/NonnegativeDecimalString"
              },
              {
                "type": "null"
              }
            ]
          },
          "dayBaseVlm": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/NonnegativeDecimalString"
              },
              {
                "type": "null"
              }
            ]
          },
          "midPx": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/NonnegativeDecimalString"
              },
              {
                "type": "null"
              }
            ]
          },
          "premium": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/DecimalString"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "funding",
          "openInterest",
          "markPx",
          "oraclePx"
        ],
        "additionalProperties": true,
        "description": "Perpetual context. Funding may be signed; open interest is nonnegative; mark/oracle prices must be positive. Optional provider fields can be absent or null. Unknown vendor fields remain extensible."
      },
      "SpotContext": {
        "type": "object",
        "properties": {
          "coin": {
            "$ref": "#/components/schemas/Coin"
          },
          "markPx": {
            "$ref": "#/components/schemas/PositiveDecimalString"
          },
          "prevDayPx": {
            "$ref": "#/components/schemas/NonnegativeDecimalString"
          },
          "dayNtlVlm": {
            "$ref": "#/components/schemas/NonnegativeDecimalString"
          }
        },
        "required": [
          "coin",
          "markPx",
          "prevDayPx",
          "dayNtlVlm"
        ],
        "additionalProperties": true,
        "description": "Spot context is joined by exact coin identity, never by array position. Funding and open interest are not applicable to spot; do not invent zeros."
      },
      "RestContextPayload": {
        "type": "object",
        "properties": {
          "coin": {
            "$ref": "#/components/schemas/Coin"
          },
          "ctx": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/SpotContext"
              },
              {
                "$ref": "#/components/schemas/PerpContext"
              }
            ]
          },
          "source": {
            "const": "rest"
          },
          "sourceTimeKnown": {
            "const": false
          },
          "kind": {
            "type": "string",
            "enum": [
              "spot",
              "perp"
            ]
          }
        },
        "required": [
          "coin",
          "ctx",
          "source",
          "sourceTimeKnown",
          "kind"
        ],
        "additionalProperties": true,
        "description": "Payload emitted by the current REST context collector. Its ALT receipt time is known; provider exchange time is not supplied. Historical activeAssetCtx observations may use an extensible provider payload instead."
      },
      "Observation": {
        "type": "object",
        "properties": {
          "venue": {
            "const": "hyperliquid"
          },
          "channel": {
            "type": "string",
            "enum": [
              "l2Book",
              "assetContext",
              "activeAssetCtx"
            ]
          },
          "coin": {
            "$ref": "#/components/schemas/Coin"
          },
          "dex": {
            "type": "string",
            "enum": [
              "",
              "xyz"
            ]
          },
          "exchangeTime": {
            "$ref": "#/components/schemas/NullableEpochMillis"
          },
          "receivedAt": {
            "$ref": "#/components/schemas/EpochMillis"
          },
          "sourceTimeKnown": {
            "type": "boolean"
          },
          "ageMs": {
            "type": [
              "integer",
              "null"
            ],
            "minimum": 0
          },
          "stale": {
            "type": "boolean"
          },
          "data": {
            "$ref": "#/components/schemas/ProviderObject"
          }
        },
        "required": [
          "venue",
          "channel",
          "coin",
          "dex",
          "exchangeTime",
          "receivedAt",
          "sourceTimeKnown",
          "ageMs",
          "stale",
          "data"
        ],
        "additionalProperties": false,
        "description": "Observed provider payload with provenance. ageMs uses exchangeTime when present, otherwise receivedAt. Freshness also checks ALT receipt age. A source time over five seconds in the future is invalid. A book without known source time is stale."
      },
      "BookObservation": {
        "allOf": [
          {
            "$ref": "#/components/schemas/Observation"
          },
          {
            "properties": {
              "channel": {
                "const": "l2Book"
              },
              "stale": {
                "const": false
              },
              "data": {
                "$ref": "#/components/schemas/BookPayload"
              }
            }
          }
        ]
      },
      "ContextObservation": {
        "allOf": [
          {
            "$ref": "#/components/schemas/Observation"
          },
          {
            "properties": {
              "channel": {
                "type": "string",
                "enum": [
                  "assetContext",
                  "activeAssetCtx"
                ]
              },
              "stale": {
                "const": false
              },
              "data": {
                "type": "object",
                "additionalProperties": true,
                "description": "Current REST emissions use RestContextPayload; historical activeAssetCtx remains a provider object. See the schema reference and synthetic example."
              }
            }
          }
        ]
      },
      "UnavailableObservation": {
        "type": "object",
        "properties": {
          "venue": {
            "const": "hyperliquid"
          },
          "channel": {
            "type": "string",
            "enum": [
              "l2Book",
              "assetContext",
              "activeAssetCtx"
            ]
          },
          "coin": {
            "$ref": "#/components/schemas/Coin"
          },
          "dex": {
            "type": "string",
            "enum": [
              "",
              "xyz"
            ]
          },
          "exchangeTime": {
            "$ref": "#/components/schemas/NullableEpochMillis"
          },
          "receivedAt": {
            "$ref": "#/components/schemas/EpochMillis"
          },
          "sourceTimeKnown": {
            "type": "boolean"
          },
          "ageMs": {
            "type": [
              "integer",
              "null"
            ],
            "minimum": 0
          },
          "stale": {
            "const": true
          },
          "data": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/ProviderObject"
              },
              {
                "type": "null"
              }
            ]
          },
          "error": {
            "const": "market_data_unavailable"
          }
        },
        "required": [
          "venue",
          "channel",
          "coin",
          "dex",
          "exchangeTime",
          "receivedAt",
          "sourceTimeKnown",
          "ageMs",
          "stale",
          "data",
          "error"
        ],
        "additionalProperties": false,
        "description": "A retained observation may be returned for diagnosis with HTTP 503. Its data is not available as fresh research evidence. The error may reflect age, registry state, coverage or instrument-generation mismatch."
      },
      "MissingObservation": {
        "type": "object",
        "properties": {
          "coin": {
            "$ref": "#/components/schemas/Coin"
          },
          "data": {
            "type": "null"
          },
          "stale": {
            "const": true
          },
          "error": {
            "const": "market_data_unavailable"
          }
        },
        "required": [
          "coin",
          "data",
          "stale",
          "error"
        ],
        "additionalProperties": false
      },
      "InactiveMarket": {
        "type": "object",
        "properties": {
          "coin": {
            "$ref": "#/components/schemas/Coin"
          },
          "stale": {
            "const": true
          },
          "error": {
            "const": "market_inactive"
          }
        },
        "required": [
          "coin",
          "stale",
          "error"
        ],
        "additionalProperties": false
      },
      "TradePayload": {
        "type": "object",
        "properties": {
          "coin": {
            "$ref": "#/components/schemas/Coin"
          },
          "px": {
            "$ref": "#/components/schemas/PositiveDecimalString"
          },
          "sz": {
            "$ref": "#/components/schemas/PositiveDecimalString"
          },
          "side": {
            "type": "string",
            "enum": [
              "A",
              "B"
            ],
            "description": "Provider side code, preserved as A or B."
          },
          "time": {
            "$ref": "#/components/schemas/EpochMillis"
          },
          "tid": {
            "type": "integer",
            "minimum": 0,
            "maximum": 9007199254740991
          }
        },
        "required": [
          "coin",
          "px",
          "sz",
          "side",
          "time",
          "tid"
        ],
        "additionalProperties": true
      },
      "MarketEvent": {
        "type": "object",
        "properties": {
          "marketType": {
            "type": "string",
            "enum": [
              "spot",
              "perp"
            ]
          },
          "venue": {
            "const": "hyperliquid"
          },
          "channel": {
            "const": "trades"
          },
          "coin": {
            "$ref": "#/components/schemas/Coin"
          },
          "dex": {
            "type": "string",
            "enum": [
              "",
              "xyz"
            ]
          },
          "eventId": {
            "type": "string"
          },
          "exchangeTime": {
            "$ref": "#/components/schemas/NullableEpochMillis"
          },
          "receivedAt": {
            "$ref": "#/components/schemas/EpochMillis"
          },
          "payload": {
            "$ref": "#/components/schemas/TradePayload"
          },
          "instrumentGeneration": {
            "$ref": "#/components/schemas/Generation"
          },
          "assetId": {
            "type": "integer",
            "format": "int64",
            "minimum": 0
          },
          "registryGeneration": {
            "type": "string"
          }
        },
        "required": [
          "venue",
          "channel",
          "exchangeTime",
          "receivedAt",
          "payload"
        ],
        "additionalProperties": true,
        "description": "Observed trade event. Exact current instrument generation is enforced by the route. Unknown historical envelope/provider fields may be preserved. This read envelope is not an execution receipt."
      },
      "Trades": {
        "type": "object",
        "properties": {
          "coin": {
            "$ref": "#/components/schemas/Coin"
          },
          "stale": {
            "type": "boolean"
          },
          "trades": {
            "type": "array",
            "maxItems": 500,
            "items": {
              "$ref": "#/components/schemas/MarketEvent"
            }
          },
          "coverage": {
            "const": "observed_only"
          },
          "historyComplete": {
            "const": false
          },
          "beforeSemantics": {
            "const": "exclusive_exchange_time"
          }
        },
        "required": [
          "coin",
          "stale",
          "trades",
          "coverage",
          "historyComplete",
          "beforeSemantics"
        ],
        "additionalProperties": false
      },
      "ReadinessCoverage": {
        "type": "object",
        "properties": {
          "approved": {
            "type": "integer",
            "minimum": 0
          },
          "catalog": {
            "type": "integer",
            "minimum": 0
          },
          "active": {
            "type": "integer",
            "minimum": 0
          },
          "covered": {
            "type": "integer",
            "minimum": 0
          },
          "expectedGroups": {
            "type": "integer",
            "minimum": 0
          },
          "reportingGroups": {
            "type": "integer",
            "minimum": 0
          }
        },
        "required": [
          "approved",
          "catalog",
          "active",
          "covered",
          "expectedGroups",
          "reportingGroups"
        ],
        "additionalProperties": false
      },
      "MarketReadiness": {
        "type": "object",
        "properties": {
          "coin": {
            "$ref": "#/components/schemas/Coin"
          },
          "ready": {
            "type": "boolean"
          },
          "researchReady": {
            "type": "boolean"
          },
          "bookStale": {
            "type": "boolean"
          },
          "contextReady": {
            "type": "boolean"
          },
          "contextQuality": {
            "type": "string",
            "enum": [
              "observed",
              "inactive",
              "invalid_or_unavailable"
            ]
          }
        },
        "required": [
          "coin",
          "ready",
          "researchReady",
          "bookStale",
          "contextReady",
          "contextQuality"
        ],
        "additionalProperties": false
      },
      "CollectorCoverage": {
        "type": "object",
        "properties": {
          "universeActive": {
            "type": "integer",
            "minimum": 0
          },
          "assigned": {
            "type": "integer",
            "minimum": 0
          },
          "covered": {
            "type": "integer",
            "minimum": 0
          },
          "requiredConnections": {
            "type": "integer",
            "minimum": 0
          },
          "requiredSubscriptions": {
            "type": "integer",
            "minimum": 0
          },
          "capacityExceeded": {
            "type": "boolean"
          }
        },
        "required": [
          "universeActive",
          "assigned",
          "covered",
          "requiredConnections",
          "requiredSubscriptions",
          "capacityExceeded"
        ],
        "additionalProperties": false
      },
      "CollectorSummary": {
        "type": "object",
        "properties": {
          "groupIndex": {
            "type": "integer",
            "minimum": 0
          },
          "groupCount": {
            "type": "integer",
            "minimum": 1
          },
          "connected": {
            "type": "boolean"
          },
          "ingestionReady": {
            "type": "boolean"
          },
          "researchReady": {
            "type": "boolean"
          },
          "coverage": {
            "$ref": "#/components/schemas/CollectorCoverage"
          },
          "shardCount": {
            "type": "integer",
            "minimum": 0
          },
          "queueDepth": {
            "type": "integer",
            "minimum": 0
          },
          "queueBytes": {
            "type": "integer",
            "minimum": 0
          },
          "reconnects": {
            "type": "integer",
            "minimum": 0
          },
          "lastFailureReason": {
            "type": "string"
          }
        },
        "required": [
          "groupIndex",
          "groupCount",
          "connected",
          "ingestionReady",
          "researchReady",
          "coverage",
          "shardCount",
          "queueDepth",
          "queueBytes",
          "reconnects"
        ],
        "additionalProperties": false
      },
      "CollectorObservation": {
        "type": "object",
        "properties": {
          "updatedAt": {
            "$ref": "#/components/schemas/EpochMillis"
          },
          "status": {
            "$ref": "#/components/schemas/CollectorSummary"
          }
        },
        "required": [
          "updatedAt",
          "status"
        ],
        "additionalProperties": false
      },
      "MismatchedCollectorObservation": {
        "type": "object",
        "properties": {
          "updatedAt": {
            "$ref": "#/components/schemas/EpochMillis"
          },
          "groupIndex": {
            "type": "integer",
            "minimum": 0
          },
          "validForCurrentApproval": {
            "const": false
          }
        },
        "required": [
          "updatedAt",
          "groupIndex",
          "validForCurrentApproval"
        ],
        "additionalProperties": false
      },
      "IngestionStatus": {
        "type": "object",
        "properties": {
          "ready": {
            "type": "boolean"
          },
          "reason": {
            "type": "string",
            "enum": [
              "approved_registry_unavailable",
              "coverage_incomplete",
              "registry_stale",
              "ready"
            ]
          },
          "scope": {
            "const": "approved"
          },
          "registryGeneration": {
            "type": "string"
          },
          "membershipGeneration": {
            "type": "string"
          },
          "registryObservedAt": {
            "$ref": "#/components/schemas/EpochMillis"
          },
          "researchReady": {
            "type": "boolean"
          },
          "approvalManifestHash": {
            "type": "string",
            "pattern": "^[0-9a-f]{64}$"
          },
          "coverage": {
            "$ref": "#/components/schemas/ReadinessCoverage"
          },
          "markets": {
            "type": "array",
            "maxItems": 38,
            "items": {
              "$ref": "#/components/schemas/MarketReadiness"
            }
          },
          "observations": {
            "type": "array",
            "items": {
              "oneOf": [
                {
                  "$ref": "#/components/schemas/CollectorObservation"
                },
                {
                  "$ref": "#/components/schemas/MismatchedCollectorObservation"
                }
              ]
            }
          }
        },
        "required": [
          "ready",
          "reason",
          "scope",
          "researchReady",
          "approvalManifestHash",
          "coverage",
          "markets",
          "observations"
        ],
        "additionalProperties": false,
        "description": "Private approved-universe readiness and bounded collector summaries. No raw shard, budget or arbitrary market maps are exposed. ready describes collection coverage; researchReady additionally requires fresh source books and observed applicable contexts."
      },
      "NonnegativeDecimalString": {
        "allOf": [
          {
            "$ref": "#/components/schemas/DecimalString"
          },
          {
            "pattern": "^(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?$"
          }
        ],
        "description": "Lossless nonnegative decimal string; zero is valid."
      },
      "PositiveDecimalString": {
        "allOf": [
          {
            "$ref": "#/components/schemas/NonnegativeDecimalString"
          },
          {
            "pattern": "[1-9]"
          }
        ],
        "description": "Lossless positive decimal string containing at least one nonzero digit."
      },
      "FeatureExactDecimal": {
        "type": "string",
        "pattern": "^(?=[0-9.]*[1-9])(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?$",
        "description": "Exact positive derived decimal with no exponent notation. Quotes, valid spread and complete depth quantities are positive. No source-input length cap applies to a calculated sum or midpoint. Preserve it as a string."
      },
      "FeatureRatioDecimal": {
        "type": "string",
        "pattern": "^-?(?:0|[1-9][0-9]*)\\.[0-9]{18}$",
        "description": "Ratio rounded to exactly 18 fractional places, nearest with halves away from zero. A tiny nonzero ratio can round to zero; consult the exact spread/depth values and declared definition."
      },
      "FeatureRawTimestamp": {
        "type": "integer",
        "format": "int64",
        "description": "Unmodified source or receipt epoch-millisecond value. An unavailable response can retain a timestamp that fails freshness/validity checks; inspect the corresponding age and stale flag rather than treating presence as valid evidence."
      },
      "FeatureDefinition": {
        "type": "object",
        "properties": {
          "id": {
            "const": "l2-top5-v1"
          },
          "depthLevels": {
            "const": 5
          },
          "ratioDecimalPlaces": {
            "const": 18
          },
          "ratioRounding": {
            "const": "nearest_half_away_from_zero"
          }
        },
        "required": [
          "id",
          "depthLevels",
          "ratioDecimalPlaces",
          "ratioRounding"
        ],
        "additionalProperties": false,
        "description": "Versioned deterministic definition. Mid=(bid+ask)/2; spread=ask-bid; spreadBps=spread/mid*10000; depthImbalance=(five-level bid base quantity - five-level ask base quantity)/(their sum)."
      },
      "FeatureSource": {
        "type": "object",
        "properties": {
          "eventId": {
            "type": "string",
            "minLength": 1,
            "maxLength": 512
          },
          "registryGeneration": {
            "type": "string",
            "description": "Registry generation recorded on the input event. It may differ from the current registry generation without changing the instrument identity."
          },
          "exchangeTime": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/FeatureRawTimestamp"
              },
              {
                "type": "null"
              }
            ]
          },
          "receivedAt": {
            "$ref": "#/components/schemas/FeatureRawTimestamp"
          }
        },
        "required": [
          "eventId",
          "registryGeneration",
          "exchangeTime",
          "receivedAt"
        ],
        "additionalProperties": false,
        "description": "Identity-checked input L2 event provenance. Null at the response level when the market is inactive, no book exists, or the input identity cannot be trusted. No durable commit/availability timestamp is invented."
      },
      "FeatureFreshness": {
        "type": "object",
        "properties": {
          "maxAgeMs": {
            "type": "integer",
            "minimum": 1,
            "description": "Configured source and receipt freshness threshold; the current default is 15000 ms."
          },
          "sourceTimeKnown": {
            "type": "boolean",
            "description": "True when a source timestamp is present, even if it is invalid. An absent source never borrows a receipt-derived source age."
          },
          "sourceAgeMs": {
            "type": [
              "integer",
              "null"
            ],
            "minimum": 0,
            "description": "Source clock age only. Null when source time is absent or invalid. A timestamp at most five seconds ahead has age zero."
          },
          "receiptAgeMs": {
            "type": [
              "integer",
              "null"
            ],
            "minimum": 0,
            "description": "ALT receipt clock age only. Null when the receipt timestamp is invalid. A timestamp at most five seconds ahead has age zero."
          },
          "sourceStale": {
            "type": "boolean",
            "description": "True only when the source clock is unknown, invalid or older than maxAgeMs. Independent of receipt age."
          },
          "receiptStale": {
            "type": "boolean",
            "description": "True only when the receipt clock is invalid or older than maxAgeMs. Independent of source age."
          }
        },
        "required": [
          "maxAgeMs",
          "sourceTimeKnown",
          "sourceAgeMs",
          "receiptAgeMs",
          "sourceStale",
          "receiptStale"
        ],
        "additionalProperties": false,
        "description": "Independent source/receipt clock checks. Either stale/invalid clock makes the feature unavailable. The response-level stale flag additionally covers non-time failures such as disconnection, bad ordering or identity mismatch."
      },
      "FeatureUnits": {
        "type": "object",
        "properties": {
          "price": {
            "const": "quote_asset_per_base_asset"
          },
          "baseDepth": {
            "const": "base_asset"
          },
          "spreadBps": {
            "const": "basis_points"
          },
          "depthImbalance": {
            "const": "ratio"
          }
        },
        "required": [
          "price",
          "baseDepth",
          "spreadBps",
          "depthImbalance"
        ],
        "additionalProperties": false,
        "description": "Best quotes, midpoint and absolute spread use price units. Visible depth is base-asset quantity, not a quote notional, whole-market depth or guaranteed executable liquidity."
      },
      "FeatureDepth": {
        "type": "object",
        "properties": {
          "requiredLevels": {
            "const": 5
          },
          "bidAvailableLevels": {
            "type": "integer",
            "minimum": 0,
            "maximum": 1000
          },
          "askAvailableLevels": {
            "type": "integer",
            "minimum": 0,
            "maximum": 1000
          },
          "bidZeroSizeExcluded": {
            "type": "integer",
            "minimum": 0,
            "maximum": 1000
          },
          "askZeroSizeExcluded": {
            "type": "integer",
            "minimum": 0,
            "maximum": 1000
          },
          "bidLevelsUsed": {
            "type": "integer",
            "minimum": 0,
            "maximum": 5
          },
          "askLevelsUsed": {
            "type": "integer",
            "minimum": 0,
            "maximum": 5
          },
          "complete": {
            "type": "boolean"
          }
        },
        "required": [
          "requiredLevels",
          "bidAvailableLevels",
          "askAvailableLevels",
          "bidZeroSizeExcluded",
          "askZeroSizeExcluded",
          "bidLevelsUsed",
          "askLevelsUsed",
          "complete"
        ],
        "additionalProperties": false,
        "description": "Available counts exclude zero-size rows across the observed, bounded snapshot. Used counts select at most five positive-size levels per side after valid two-sided quotes are established. Short books do not replace the five-level denominator with shorter depth. Counts remain explicit even when values are unavailable."
      },
      "FeatureValues": {
        "type": "object",
        "properties": {
          "bestBid": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/FeatureExactDecimal"
              },
              {
                "type": "null"
              }
            ]
          },
          "bestAsk": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/FeatureExactDecimal"
              },
              {
                "type": "null"
              }
            ]
          },
          "mid": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/FeatureExactDecimal"
              },
              {
                "type": "null"
              }
            ]
          },
          "spread": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/FeatureExactDecimal"
              },
              {
                "type": "null"
              }
            ]
          },
          "bidBaseDepth": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/FeatureExactDecimal"
              },
              {
                "type": "null"
              }
            ]
          },
          "askBaseDepth": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/FeatureExactDecimal"
              },
              {
                "type": "null"
              }
            ]
          },
          "spreadBps": {
            "oneOf": [
              {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/FeatureRatioDecimal"
                  },
                  {
                    "pattern": "^[0-9]"
                  }
                ],
                "description": "Nonnegative spread basis points, rounded to 18 fractional places. A tiny positive spread can round to zero."
              },
              {
                "type": "null"
              }
            ]
          },
          "depthImbalance": {
            "oneOf": [
              {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/FeatureRatioDecimal"
                  },
                  {
                    "pattern": "^-?(?:0\\.[0-9]{18}|1\\.0{18})$"
                  }
                ],
                "description": "Signed top-five base-depth imbalance in [-1,1] after rounding. Positive-size depth on both sides can round a near-boundary value to +1 or -1."
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "bestBid",
          "bestAsk",
          "mid",
          "spread",
          "bidBaseDepth",
          "askBaseDepth",
          "spreadBps",
          "depthImbalance"
        ],
        "additionalProperties": false,
        "description": "Every measurement is present; JSON null means unavailable. Quote and quantity arithmetic is exact. Ratios alone use the declared fixed rounding precision. Do not turn null into zero."
      },
      "FeatureAvailableValues": {
        "type": "object",
        "properties": {
          "bestBid": {
            "$ref": "#/components/schemas/FeatureExactDecimal"
          },
          "bestAsk": {
            "$ref": "#/components/schemas/FeatureExactDecimal"
          },
          "mid": {
            "$ref": "#/components/schemas/FeatureExactDecimal"
          },
          "spread": {
            "$ref": "#/components/schemas/FeatureExactDecimal"
          },
          "bidBaseDepth": {
            "$ref": "#/components/schemas/FeatureExactDecimal"
          },
          "askBaseDepth": {
            "$ref": "#/components/schemas/FeatureExactDecimal"
          },
          "spreadBps": {
            "allOf": [
              {
                "$ref": "#/components/schemas/FeatureRatioDecimal"
              },
              {
                "pattern": "^[0-9]"
              }
            ],
            "description": "Nonnegative spread basis points, rounded to 18 fractional places. A tiny positive spread can round to zero."
          },
          "depthImbalance": {
            "allOf": [
              {
                "$ref": "#/components/schemas/FeatureRatioDecimal"
              },
              {
                "pattern": "^-?(?:0\\.[0-9]{18}|1\\.0{18})$"
              }
            ],
            "description": "Signed top-five base-depth imbalance in [-1,1] after rounding. Positive-size depth on both sides can round a near-boundary value to +1 or -1."
          }
        },
        "required": [
          "bestBid",
          "bestAsk",
          "mid",
          "spread",
          "bidBaseDepth",
          "askBaseDepth",
          "spreadBps",
          "depthImbalance"
        ],
        "additionalProperties": false,
        "description": "All quote and top-five depth values are available."
      },
      "FeaturePartialValues": {
        "type": "object",
        "properties": {
          "bestBid": {
            "$ref": "#/components/schemas/FeatureExactDecimal"
          },
          "bestAsk": {
            "$ref": "#/components/schemas/FeatureExactDecimal"
          },
          "mid": {
            "$ref": "#/components/schemas/FeatureExactDecimal"
          },
          "spread": {
            "$ref": "#/components/schemas/FeatureExactDecimal"
          },
          "bidBaseDepth": {
            "type": "null"
          },
          "askBaseDepth": {
            "type": "null"
          },
          "spreadBps": {
            "allOf": [
              {
                "$ref": "#/components/schemas/FeatureRatioDecimal"
              },
              {
                "pattern": "^[0-9]"
              }
            ],
            "description": "Nonnegative spread basis points, rounded to 18 fractional places. A tiny positive spread can round to zero."
          },
          "depthImbalance": {
            "type": "null"
          }
        },
        "required": [
          "bestBid",
          "bestAsk",
          "mid",
          "spread",
          "bidBaseDepth",
          "askBaseDepth",
          "spreadBps",
          "depthImbalance"
        ],
        "additionalProperties": false,
        "description": "Fresh two-sided quote/spread values with insufficient five-level depth. Both depth quantities and imbalance stay null."
      },
      "FeatureUnavailableValues": {
        "type": "object",
        "properties": {
          "bestBid": {
            "type": "null"
          },
          "bestAsk": {
            "type": "null"
          },
          "mid": {
            "type": "null"
          },
          "spread": {
            "type": "null"
          },
          "bidBaseDepth": {
            "type": "null"
          },
          "askBaseDepth": {
            "type": "null"
          },
          "spreadBps": {
            "type": "null"
          },
          "depthImbalance": {
            "type": "null"
          }
        },
        "required": [
          "bestBid",
          "bestAsk",
          "mid",
          "spread",
          "bidBaseDepth",
          "askBaseDepth",
          "spreadBps",
          "depthImbalance"
        ],
        "additionalProperties": false,
        "description": "No calculated values are returned for unavailable inputs or coverage."
      },
      "BookFeatures": {
        "type": "object",
        "properties": {
          "schemaVersion": {
            "const": "alt.market_features.v1"
          },
          "coin": {
            "$ref": "#/components/schemas/Coin"
          },
          "dex": {
            "type": "string",
            "enum": [
              "",
              "xyz"
            ]
          },
          "marketType": {
            "type": "string",
            "enum": [
              "spot",
              "perp"
            ]
          },
          "assetId": {
            "type": "integer",
            "minimum": 0
          },
          "instrumentGeneration": {
            "type": "string",
            "minLength": 1,
            "description": "Canonical string form of the current approved instrument generation."
          },
          "registryGeneration": {
            "type": "string",
            "minLength": 1,
            "description": "Current validated registry generation; distinguish it from source.registryGeneration."
          },
          "approvalManifestHash": {
            "type": "string",
            "pattern": "^[0-9a-f]{64}$"
          },
          "calculatedAt": {
            "$ref": "#/components/schemas/EpochMillis"
          },
          "coverage": {
            "const": "observed_snapshot"
          },
          "quality": {
            "type": "string",
            "enum": [
              "available",
              "partial",
              "unavailable"
            ]
          },
          "stale": {
            "type": "boolean"
          },
          "reason": {
            "type": "string",
            "enum": [
              "insufficient_depth",
              "market_inactive",
              "book_unavailable",
              "input_identity_unavailable",
              "registry_stale",
              "collection_unavailable",
              "book_stale",
              "input_payload_mismatch",
              "invalid_book",
              "one_sided_or_empty_book",
              "crossed_or_locked_book"
            ]
          },
          "error": {
            "const": "market_data_unavailable"
          },
          "definition": {
            "$ref": "#/components/schemas/FeatureDefinition"
          },
          "source": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/FeatureSource"
              },
              {
                "type": "null"
              }
            ]
          },
          "freshness": {
            "$ref": "#/components/schemas/FeatureFreshness"
          },
          "units": {
            "$ref": "#/components/schemas/FeatureUnits"
          },
          "depth": {
            "$ref": "#/components/schemas/FeatureDepth"
          },
          "values": {
            "$ref": "#/components/schemas/FeatureValues"
          }
        },
        "required": [
          "schemaVersion",
          "coin",
          "dex",
          "marketType",
          "assetId",
          "instrumentGeneration",
          "registryGeneration",
          "approvalManifestHash",
          "calculatedAt",
          "coverage",
          "quality",
          "stale",
          "definition",
          "source",
          "freshness",
          "units",
          "depth",
          "values"
        ],
        "additionalProperties": false,
        "description": "Deterministic feature envelope for one approved current-generation L2 snapshot. calculatedAt is the request evaluation clock taken before the snapshot read, not a durable-availability/commit timestamp. Coverage is an observed snapshot only, not a historical continuity claim. Use the qualified success/unavailable subtypes below."
      },
      "AvailableBookFeatures": {
        "allOf": [
          {
            "$ref": "#/components/schemas/BookFeatures"
          },
          {
            "properties": {
              "quality": {
                "const": "available"
              },
              "stale": {
                "const": false
              },
              "reason": false,
              "error": false,
              "source": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/FeatureSource"
                  },
                  {
                    "properties": {
                      "exchangeTime": {
                        "$ref": "#/components/schemas/EpochMillis"
                      },
                      "receivedAt": {
                        "$ref": "#/components/schemas/EpochMillis"
                      }
                    }
                  }
                ]
              },
              "freshness": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/FeatureFreshness"
                  },
                  {
                    "properties": {
                      "sourceTimeKnown": {
                        "const": true
                      },
                      "sourceAgeMs": {
                        "type": "integer",
                        "minimum": 0
                      },
                      "receiptAgeMs": {
                        "type": "integer",
                        "minimum": 0
                      },
                      "sourceStale": {
                        "const": false
                      },
                      "receiptStale": {
                        "const": false
                      }
                    }
                  }
                ]
              },
              "depth": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/FeatureDepth"
                  },
                  {
                    "properties": {
                      "complete": {
                        "const": true
                      },
                      "bidAvailableLevels": {
                        "minimum": 5
                      },
                      "askAvailableLevels": {
                        "minimum": 5
                      },
                      "bidLevelsUsed": {
                        "const": 5
                      },
                      "askLevelsUsed": {
                        "const": 5
                      }
                    }
                  }
                ]
              },
              "values": {
                "$ref": "#/components/schemas/FeatureAvailableValues"
              }
            }
          }
        ],
        "description": "HTTP 200 with a fresh valid two-sided book and at least five positive-size levels on both sides. reason and error are omitted."
      },
      "PartialBookFeatures": {
        "allOf": [
          {
            "$ref": "#/components/schemas/BookFeatures"
          },
          {
            "required": [
              "reason"
            ],
            "properties": {
              "quality": {
                "const": "partial"
              },
              "stale": {
                "const": false
              },
              "reason": {
                "const": "insufficient_depth"
              },
              "error": false,
              "source": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/FeatureSource"
                  },
                  {
                    "properties": {
                      "exchangeTime": {
                        "$ref": "#/components/schemas/EpochMillis"
                      },
                      "receivedAt": {
                        "$ref": "#/components/schemas/EpochMillis"
                      }
                    }
                  }
                ]
              },
              "freshness": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/FeatureFreshness"
                  },
                  {
                    "properties": {
                      "sourceTimeKnown": {
                        "const": true
                      },
                      "sourceAgeMs": {
                        "type": "integer",
                        "minimum": 0
                      },
                      "receiptAgeMs": {
                        "type": "integer",
                        "minimum": 0
                      },
                      "sourceStale": {
                        "const": false
                      },
                      "receiptStale": {
                        "const": false
                      }
                    }
                  }
                ]
              },
              "depth": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/FeatureDepth"
                  },
                  {
                    "properties": {
                      "complete": {
                        "const": false
                      },
                      "bidAvailableLevels": {
                        "minimum": 1
                      },
                      "askAvailableLevels": {
                        "minimum": 1
                      },
                      "bidLevelsUsed": {
                        "minimum": 1
                      },
                      "askLevelsUsed": {
                        "minimum": 1
                      }
                    }
                  },
                  {
                    "anyOf": [
                      {
                        "properties": {
                          "bidAvailableLevels": {
                            "maximum": 4
                          }
                        }
                      },
                      {
                        "properties": {
                          "askAvailableLevels": {
                            "maximum": 4
                          }
                        }
                      }
                    ]
                  }
                ]
              },
              "values": {
                "$ref": "#/components/schemas/FeaturePartialValues"
              }
            }
          }
        ],
        "description": "HTTP 200 with fresh quote/spread values but fewer than five positive-size levels on at least one side. All three depth values remain explicitly null."
      },
      "UnavailableBookFeatures": {
        "allOf": [
          {
            "$ref": "#/components/schemas/BookFeatures"
          },
          {
            "required": [
              "reason",
              "error"
            ],
            "properties": {
              "quality": {
                "const": "unavailable"
              },
              "stale": {
                "const": true
              },
              "reason": {
                "type": "string",
                "enum": [
                  "market_inactive",
                  "book_unavailable",
                  "input_identity_unavailable",
                  "registry_stale",
                  "collection_unavailable",
                  "book_stale",
                  "input_payload_mismatch",
                  "invalid_book",
                  "one_sided_or_empty_book",
                  "crossed_or_locked_book"
                ]
              },
              "error": {
                "const": "market_data_unavailable"
              },
              "depth": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/FeatureDepth"
                  },
                  {
                    "properties": {
                      "complete": {
                        "const": false
                      }
                    }
                  }
                ]
              },
              "values": {
                "$ref": "#/components/schemas/FeatureUnavailableValues"
              }
            }
          },
          {
            "oneOf": [
              {
                "properties": {
                  "reason": {
                    "enum": [
                      "market_inactive",
                      "book_unavailable",
                      "input_identity_unavailable"
                    ]
                  },
                  "source": {
                    "type": "null"
                  },
                  "freshness": {
                    "properties": {
                      "sourceTimeKnown": {
                        "const": false
                      },
                      "sourceAgeMs": {
                        "type": "null"
                      },
                      "receiptAgeMs": {
                        "type": "null"
                      },
                      "sourceStale": {
                        "const": true
                      },
                      "receiptStale": {
                        "const": true
                      }
                    }
                  },
                  "depth": {
                    "properties": {
                      "bidAvailableLevels": {
                        "const": 0
                      },
                      "askAvailableLevels": {
                        "const": 0
                      },
                      "bidLevelsUsed": {
                        "const": 0
                      },
                      "askLevelsUsed": {
                        "const": 0
                      },
                      "bidZeroSizeExcluded": {
                        "const": 0
                      },
                      "askZeroSizeExcluded": {
                        "const": 0
                      }
                    }
                  }
                }
              },
              {
                "properties": {
                  "reason": {
                    "enum": [
                      "registry_stale",
                      "collection_unavailable",
                      "book_stale",
                      "input_payload_mismatch",
                      "invalid_book",
                      "one_sided_or_empty_book",
                      "crossed_or_locked_book"
                    ]
                  },
                  "source": {
                    "$ref": "#/components/schemas/FeatureSource"
                  }
                }
              }
            ]
          }
        ],
        "description": "HTTP 503 for inactive/missing/mismatched/stale/invalid data or unavailable collection. source is null for market_inactive, book_unavailable and input_identity_unavailable; otherwise it preserves identity-checked input provenance. All calculated values are null. Clock flags retain their independent meanings even when another gate failed."
      },
      "PublicMarketIdentity": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "coin": {
            "$ref": "#/components/schemas/Coin"
          },
          "dex": {
            "type": "string"
          },
          "marketType": {
            "type": "string",
            "enum": [
              "spot",
              "perp"
            ]
          },
          "assetId": {
            "type": "integer",
            "minimum": 0
          },
          "instrumentGeneration": {
            "type": "string",
            "minLength": 1,
            "maxLength": 200
          }
        },
        "required": [
          "coin",
          "dex",
          "marketType",
          "assetId",
          "instrumentGeneration"
        ]
      },
      "PublicDataSource": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "channel": {
            "type": "string",
            "enum": [
              "assetContext",
              "activeAssetCtx",
              "l2Book"
            ]
          },
          "eventId": {
            "type": "string",
            "minLength": 1,
            "maxLength": 256
          },
          "exchangeTime": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/EpochMillis"
              },
              {
                "type": "null"
              }
            ]
          },
          "receivedAt": {
            "$ref": "#/components/schemas/EpochMillis"
          },
          "sourceTimeKnown": {
            "type": "boolean"
          },
          "maxAgeMs": {
            "type": "integer",
            "enum": [
              15000,
              120000
            ]
          },
          "stale": {
            "type": "boolean"
          }
        },
        "required": [
          "channel",
          "eventId",
          "exchangeTime",
          "receivedAt",
          "sourceTimeKnown",
          "maxAgeMs",
          "stale"
        ],
        "description": "Unavailable or invalid source clocks/event provenance produce source=null and per-market unavailable data; they never create invented receipt/source timestamps or suppress unrelated markets."
      },
      "PublicMarketSummary": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "identity": {
            "$ref": "#/components/schemas/PublicMarketIdentity"
          },
          "displayName": {
            "type": "string"
          },
          "isActive": {
            "type": "boolean"
          },
          "quality": {
            "type": "string",
            "enum": [
              "available",
              "unavailable"
            ]
          },
          "reason": {
            "type": "string"
          },
          "price": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/PositiveDecimalString"
              },
              {
                "type": "null"
              }
            ]
          },
          "priceKind": {
            "type": "string",
            "const": "mark"
          },
          "previousDayPrice": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/PositiveDecimalString"
              },
              {
                "type": "null"
              }
            ]
          },
          "change24hPercent": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/FeatureRatioDecimal"
              },
              {
                "type": "null"
              }
            ]
          },
          "volume24hQuote": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/NonnegativeDecimalString"
              },
              {
                "type": "null"
              }
            ]
          },
          "openInterestBase": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/NonnegativeDecimalString"
              },
              {
                "type": "null"
              }
            ]
          },
          "openInterestQuote": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/PublicDerivedNonnegativeDecimal"
              },
              {
                "type": "null"
              }
            ]
          },
          "hourlyFundingRate": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/DecimalString"
              },
              {
                "type": "null"
              }
            ]
          },
          "source": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/PublicDataSource"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "identity",
          "displayName",
          "isActive",
          "quality",
          "price",
          "priceKind",
          "previousDayPrice",
          "change24hPercent",
          "volume24hQuote",
          "openInterestBase",
          "openInterestQuote",
          "hourlyFundingRate",
          "source"
        ],
        "description": "price is venue markPx in quote units per base asset, not a guaranteed execution price. change24hPercent=(markPx-prevDayPx)/prevDayPx*100, rounded to 18 fractional places, nearest halves away from zero. volume24hQuote is venue-reported dayNtlVlm in quote units; do not infer collateral currency. Open interest is venue base units; openInterestQuote is an exact mark-price valuation, not an independently sourced quote OI. Funding is signed fraction per hour. Spot funding and OI are null. Unavailable context emits null values; unknown source time stays null even with a fresh receipt."
      },
      "PublicBookLevel": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "price": {
            "$ref": "#/components/schemas/PositiveDecimalString"
          },
          "size": {
            "$ref": "#/components/schemas/PositiveDecimalString"
          },
          "orderCount": {
            "type": "integer",
            "minimum": 0
          }
        },
        "required": [
          "price",
          "size",
          "orderCount"
        ]
      },
      "PublicOrderBook": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "quality": {
            "type": "string",
            "enum": [
              "available",
              "unavailable"
            ]
          },
          "reason": {
            "type": "string"
          },
          "bids": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/PublicBookLevel"
            },
            "maxItems": 20
          },
          "asks": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/PublicBookLevel"
            },
            "maxItems": 20
          },
          "source": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/PublicDataSource"
              },
              {
                "type": "null"
              }
            ]
          },
          "spread": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/FeatureExactDecimal"
              },
              {
                "type": "null"
              }
            ]
          },
          "midpoint": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/FeatureExactDecimal"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "quality",
          "bids",
          "asks",
          "source",
          "spread",
          "midpoint"
        ],
        "description": "At most20 positive-size rows per side. Bids strictly descend and asks strictly ascend; crossed, locked, one-sided, stale, disconnected or mismatched books emit no levels or values. Fresh short books are valid snapshots; displayed depth never claims full liquidity."
      },
      "PublicTrade": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "price": {
            "$ref": "#/components/schemas/PositiveDecimalString"
          },
          "size": {
            "$ref": "#/components/schemas/PositiveDecimalString"
          },
          "side": {
            "type": "string",
            "enum": [
              "buy",
              "sell"
            ]
          },
          "exchangeTime": {
            "$ref": "#/components/schemas/EpochMillis"
          },
          "receivedAt": {
            "$ref": "#/components/schemas/EpochMillis"
          }
        },
        "required": [
          "price",
          "size",
          "side",
          "exchangeTime",
          "receivedAt"
        ],
        "description": "Venue-reported aggressor side (B=buy,A=sell), not a user fill. Observed-only records may be old; source and receipt timestamps are distinct."
      },
      "PublicMarketSummaries": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "schemaVersion": {
            "type": "string",
            "const": "alt.public_market_data.v1"
          },
          "approvalManifestHash": {
            "type": "string",
            "const": "04c6bf8b7ef675d007704d1ce62940f504a0590f19cf4f10630063b9a841e7e6"
          },
          "observedAt": {
            "$ref": "#/components/schemas/EpochMillis"
          },
          "markets": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/PublicMarketSummary"
            },
            "maxItems": 38,
            "minItems": 38
          }
        },
        "required": [
          "schemaVersion",
          "approvalManifestHash",
          "observedAt",
          "markets"
        ]
      },
      "PublicMarketSnapshot": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "schemaVersion": {
            "type": "string",
            "const": "alt.public_market_data.v1"
          },
          "approvalManifestHash": {
            "type": "string",
            "const": "04c6bf8b7ef675d007704d1ce62940f504a0590f19cf4f10630063b9a841e7e6"
          },
          "observedAt": {
            "$ref": "#/components/schemas/EpochMillis"
          },
          "market": {
            "$ref": "#/components/schemas/PublicMarketSummary"
          },
          "book": {
            "$ref": "#/components/schemas/PublicOrderBook"
          },
          "trades": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/PublicTrade"
            },
            "maxItems": 50
          },
          "tradesCoverage": {
            "type": "string",
            "const": "observed_only"
          }
        },
        "required": [
          "schemaVersion",
          "approvalManifestHash",
          "observedAt",
          "market",
          "book",
          "trades",
          "tradesCoverage"
        ]
      },
      "PublicCandle": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "openTime": {
            "$ref": "#/components/schemas/EpochMillis"
          },
          "closeTime": {
            "$ref": "#/components/schemas/EpochMillis"
          },
          "open": {
            "$ref": "#/components/schemas/PositiveDecimalString"
          },
          "high": {
            "$ref": "#/components/schemas/PositiveDecimalString"
          },
          "low": {
            "$ref": "#/components/schemas/PositiveDecimalString"
          },
          "close": {
            "$ref": "#/components/schemas/PositiveDecimalString"
          },
          "volumeBase": {
            "$ref": "#/components/schemas/NonnegativeDecimalString"
          },
          "tradeCount": {
            "type": "integer",
            "minimum": 0
          },
          "isClosed": {
            "type": "boolean"
          }
        },
        "required": [
          "openTime",
          "closeTime",
          "open",
          "high",
          "low",
          "close",
          "volumeBase",
          "tradeCount",
          "isClosed"
        ],
        "description": "Provider candle, exact coin/interval, strictly increasing unique bucket opens, closeTime=openTime+interval-1ms, consistent OHLC range. Current bars can change. isClosed requires closeTime < actual provider receivedAt; a cached partial bar does not become final merely because wall time passes."
      },
      "PublicCandleGap": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "startTime": {
            "$ref": "#/components/schemas/EpochMillis"
          },
          "endTime": {
            "$ref": "#/components/schemas/EpochMillis"
          }
        },
        "required": [
          "startTime",
          "endTime"
        ],
        "description": "A missing requested bucket span [startTime,endTime), including leading/trailing gaps. No synthetic flat candles or zero volumes fill absent buckets."
      },
      "PublicCandles": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "schemaVersion": {
            "type": "string",
            "const": "alt.public_market_data.v1"
          },
          "approvalManifestHash": {
            "type": "string",
            "const": "04c6bf8b7ef675d007704d1ce62940f504a0590f19cf4f10630063b9a841e7e6"
          },
          "observedAt": {
            "$ref": "#/components/schemas/EpochMillis"
          },
          "identity": {
            "$ref": "#/components/schemas/PublicMarketIdentity"
          },
          "interval": {
            "type": "string",
            "enum": [
              "1m",
              "3m",
              "5m",
              "15m",
              "30m",
              "1h",
              "2h",
              "4h",
              "8h",
              "12h",
              "1d"
            ]
          },
          "startTime": {
            "$ref": "#/components/schemas/EpochMillis"
          },
          "endTime": {
            "$ref": "#/components/schemas/EpochMillis"
          },
          "receivedAt": {
            "$ref": "#/components/schemas/EpochMillis"
          },
          "quality": {
            "type": "string",
            "enum": [
              "available",
              "empty"
            ]
          },
          "historyComplete": {
            "type": "boolean",
            "const": false
          },
          "coverage": {
            "type": "string",
            "const": "provider_recent_5000"
          },
          "candles": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/PublicCandle"
            },
            "maxItems": 500
          },
          "gaps": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/PublicCandleGap"
            },
            "maxItems": 501
          }
        },
        "required": [
          "schemaVersion",
          "approvalManifestHash",
          "observedAt",
          "identity",
          "interval",
          "startTime",
          "endTime",
          "receivedAt",
          "quality",
          "historyComplete",
          "coverage",
          "candles",
          "gaps"
        ]
      },
      "PublicMarketError": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "error": {
            "type": "string",
            "enum": [
              "uri_too_long",
              "method_not_allowed",
              "unexpected_body",
              "not_found",
              "public_read_rate_limited",
              "invalid_query",
              "invalid_market",
              "unknown_market",
              "public_reads_busy",
              "market_data_unavailable",
              "candle_data_unavailable"
            ]
          }
        },
        "required": [
          "error"
        ]
      },
      "PublicMarketHealth": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "status": {
            "type": "string",
            "const": "alive"
          }
        },
        "required": [
          "status"
        ]
      },
      "PublicDerivedNonnegativeDecimal": {
        "type": "string",
        "pattern": "^(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?$",
        "description": "Exact nonnegative derived decimal with no exponent notation or source-input length cap. Zero is a measured value only when the validated source supplies zero."
      }
    }
  },
  "x-alt-approved-markets": [
    {
      "coin": "@142",
      "kind": "spot",
      "displayName": "BTC",
      "dex": "",
      "assetId": 10142,
      "spotPairIndex": 142,
      "baseTokenId": "0x8f254b963e8468305d409b33aa137c67",
      "quoteTokenId": "0x6d1e7cde53ba9467b783cb7c530ce054",
      "baseTokenSymbol": "UBTC",
      "quoteTokenSymbol": "USDC"
    },
    {
      "coin": "@151",
      "kind": "spot",
      "displayName": "ETH",
      "dex": "",
      "assetId": 10151,
      "spotPairIndex": 151,
      "baseTokenId": "0xe1edd30daaf5caac3fe63569e24748da",
      "quoteTokenId": "0x6d1e7cde53ba9467b783cb7c530ce054",
      "baseTokenSymbol": "UETH",
      "quoteTokenSymbol": "USDC"
    },
    {
      "coin": "@156",
      "kind": "spot",
      "displayName": "SOL",
      "dex": "",
      "assetId": 10156,
      "spotPairIndex": 156,
      "baseTokenId": "0x49b67c39f5566535de22b29b0e51e685",
      "quoteTokenId": "0x6d1e7cde53ba9467b783cb7c530ce054",
      "baseTokenSymbol": "USOL",
      "quoteTokenSymbol": "USDC"
    },
    {
      "coin": "@107",
      "kind": "spot",
      "displayName": "HYPE",
      "dex": "",
      "assetId": 10107,
      "spotPairIndex": 107,
      "baseTokenId": "0x0d01dc56dcaaca66ad901c959b4011ec",
      "quoteTokenId": "0x6d1e7cde53ba9467b783cb7c530ce054",
      "baseTokenSymbol": "HYPE",
      "quoteTokenSymbol": "USDC"
    },
    {
      "coin": "@272",
      "kind": "spot",
      "displayName": "ZEC",
      "dex": "",
      "assetId": 10272,
      "spotPairIndex": 272,
      "baseTokenId": "0x1c994ad3381d31c86c8c2d74ed89a365",
      "quoteTokenId": "0x6d1e7cde53ba9467b783cb7c530ce054",
      "baseTokenSymbol": "UZEC",
      "quoteTokenSymbol": "USDC"
    },
    {
      "coin": "@188",
      "kind": "spot",
      "displayName": "PUMP",
      "dex": "",
      "assetId": 10188,
      "spotPairIndex": 188,
      "baseTokenId": "0x544e60f98a36d7b22c0fb5824b84f795",
      "quoteTokenId": "0x6d1e7cde53ba9467b783cb7c530ce054",
      "baseTokenSymbol": "UPUMP",
      "quoteTokenSymbol": "USDC"
    },
    {
      "coin": "PURR/USDC",
      "kind": "spot",
      "displayName": "PURR",
      "dex": "",
      "assetId": 10000,
      "spotPairIndex": 0,
      "baseTokenId": "0xc1fb593aeffbeb02f85e0308e9956a90",
      "quoteTokenId": "0x6d1e7cde53ba9467b783cb7c530ce054",
      "baseTokenSymbol": "PURR",
      "quoteTokenSymbol": "USDC"
    },
    {
      "coin": "BTC",
      "kind": "perp",
      "displayName": "BTC",
      "dex": "",
      "assetId": 0
    },
    {
      "coin": "ETH",
      "kind": "perp",
      "displayName": "ETH",
      "dex": "",
      "assetId": 1
    },
    {
      "coin": "SOL",
      "kind": "perp",
      "displayName": "SOL",
      "dex": "",
      "assetId": 5
    },
    {
      "coin": "HYPE",
      "kind": "perp",
      "displayName": "HYPE",
      "dex": "",
      "assetId": 159
    },
    {
      "coin": "ZEC",
      "kind": "perp",
      "displayName": "ZEC",
      "dex": "",
      "assetId": 214
    },
    {
      "coin": "PUMP",
      "kind": "perp",
      "displayName": "PUMP",
      "dex": "",
      "assetId": 200
    },
    {
      "coin": "PURR",
      "kind": "perp",
      "displayName": "PURR",
      "dex": "",
      "assetId": 152
    },
    {
      "coin": "xyz:GOLD",
      "kind": "perp",
      "displayName": "GOLD",
      "requestedSymbol": "GOLD",
      "dex": "xyz",
      "assetId": 110003
    },
    {
      "coin": "xyz:SILVER",
      "kind": "perp",
      "displayName": "SILVER",
      "requestedSymbol": "SILVER",
      "dex": "xyz",
      "assetId": 110026
    },
    {
      "coin": "xyz:COPPER",
      "kind": "perp",
      "displayName": "COPPER",
      "requestedSymbol": "COPPER",
      "dex": "xyz",
      "assetId": 110030
    },
    {
      "coin": "xyz:MU",
      "kind": "perp",
      "displayName": "MU",
      "requestedSymbol": "MU",
      "dex": "xyz",
      "assetId": 110015
    },
    {
      "coin": "xyz:SKHY",
      "kind": "perp",
      "displayName": "SKHY",
      "requestedSymbol": "SKHY",
      "dex": "xyz",
      "assetId": 110099
    },
    {
      "coin": "xyz:GOOGL",
      "kind": "perp",
      "displayName": "GOOGL",
      "requestedSymbol": "GOOG",
      "dex": "xyz",
      "assetId": 110012
    },
    {
      "coin": "xyz:DRAM",
      "kind": "perp",
      "displayName": "DRAM",
      "requestedSymbol": "DRAM",
      "dex": "xyz",
      "assetId": 110065
    },
    {
      "coin": "xyz:CL",
      "kind": "perp",
      "displayName": "WTI",
      "requestedSymbol": "WTOIL",
      "dex": "xyz",
      "assetId": 110029
    },
    {
      "coin": "xyz:SNDK",
      "kind": "perp",
      "displayName": "SNDK",
      "requestedSymbol": "SNDK",
      "dex": "xyz",
      "assetId": 110016
    },
    {
      "coin": "xyz:AAPL",
      "kind": "perp",
      "displayName": "AAPL",
      "requestedSymbol": "AAPL",
      "dex": "xyz",
      "assetId": 110009
    },
    {
      "coin": "xyz:MSFT",
      "kind": "perp",
      "displayName": "MSFT",
      "requestedSymbol": "MSFT",
      "dex": "xyz",
      "assetId": 110010
    },
    {
      "coin": "xyz:SPCX",
      "kind": "perp",
      "displayName": "SPCX",
      "requestedSymbol": "SPCX",
      "dex": "xyz",
      "assetId": 110076
    },
    {
      "coin": "xyz:TSLA",
      "kind": "perp",
      "displayName": "TSLA",
      "requestedSymbol": "TSLA",
      "dex": "xyz",
      "assetId": 110001
    },
    {
      "coin": "xyz:AMZN",
      "kind": "perp",
      "displayName": "AMZN",
      "requestedSymbol": "AMZN",
      "dex": "xyz",
      "assetId": 110013
    },
    {
      "coin": "xyz:AMD",
      "kind": "perp",
      "displayName": "AMD",
      "requestedSymbol": "AMD",
      "dex": "xyz",
      "assetId": 110014
    },
    {
      "coin": "xyz:INTC",
      "kind": "perp",
      "displayName": "INTC",
      "requestedSymbol": "INTC",
      "dex": "xyz",
      "assetId": 110005
    },
    {
      "coin": "xyz:META",
      "kind": "perp",
      "displayName": "META",
      "requestedSymbol": "META",
      "dex": "xyz",
      "assetId": 110008
    },
    {
      "coin": "xyz:COIN",
      "kind": "perp",
      "displayName": "COIN",
      "requestedSymbol": "COIN",
      "dex": "xyz",
      "assetId": 110007
    },
    {
      "coin": "xyz:HOOD",
      "kind": "perp",
      "displayName": "HOOD",
      "requestedSymbol": "HOOD",
      "dex": "xyz",
      "assetId": 110004
    },
    {
      "coin": "xyz:ORCL",
      "kind": "perp",
      "displayName": "ORCL",
      "requestedSymbol": "ORCL",
      "dex": "xyz",
      "assetId": 110011
    },
    {
      "coin": "xyz:SP500",
      "kind": "perp",
      "displayName": "SP500",
      "requestedSymbol": "SP500",
      "dex": "xyz",
      "assetId": 110052
    },
    {
      "coin": "xyz:MAGS",
      "kind": "perp",
      "displayName": "MAGS",
      "requestedSymbol": "MAGS",
      "dex": "xyz",
      "assetId": 110108
    },
    {
      "coin": "xyz:SOXL",
      "kind": "perp",
      "displayName": "SOXL",
      "requestedSymbol": "SOXL",
      "dex": "xyz",
      "assetId": 110107
    },
    {
      "coin": "xyz:EWY",
      "kind": "perp",
      "displayName": "EWY",
      "requestedSymbol": "EWY",
      "dex": "xyz",
      "assetId": 110047
    }
  ],
  "x-alt-approval-manifest-sha256": "04c6bf8b7ef675d007704d1ce62940f504a0590f19cf4f10630063b9a841e7e6",
  "x-alt-guides": [
    {
      "id": "getting-started",
      "title": "Connect to the private API",
      "body": "This site documents the approved ALT Go market-data source 8d08e4a. It does not expose or proxy the backend and is not a continuously refreshed health monitor. The backend API binds to 127.0.0.1:8080 on its host; authorized operators use a local API tunnel or local development. The OpenAPI server is the local end of that tunnel. Browser Try it is disabled. All examples are frozen synthetic data. A prepared reference is not evidence of deployment or live acceptance."
    },
    {
      "id": "authentication",
      "title": "Internal bearer authentication",
      "body": "All private-process /v1/ routes require Authorization: Bearer $ALT_READ_TOKEN. Set the credential privately in your local environment; never paste it into this site. The current credential is an internal development/read credential, not an end-user login or wallet/trading authority. Exactly one Authorization header is accepted, the Bearer prefix is case-sensitive, and invalid credentials receive 401 before private storage reads. /health and /ready are unauthenticated but remain behind the private network boundary. No browser CORS interface or client WebSocket API exists. The separate market-api process exposes only /v1/market-data/* without a bearer credential. Private routes remain unauthorized/unrouted; never embed the internal token in an app."
    },
    {
      "id": "public-market-data",
      "title": "Public market data and candle coverage",
      "body": "The separate public process serves /v1/market-data/* on the stated public origin after deployment. It reads exact approved-generation ingested summaries/books/trades with SELECT-only storage. Provider candles use bounded intervals, actual OHLC strings and explicit missing ranges; no fabricated backfill or absent-data zeros. UI refreshes must preserve receivedAt, unknown source time, per-component stale state and forming-bar status. Context prices are mark prices, quote currency must not be inferred from collateral, funding is a signed hourly fraction, and OI quote is a mark valuation. The local /healthz does not establish readiness. Public egress requires one process owner and the verified 1000 + 180 <= 1200 shared-IP reserve; startup 61 seconds protects restarts. Cachehits never change source receipt/finality."
    },
    {
      "id": "freshness",
      "title": "Freshness, identity and gaps",
      "body": "Use the exact coin identifier, market type, DEX and instrument generation. Seven spot instruments and 31 perps are explicitly approved; metadata validation cannot admit another market. Preserve decimal strings and distinguish exchangeTime from receivedAt. The default book freshness is 15 seconds and context freshness 120 seconds. /ready reports collection coverage; it can return 200 while researchReady is false or a particular book returns 503. Do not use retained data in a 503 response as fresh evidence. Spot funding/open interest are not applicable. Trades are observed-only; no endpoint promises complete historical coverage or reconstructs unobserved books. Current-book features expose sourceStale and receiptStale independently; either invalid/stale clock prevents a measurement. Feature quality=partial is a fresh quote-only success, not complete five-level depth. Feature values are explicit nulls on unavailable responses. The calculatedAt evaluation clock is not durable commit/availability evidence."
    },
    {
      "id": "features",
      "title": "Current-book feature definitions",
      "body": "The l2-top5-v1 definition measures a single observed current-generation snapshot. Midpoint is (bestBid + bestAsk) / 2. Absolute spread is bestAsk - bestBid. Spread basis points are spread / midpoint × 10000. Five-level base depth sums the first five positive-size levels on each side; imbalance is (bidBaseDepth - askBaseDepth) / (bidBaseDepth + askBaseDepth). Original bids must be strictly descending and asks strictly ascending, with distinct positive prices and nonnegative sizes. Zero-size rows are excluded and counted. Empty, one-sided, crossed, locked, malformed or unsorted books produce unavailable values. A valid shorter book returns HTTP 200 quality=partial with quote/spread values and null depth quantities/imbalance. Prices and quantities use exact rational decimal calculations; ratios use 18 fractional places, nearest with halves away from zero. Visible depth is not total market liquidity or guaranteed execution. No additional feed, signing or execution authority is involved."
    },
    {
      "id": "errors",
      "title": "Request and error behavior",
      "body": "Only GET is supported; HEAD/OPTIONS return 405 with Allow: GET. Requests with a body return 400 unexpected_body; URIs over 2,048 characters return 414 uri_too_long. JSON responses set Cache-Control:no-store and X-Content-Type-Options:nosniff. The server bounds private request work to 12 seconds and uses an 8 KiB header limit. Unsupported markets/routes return 404, invalid queries 400, invalid private credentials 401, and unavailable data/services 503. Service failures are sanitized and contain no raw provider or database error. Unknown query keys are rejected on markets/book/context/trades/features; well-formed query keys on ingestion/status and all queries on health/ready are currently ignored. Retained observation and trade data can accompany 503."
    },
    {
      "id": "roadmap",
      "title": "Implemented API boundary",
      "body": "The eight private GET operations describe runtime 8d08e4a. Additional public summaries/snapshots/candles are a separately versioned contract with source-file SHA256 values; live rollout requires independent acceptance. Public reads include no wallet, account, balance, positions, signing, order submission or automation execution. All examples are synthetic; no API grants financial authority."
    }
  ]
}
