{
  "openapi": "3.1.0",
  "info": {
    "title": "HistPrice",
    "version": "0.1.0",
    "description": "Historical market data for backtesting. 1-minute candles stored once in Cloudflare R2 as Parquet; every other timeframe is aggregated on demand."
  },
  "servers": [
    {
      "url": "https://histprice.com"
    }
  ],
  "security": [
    {
      "bearerAuth": []
    }
  ],
  "components": {
    "securitySchemes": {
      "bearerAuth": {
        "type": "http",
        "scheme": "bearer"
      },
      "apiKey": {
        "type": "apiKey",
        "in": "header",
        "name": "X-API-Key"
      }
    }
  },
  "paths": {
    "/v1/coverage/{symbol}": {
      "get": {
        "summary": "History available per provider"
      }
    },
    "/v1/history/{symbol}": {
      "get": {
        "summary": "Candles at any timeframe"
      }
    },
    "/v1/history/query": {
      "post": {
        "summary": "Multi-symbol history"
      }
    },
    "/v1/dataset": {
      "post": {
        "summary": "Presigned Parquet object references"
      }
    },
    "/v1/tools/history": {
      "post": {
        "summary": "Agent tool: dataset reference + summary"
      }
    },
    "/v1/tools/prepare": {
      "post": {
        "summary": "Agent tool: histprice.prepare - returns a dataset handle"
      }
    },
    "/v1/tools/backtest": {
      "post": {
        "summary": "Agent tool: backtest.run - compact metrics only"
      }
    },
    "/v1/instruments": {
      "get": {
        "summary": "Instrument metadata"
      }
    },
    "/v1/universe": {
      "get": {
        "summary": "Universe and provider status"
      }
    }
  }
}