{
  "openapi": "3.1.0",
  "info": {
    "title": "Vanda Analytics Timeseries API",
    "description": "High-performance time series API with Auth0",
    "version": "1.0.0"
  },
  "servers": [
    {
      "url": "https://api.vanda-analytics.com",
      "description": "Production server"
    }
  ],
  "paths": {
    "/series/jobs/{job_id}": {
      "get": {
        "tags": [
          "Series"
        ],
        "summary": "Get Job Status",
        "description": "Get status of async job.\n\nPoll this endpoint to check job progress and retrieve results.\n\nExample:\n    GET /jobs/job_abc123xyz",
        "operationId": "get_job_status_series_jobs__job_id__get",
        "security": [
          {
            "HTTPBearer": []
          },
          {
            "ApiKeyAuth": []
          }
        ],
        "parameters": [
          {
            "name": "job_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "description": "Job identifier",
              "title": "Job Id"
            },
            "description": "Job identifier"
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/JobStatusResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/series/jobs/{job_id}/status": {
      "get": {
        "tags": [
          "Series"
        ],
        "summary": "Get Job Status Only",
        "description": "Get status and metadata of async job (without result data).\n\nEfficient endpoint for polling job status without downloading results.\nUse /jobs/{job_id} for full result retrieval.\n\nExample:\n    GET /jobs/job_abc123xyz/status",
        "operationId": "get_job_status_only_series_jobs__job_id__status_get",
        "security": [
          {
            "HTTPBearer": []
          },
          {
            "ApiKeyAuth": []
          }
        ],
        "parameters": [
          {
            "name": "job_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "description": "Job identifier",
              "title": "Job Id"
            },
            "description": "Job identifier"
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/JobStatusOnlyResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/series/jobs/{job_id}/export": {
      "get": {
        "tags": [
          "Series"
        ],
        "summary": "Export Job Result",
        "description": "Export completed job result in specified format with optional compression.\n\nSupports JSON and CSV formats with gzip or zip compression.\nJob must be in COMPLETED status.\n\nExample:\n    GET /jobs/job_abc123xyz/export?export_format=csv&compression=gzip\n    GET /jobs/job_abc123xyz/export?export_format=json&compression=zip",
        "operationId": "export_job_result_series_jobs__job_id__export_get",
        "security": [
          {
            "HTTPBearer": []
          },
          {
            "ApiKeyAuth": []
          }
        ],
        "parameters": [
          {
            "name": "job_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "description": "Job identifier",
              "title": "Job Id"
            },
            "description": "Job identifier"
          },
          {
            "name": "export_format",
            "in": "query",
            "required": false,
            "schema": {
              "$ref": "#/components/schemas/ExportFormat",
              "description": "Export format (json or csv)",
              "default": "csv"
            },
            "description": "Export format (json or csv)"
          },
          {
            "name": "compression",
            "in": "query",
            "required": false,
            "schema": {
              "$ref": "#/components/schemas/CompressionFormat",
              "description": "Compression format (none, gzip, zip)",
              "default": "none"
            },
            "description": "Compression format (none, gzip, zip)"
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/series/jobs/{job_id}/stream": {
      "get": {
        "tags": [
          "Series"
        ],
        "summary": "Stream Job Result",
        "description": "Stream completed job result line by line.\n\nSupports NDJSON (newline-delimited JSON) or CSV streaming.\nMemory-efficient for large result sets.\nJob must be in COMPLETED status.\n\nExample:\n    GET /jobs/job_abc123xyz/stream?format=ndjson\n    GET /jobs/job_abc123xyz/stream?format=csv",
        "operationId": "stream_job_result_series_jobs__job_id__stream_get",
        "security": [
          {
            "HTTPBearer": []
          },
          {
            "ApiKeyAuth": []
          }
        ],
        "parameters": [
          {
            "name": "job_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "description": "Job identifier",
              "title": "Job Id"
            },
            "description": "Job identifier"
          },
          {
            "name": "format",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "description": "Stream format: 'ndjson' (newline-delimited JSON) or 'csv'",
              "default": "ndjson",
              "title": "Format"
            },
            "description": "Stream format: 'ndjson' (newline-delimited JSON) or 'csv'"
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/series/bulk/securities": {
      "post": {
        "tags": [
          "Series"
        ],
        "summary": "Bulk Fetch Securities",
        "description": "Bulk fetch timeseries data for multiple securities.\n\nLarge requests are processed asynchronously.\nReturns job_id for async processing or direct results for small datasets.\nRestricted to data_license and enterprise tiers.\nOptimized for large batch requests with tier-based limits.\nSupports 'all' parameter to fetch all available securities.",
        "operationId": "bulk_fetch_securities_series_bulk_securities_post",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/BulkSecuritiesRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        },
        "security": [
          {
            "HTTPBearer": []
          },
          {
            "ApiKeyAuth": []
          }
        ]
      }
    },
    "/series/bulk/daily/snapshot": {
      "post": {
        "tags": [
          "Series"
        ],
        "summary": "Daily Snapshot",
        "description": "Get daily snapshot of latest data for all securities.\n\nLarge requests processed asynchronously in the background..\nRestricted to data_license and enterprise tiers.\nReturns latest data point with tier-based limits (up to 100k for data_license).",
        "operationId": "daily_snapshot_series_bulk_daily_snapshot_post",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/DailySnapshotRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        },
        "security": [
          {
            "HTTPBearer": []
          },
          {
            "ApiKeyAuth": []
          }
        ]
      }
    },
    "/series/timeseries": {
      "get": {
        "tags": [
          "Series"
        ],
        "summary": "Get Timeseries",
        "description": "Get timeseries data for specified parameters.\n\nLarge requests processed asynchronously in the background..\nTier-based limits apply for records per page and data access.\n\nExample:\n    GET /timeseries?symbol=AAPL&interval=1d&asset_class=cash\n    GET /timeseries?symbol=AAPL,TSLA,NVDA&interval=1d&asset_class=cash\n    GET /timeseries?vanda_id=VNDA10000034&start_date=2024-01-01&end_date=2024-01-31\n    GET /timeseries?vanda_id=VNDA10000034,VNDA10000035,VNDA10000036&interval=1d\n    GET /timeseries?all=true&interval=1d&asset_class=cash (data_license only)",
        "operationId": "get_timeseries_series_timeseries_get",
        "security": [
          {
            "HTTPBearer": []
          },
          {
            "ApiKeyAuth": []
          }
        ],
        "parameters": [
          {
            "name": "vanda_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Vanda ID (e.g. VNDA10000034, VNDA10000035)",
              "title": "Vanda Id"
            },
            "description": "Vanda ID (e.g. VNDA10000034, VNDA10000035)"
          },
          {
            "name": "symbol",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Stock ticker symbol (e.g. AAPL, TSLA)",
              "title": "Symbol"
            },
            "description": "Stock ticker symbol (e.g. AAPL, TSLA)"
          },
          {
            "name": "ticker",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Alias for symbol (backward compatibility)",
              "title": "Ticker"
            },
            "description": "Alias for symbol (backward compatibility)"
          },
          {
            "name": "figi",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "FIGI identifier",
              "title": "Figi"
            },
            "description": "FIGI identifier"
          },
          {
            "name": "isin",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "ISIN identifier",
              "title": "Isin"
            },
            "description": "ISIN identifier"
          },
          {
            "name": "all",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "boolean"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Fetch all available securities (data_license only)",
              "default": false,
              "title": "All"
            },
            "description": "Fetch all available securities (data_license only)"
          },
          {
            "name": "interval",
            "in": "query",
            "required": false,
            "schema": {
              "$ref": "#/components/schemas/IntervalEnum",
              "description": "Time interval",
              "default": "1d"
            },
            "description": "Time interval"
          },
          {
            "name": "start_date",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string",
                  "format": "date"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Start date",
              "title": "Start Date"
            },
            "description": "Start date"
          },
          {
            "name": "end_date",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string",
                  "format": "date"
                },
                {
                  "type": "null"
                }
              ],
              "description": "End date",
              "title": "End Date"
            },
            "description": "End date"
          },
          {
            "name": "date",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string",
                  "format": "date"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Specific date",
              "title": "Date"
            },
            "description": "Specific date"
          },
          {
            "name": "fields",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/FieldEnum"
                  }
                },
                {
                  "type": "null"
                }
              ],
              "description": "Fields to retrieve",
              "title": "Fields"
            },
            "description": "Fields to retrieve"
          },
          {
            "name": "asset_class",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/AssetClassEnum"
                  }
                },
                {
                  "type": "null"
                }
              ],
              "description": "Asset class(es)",
              "default": [
                "all"
              ],
              "title": "Asset Class"
            },
            "description": "Asset class(es)"
          },
          {
            "name": "type",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "$ref": "#/components/schemas/TypeEnum"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Options type filter (metadata only)",
              "title": "Type"
            },
            "description": "Options type filter (metadata only)"
          },
          {
            "name": "notional",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "$ref": "#/components/schemas/NotionalEnum"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Options notional filter (metadata only)",
              "title": "Notional"
            },
            "description": "Options notional filter (metadata only)"
          },
          {
            "name": "moneyness",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "$ref": "#/components/schemas/MoneynessEnum"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Options moneyness filter (WHERE clause)",
              "title": "Moneyness"
            },
            "description": "Options moneyness filter (WHERE clause)"
          },
          {
            "name": "size",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "$ref": "#/components/schemas/SizeEnum"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Options size filter (WHERE clause)",
              "title": "Size"
            },
            "description": "Options size filter (WHERE clause)"
          },
          {
            "name": "records_per_page",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "maximum": 100000,
              "minimum": 1,
              "description": "Number of records per page",
              "default": 2000,
              "title": "Records Per Page"
            },
            "description": "Number of records per page"
          },
          {
            "name": "page_number",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "description": "Page number to retrieve",
              "default": 1,
              "title": "Page Number"
            },
            "description": "Page number to retrieve"
          },
          {
            "name": "order",
            "in": "query",
            "required": false,
            "schema": {
              "$ref": "#/components/schemas/SortDirectionEnum",
              "description": "Sort order",
              "default": "desc"
            },
            "description": "Sort order"
          },
          {
            "name": "transformation",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "$ref": "#/components/schemas/TransformationEnum"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Transformation Fields",
              "title": "Transformation"
            },
            "description": "Transformation Fields"
          },
          {
            "name": "normalisation",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "$ref": "#/components/schemas/NormalisationEnum"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Normalisation Fields",
              "title": "Normalisation"
            },
            "description": "Normalisation Fields"
          },
          {
            "name": "normalisation_period",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "$ref": "#/components/schemas/NormalisationPeriodEnum"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Normalisation period",
              "title": "Normalisation Period"
            },
            "description": "Normalisation period"
          },
          {
            "name": "window",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "$ref": "#/components/schemas/WindowEnum"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Window in trading days. Allowed values: 5 (1W), 20 (1M), 60 (3M), 120 (6M), 252 (1Y)",
              "title": "Window"
            },
            "description": "Window in trading days. Allowed values: 5 (1W), 20 (1M), 60 (3M), 120 (6M), 252 (1Y)"
          },
          {
            "name": "is_full_history",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "boolean"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Fetch all available transformation data",
              "title": "Is Full History"
            },
            "description": "Fetch all available transformation data"
          },
          {
            "name": "calculate_metrics",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "boolean"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Calculate z-score, momentum, etc.",
              "title": "Calculate Metrics"
            },
            "description": "Calculate z-score, momentum, etc."
          },
          {
            "name": "include_intraday",
            "in": "query",
            "required": false,
            "schema": {
              "type": "boolean",
              "description": "Include today's intraday data augmentation for non-intraday intervals",
              "default": false,
              "title": "Include Intraday"
            },
            "description": "Include today's intraday data augmentation for non-intraday intervals"
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/series/ticker": {
      "get": {
        "tags": [
          "Series"
        ],
        "summary": "Get Ticker",
        "description": "Retrieve time series data for a single ticker and field.\nLegacy endpoint maintained for backward compatibility.\n\nExample:\n    GET /ticker?ticker=AAPL&interval=1d&field=px&asset_class=cash",
        "operationId": "get_ticker_series_ticker_get",
        "security": [
          {
            "HTTPBearer": []
          },
          {
            "ApiKeyAuth": []
          }
        ],
        "parameters": [
          {
            "name": "interval",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "description": "Timestamp interval (10min, 30min, 1h, 1d, 1w, 1m, 1y)",
              "title": "Interval"
            },
            "description": "Timestamp interval (10min, 30min, 1h, 1d, 1w, 1m, 1y)"
          },
          {
            "name": "ticker",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Stock ticker symbol",
              "title": "Ticker"
            },
            "description": "Stock ticker symbol"
          },
          {
            "name": "symbol",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Alias for ticker",
              "title": "Symbol"
            },
            "description": "Alias for ticker"
          },
          {
            "name": "vanda_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Vanda ID (VNDA{bigint})",
              "title": "Vanda Id"
            },
            "description": "Vanda ID (VNDA{bigint})"
          },
          {
            "name": "field",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "description": "Field name(px, retail_buy_turnover, retail_sell_turnover, retail_net_turnover, retail_total_turnover for cash; call_turnover, put_turnover, cp_turnover, net_cp_turnover for options)",
              "title": "Field"
            },
            "description": "Field name(px, retail_buy_turnover, retail_sell_turnover, retail_net_turnover, retail_total_turnover for cash; call_turnover, put_turnover, cp_turnover, net_cp_turnover for options)"
          },
          {
            "name": "asset_class",
            "in": "query",
            "required": false,
            "schema": {
              "$ref": "#/components/schemas/AssetClassEnum",
              "description": "Asset class",
              "default": "cash"
            },
            "description": "Asset class"
          },
          {
            "name": "include_intraday",
            "in": "query",
            "required": false,
            "schema": {
              "type": "boolean",
              "description": "Include today's intraday data augmentation for non-intraday intervals",
              "default": true,
              "title": "Include Intraday"
            },
            "description": "Include today's intraday data augmentation for non-intraday intervals"
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/TimeseriesDataPointOut"
                  },
                  "title": "Response Get Ticker Series Ticker Get"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/series/marketdata": {
      "get": {
        "tags": [
          "Series"
        ],
        "summary": "Get Marketdata",
        "description": "Batch endpoint for multiple tickers and fields.\n\nExample:\n    GET /marketdata?ticker=AAPL&ticker=TSLA&field=px&field=retail_net_turnover&interval=1d",
        "operationId": "get_marketdata_series_marketdata_get",
        "security": [
          {
            "HTTPBearer": []
          },
          {
            "ApiKeyAuth": []
          }
        ],
        "parameters": [
          {
            "name": "interval",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "description": "Timestamp interval",
              "title": "Interval"
            },
            "description": "Timestamp interval"
          },
          {
            "name": "ticker",
            "in": "query",
            "required": true,
            "schema": {
              "type": "array",
              "items": {
                "type": "string"
              },
              "description": "Stock ticker symbols or vanda_ids",
              "title": "Ticker"
            },
            "description": "Stock ticker symbols or vanda_ids"
          },
          {
            "name": "field",
            "in": "query",
            "required": true,
            "schema": {
              "type": "array",
              "items": {
                "type": "string"
              },
              "description": "Field names",
              "title": "Field"
            },
            "description": "Field names"
          },
          {
            "name": "asset_class",
            "in": "query",
            "required": false,
            "schema": {
              "$ref": "#/components/schemas/AssetClassEnum",
              "description": "Asset class",
              "default": "cash"
            },
            "description": "Asset class"
          },
          {
            "name": "include_intraday",
            "in": "query",
            "required": false,
            "schema": {
              "type": "boolean",
              "description": "Include today's intraday data augmentation for non-intraday intervals",
              "default": true,
              "title": "Include Intraday"
            },
            "description": "Include today's intraday data augmentation for non-intraday intervals"
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/TickerDataOut"
                  },
                  "title": "Response Get Marketdata Series Marketdata Get"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/series/securities/{ticker}/summary": {
      "get": {
        "tags": [
          "Series"
        ],
        "summary": "Get Security Summary",
        "description": "Get executive summary for a security with key metrics and trend analysis.\n\nExample:\n    GET /securities/AAPL/summary?interval=1d&asset_class=cash",
        "operationId": "get_security_summary_series_securities__ticker__summary_get",
        "security": [
          {
            "HTTPBearer": []
          },
          {
            "ApiKeyAuth": []
          }
        ],
        "parameters": [
          {
            "name": "ticker",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "description": "Security ticker symbol or vanda_id",
              "title": "Ticker"
            },
            "description": "Security ticker symbol or vanda_id"
          },
          {
            "name": "interval",
            "in": "query",
            "required": false,
            "schema": {
              "$ref": "#/components/schemas/IntervalEnum",
              "description": "Time interval for metrics",
              "default": "1d"
            },
            "description": "Time interval for metrics"
          },
          {
            "name": "asset_class",
            "in": "query",
            "required": false,
            "schema": {
              "$ref": "#/components/schemas/AssetClassEnum",
              "description": "Asset class",
              "default": "cash"
            },
            "description": "Asset class"
          },
          {
            "name": "include_intraday",
            "in": "query",
            "required": false,
            "schema": {
              "type": "boolean",
              "description": "Include today's intraday data augmentation for non-intraday intervals",
              "default": true,
              "title": "Include Intraday"
            },
            "description": "Include today's intraday data augmentation for non-intraday intervals"
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SecuritySummary"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/series/timeseries/leaderboard": {
      "get": {
        "tags": [
          "Series"
        ],
        "summary": "Get Leaderboard",
        "description": "Get leaderboard of top movers ranked by specified metric.\n\nLarge requests processed asynchronously in the background..\nTier-based limits apply for page size (up to 10k for data_license).\n\nExample:\n    GET /timeseries/leaderboard?metric=retail_net_turnover&records_per_page=20&asset_class=cash\n    GET /timeseries/leaderboard?symbol=AAPL,TSLA,NVDA&metric=retail_net_turnover&records_per_page=10\n    GET /timeseries/leaderboard?vanda_id=VNDA10000034,VNDA10000035&metric=retail_total_turnover\n    GET /timeseries/leaderboard?metric=retail_net_turnover&order=asc",
        "operationId": "get_leaderboard_series_timeseries_leaderboard_get",
        "security": [
          {
            "HTTPBearer": []
          },
          {
            "ApiKeyAuth": []
          }
        ],
        "parameters": [
          {
            "name": "interval",
            "in": "query",
            "required": false,
            "schema": {
              "$ref": "#/components/schemas/IntervalEnum",
              "description": "Data interval",
              "default": "1d"
            },
            "description": "Data interval"
          },
          {
            "name": "metric",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "description": "Metric to rank by",
              "default": "retail_net_turnover",
              "title": "Metric"
            },
            "description": "Metric to rank by"
          },
          {
            "name": "sector",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Filter by sector",
              "title": "Sector"
            },
            "description": "Filter by sector"
          },
          {
            "name": "industry",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Filter by industry",
              "title": "Industry"
            },
            "description": "Filter by industry"
          },
          {
            "name": "asset_type",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Filter by asset type",
              "title": "Asset Type"
            },
            "description": "Filter by asset type"
          },
          {
            "name": "vanda_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Filter by Vanda ID(s) - supports comma-separated values",
              "title": "Vanda Id"
            },
            "description": "Filter by Vanda ID(s) - supports comma-separated values"
          },
          {
            "name": "symbol",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Filter by ticker symbol(s) - supports comma-separated values",
              "title": "Symbol"
            },
            "description": "Filter by ticker symbol(s) - supports comma-separated values"
          },
          {
            "name": "ticker",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Alias for symbol - supports comma-separated values",
              "title": "Ticker"
            },
            "description": "Alias for symbol - supports comma-separated values"
          },
          {
            "name": "figi",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Filter by FIGI identifier(s) - supports comma-separated values",
              "title": "Figi"
            },
            "description": "Filter by FIGI identifier(s) - supports comma-separated values"
          },
          {
            "name": "isin",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Filter by ISIN identifier(s) - supports comma-separated values",
              "title": "Isin"
            },
            "description": "Filter by ISIN identifier(s) - supports comma-separated values"
          },
          {
            "name": "records_per_page",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "maximum": 10000,
              "minimum": 1,
              "description": "Number of results per page",
              "default": 20,
              "title": "Records Per Page"
            },
            "description": "Number of results per page"
          },
          {
            "name": "page_number",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "description": "Page number to retrieve",
              "default": 1,
              "title": "Page Number"
            },
            "description": "Page number to retrieve"
          },
          {
            "name": "date",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string",
                  "format": "date"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Specific date",
              "title": "Date"
            },
            "description": "Specific date"
          },
          {
            "name": "start_date",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string",
                  "format": "date"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Start date for range",
              "title": "Start Date"
            },
            "description": "Start date for range"
          },
          {
            "name": "end_date",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string",
                  "format": "date"
                },
                {
                  "type": "null"
                }
              ],
              "description": "End date for range",
              "title": "End Date"
            },
            "description": "End date for range"
          },
          {
            "name": "asset_class",
            "in": "query",
            "required": false,
            "schema": {
              "$ref": "#/components/schemas/AssetClassEnum",
              "description": "Asset class",
              "default": "cash"
            },
            "description": "Asset class"
          },
          {
            "name": "type",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "$ref": "#/components/schemas/TypeEnum"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Options type filter",
              "title": "Type"
            },
            "description": "Options type filter"
          },
          {
            "name": "notional",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "$ref": "#/components/schemas/NotionalEnum"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Options notional filter",
              "title": "Notional"
            },
            "description": "Options notional filter"
          },
          {
            "name": "moneyness",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "$ref": "#/components/schemas/MoneynessEnum"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Options moneyness filter",
              "title": "Moneyness"
            },
            "description": "Options moneyness filter"
          },
          {
            "name": "size",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "$ref": "#/components/schemas/SizeEnum"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Options size filter",
              "title": "Size"
            },
            "description": "Options size filter"
          },
          {
            "name": "order",
            "in": "query",
            "required": false,
            "schema": {
              "$ref": "#/components/schemas/SortDirectionEnum",
              "description": "Sort order (asc or desc)",
              "default": "desc"
            },
            "description": "Sort order (asc or desc)"
          },
          {
            "name": "include_intraday",
            "in": "query",
            "required": false,
            "schema": {
              "type": "boolean",
              "description": "Include today's intraday data augmentation for non-intraday intervals",
              "default": true,
              "title": "Include Intraday"
            },
            "description": "Include today's intraday data augmentation for non-intraday intervals"
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/series/securities/search": {
      "get": {
        "tags": [
          "Series"
        ],
        "summary": "Search Securities",
        "description": "Search securities with autocomplete support and optionally aggregate securities.\n\nWhen include_aggregate_security=False (default):\n- Searches only single securities\n- Returns security results with result_type='single_security'\n\nWhen include_aggregate_security=True:\n- Searches both securities and aggregates sequentially\n- Each search returns up to 'limit' results (total max 2*limit)\n- Results include 'result_type' field to distinguish single_security vs aggregate\n\nTier-based result limits apply.\n\nExample:\n    GET /securities/search?q=AAPL&limit=20\n    GET /securities/search?q=tech&include_aggregate_security=true&limit=20",
        "operationId": "search_securities_series_securities_search_get",
        "security": [
          {
            "HTTPBearer": []
          },
          {
            "ApiKeyAuth": []
          }
        ],
        "parameters": [
          {
            "name": "q",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "description": "Search query",
              "title": "Q"
            },
            "description": "Search query"
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "maximum": 10000,
              "minimum": 1,
              "description": "Maximum results per type",
              "default": 20,
              "title": "Limit"
            },
            "description": "Maximum results per type"
          },
          {
            "name": "is_active",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "boolean"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Filter by active status",
              "title": "Is Active"
            },
            "description": "Filter by active status"
          },
          {
            "name": "sector",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Filter by sector",
              "title": "Sector"
            },
            "description": "Filter by sector"
          },
          {
            "name": "exchange",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Filter by exchange",
              "title": "Exchange"
            },
            "description": "Filter by exchange"
          },
          {
            "name": "industry",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Filter by industry",
              "title": "Industry"
            },
            "description": "Filter by industry"
          },
          {
            "name": "asset_type",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Filter by asset type",
              "title": "Asset Type"
            },
            "description": "Filter by asset type"
          },
          {
            "name": "include_aggregate_security",
            "in": "query",
            "required": false,
            "schema": {
              "type": "boolean",
              "description": "Include aggregate security search results",
              "default": false,
              "title": "Include Aggregate Security"
            },
            "description": "Include aggregate security search results"
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/series/securities/count": {
      "get": {
        "tags": [
          "Series"
        ],
        "summary": "Get Securities Count",
        "description": "Get total count of available securities with optional filters.\n\nExample:\n    GET /securities/count?sector=Technology&is_active=true",
        "operationId": "get_securities_count_series_securities_count_get",
        "security": [
          {
            "HTTPBearer": []
          },
          {
            "ApiKeyAuth": []
          }
        ],
        "parameters": [
          {
            "name": "sector",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Filter by sector",
              "title": "Sector"
            },
            "description": "Filter by sector"
          },
          {
            "name": "exchange",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Filter by exchange",
              "title": "Exchange"
            },
            "description": "Filter by exchange"
          },
          {
            "name": "is_active",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "boolean"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Filter by active status",
              "title": "Is Active"
            },
            "description": "Filter by active status"
          },
          {
            "name": "industry",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Filter by industry",
              "title": "Industry"
            },
            "description": "Filter by industry"
          },
          {
            "name": "asset_type",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Filter by asset type",
              "title": "Asset Type"
            },
            "description": "Filter by asset type"
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/series/sectors": {
      "get": {
        "tags": [
          "Series"
        ],
        "summary": "Get Sectors",
        "description": "Get list of all available sectors with security counts.\n\nExample:\n    GET /sectors?is_active=true",
        "operationId": "get_sectors_series_sectors_get",
        "security": [
          {
            "HTTPBearer": []
          },
          {
            "ApiKeyAuth": []
          }
        ],
        "parameters": [
          {
            "name": "is_active",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "boolean"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Filter by active status",
              "title": "Is Active"
            },
            "description": "Filter by active status"
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/series/asset_type": {
      "get": {
        "tags": [
          "Series"
        ],
        "summary": "Get Asset Type",
        "description": "Get list of all available sectors with security counts.\n\nExample:\n    GET /sectors?is_active=true",
        "operationId": "get_asset_type_series_asset_type_get",
        "security": [
          {
            "HTTPBearer": []
          },
          {
            "ApiKeyAuth": []
          }
        ],
        "parameters": [
          {
            "name": "is_active",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "boolean"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Filter by active status",
              "title": "Is Active"
            },
            "description": "Filter by active status"
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/series/cache/invalidate": {
      "delete": {
        "tags": [
          "Series"
        ],
        "summary": "Invalidate Cache",
        "description": "Invalidate all cache entries for current user.\n\nExample:\n    DELETE /cache/invalidate",
        "operationId": "invalidate_cache_series_cache_invalidate_delete",
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          }
        },
        "security": [
          {
            "HTTPBearer": []
          },
          {
            "ApiKeyAuth": []
          }
        ]
      }
    },
    "/series/timeseries/intervals": {
      "get": {
        "tags": [
          "Series"
        ],
        "summary": "Get Available Intervals",
        "description": "Get list of available time intervals for the asset class.\n\nExample:\n    GET /timeseries/intervals?asset_class=cash",
        "operationId": "get_available_intervals_series_timeseries_intervals_get",
        "security": [
          {
            "HTTPBearer": []
          },
          {
            "ApiKeyAuth": []
          }
        ],
        "parameters": [
          {
            "name": "asset_class",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "$ref": "#/components/schemas/AssetClassEnum"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Asset class",
              "default": "cash",
              "title": "Asset Class"
            },
            "description": "Asset class"
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/series/timeseries/fields": {
      "get": {
        "tags": [
          "Series"
        ],
        "summary": "Get Available Fields",
        "description": "Get list of available fields for the asset class with accessibility information.\n\nExample:\n    GET /timeseries/fields?asset_class=cash",
        "operationId": "get_available_fields_series_timeseries_fields_get",
        "security": [
          {
            "HTTPBearer": []
          },
          {
            "ApiKeyAuth": []
          }
        ],
        "parameters": [
          {
            "name": "asset_class",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "$ref": "#/components/schemas/AssetClassEnum"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Asset class",
              "default": "cash",
              "title": "Asset Class"
            },
            "description": "Asset class"
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/series/timeseries/latest": {
      "get": {
        "tags": [
          "Series"
        ],
        "summary": "Get Latest Timeseries",
        "description": "Get latest data points for multiple identifiers.\n\nExample:\n    GET /timeseries/latest?identifiers=AAPL&identifiers=TSLA&interval=1d&asset_class=cash\n    GET /timeseries/latest?identifiers=VNDA10000034&identifiers=VNDA10000035&fields=px&fields=retail_net_turnover",
        "operationId": "get_latest_timeseries_series_timeseries_latest_get",
        "security": [
          {
            "HTTPBearer": []
          },
          {
            "ApiKeyAuth": []
          }
        ],
        "parameters": [
          {
            "name": "identifiers",
            "in": "query",
            "required": true,
            "schema": {
              "type": "array",
              "items": {
                "type": "string"
              },
              "description": "List of identifiers (vanda_ids or tickers)",
              "title": "Identifiers"
            },
            "description": "List of identifiers (vanda_ids or tickers)"
          },
          {
            "name": "interval",
            "in": "query",
            "required": false,
            "schema": {
              "$ref": "#/components/schemas/IntervalEnum",
              "description": "Time interval",
              "default": "1d"
            },
            "description": "Time interval"
          },
          {
            "name": "fields",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/FieldEnum"
                  }
                },
                {
                  "type": "null"
                }
              ],
              "description": "Fields to retrieve",
              "title": "Fields"
            },
            "description": "Fields to retrieve"
          },
          {
            "name": "asset_class",
            "in": "query",
            "required": false,
            "schema": {
              "$ref": "#/components/schemas/AssetClassEnum",
              "description": "Asset class",
              "default": "all"
            },
            "description": "Asset class"
          },
          {
            "name": "include_intraday",
            "in": "query",
            "required": false,
            "schema": {
              "type": "boolean",
              "description": "Include today's intraday data augmentation for non-intraday intervals",
              "default": true,
              "title": "Include Intraday"
            },
            "description": "Include today's intraday data augmentation for non-intraday intervals"
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/series/latest": {
      "get": {
        "tags": [
          "Series"
        ],
        "summary": "Get Latest Data",
        "description": "Get latest data points for specified identifiers.\nAlternative endpoint with comma-separated parameters.\n\nExample:\n    GET /latest?identifiers=AAPL,TSLA,NVDA&interval=1d&fields=px,retail_net_turnover&asset_class=cash\n    GET /latest?identifiers=VNDA10000034,VNDA10000035&fields=px\n    GET /latest?interval=1d&asset_class=cash (returns default tickers)",
        "operationId": "get_latest_data_series_latest_get",
        "security": [
          {
            "HTTPBearer": []
          },
          {
            "ApiKeyAuth": []
          }
        ],
        "parameters": [
          {
            "name": "identifiers",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Comma-separated list of identifiers",
              "title": "Identifiers"
            },
            "description": "Comma-separated list of identifiers"
          },
          {
            "name": "interval",
            "in": "query",
            "required": false,
            "schema": {
              "$ref": "#/components/schemas/IntervalEnum",
              "description": "Time interval",
              "default": "1d"
            },
            "description": "Time interval"
          },
          {
            "name": "fields",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Comma-separated list of fields",
              "title": "Fields"
            },
            "description": "Comma-separated list of fields"
          },
          {
            "name": "asset_class",
            "in": "query",
            "required": false,
            "schema": {
              "$ref": "#/components/schemas/AssetClassEnum",
              "description": "Asset class",
              "default": "all"
            },
            "description": "Asset class"
          },
          {
            "name": "include_intraday",
            "in": "query",
            "required": false,
            "schema": {
              "type": "boolean",
              "description": "Include today's intraday data augmentation for non-intraday intervals",
              "default": true,
              "title": "Include Intraday"
            },
            "description": "Include today's intraday data augmentation for non-intraday intervals"
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/series/timeseries/export": {
      "get": {
        "tags": [
          "Series"
        ],
        "summary": "Export Timeseries",
        "description": "Run async background job to export timeseries data for specified parameters.\n\nExample:\n    GET /timeseries/export?symbol=AAPL&interval=1d\n    GET /timeseries/export?vanda_id=VNDA10000034",
        "operationId": "export_timeseries_series_timeseries_export_get",
        "security": [
          {
            "HTTPBearer": []
          },
          {
            "ApiKeyAuth": []
          }
        ],
        "parameters": [
          {
            "name": "vanda_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Vanda ID",
              "title": "Vanda Id"
            },
            "description": "Vanda ID"
          },
          {
            "name": "symbol",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Stock ticker symbol",
              "title": "Symbol"
            },
            "description": "Stock ticker symbol"
          },
          {
            "name": "interval",
            "in": "query",
            "required": false,
            "schema": {
              "$ref": "#/components/schemas/IntervalEnum",
              "description": "Time interval",
              "default": "1d"
            },
            "description": "Time interval"
          },
          {
            "name": "start_date",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string",
                  "format": "date"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Start date",
              "title": "Start Date"
            },
            "description": "Start date"
          },
          {
            "name": "end_date",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string",
                  "format": "date"
                },
                {
                  "type": "null"
                }
              ],
              "description": "End date",
              "title": "End Date"
            },
            "description": "End date"
          },
          {
            "name": "asset_class",
            "in": "query",
            "required": false,
            "schema": {
              "$ref": "#/components/schemas/AssetClassEnum",
              "description": "Asset class",
              "default": "cash"
            },
            "description": "Asset class"
          },
          {
            "name": "include_intraday",
            "in": "query",
            "required": false,
            "schema": {
              "type": "boolean",
              "description": "Include today's intraday data augmentation for non-intraday intervals",
              "default": true,
              "title": "Include Intraday"
            },
            "description": "Include today's intraday data augmentation for non-intraday intervals"
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/series/timeseries/list": {
      "get": {
        "tags": [
          "Series"
        ],
        "summary": "List Available Series",
        "description": "List available timeseries identifiers.\n\nLarge requests processed asynchronously in the background.\nProvides searchable list of securities with data.\n\nExample:\n    GET /timeseries/list?asset_class=cash&limit=50\n    GET /timeseries/list?asset_class=options&is_active=true\n    GET /timeseries/list?limit=1000",
        "operationId": "list_available_series_series_timeseries_list_get",
        "security": [
          {
            "HTTPBearer": []
          },
          {
            "ApiKeyAuth": []
          }
        ],
        "parameters": [
          {
            "name": "asset_class",
            "in": "query",
            "required": false,
            "schema": {
              "$ref": "#/components/schemas/AssetClassEnum",
              "description": "Asset class",
              "default": "all"
            },
            "description": "Asset class"
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "maximum": 100000,
              "minimum": 1,
              "description": "Maximum results",
              "default": 100,
              "title": "Limit"
            },
            "description": "Maximum results"
          },
          {
            "name": "is_active",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "boolean"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Filter by active status",
              "default": true,
              "title": "Is Active"
            },
            "description": "Filter by active status"
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/series/debug-token": {
      "get": {
        "tags": [
          "Series"
        ],
        "summary": "Debug Token",
        "description": "Inspect decoded JWT token claims and computed permissions.\nDebugging endpoint for troubleshooting authentication and authorisation issues.\n\nExample:\n    GET /debug-token",
        "operationId": "debug_token_series_debug_token_get",
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          }
        },
        "security": [
          {
            "HTTPBearer": []
          },
          {
            "ApiKeyAuth": []
          }
        ]
      }
    },
    "/series/user": {
      "get": {
        "tags": [
          "Users"
        ],
        "summary": "Get Current User Profile",
        "description": "Get current authenticated user's profile.\nAuto-provisions user if not exists.",
        "operationId": "get_current_user_profile_series_user_get",
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/UserResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ]
      },
      "put": {
        "tags": [
          "Users"
        ],
        "summary": "Update Current User Profile",
        "description": "Update current user's profile.\nOnly username and active status can be modified (email immutable from JWT).",
        "operationId": "update_current_user_profile_series_user_put",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UserUpdate"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/UserResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ]
      }
    },
    "/series/user/charts": {
      "get": {
        "tags": [
          "Users"
        ],
        "summary": "Get Current User Charts",
        "description": "Get current user's chart configurations.\nReturns charts as dictionary for flexible storage.",
        "operationId": "get_current_user_charts_series_user_charts_get",
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ]
      },
      "put": {
        "tags": [
          "Users"
        ],
        "summary": "Update Current User Charts",
        "description": "Update current user's chart configurations.\nReplaces entire charts object with new configuration.",
        "operationId": "update_current_user_charts_series_user_charts_put",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UserChartsUpdate"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ]
      },
      "patch": {
        "tags": [
          "Users"
        ],
        "summary": "Patch Current User Charts",
        "description": "Partially update user's chart configurations.\nMerges provided charts with existing ones (additive update).",
        "operationId": "patch_current_user_charts_series_user_charts_patch",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "additionalProperties": true,
                "type": "object",
                "title": "Chart Updates"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ]
      }
    },
    "/series/user/charts/{chart_id}": {
      "delete": {
        "tags": [
          "Users"
        ],
        "summary": "Delete User Chart",
        "description": "Delete specific chart configuration by ID.\nReturns 404 if chart doesn't exist.",
        "operationId": "delete_user_chart_series_user_charts__chart_id__delete",
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "parameters": [
          {
            "name": "chart_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Chart Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/series/user/preferences": {
      "get": {
        "tags": [
          "Users"
        ],
        "summary": "Get Current User Preferences",
        "description": "Get current user's preferences.",
        "operationId": "get_current_user_preferences_series_user_preferences_get",
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ]
      },
      "put": {
        "tags": [
          "Users"
        ],
        "summary": "Update Current User Preferences",
        "description": "Update current user's preferences.\nReplaces entire preferences object with new configuration.",
        "operationId": "update_current_user_preferences_series_user_preferences_put",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UserPreferencesUpdate"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ]
      },
      "patch": {
        "tags": [
          "Users"
        ],
        "summary": "Patch Current User Preferences",
        "description": "Partially update user's preferences.\nMerges provided preferences with existing ones (additive update).",
        "operationId": "patch_current_user_preferences_series_user_preferences_patch",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "additionalProperties": true,
                "type": "object",
                "title": "Preference Updates"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ]
      }
    },
    "/series/user/configuration": {
      "get": {
        "tags": [
          "Users"
        ],
        "summary": "Get User Configuration",
        "description": "Get complete user configuration.\nLegacy endpoint for backward compatibility.\nCharts dict is converted to list format.",
        "operationId": "get_user_configuration_series_user_configuration_get",
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/UserConfigurationResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ]
      },
      "post": {
        "tags": [
          "Users"
        ],
        "summary": "Save User Configuration",
        "description": "Save complete user configuration.\nLegacy endpoint for backward compatibility.\nCharts list is converted to dict with index keys.",
        "operationId": "save_user_configuration_series_user_configuration_post",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UserConfigurationRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/UserConfigurationResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ]
      }
    },
    "/series/user/configurations": {
      "get": {
        "tags": [
          "Users"
        ],
        "summary": "Get User Configurations",
        "description": "Get saved configurations for a user.\nLegacy endpoint for backward compatibility.\n\nArgs:\n    email: User email to retrieve configurations\n    username: Optional username filter\n    current_user: Authenticated user\n    service: User service\n\nReturns:\n    List of user configurations (single item in new architecture)",
        "operationId": "get_user_configurations_series_user_configurations_get",
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "parameters": [
          {
            "name": "email",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "description": "User email to retrieve configurations",
              "title": "Email"
            },
            "description": "User email to retrieve configurations"
          },
          {
            "name": "username",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Optional username filter",
              "title": "Username"
            },
            "description": "Optional username filter"
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/UserConfigurationResponse"
                  },
                  "title": "Response Get User Configurations Series User Configurations Get"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/series/health": {
      "get": {
        "tags": [
          "Utility",
          "Utility"
        ],
        "summary": "Health check endpoint",
        "operationId": "health_check_series_health_get",
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          }
        },
        "security": []
      }
    }
  },
  "components": {
    "schemas": {
      "AssetClassEnum": {
        "type": "string",
        "enum": [
          "all",
          "cash",
          "options"
        ],
        "title": "AssetClassEnum"
      },
      "BulkSecuritiesRequest": {
        "properties": {
          "identifiers": {
            "anyOf": [
              {
                "items": {
                  "type": "string"
                },
                "type": "array",
                "maxItems": 10000
              },
              {
                "type": "null"
              }
            ],
            "title": "Identifiers",
            "description": "List of vanda_ids, symbols, or tickers (data_license tier can use up to 10k)"
          },
          "all": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ],
            "title": "All",
            "description": "Fetch all available securities (data_license only)",
            "default": false
          },
          "interval": {
            "$ref": "#/components/schemas/IntervalEnum",
            "description": "Time interval",
            "default": "1d"
          },
          "start_date": {
            "anyOf": [
              {
                "type": "string",
                "format": "date"
              },
              {
                "type": "null"
              }
            ],
            "title": "Start Date",
            "description": "Start date for time range"
          },
          "end_date": {
            "anyOf": [
              {
                "type": "string",
                "format": "date"
              },
              {
                "type": "null"
              }
            ],
            "title": "End Date",
            "description": "End date for time range"
          },
          "fields": {
            "anyOf": [
              {
                "items": {
                  "$ref": "#/components/schemas/FieldEnum"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Fields",
            "description": "Specific fields to retrieve"
          },
          "asset_class": {
            "items": {
              "$ref": "#/components/schemas/AssetClassEnum"
            },
            "type": "array",
            "title": "Asset Class",
            "description": "Asset class(es)",
            "default": [
              "cash"
            ]
          },
          "type": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/TypeEnum"
              },
              {
                "type": "null"
              }
            ],
            "description": "Options type filter (ALL, CALL, PUT)"
          },
          "notional": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/NotionalEnum"
              },
              {
                "type": "null"
              }
            ],
            "description": "Options notional filter (ALL, CALL, PUT)"
          },
          "moneyness": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/MoneynessEnum"
              },
              {
                "type": "null"
              }
            ],
            "description": "Options moneyness filter (TOTAL, ITM, OTM, ATM)"
          },
          "size": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/SizeEnum"
              },
              {
                "type": "null"
              }
            ],
            "description": "Options size filter (TOTAL, LARGE, SMALL)"
          },
          "include_intraday": {
            "type": "boolean",
            "title": "Include Intraday",
            "description": "Include today's intraday data augmentation for non-intraday intervals",
            "default": true
          }
        },
        "type": "object",
        "title": "BulkSecuritiesRequest",
        "description": "Request model for bulk securities data retrieval.\nOptimized for data_license tier users to fetch multiple securities efficiently.",
        "example": {
          "all": false,
          "asset_class": [
            "cash"
          ],
          "end_date": "2026-01-28",
          "fields": [
            "px",
            "px_chg",
            "retail_buy_turnover",
            "retail_sell_turnover",
            "retail_net_turnover",
            "retail_total_turnover"
          ],
          "identifiers": [
            "AAPL",
            "TSLA",
            "NVDA"
          ],
          "include_intraday": true,
          "interval": "1d",
          "moneyness": "TOTAL",
          "notional": "ALL",
          "size": "TOTAL",
          "start_date": "2026-01-01",
          "type": "ALL"
        }
      },
      "CompressionFormat": {
        "type": "string",
        "enum": [
          "none",
          "gzip",
          "zip"
        ],
        "title": "CompressionFormat",
        "description": "Compression format options for exports"
      },
      "DailySnapshotRequest": {
        "properties": {
          "interval": {
            "$ref": "#/components/schemas/IntervalEnum",
            "description": "Time interval",
            "default": "1d"
          },
          "asset_class": {
            "items": {
              "$ref": "#/components/schemas/AssetClassEnum"
            },
            "type": "array",
            "title": "Asset Class",
            "description": "Asset class(es)",
            "default": [
              "cash"
            ]
          },
          "sector": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Sector",
            "description": "Filter by sector"
          },
          "is_active": {
            "type": "boolean",
            "title": "Is Active",
            "description": "Only active securities",
            "default": true
          },
          "fields": {
            "anyOf": [
              {
                "items": {
                  "$ref": "#/components/schemas/FieldEnum"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Fields",
            "description": "Specific fields to retrieve"
          },
          "limit": {
            "type": "integer",
            "maximum": 100000,
            "minimum": 1,
            "title": "Limit",
            "description": "Maximum number of securities (data_license tier can use up to 100k)",
            "default": 100000
          },
          "type": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/TypeEnum"
              },
              {
                "type": "null"
              }
            ],
            "description": "Options type filter (ALL, CALL, PUT)"
          },
          "notional": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/NotionalEnum"
              },
              {
                "type": "null"
              }
            ],
            "description": "Options notional filter (ALL, CALL, PUT)"
          },
          "moneyness": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/MoneynessEnum"
              },
              {
                "type": "null"
              }
            ],
            "description": "Options moneyness filter (TOTAL, ITM, OTM, ATM)"
          },
          "size": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/SizeEnum"
              },
              {
                "type": "null"
              }
            ],
            "description": "Options size filter (TOTAL, LARGE, SMALL)"
          },
          "include_intraday": {
            "type": "boolean",
            "title": "Include Intraday",
            "description": "Include today's intraday data augmentation for non-intraday intervals",
            "default": true
          }
        },
        "type": "object",
        "title": "DailySnapshotRequest",
        "description": "Request model for daily snapshot of all securities.\nReturns latest data point for all active securities.",
        "example": {
          "asset_class": [
            "cash"
          ],
          "fields": [
            "px",
            "px_chg",
            "retail_buy_turnover",
            "retail_sell_turnover",
            "retail_net_turnover",
            "retail_total_turnover"
          ],
          "include_intraday": true,
          "interval": "1d",
          "is_active": true,
          "limit": 1000,
          "moneyness": "TOTAL",
          "notional": "ALL",
          "sector": "Technology",
          "size": "TOTAL",
          "type": "ALL"
        }
      },
      "ExportFormat": {
        "type": "string",
        "enum": [
          "json",
          "csv"
        ],
        "title": "ExportFormat",
        "description": "Export format options for API responses"
      },
      "FieldEnum": {
        "type": "string",
        "enum": [
          "px",
          "px_chg",
          "retail_buy_turnover",
          "retail_sell_turnover",
          "retail_net_turnover",
          "retail_total_turnover",
          "call_turnover",
          "put_turnover",
          "cp_turnover",
          "net_cp_turnover",
          "call_notional",
          "put_notional",
          "cp_notional",
          "net_cp_notional"
        ],
        "title": "FieldEnum"
      },
      "HTTPValidationError": {
        "properties": {
          "detail": {
            "items": {
              "$ref": "#/components/schemas/ValidationError"
            },
            "type": "array",
            "title": "Detail"
          }
        },
        "type": "object",
        "title": "HTTPValidationError"
      },
      "IntervalEnum": {
        "type": "string",
        "enum": [
          "10min",
          "30min",
          "1h",
          "1d",
          "1w",
          "1m",
          "1y"
        ],
        "title": "IntervalEnum"
      },
      "JobStatusEnum": {
        "type": "string",
        "enum": [
          "pending",
          "processing",
          "completed",
          "failed"
        ],
        "title": "JobStatusEnum",
        "description": "Async job processing status"
      },
      "JobStatusOnlyResponse": {
        "properties": {
          "job_id": {
            "type": "string",
            "title": "Job Id",
            "description": "Job identifier"
          },
          "status": {
            "$ref": "#/components/schemas/JobStatusEnum",
            "description": "Current job status"
          },
          "endpoint": {
            "type": "string",
            "title": "Endpoint",
            "description": "Original endpoint"
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "title": "Created At",
            "description": "Job creation timestamp"
          },
          "completed_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "title": "Completed At",
            "description": "Job completion timestamp"
          },
          "error": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Error",
            "description": "Error message (if failed)"
          },
          "result_type": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Result Type",
            "description": "Result storage type"
          },
          "total_records": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Total Records",
            "description": "Total records in result"
          },
          "ttl_seconds": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Ttl Seconds",
            "description": "Time to live in seconds"
          },
          "progress_percentage": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Progress Percentage",
            "description": "Progress indicator"
          }
        },
        "type": "object",
        "required": [
          "job_id",
          "status",
          "endpoint",
          "created_at"
        ],
        "title": "JobStatusOnlyResponse",
        "description": "Response for status-only query (no result data)"
      },
      "JobStatusResponse": {
        "properties": {
          "job_id": {
            "type": "string",
            "title": "Job Id",
            "description": "Job identifier"
          },
          "status": {
            "$ref": "#/components/schemas/JobStatusEnum",
            "description": "Current job status"
          },
          "endpoint": {
            "type": "string",
            "title": "Endpoint",
            "description": "Original endpoint"
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "title": "Created At",
            "description": "Job creation timestamp"
          },
          "completed_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "title": "Completed At",
            "description": "Job completion timestamp"
          },
          "result": {
            "anyOf": [
              {},
              {
                "type": "null"
              }
            ],
            "title": "Result",
            "description": "Job result (if completed)"
          },
          "error": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Error",
            "description": "Error message (if failed)"
          },
          "progress_percentage": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Progress Percentage",
            "description": "Progress indicator"
          }
        },
        "type": "object",
        "required": [
          "job_id",
          "status",
          "endpoint",
          "created_at"
        ],
        "title": "JobStatusResponse",
        "description": "Response for job status query"
      },
      "MoneynessEnum": {
        "type": "string",
        "enum": [
          "TOTAL",
          "OTM",
          "ATM",
          "ITM"
        ],
        "title": "MoneynessEnum"
      },
      "NormalisationEnum": {
        "type": "string",
        "enum": [
          "zscore",
          "percentile_rank"
        ],
        "title": "NormalisationEnum",
        "description": "selection of normalisation"
      },
      "NormalisationPeriodEnum": {
        "type": "string",
        "enum": [
          "3m",
          "6m",
          "1y",
          "2y",
          "5y",
          "Expanding",
          "All"
        ],
        "title": "NormalisationPeriodEnum",
        "description": "selection of normalisation period"
      },
      "NotionalEnum": {
        "type": "string",
        "enum": [
          "ALL",
          "CALL",
          "PUT"
        ],
        "title": "NotionalEnum",
        "description": "Options notional filter for determining notional metric"
      },
      "SecuritySummary": {
        "properties": {
          "ticker": {
            "type": "string",
            "title": "Ticker"
          },
          "name": {
            "type": "string",
            "title": "Name"
          },
          "sector": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Sector"
          },
          "flow_status": {
            "type": "string",
            "title": "Flow Status"
          },
          "buy_sell_ratio": {
            "type": "number",
            "title": "Buy Sell Ratio"
          },
          "trend_direction": {
            "type": "string",
            "title": "Trend Direction"
          },
          "total_turnover": {
            "type": "number",
            "title": "Total Turnover"
          },
          "total_turnover_change": {
            "type": "number",
            "title": "Total Turnover Change"
          },
          "net_flow": {
            "type": "number",
            "title": "Net Flow"
          },
          "net_flow_change": {
            "type": "number",
            "title": "Net Flow Change"
          },
          "buy_flow": {
            "type": "number",
            "title": "Buy Flow"
          },
          "buy_flow_change": {
            "type": "number",
            "title": "Buy Flow Change"
          },
          "sell_flow": {
            "type": "number",
            "title": "Sell Flow"
          },
          "sell_flow_change": {
            "type": "number",
            "title": "Sell Flow Change"
          },
          "latest_price": {
            "type": "number",
            "title": "Latest Price"
          },
          "price_change": {
            "type": "number",
            "title": "Price Change"
          },
          "updated_time": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "title": "Updated Time"
          },
          "asset_class": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Asset Class"
          }
        },
        "type": "object",
        "required": [
          "ticker",
          "name",
          "flow_status",
          "buy_sell_ratio",
          "trend_direction",
          "total_turnover",
          "total_turnover_change",
          "net_flow",
          "net_flow_change",
          "buy_flow",
          "buy_flow_change",
          "sell_flow",
          "sell_flow_change",
          "latest_price",
          "price_change"
        ],
        "title": "SecuritySummary",
        "description": "Executive summary for a security."
      },
      "SizeEnum": {
        "type": "string",
        "enum": [
          "TOTAL",
          "LARGE",
          "SMALL"
        ],
        "title": "SizeEnum"
      },
      "SortDirectionEnum": {
        "type": "string",
        "enum": [
          "asc",
          "desc"
        ],
        "title": "SortDirectionEnum"
      },
      "TickerDataOut": {
        "properties": {
          "ticker": {
            "type": "string",
            "title": "Ticker"
          },
          "field": {
            "type": "string",
            "title": "Field"
          },
          "data": {
            "items": {
              "$ref": "#/components/schemas/TimeseriesDataPointOut"
            },
            "type": "array",
            "title": "Data"
          }
        },
        "type": "object",
        "required": [
          "ticker",
          "field",
          "data"
        ],
        "title": "TickerDataOut",
        "description": "Ticker data response model."
      },
      "TimeseriesDataPointOut": {
        "properties": {
          "date": {
            "type": "string",
            "format": "date",
            "title": "Date"
          },
          "value": {
            "type": "number",
            "title": "Value"
          }
        },
        "type": "object",
        "required": [
          "date",
          "value"
        ],
        "title": "TimeseriesDataPointOut",
        "description": "Legacy output format to be removed. # JA Todo"
      },
      "TransformationEnum": {
        "type": "string",
        "enum": [
          "rolling_sum",
          "moving_avg"
        ],
        "title": "TransformationEnum",
        "description": "selection of transformation"
      },
      "TypeEnum": {
        "type": "string",
        "enum": [
          "ALL",
          "CALL",
          "PUT"
        ],
        "title": "TypeEnum",
        "description": "Options type filter for determining turnover metric"
      },
      "UserChartsUpdate": {
        "properties": {
          "charts": {
            "additionalProperties": true,
            "type": "object",
            "title": "Charts",
            "description": "Chart configurations"
          }
        },
        "type": "object",
        "required": [
          "charts"
        ],
        "title": "UserChartsUpdate",
        "description": "User charts update request"
      },
      "UserConfigurationRequest": {
        "properties": {
          "email": {
            "type": "string",
            "format": "email",
            "title": "Email",
            "description": "User email"
          },
          "username": {
            "type": "string",
            "title": "Username",
            "description": "Username"
          },
          "preferences": {
            "additionalProperties": true,
            "type": "object",
            "title": "Preferences",
            "description": "User preferences"
          },
          "charts": {
            "items": {
              "additionalProperties": true,
              "type": "object"
            },
            "type": "array",
            "title": "Charts",
            "description": "Chart configurations"
          }
        },
        "type": "object",
        "required": [
          "email",
          "username"
        ],
        "title": "UserConfigurationRequest",
        "description": "Request to save user configuration"
      },
      "UserConfigurationResponse": {
        "properties": {
          "id": {
            "type": "integer",
            "title": "Id",
            "description": "User ID"
          },
          "email": {
            "type": "string",
            "format": "email",
            "title": "Email",
            "description": "User email"
          },
          "username": {
            "type": "string",
            "title": "Username",
            "description": "Username"
          },
          "preferences": {
            "additionalProperties": true,
            "type": "object",
            "title": "Preferences",
            "description": "User preferences"
          },
          "charts": {
            "items": {
              "additionalProperties": true,
              "type": "object"
            },
            "type": "array",
            "title": "Charts",
            "description": "Chart configurations"
          }
        },
        "type": "object",
        "required": [
          "id",
          "email",
          "username"
        ],
        "title": "UserConfigurationResponse",
        "description": "Response with saved user configuration"
      },
      "UserPreferencesUpdate": {
        "properties": {
          "preferences": {
            "additionalProperties": true,
            "type": "object",
            "title": "Preferences",
            "description": "User preferences"
          }
        },
        "type": "object",
        "required": [
          "preferences"
        ],
        "title": "UserPreferencesUpdate",
        "description": "User preferences update request"
      },
      "UserResponse": {
        "properties": {
          "id": {
            "type": "integer",
            "title": "Id",
            "description": "User ID"
          },
          "vanda_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Vanda Id",
            "description": "Vanda ID"
          },
          "username": {
            "type": "string",
            "title": "Username",
            "description": "Username"
          },
          "email": {
            "type": "string",
            "format": "email",
            "title": "Email",
            "description": "Email address"
          },
          "charts": {
            "additionalProperties": true,
            "type": "object",
            "title": "Charts",
            "description": "Chart configurations"
          },
          "preferences": {
            "additionalProperties": true,
            "type": "object",
            "title": "Preferences",
            "description": "User preferences"
          },
          "active": {
            "type": "boolean",
            "title": "Active",
            "description": "Active status",
            "default": true
          }
        },
        "type": "object",
        "required": [
          "id",
          "username",
          "email"
        ],
        "title": "UserResponse",
        "description": "User profile response"
      },
      "UserUpdate": {
        "properties": {
          "username": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Username",
            "description": "New username"
          },
          "email": {
            "anyOf": [
              {
                "type": "string",
                "format": "email"
              },
              {
                "type": "null"
              }
            ],
            "title": "Email",
            "description": "New email"
          },
          "active": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ],
            "title": "Active",
            "description": "Active status"
          }
        },
        "type": "object",
        "title": "UserUpdate",
        "description": "User profile update request"
      },
      "ValidationError": {
        "properties": {
          "loc": {
            "items": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "integer"
                }
              ]
            },
            "type": "array",
            "title": "Location"
          },
          "msg": {
            "type": "string",
            "title": "Message"
          },
          "type": {
            "type": "string",
            "title": "Error Type"
          },
          "input": {
            "title": "Input"
          },
          "ctx": {
            "type": "object",
            "title": "Context"
          }
        },
        "type": "object",
        "required": [
          "loc",
          "msg",
          "type"
        ],
        "title": "ValidationError"
      },
      "WindowEnum": {
        "type": "string",
        "enum": [
          "5",
          "20",
          "30",
          "60",
          "90",
          "120",
          "252"
        ],
        "title": "WindowEnum"
      }
    },
    "securitySchemes": {
      "HTTPBearer": {
        "type": "http",
        "scheme": "bearer"
      },
      "ApiKeyAuth": {
        "type": "apiKey",
        "in": "header",
        "name": "x-api-key"
      }
    }
  }
}