{
  "openapi": "3.1.0",
  "info": {
    "title": "ShortInterest.au public read-only API",
    "version": "1.0.0",
    "description": "ASIC outstanding short positions are generally T+4; ASX daily gross short sales are separate. Cite source dates. For latest processed ASIC trade date see /index.md. No client API key required. Website terms apply."
  },
  "servers": [
    {
      "url": "https://www.shortinterest.au"
    }
  ],
  "paths": {
    "/api/search": {
      "get": {
        "operationId": "searchTickers",
        "summary": "Search ASX ticker codes or company names",
        "parameters": [
          {
            "name": "q",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "JSON array of code and optional name suggestions"
          },
          "503": {
            "description": "Search temporarily unavailable"
          }
        }
      }
    },
    "/api/top": {
      "get": {
        "operationId": "getShortInterestRanking",
        "summary": "Get an ASIC short-position ranking for a trade date",
        "parameters": [
          {
            "name": "as_of",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100,
              "default": 100
            }
          }
        ],
        "responses": {
          "200": {
            "description": "JSON array of ranking rows. short_float_pct is percent; pct_7d and pct_30d are percentage-point changes; null is unavailable."
          },
          "400": {
            "description": "Missing trade date"
          },
          "500": {
            "description": "Data unavailable"
          }
        }
      }
    },
    "/api/series/{code}": {
      "get": {
        "operationId": "getShortInterestHistory",
        "summary": "Read dated position and gross-sales history for a ticker",
        "parameters": [
          {
            "name": "code",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[A-Za-z0-9]{1,12}$"
            }
          },
          {
            "name": "from",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "to",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "date"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "JSON series: dates, pct (ASIC outstanding position percent), qty, shares_out; optional gross_pct_cap and gross_qty are separate ASX daily gross sales. Null is unavailable. Quantities use reported security units."
          },
          "400": {
            "description": "Invalid date range"
          },
          "404": {
            "description": "Ticker not found"
          },
          "502": {
            "description": "Upstream failure"
          },
          "503": {
            "description": "Service unavailable"
          },
          "504": {
            "description": "Upstream timeout"
          }
        }
      }
    }
  }
}
