{
 "openapi": "3.1.0",
 "info": {
  "title": "dTAOscan API",
  "version": "0.9.28",
  "description": "Public, no-key, Ed25519-signed Bittensor dTAO subnet data, read directly from Subtensor. Free reads are rate limited to 10 requests/min per IP; send an API key as `Authorization: Bearer <key>` for higher volume. Every data response is wrapped `{ data, receipt }` where `receipt` is an Ed25519 signature over the exact bytes of `data` (verify against /keys.json).",
  "contact": {
   "url": "https://dtaoscan.io"
  },
  "license": {
   "name": "Proprietary data, free to read"
  }
 },
 "servers": [
  {
   "url": "https://dtaoscan.io"
  }
 ],
 "paths": {
  "/api/subnets": {
   "get": {
    "operationId": "listSubnets",
    "summary": "Every dTAO subnet at the latest snapshot block",
    "description": "Pool price, TAO + alpha reserves, neuron count, owner-lock state and logo for every Bittensor subnet. Signed.",
    "responses": {
     "200": {
      "description": "Signed subnet directory",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/SignedEnvelope"
        }
       }
      }
     },
     "429": {
      "description": "Rate limited (10/min/IP without a key)"
     }
    }
   }
  },
  "/api/subnet/{netuid}": {
   "get": {
    "operationId": "getSubnet",
    "summary": "One subnet in depth",
    "description": "Current pool economics, the last 48 snapshots (price history), and the per-UID miner/validator table. Signed.",
    "parameters": [
     {
      "name": "netuid",
      "in": "path",
      "required": true,
      "schema": {
       "type": "integer",
       "minimum": 0
      },
      "description": "Subnet id."
     }
    ],
    "responses": {
     "200": {
      "description": "Signed subnet detail",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/SignedEnvelope"
        }
       }
      }
     },
     "404": {
      "description": "Unknown netuid"
     },
     "429": {
      "description": "Rate limited (10/min/IP without a key)"
     }
    }
   }
  },
  "/api/ecosystem": {
   "get": {
    "operationId": "getEcosystem",
    "summary": "Network totals: the whole dTAO economy in one call",
    "description": "Total-issued and staked alpha market cap (TAO and USD), TAO in pools, subnet count, and owners-unwinding count, root excluded, with the method stated inline. Signed.",
    "responses": {
     "200": {
      "description": "Signed ecosystem totals",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/SignedEnvelope"
        }
       }
      }
     },
     "429": {
      "description": "Rate limited (10/min/IP without a key)"
     }
    }
   }
  },
  "/api/synergy": {
   "get": {
    "operationId": "getSynergy",
    "summary": "Cross-subnet validator overlap",
    "description": "Every validator hotkey holding permits on two or more subnets, with the subnets it secures. The network concentration signal. Signed.",
    "responses": {
     "200": {
      "description": "Signed validator overlap",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/SignedEnvelope"
        }
       }
      }
     },
     "429": {
      "description": "Rate limited (10/min/IP without a key)"
     }
    }
   }
  },
  "/healthz": {
   "get": {
    "operationId": "health",
    "summary": "Freshness probe",
    "description": "Last indexed block, its timestamp, and age in seconds.",
    "responses": {
     "200": {
      "description": "Freshness"
     }
    }
   }
  },
  "/keys.json": {
   "get": {
    "operationId": "signingKeys",
    "summary": "Ed25519 public keys that sign every /api response",
    "responses": {
     "200": {
      "description": "Public key set"
     }
    }
   }
  }
 },
 "components": {
  "securitySchemes": {
   "apiKey": {
    "type": "http",
    "scheme": "bearer",
    "description": "Optional. Raises the per-IP rate limit."
   }
  },
  "schemas": {
   "SignedEnvelope": {
    "type": "object",
    "required": [
     "data",
     "receipt"
    ],
    "properties": {
     "data": {
      "type": "object",
      "description": "The payload. `receipt` signs the exact bytes of this object serialized."
     },
     "receipt": {
      "type": [
       "object",
       "null"
      ],
      "description": "Ed25519 provenance receipt over `data`. Verify against /keys.json."
     }
    }
   }
  }
 }
}