{
  "openapi": "3.1.0",
  "info": {
    "title": "Autopilot Fact Sheets",
    "version": "1.0.0",
    "description": "Read-only public API for Autopilot Fact Sheets. Returns are decimal fractions (0.1908 = 19.08%). Currency is USD. We publish the 50 largest by AUM. We maintain many more. Autopilot performance is measured only from the date the strategy launched on Autopilot (live follower composite). Vendor or creator pages may include a hypothetical backtest from before that launch. Those figures are a different series and must not be averaged, ranked, or substituted for Autopilot's. This site publishes performance data about Portfolios available on Autopilot. It does not rank, recommend, or select Portfolios for any person, and it does not assess whether any Portfolio is suitable for you. Suitability is assessed only inside the Autopilot app, based on your Client Questionnaire responses."
  },
  "servers": [
    {
      "url": "https://autopilotfactsheets.com"
    }
  ],
  "components": {
    "schemas": {
      "Valued": {
        "type": "object",
        "required": [
          "value",
          "status"
        ],
        "properties": {
          "value": {
            "type": [
              "number",
              "null"
            ],
            "description": "Decimal fraction unless unit says otherwise"
          },
          "status": {
            "type": "string",
            "enum": [
              "ok",
              "n/a",
              "insufficient_history",
              "unrecovered",
              "partial"
            ]
          },
          "reason_code": {
            "type": "string"
          },
          "window_start": {
            "type": "string",
            "format": "date"
          },
          "window_end": {
            "type": "string",
            "format": "date"
          },
          "unit": {
            "type": "string",
            "enum": [
              "fraction",
              "ratio",
              "calendar_days"
            ]
          }
        }
      },
      "Provenance": {
        "type": "string",
        "enum": [
          "actual_client_composite",
          "actual_portfolio",
          "hypothetical_model",
          "backtest",
          "predecessor",
          "insufficient_history"
        ]
      }
    }
  },
  "paths": {
    "/api/portfolios": {
      "get": {
        "summary": "List fact sheets",
        "parameters": [
          {
            "name": "q",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "category",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "risk",
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "LOW",
                "MEDIUM",
                "HIGH"
              ]
            }
          },
          {
            "name": "maturity",
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "MATURE",
                "EARLY",
                "NASCENT"
              ]
            }
          },
          {
            "name": "provenance",
            "in": "query",
            "schema": {
              "$ref": "#/components/schemas/Provenance"
            }
          },
          {
            "name": "status",
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "ACTIVE",
                "DORMANT",
                "CLOSED"
              ]
            }
          },
          {
            "name": "min_days_live",
            "in": "query",
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "sort",
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "sharpe",
                "sortino",
                "beta",
                "max_drawdown",
                "cagr",
                "one_year",
                "aum",
                "fee_at_10k",
                "days_live"
              ]
            }
          },
          {
            "name": "order",
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "asc",
                "desc"
              ]
            }
          },
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "integer",
              "maximum": 100
            }
          },
          {
            "name": "offset",
            "in": "query",
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "include",
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "curve"
              ]
            }
          },
          {
            "name": "include_stale",
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "1"
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Envelope { generated_at, methodology_version, stale, count, limit, offset, has_more, next_offset, results }. Default limit is 100. Not a recommendation."
          }
        }
      }
    },
    "/api/portfolios/{slug}": {
      "get": {
        "summary": "One fact-sheet record",
        "parameters": [
          {
            "name": "slug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Canonical record including disclosures"
          },
          "404": {
            "description": "Unknown slug"
          }
        }
      }
    },
    "/api/portfolios/compare": {
      "get": {
        "summary": "Side-by-side records (max 4). Not a ranking.",
        "parameters": [
          {
            "name": "ids",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "{ count, requested, missing, truncated, limit, results, note }. Unknown ids are listed in missing. More than 4 ids sets truncated true."
          }
        }
      }
    },
    "/api/search": {
      "get": {
        "summary": "Citation search. Returns id, title, and canonical HTML url.",
        "parameters": [
          {
            "name": "q",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "{ results: [{id, title, url, slug, portfolioKey}] }. Empty q returns { results: [] }."
          }
        }
      }
    },
    "/api/fetch": {
      "get": {
        "summary": "Citation fetch. Same approved record as the HTML page.",
        "parameters": [
          {
            "name": "id",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "{ id, title, text, url, metadata }"
          },
          "404": {
            "description": "Unknown id"
          }
        }
      }
    },
    "/api/meta": {
      "get": {
        "summary": "Artifact freshness and methodology version",
        "responses": {
          "200": {
            "description": "Meta"
          }
        }
      }
    }
  }
}
