{
  "openapi": "3.1.0",
  "info": {
    "title": "CuteMarkets Options API",
    "summary": "OpenAPI specification for the CuteMarkets options market data API.",
    "description": "CuteMarkets provides REST endpoints for U.S. options chains, contract snapshots, reference contracts, trades, quotes, OHLC aggregates, technical indicators, ticker search, and expiration lookup. All authenticated endpoints use an API key in the Authorization header.",
    "version": "1.0.0",
    "contact": {
      "name": "CuteMarkets Support",
      "url": "https://cutemarkets.com/support"
    }
  },
  "servers": [
    {
      "url": "https://api.cutemarkets.com",
      "description": "Production API"
    },
    {
      "url": "http://localhost:8000",
      "description": "Local development"
    }
  ],
  "externalDocs": {
    "description": "CuteMarkets API docs",
    "url": "https://cutemarkets.com/docs"
  },
  "security": [
    {
      "bearerApiKey": []
    }
  ],
  "tags": [
    {
      "name": "Options",
      "description": "Option chains, snapshots, and contract reference data"
    },
    {
      "name": "Trades",
      "description": "Historical and latest option trade data"
    },
    {
      "name": "Quotes",
      "description": "Historical option quote data"
    },
    {
      "name": "Aggregates",
      "description": "OHLC aggregate bars and open-close snapshots"
    },
    {
      "name": "Indicators",
      "description": "Technical indicators calculated from option aggregate bars"
    },
    {
      "name": "Reference",
      "description": "Ticker search and expiration lookup"
    }
  ],
  "paths": {
    "/v1/options/chain/{ticker}/": {
      "get": {
        "tags": ["Options"],
        "operationId": "getOptionChain",
        "summary": "Get an option chain snapshot",
        "description": "Returns a paginated snapshot of option contracts for one underlying equity, including contract details, day stats, Greeks, implied volatility, open interest, and latest quote/trade fields when available for the plan.",
        "externalDocs": {
          "url": "https://cutemarkets.com/docs/option-chain"
        },
        "parameters": [
          {
            "$ref": "#/components/parameters/UnderlyingTicker"
          },
          {
            "$ref": "#/components/parameters/ContractType"
          },
          {
            "$ref": "#/components/parameters/ExpirationDate"
          },
          {
            "$ref": "#/components/parameters/ExpirationDateGte"
          },
          {
            "$ref": "#/components/parameters/ExpirationDateGt"
          },
          {
            "$ref": "#/components/parameters/ExpirationDateLte"
          },
          {
            "$ref": "#/components/parameters/ExpirationDateLt"
          },
          {
            "$ref": "#/components/parameters/StrikePrice"
          },
          {
            "$ref": "#/components/parameters/StrikePriceGte"
          },
          {
            "$ref": "#/components/parameters/StrikePriceGt"
          },
          {
            "$ref": "#/components/parameters/StrikePriceLte"
          },
          {
            "$ref": "#/components/parameters/StrikePriceLt"
          },
          {
            "$ref": "#/components/parameters/Sort"
          },
          {
            "$ref": "#/components/parameters/Order"
          },
          {
            "$ref": "#/components/parameters/ChainLimit"
          },
          {
            "$ref": "#/components/parameters/Page"
          }
        ],
        "responses": {
          "200": {
            "description": "Option chain snapshot.",
            "headers": {
              "X-RateLimit-Limit-Minute": {
                "$ref": "#/components/headers/RateLimitLimitMinute"
              },
              "X-RateLimit-Remaining-Minute": {
                "$ref": "#/components/headers/RateLimitRemainingMinute"
              },
              "X-RateLimit-Limit-Day": {
                "$ref": "#/components/headers/RateLimitLimitDay"
              },
              "X-RateLimit-Remaining-Day": {
                "$ref": "#/components/headers/RateLimitRemainingDay"
              },
              "X-RateLimit-Plan": {
                "$ref": "#/components/headers/RateLimitPlan"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/OptionChainResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        }
      }
    },
    "/v1/options/snapshot/{underlying}/{option_contract}/": {
      "get": {
        "tags": ["Options"],
        "operationId": "getOptionContractSnapshot",
        "summary": "Get one option contract snapshot",
        "description": "Returns a single option contract snapshot by underlying ticker and full option contract ticker.",
        "externalDocs": {
          "url": "https://cutemarkets.com/docs/option-contract-snapshot"
        },
        "parameters": [
          {
            "$ref": "#/components/parameters/UnderlyingPath"
          },
          {
            "$ref": "#/components/parameters/OptionContract"
          }
        ],
        "responses": {
          "200": {
            "description": "Single option contract snapshot.",
            "headers": {
              "X-RateLimit-Limit-Minute": {
                "$ref": "#/components/headers/RateLimitLimitMinute"
              },
              "X-RateLimit-Remaining-Minute": {
                "$ref": "#/components/headers/RateLimitRemainingMinute"
              },
              "X-RateLimit-Limit-Day": {
                "$ref": "#/components/headers/RateLimitLimitDay"
              },
              "X-RateLimit-Remaining-Day": {
                "$ref": "#/components/headers/RateLimitRemainingDay"
              },
              "X-RateLimit-Plan": {
                "$ref": "#/components/headers/RateLimitPlan"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/OptionSnapshotResponse"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        }
      }
    },
    "/v1/options/contracts/": {
      "get": {
        "tags": ["Options"],
        "operationId": "listOptionContracts",
        "summary": "List option contracts",
        "description": "Returns a paginated reference index of option contracts. Use filters for underlying ticker, expiration, strike, contract type, and historical as-of lookup.",
        "externalDocs": {
          "url": "https://cutemarkets.com/docs/contracts"
        },
        "parameters": [
          {
            "$ref": "#/components/parameters/UnderlyingTickerQuery"
          },
          {
            "$ref": "#/components/parameters/ContractType"
          },
          {
            "$ref": "#/components/parameters/ExpirationDate"
          },
          {
            "$ref": "#/components/parameters/ExpirationDateGte"
          },
          {
            "$ref": "#/components/parameters/ExpirationDateGt"
          },
          {
            "$ref": "#/components/parameters/ExpirationDateLte"
          },
          {
            "$ref": "#/components/parameters/ExpirationDateLt"
          },
          {
            "$ref": "#/components/parameters/UnderlyingTickerGte"
          },
          {
            "$ref": "#/components/parameters/UnderlyingTickerGt"
          },
          {
            "$ref": "#/components/parameters/UnderlyingTickerLte"
          },
          {
            "$ref": "#/components/parameters/UnderlyingTickerLt"
          },
          {
            "$ref": "#/components/parameters/StrikePrice"
          },
          {
            "$ref": "#/components/parameters/StrikePriceGte"
          },
          {
            "$ref": "#/components/parameters/StrikePriceGt"
          },
          {
            "$ref": "#/components/parameters/StrikePriceLte"
          },
          {
            "$ref": "#/components/parameters/StrikePriceLt"
          },
          {
            "$ref": "#/components/parameters/AsOf"
          },
          {
            "$ref": "#/components/parameters/Expired"
          },
          {
            "$ref": "#/components/parameters/Sort"
          },
          {
            "$ref": "#/components/parameters/Order"
          },
          {
            "$ref": "#/components/parameters/ContractsLimit"
          },
          {
            "$ref": "#/components/parameters/Page"
          }
        ],
        "responses": {
          "200": {
            "description": "Option contracts page.",
            "headers": {
              "X-RateLimit-Limit-Minute": {
                "$ref": "#/components/headers/RateLimitLimitMinute"
              },
              "X-RateLimit-Remaining-Minute": {
                "$ref": "#/components/headers/RateLimitRemainingMinute"
              },
              "X-RateLimit-Limit-Day": {
                "$ref": "#/components/headers/RateLimitLimitDay"
              },
              "X-RateLimit-Remaining-Day": {
                "$ref": "#/components/headers/RateLimitRemainingDay"
              },
              "X-RateLimit-Plan": {
                "$ref": "#/components/headers/RateLimitPlan"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ContractsListResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        }
      }
    },
    "/v1/options/contracts/{options_ticker}/": {
      "get": {
        "tags": ["Options"],
        "operationId": "getOptionContract",
        "summary": "Get one option contract",
        "description": "Returns reference data for a single option contract ticker.",
        "externalDocs": {
          "url": "https://cutemarkets.com/docs/contracts"
        },
        "parameters": [
          {
            "$ref": "#/components/parameters/OptionsTicker"
          },
          {
            "$ref": "#/components/parameters/AsOf"
          }
        ],
        "responses": {
          "200": {
            "description": "Option contract detail.",
            "headers": {
              "X-RateLimit-Limit-Minute": {
                "$ref": "#/components/headers/RateLimitLimitMinute"
              },
              "X-RateLimit-Remaining-Minute": {
                "$ref": "#/components/headers/RateLimitRemainingMinute"
              },
              "X-RateLimit-Limit-Day": {
                "$ref": "#/components/headers/RateLimitLimitDay"
              },
              "X-RateLimit-Remaining-Day": {
                "$ref": "#/components/headers/RateLimitRemainingDay"
              },
              "X-RateLimit-Plan": {
                "$ref": "#/components/headers/RateLimitPlan"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ContractDetailResponse"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        }
      }
    },
    "/v1/options/trades/{options_ticker}/": {
      "get": {
        "tags": ["Trades"],
        "operationId": "listOptionTrades",
        "summary": "List historical option trades",
        "description": "Returns tick-level historical trades for one option contract.",
        "externalDocs": {
          "url": "https://cutemarkets.com/docs/trades"
        },
        "parameters": [
          {
            "$ref": "#/components/parameters/OptionsTicker"
          },
          {
            "$ref": "#/components/parameters/Timestamp"
          },
          {
            "$ref": "#/components/parameters/TimestampGte"
          },
          {
            "$ref": "#/components/parameters/TimestampGt"
          },
          {
            "$ref": "#/components/parameters/TimestampLte"
          },
          {
            "$ref": "#/components/parameters/TimestampLt"
          },
          {
            "$ref": "#/components/parameters/Sort"
          },
          {
            "$ref": "#/components/parameters/Order"
          },
          {
            "$ref": "#/components/parameters/TickLimit"
          },
          {
            "$ref": "#/components/parameters/Page"
          }
        ],
        "responses": {
          "200": {
            "description": "Historical option trades page.",
            "headers": {
              "X-RateLimit-Limit-Minute": {
                "$ref": "#/components/headers/RateLimitLimitMinute"
              },
              "X-RateLimit-Remaining-Minute": {
                "$ref": "#/components/headers/RateLimitRemainingMinute"
              },
              "X-RateLimit-Limit-Day": {
                "$ref": "#/components/headers/RateLimitLimitDay"
              },
              "X-RateLimit-Remaining-Day": {
                "$ref": "#/components/headers/RateLimitRemainingDay"
              },
              "X-RateLimit-Plan": {
                "$ref": "#/components/headers/RateLimitPlan"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TradesListResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        }
      }
    },
    "/v1/options/trades/{options_ticker}/last/": {
      "get": {
        "tags": ["Trades"],
        "operationId": "getLastOptionTrade",
        "summary": "Get the latest option trade",
        "description": "Returns the latest trade for one option contract in the compact latest-trade shape.",
        "externalDocs": {
          "url": "https://cutemarkets.com/docs/trades"
        },
        "parameters": [
          {
            "$ref": "#/components/parameters/OptionsTicker"
          }
        ],
        "responses": {
          "200": {
            "description": "Latest option trade.",
            "headers": {
              "X-RateLimit-Limit-Minute": {
                "$ref": "#/components/headers/RateLimitLimitMinute"
              },
              "X-RateLimit-Remaining-Minute": {
                "$ref": "#/components/headers/RateLimitRemainingMinute"
              },
              "X-RateLimit-Limit-Day": {
                "$ref": "#/components/headers/RateLimitLimitDay"
              },
              "X-RateLimit-Remaining-Day": {
                "$ref": "#/components/headers/RateLimitRemainingDay"
              },
              "X-RateLimit-Plan": {
                "$ref": "#/components/headers/RateLimitPlan"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/LastTradeResponse"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        }
      }
    },
    "/v1/options/quotes/{options_ticker}/": {
      "get": {
        "tags": ["Quotes"],
        "operationId": "listOptionQuotes",
        "summary": "List historical option quotes",
        "description": "Returns historical NBBO-style quote rows for one option contract. This endpoint requires the Expert Plan.",
        "externalDocs": {
          "url": "https://cutemarkets.com/docs/quotes"
        },
        "parameters": [
          {
            "$ref": "#/components/parameters/OptionsTicker"
          },
          {
            "$ref": "#/components/parameters/Timestamp"
          },
          {
            "$ref": "#/components/parameters/TimestampGte"
          },
          {
            "$ref": "#/components/parameters/TimestampGt"
          },
          {
            "$ref": "#/components/parameters/TimestampLte"
          },
          {
            "$ref": "#/components/parameters/TimestampLt"
          },
          {
            "$ref": "#/components/parameters/Sort"
          },
          {
            "$ref": "#/components/parameters/Order"
          },
          {
            "$ref": "#/components/parameters/TickLimit"
          },
          {
            "$ref": "#/components/parameters/Page"
          }
        ],
        "responses": {
          "200": {
            "description": "Historical option quotes page.",
            "headers": {
              "X-RateLimit-Limit-Minute": {
                "$ref": "#/components/headers/RateLimitLimitMinute"
              },
              "X-RateLimit-Remaining-Minute": {
                "$ref": "#/components/headers/RateLimitRemainingMinute"
              },
              "X-RateLimit-Limit-Day": {
                "$ref": "#/components/headers/RateLimitLimitDay"
              },
              "X-RateLimit-Remaining-Day": {
                "$ref": "#/components/headers/RateLimitRemainingDay"
              },
              "X-RateLimit-Plan": {
                "$ref": "#/components/headers/RateLimitPlan"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/QuotesListResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        }
      }
    },
    "/v1/options/aggs/{ticker}/{multiplier}/{timespan}/{from_date}/{to_date}/": {
      "get": {
        "tags": ["Aggregates"],
        "operationId": "listOptionAggregates",
        "summary": "Get custom-range option aggregate bars",
        "description": "Returns OHLC aggregate bars for one option contract over a custom range.",
        "externalDocs": {
          "url": "https://cutemarkets.com/docs/aggregates"
        },
        "parameters": [
          {
            "$ref": "#/components/parameters/OptionTickerPath"
          },
          {
            "$ref": "#/components/parameters/Multiplier"
          },
          {
            "$ref": "#/components/parameters/Timespan"
          },
          {
            "$ref": "#/components/parameters/FromDate"
          },
          {
            "$ref": "#/components/parameters/ToDate"
          },
          {
            "$ref": "#/components/parameters/Adjusted"
          },
          {
            "$ref": "#/components/parameters/AggregateSort"
          },
          {
            "$ref": "#/components/parameters/AggregateLimit"
          },
          {
            "$ref": "#/components/parameters/Page"
          }
        ],
        "responses": {
          "200": {
            "description": "Option aggregate bars.",
            "headers": {
              "X-RateLimit-Limit-Minute": {
                "$ref": "#/components/headers/RateLimitLimitMinute"
              },
              "X-RateLimit-Remaining-Minute": {
                "$ref": "#/components/headers/RateLimitRemainingMinute"
              },
              "X-RateLimit-Limit-Day": {
                "$ref": "#/components/headers/RateLimitLimitDay"
              },
              "X-RateLimit-Remaining-Day": {
                "$ref": "#/components/headers/RateLimitRemainingDay"
              },
              "X-RateLimit-Plan": {
                "$ref": "#/components/headers/RateLimitPlan"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AggregatesResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        }
      }
    },
    "/v1/options/aggs/{ticker}/prev/": {
      "get": {
        "tags": ["Aggregates"],
        "operationId": "getPreviousDayOptionAggregate",
        "summary": "Get the previous option daily aggregate",
        "description": "Returns the prior completed trading day's OHLC bar for one option contract.",
        "externalDocs": {
          "url": "https://cutemarkets.com/docs/aggregates"
        },
        "parameters": [
          {
            "$ref": "#/components/parameters/OptionTickerPath"
          },
          {
            "$ref": "#/components/parameters/Adjusted"
          }
        ],
        "responses": {
          "200": {
            "description": "Previous day option aggregate.",
            "headers": {
              "X-RateLimit-Limit-Minute": {
                "$ref": "#/components/headers/RateLimitLimitMinute"
              },
              "X-RateLimit-Remaining-Minute": {
                "$ref": "#/components/headers/RateLimitRemainingMinute"
              },
              "X-RateLimit-Limit-Day": {
                "$ref": "#/components/headers/RateLimitLimitDay"
              },
              "X-RateLimit-Remaining-Day": {
                "$ref": "#/components/headers/RateLimitRemainingDay"
              },
              "X-RateLimit-Plan": {
                "$ref": "#/components/headers/RateLimitPlan"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AggregatesResponse"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        }
      }
    },
    "/v1/options/open-close/{ticker}/{date}/": {
      "get": {
        "tags": ["Aggregates"],
        "operationId": "getOptionOpenClose",
        "summary": "Get daily option open-close data",
        "description": "Returns a flat daily open, high, low, close, and volume snapshot for one option contract on one calendar date.",
        "externalDocs": {
          "url": "https://cutemarkets.com/docs/aggregates"
        },
        "parameters": [
          {
            "$ref": "#/components/parameters/OptionTickerPath"
          },
          {
            "$ref": "#/components/parameters/DatePath"
          },
          {
            "$ref": "#/components/parameters/Adjusted"
          }
        ],
        "responses": {
          "200": {
            "description": "Daily open-close data.",
            "headers": {
              "X-RateLimit-Limit-Minute": {
                "$ref": "#/components/headers/RateLimitLimitMinute"
              },
              "X-RateLimit-Remaining-Minute": {
                "$ref": "#/components/headers/RateLimitRemainingMinute"
              },
              "X-RateLimit-Limit-Day": {
                "$ref": "#/components/headers/RateLimitLimitDay"
              },
              "X-RateLimit-Remaining-Day": {
                "$ref": "#/components/headers/RateLimitRemainingDay"
              },
              "X-RateLimit-Plan": {
                "$ref": "#/components/headers/RateLimitPlan"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/OpenCloseResponse"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        }
      }
    },
    "/v1/options/indicators/sma/{ticker}/": {
      "get": {
        "tags": ["Indicators"],
        "operationId": "getOptionSma",
        "summary": "Get option SMA values",
        "description": "Returns Simple Moving Average values calculated from option aggregate bars.",
        "externalDocs": {
          "url": "https://cutemarkets.com/docs/indicators-sma"
        },
        "parameters": [
          {
            "$ref": "#/components/parameters/OptionTickerPath"
          },
          {
            "$ref": "#/components/parameters/IndicatorTimestamp"
          },
          {
            "$ref": "#/components/parameters/IndicatorTimestampGte"
          },
          {
            "$ref": "#/components/parameters/IndicatorTimestampGt"
          },
          {
            "$ref": "#/components/parameters/IndicatorTimestampLte"
          },
          {
            "$ref": "#/components/parameters/IndicatorTimestampLt"
          },
          {
            "$ref": "#/components/parameters/IndicatorTimespan"
          },
          {
            "$ref": "#/components/parameters/Adjusted"
          },
          {
            "$ref": "#/components/parameters/Window"
          },
          {
            "$ref": "#/components/parameters/SeriesType"
          },
          {
            "$ref": "#/components/parameters/ExpandUnderlying"
          },
          {
            "$ref": "#/components/parameters/Order"
          },
          {
            "$ref": "#/components/parameters/IndicatorLimit"
          },
          {
            "$ref": "#/components/parameters/Page"
          }
        ],
        "responses": {
          "200": {
            "description": "SMA values.",
            "headers": {
              "X-RateLimit-Limit-Minute": {
                "$ref": "#/components/headers/RateLimitLimitMinute"
              },
              "X-RateLimit-Remaining-Minute": {
                "$ref": "#/components/headers/RateLimitRemainingMinute"
              },
              "X-RateLimit-Limit-Day": {
                "$ref": "#/components/headers/RateLimitLimitDay"
              },
              "X-RateLimit-Remaining-Day": {
                "$ref": "#/components/headers/RateLimitRemainingDay"
              },
              "X-RateLimit-Plan": {
                "$ref": "#/components/headers/RateLimitPlan"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/IndicatorResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        }
      }
    },
    "/v1/options/indicators/ema/{ticker}/": {
      "get": {
        "tags": ["Indicators"],
        "operationId": "getOptionEma",
        "summary": "Get option EMA values",
        "description": "Returns Exponential Moving Average values calculated from option aggregate bars.",
        "externalDocs": {
          "url": "https://cutemarkets.com/docs/indicators-ema"
        },
        "parameters": [
          {
            "$ref": "#/components/parameters/OptionTickerPath"
          },
          {
            "$ref": "#/components/parameters/IndicatorTimestamp"
          },
          {
            "$ref": "#/components/parameters/IndicatorTimestampGte"
          },
          {
            "$ref": "#/components/parameters/IndicatorTimestampGt"
          },
          {
            "$ref": "#/components/parameters/IndicatorTimestampLte"
          },
          {
            "$ref": "#/components/parameters/IndicatorTimestampLt"
          },
          {
            "$ref": "#/components/parameters/IndicatorTimespan"
          },
          {
            "$ref": "#/components/parameters/Adjusted"
          },
          {
            "$ref": "#/components/parameters/Window"
          },
          {
            "$ref": "#/components/parameters/SeriesType"
          },
          {
            "$ref": "#/components/parameters/ExpandUnderlying"
          },
          {
            "$ref": "#/components/parameters/Order"
          },
          {
            "$ref": "#/components/parameters/IndicatorLimit"
          },
          {
            "$ref": "#/components/parameters/Page"
          }
        ],
        "responses": {
          "200": {
            "description": "EMA values.",
            "headers": {
              "X-RateLimit-Limit-Minute": {
                "$ref": "#/components/headers/RateLimitLimitMinute"
              },
              "X-RateLimit-Remaining-Minute": {
                "$ref": "#/components/headers/RateLimitRemainingMinute"
              },
              "X-RateLimit-Limit-Day": {
                "$ref": "#/components/headers/RateLimitLimitDay"
              },
              "X-RateLimit-Remaining-Day": {
                "$ref": "#/components/headers/RateLimitRemainingDay"
              },
              "X-RateLimit-Plan": {
                "$ref": "#/components/headers/RateLimitPlan"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/IndicatorResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        }
      }
    },
    "/v1/options/indicators/macd/{ticker}/": {
      "get": {
        "tags": ["Indicators"],
        "operationId": "getOptionMacd",
        "summary": "Get option MACD values",
        "description": "Returns MACD line, signal line, and histogram values calculated from option aggregate bars.",
        "externalDocs": {
          "url": "https://cutemarkets.com/docs/indicators-macd"
        },
        "parameters": [
          {
            "$ref": "#/components/parameters/OptionTickerPath"
          },
          {
            "$ref": "#/components/parameters/IndicatorTimestamp"
          },
          {
            "$ref": "#/components/parameters/IndicatorTimestampGte"
          },
          {
            "$ref": "#/components/parameters/IndicatorTimestampGt"
          },
          {
            "$ref": "#/components/parameters/IndicatorTimestampLte"
          },
          {
            "$ref": "#/components/parameters/IndicatorTimestampLt"
          },
          {
            "$ref": "#/components/parameters/IndicatorTimespan"
          },
          {
            "$ref": "#/components/parameters/Adjusted"
          },
          {
            "$ref": "#/components/parameters/ShortWindow"
          },
          {
            "$ref": "#/components/parameters/LongWindow"
          },
          {
            "$ref": "#/components/parameters/SignalWindow"
          },
          {
            "$ref": "#/components/parameters/SeriesType"
          },
          {
            "$ref": "#/components/parameters/ExpandUnderlying"
          },
          {
            "$ref": "#/components/parameters/Order"
          },
          {
            "$ref": "#/components/parameters/IndicatorLimit"
          },
          {
            "$ref": "#/components/parameters/Page"
          }
        ],
        "responses": {
          "200": {
            "description": "MACD values.",
            "headers": {
              "X-RateLimit-Limit-Minute": {
                "$ref": "#/components/headers/RateLimitLimitMinute"
              },
              "X-RateLimit-Remaining-Minute": {
                "$ref": "#/components/headers/RateLimitRemainingMinute"
              },
              "X-RateLimit-Limit-Day": {
                "$ref": "#/components/headers/RateLimitLimitDay"
              },
              "X-RateLimit-Remaining-Day": {
                "$ref": "#/components/headers/RateLimitRemainingDay"
              },
              "X-RateLimit-Plan": {
                "$ref": "#/components/headers/RateLimitPlan"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MacdIndicatorResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        }
      }
    },
    "/v1/options/indicators/rsi/{ticker}/": {
      "get": {
        "tags": ["Indicators"],
        "operationId": "getOptionRsi",
        "summary": "Get option RSI values",
        "description": "Returns Relative Strength Index values calculated from option aggregate bars.",
        "externalDocs": {
          "url": "https://cutemarkets.com/docs/indicators-rsi"
        },
        "parameters": [
          {
            "$ref": "#/components/parameters/OptionTickerPath"
          },
          {
            "$ref": "#/components/parameters/IndicatorTimestamp"
          },
          {
            "$ref": "#/components/parameters/IndicatorTimestampGte"
          },
          {
            "$ref": "#/components/parameters/IndicatorTimestampGt"
          },
          {
            "$ref": "#/components/parameters/IndicatorTimestampLte"
          },
          {
            "$ref": "#/components/parameters/IndicatorTimestampLt"
          },
          {
            "$ref": "#/components/parameters/IndicatorTimespan"
          },
          {
            "$ref": "#/components/parameters/Adjusted"
          },
          {
            "$ref": "#/components/parameters/Window"
          },
          {
            "$ref": "#/components/parameters/SeriesType"
          },
          {
            "$ref": "#/components/parameters/ExpandUnderlying"
          },
          {
            "$ref": "#/components/parameters/Order"
          },
          {
            "$ref": "#/components/parameters/IndicatorLimit"
          },
          {
            "$ref": "#/components/parameters/Page"
          }
        ],
        "responses": {
          "200": {
            "description": "RSI values.",
            "headers": {
              "X-RateLimit-Limit-Minute": {
                "$ref": "#/components/headers/RateLimitLimitMinute"
              },
              "X-RateLimit-Remaining-Minute": {
                "$ref": "#/components/headers/RateLimitRemainingMinute"
              },
              "X-RateLimit-Limit-Day": {
                "$ref": "#/components/headers/RateLimitLimitDay"
              },
              "X-RateLimit-Remaining-Day": {
                "$ref": "#/components/headers/RateLimitRemainingDay"
              },
              "X-RateLimit-Plan": {
                "$ref": "#/components/headers/RateLimitPlan"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/IndicatorResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        }
      }
    },
    "/v1/tickers/search/": {
      "get": {
        "tags": ["Reference"],
        "operationId": "searchTickers",
        "summary": "Search ticker symbols",
        "description": "Searches underlying ticker symbols for option workflows.",
        "security": [],
        "externalDocs": {
          "url": "https://cutemarkets.com/docs/ticker-search"
        },
        "parameters": [
          {
            "name": "query",
            "in": "query",
            "description": "Search text, for example an equity symbol prefix.",
            "required": true,
            "schema": {
              "type": "string",
              "example": "NFLX"
            }
          },
          {
            "name": "type",
            "in": "query",
            "description": "Optional ticker type filter.",
            "required": false,
            "schema": {
              "type": "string",
              "default": "stocks",
              "example": "stocks"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "description": "Maximum number of symbols to return.",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 25,
              "default": 8
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Ticker search results.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TickerSearchResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        }
      }
    },
    "/v1/tickers/expirations/{ticker}/": {
      "get": {
        "tags": ["Reference"],
        "operationId": "listExpirations",
        "summary": "List option expiration dates",
        "description": "Returns available option expiration dates for an underlying ticker.",
        "externalDocs": {
          "url": "https://cutemarkets.com/docs/expirations"
        },
        "parameters": [
          {
            "$ref": "#/components/parameters/UnderlyingTicker"
          }
        ],
        "responses": {
          "200": {
            "description": "Expiration dates for the underlying ticker.",
            "headers": {
              "X-RateLimit-Limit-Minute": {
                "$ref": "#/components/headers/RateLimitLimitMinute"
              },
              "X-RateLimit-Remaining-Minute": {
                "$ref": "#/components/headers/RateLimitRemainingMinute"
              },
              "X-RateLimit-Limit-Day": {
                "$ref": "#/components/headers/RateLimitLimitDay"
              },
              "X-RateLimit-Remaining-Day": {
                "$ref": "#/components/headers/RateLimitRemainingDay"
              },
              "X-RateLimit-Plan": {
                "$ref": "#/components/headers/RateLimitPlan"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExpirationsResponse"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        }
      }
    },
    "/v1/options/expirations/{ticker}/": {
      "get": {
        "tags": ["Reference"],
        "operationId": "listOptionExpirationsAlias",
        "summary": "List option expiration dates",
        "description": "Alias for /v1/tickers/expirations/{ticker}/.",
        "externalDocs": {
          "url": "https://cutemarkets.com/docs/expirations"
        },
        "parameters": [
          {
            "$ref": "#/components/parameters/UnderlyingTicker"
          }
        ],
        "responses": {
          "200": {
            "description": "Expiration dates for the underlying ticker.",
            "headers": {
              "X-RateLimit-Limit-Minute": {
                "$ref": "#/components/headers/RateLimitLimitMinute"
              },
              "X-RateLimit-Remaining-Minute": {
                "$ref": "#/components/headers/RateLimitRemainingMinute"
              },
              "X-RateLimit-Limit-Day": {
                "$ref": "#/components/headers/RateLimitLimitDay"
              },
              "X-RateLimit-Remaining-Day": {
                "$ref": "#/components/headers/RateLimitRemainingDay"
              },
              "X-RateLimit-Plan": {
                "$ref": "#/components/headers/RateLimitPlan"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExpirationsResponse"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        }
      }
    }
  },
  "components": {
    "securitySchemes": {
      "bearerApiKey": {
        "type": "http",
        "scheme": "bearer",
        "description": "Pass your CuteMarkets API key as a bearer token: Authorization: Bearer YOUR_API_KEY"
      }
    },
    "headers": {
      "RateLimitLimitMinute": {
        "description": "Requests allowed per minute for the current plan.",
        "schema": {
          "type": "integer"
        }
      },
      "RateLimitRemainingMinute": {
        "description": "Requests remaining in the current minute window.",
        "schema": {
          "type": "integer"
        }
      },
      "RateLimitLimitDay": {
        "description": "Requests allowed per day for the current plan.",
        "schema": {
          "type": "integer"
        }
      },
      "RateLimitRemainingDay": {
        "description": "Requests remaining in the current day window.",
        "schema": {
          "type": "integer"
        }
      },
      "RateLimitPlan": {
        "description": "Plan used for rate-limit accounting.",
        "schema": {
          "type": "string"
        }
      }
    },
    "parameters": {
      "UnderlyingTicker": {
        "name": "ticker",
        "in": "path",
        "description": "Underlying equity ticker symbol.",
        "required": true,
        "schema": {
          "type": "string",
          "example": "NFLX"
        }
      },
      "UnderlyingPath": {
        "name": "underlying",
        "in": "path",
        "description": "Underlying equity ticker symbol.",
        "required": true,
        "schema": {
          "type": "string",
          "example": "NFLX"
        }
      },
      "UnderlyingTickerQuery": {
        "name": "underlying_ticker",
        "in": "query",
        "description": "Limit results to contracts for this underlying ticker.",
        "required": false,
        "schema": {
          "type": "string",
          "example": "NFLX"
        }
      },
      "UnderlyingTickerGte": {
        "name": "underlying_ticker.gte",
        "in": "query",
        "description": "Underlying ticker greater than or equal to this value.",
        "required": false,
        "schema": {
          "type": "string"
        }
      },
      "UnderlyingTickerGt": {
        "name": "underlying_ticker.gt",
        "in": "query",
        "description": "Underlying ticker greater than this value.",
        "required": false,
        "schema": {
          "type": "string"
        }
      },
      "UnderlyingTickerLte": {
        "name": "underlying_ticker.lte",
        "in": "query",
        "description": "Underlying ticker less than or equal to this value.",
        "required": false,
        "schema": {
          "type": "string"
        }
      },
      "UnderlyingTickerLt": {
        "name": "underlying_ticker.lt",
        "in": "query",
        "description": "Underlying ticker less than this value.",
        "required": false,
        "schema": {
          "type": "string"
        }
      },
      "OptionContract": {
        "name": "option_contract",
        "in": "path",
        "description": "Full option contract ticker, for example O:NFLX260410C00060000. Encode ':' as %3A if your client requires it.",
        "required": true,
        "schema": {
          "type": "string",
          "example": "O:NFLX260410C00060000"
        }
      },
      "OptionsTicker": {
        "name": "options_ticker",
        "in": "path",
        "description": "Full option contract ticker, for example O:NFLX260402C00075000. Encode ':' as %3A if your client requires it.",
        "required": true,
        "schema": {
          "type": "string",
          "example": "O:NFLX260402C00075000"
        }
      },
      "OptionTickerPath": {
        "name": "ticker",
        "in": "path",
        "description": "Full option contract ticker, for example O:NFLX260402C00075000. Encode ':' as %3A if your client requires it.",
        "required": true,
        "schema": {
          "type": "string",
          "example": "O:NFLX260402C00075000"
        }
      },
      "ContractType": {
        "name": "contract_type",
        "in": "query",
        "description": "Filter by option contract type.",
        "required": false,
        "schema": {
          "type": "string",
          "enum": ["call", "put"]
        }
      },
      "ExpirationDate": {
        "name": "expiration_date",
        "in": "query",
        "description": "Expiration date in YYYY-MM-DD format.",
        "required": false,
        "schema": {
          "type": "string",
          "format": "date"
        }
      },
      "ExpirationDateGte": {
        "name": "expiration_date.gte",
        "in": "query",
        "description": "Expiration date on or after this date.",
        "required": false,
        "schema": {
          "type": "string",
          "format": "date"
        }
      },
      "ExpirationDateGt": {
        "name": "expiration_date.gt",
        "in": "query",
        "description": "Expiration date after this date.",
        "required": false,
        "schema": {
          "type": "string",
          "format": "date"
        }
      },
      "ExpirationDateLte": {
        "name": "expiration_date.lte",
        "in": "query",
        "description": "Expiration date on or before this date.",
        "required": false,
        "schema": {
          "type": "string",
          "format": "date"
        }
      },
      "ExpirationDateLt": {
        "name": "expiration_date.lt",
        "in": "query",
        "description": "Expiration date before this date.",
        "required": false,
        "schema": {
          "type": "string",
          "format": "date"
        }
      },
      "StrikePrice": {
        "name": "strike_price",
        "in": "query",
        "description": "Exact strike price filter.",
        "required": false,
        "schema": {
          "type": "number"
        }
      },
      "StrikePriceGte": {
        "name": "strike_price.gte",
        "in": "query",
        "description": "Strike price greater than or equal to this value.",
        "required": false,
        "schema": {
          "type": "number"
        }
      },
      "StrikePriceGt": {
        "name": "strike_price.gt",
        "in": "query",
        "description": "Strike price greater than this value.",
        "required": false,
        "schema": {
          "type": "number"
        }
      },
      "StrikePriceLte": {
        "name": "strike_price.lte",
        "in": "query",
        "description": "Strike price less than or equal to this value.",
        "required": false,
        "schema": {
          "type": "number"
        }
      },
      "StrikePriceLt": {
        "name": "strike_price.lt",
        "in": "query",
        "description": "Strike price less than this value.",
        "required": false,
        "schema": {
          "type": "number"
        }
      },
      "AsOf": {
        "name": "as_of",
        "in": "query",
        "description": "Historical as-of date in YYYY-MM-DD format.",
        "required": false,
        "schema": {
          "type": "string",
          "format": "date"
        }
      },
      "Expired": {
        "name": "expired",
        "in": "query",
        "description": "Include expired contracts when true.",
        "required": false,
        "schema": {
          "type": "boolean",
          "default": false
        }
      },
      "Sort": {
        "name": "sort",
        "in": "query",
        "description": "Field used for ordering.",
        "required": false,
        "schema": {
          "type": "string"
        }
      },
      "Order": {
        "name": "order",
        "in": "query",
        "description": "Sort direction.",
        "required": false,
        "schema": {
          "type": "string",
          "enum": ["asc", "desc"]
        }
      },
      "AggregateSort": {
        "name": "sort",
        "in": "query",
        "description": "Aggregate bar timestamp sort direction.",
        "required": false,
        "schema": {
          "type": "string",
          "enum": ["asc", "desc"]
        }
      },
      "ChainLimit": {
        "name": "limit",
        "in": "query",
        "description": "Maximum contracts returned. Defaults to 10.",
        "required": false,
        "schema": {
          "type": "integer",
          "minimum": 1,
          "maximum": 100,
          "default": 10
        }
      },
      "ContractsLimit": {
        "name": "limit",
        "in": "query",
        "description": "Maximum contracts returned. Defaults to 10.",
        "required": false,
        "schema": {
          "type": "integer",
          "minimum": 1,
          "maximum": 1000,
          "default": 10
        }
      },
      "TickLimit": {
        "name": "limit",
        "in": "query",
        "description": "Maximum rows returned. Defaults to 1000.",
        "required": false,
        "schema": {
          "type": "integer",
          "minimum": 1,
          "maximum": 10000,
          "default": 1000
        }
      },
      "AggregateLimit": {
        "name": "limit",
        "in": "query",
        "description": "Maximum base aggregates read. Defaults to 5000.",
        "required": false,
        "schema": {
          "type": "integer",
          "minimum": 1,
          "maximum": 10000,
          "default": 5000
        }
      },
      "IndicatorLimit": {
        "name": "limit",
        "in": "query",
        "description": "Maximum indicator points returned. Defaults to 10.",
        "required": false,
        "schema": {
          "type": "integer",
          "minimum": 1,
          "maximum": 1000,
          "default": 10
        }
      },
      "Page": {
        "name": "page",
        "in": "query",
        "description": "Pagination continuation token. Prefer following the full next_url returned by the previous response.",
        "required": false,
        "schema": {
          "type": "string"
        }
      },
      "Timestamp": {
        "name": "timestamp",
        "in": "query",
        "description": "Timestamp filter as YYYY-MM-DD or a nanosecond Unix timestamp string.",
        "required": false,
        "schema": {
          "type": "string"
        }
      },
      "TimestampGte": {
        "name": "timestamp.gte",
        "in": "query",
        "description": "Timestamp greater than or equal to this value.",
        "required": false,
        "schema": {
          "type": "string"
        }
      },
      "TimestampGt": {
        "name": "timestamp.gt",
        "in": "query",
        "description": "Timestamp greater than this value.",
        "required": false,
        "schema": {
          "type": "string"
        }
      },
      "TimestampLte": {
        "name": "timestamp.lte",
        "in": "query",
        "description": "Timestamp less than or equal to this value.",
        "required": false,
        "schema": {
          "type": "string"
        }
      },
      "TimestampLt": {
        "name": "timestamp.lt",
        "in": "query",
        "description": "Timestamp less than this value.",
        "required": false,
        "schema": {
          "type": "string"
        }
      },
      "IndicatorTimestamp": {
        "name": "timestamp",
        "in": "query",
        "description": "Indicator timestamp anchor as YYYY-MM-DD or a millisecond Unix timestamp string.",
        "required": false,
        "schema": {
          "type": "string"
        }
      },
      "IndicatorTimestampGte": {
        "name": "timestamp.gte",
        "in": "query",
        "description": "Indicator timestamp greater than or equal to this value.",
        "required": false,
        "schema": {
          "type": "string"
        }
      },
      "IndicatorTimestampGt": {
        "name": "timestamp.gt",
        "in": "query",
        "description": "Indicator timestamp greater than this value.",
        "required": false,
        "schema": {
          "type": "string"
        }
      },
      "IndicatorTimestampLte": {
        "name": "timestamp.lte",
        "in": "query",
        "description": "Indicator timestamp less than or equal to this value.",
        "required": false,
        "schema": {
          "type": "string"
        }
      },
      "IndicatorTimestampLt": {
        "name": "timestamp.lt",
        "in": "query",
        "description": "Indicator timestamp less than this value.",
        "required": false,
        "schema": {
          "type": "string"
        }
      },
      "Multiplier": {
        "name": "multiplier",
        "in": "path",
        "description": "Size of each aggregate bar relative to the timespan.",
        "required": true,
        "schema": {
          "type": "integer",
          "minimum": 1,
          "example": 1
        }
      },
      "Timespan": {
        "name": "timespan",
        "in": "path",
        "description": "Aggregate bar width.",
        "required": true,
        "schema": {
          "type": "string",
          "enum": ["minute", "hour", "day", "week", "month", "quarter", "year"]
        }
      },
      "IndicatorTimespan": {
        "name": "timespan",
        "in": "query",
        "description": "Aggregate bar width used for indicator calculation.",
        "required": false,
        "schema": {
          "type": "string",
          "enum": ["minute", "hour", "day", "week", "month", "quarter", "year"],
          "default": "day"
        }
      },
      "FromDate": {
        "name": "from_date",
        "in": "path",
        "description": "Start of the range as YYYY-MM-DD or Unix time in milliseconds.",
        "required": true,
        "schema": {
          "type": "string",
          "example": "2026-01-01"
        }
      },
      "ToDate": {
        "name": "to_date",
        "in": "path",
        "description": "End of the range as YYYY-MM-DD or Unix time in milliseconds.",
        "required": true,
        "schema": {
          "type": "string",
          "example": "2026-04-01"
        }
      },
      "DatePath": {
        "name": "date",
        "in": "path",
        "description": "Calendar date in YYYY-MM-DD format.",
        "required": true,
        "schema": {
          "type": "string",
          "format": "date",
          "example": "2026-03-10"
        }
      },
      "Adjusted": {
        "name": "adjusted",
        "in": "query",
        "description": "Use split-adjusted data when true.",
        "required": false,
        "schema": {
          "type": "boolean",
          "default": true
        }
      },
      "Window": {
        "name": "window",
        "in": "query",
        "description": "Moving average or RSI lookback window.",
        "required": false,
        "schema": {
          "type": "integer",
          "minimum": 1,
          "example": 20
        }
      },
      "ShortWindow": {
        "name": "short_window",
        "in": "query",
        "description": "Short EMA length used for the MACD line.",
        "required": false,
        "schema": {
          "type": "integer",
          "minimum": 1,
          "default": 12
        }
      },
      "LongWindow": {
        "name": "long_window",
        "in": "query",
        "description": "Long EMA length used for the MACD line.",
        "required": false,
        "schema": {
          "type": "integer",
          "minimum": 1,
          "default": 26
        }
      },
      "SignalWindow": {
        "name": "signal_window",
        "in": "query",
        "description": "Smoothing window for the MACD signal line.",
        "required": false,
        "schema": {
          "type": "integer",
          "minimum": 1,
          "default": 9
        }
      },
      "SeriesType": {
        "name": "series_type",
        "in": "query",
        "description": "Aggregate price field used for the calculation.",
        "required": false,
        "schema": {
          "type": "string",
          "default": "close",
          "example": "close"
        }
      },
      "ExpandUnderlying": {
        "name": "expand_underlying",
        "in": "query",
        "description": "When true, include underlying aggregate bars and a matching aggregate URL in results.underlying.",
        "required": false,
        "schema": {
          "type": "boolean",
          "default": false
        }
      }
    },
    "responses": {
      "BadRequest": {
        "description": "Missing or invalid query parameters.",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/ErrorResponse"
            }
          }
        }
      },
      "Unauthorized": {
        "description": "Missing or invalid API key.",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/ErrorResponse"
            }
          }
        }
      },
      "Forbidden": {
        "description": "Plan restriction or historical lookback limit.",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/ErrorResponse"
            }
          }
        }
      },
      "NotFound": {
        "description": "Requested market data was not found.",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/ErrorResponse"
            }
          }
        }
      },
      "RateLimited": {
        "description": "Rate limit exceeded.",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/ErrorResponse"
            }
          }
        }
      },
      "Error": {
        "description": "Error response envelope.",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/ErrorResponse"
            }
          }
        }
      }
    },
    "schemas": {
      "StatusOk": {
        "type": "string",
        "enum": ["OK"]
      },
      "RequestId": {
        "type": "string",
        "description": "CuteMarkets request identifier.",
        "example": "cm_a1b2c3d4e5f6478990a1b2c3d4e5f678"
      },
      "PaginationFields": {
        "type": "object",
        "properties": {
          "next_url": {
            "type": "string",
            "format": "uri",
            "description": "Full URL for the next page when more data exists."
          }
        }
      },
      "OptionChainResponse": {
        "allOf": [
          {
            "$ref": "#/components/schemas/PaginationFields"
          },
          {
            "type": "object",
            "required": ["status", "request_id", "results"],
            "properties": {
              "status": {
                "$ref": "#/components/schemas/StatusOk"
              },
              "request_id": {
                "$ref": "#/components/schemas/RequestId"
              },
              "results": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/OptionSnapshot"
                }
              },
              "results_count": {
                "type": "integer"
              }
            },
            "additionalProperties": true
          }
        ]
      },
      "OptionSnapshotResponse": {
        "type": "object",
        "required": ["status", "request_id", "results"],
        "properties": {
          "status": {
            "$ref": "#/components/schemas/StatusOk"
          },
          "request_id": {
            "$ref": "#/components/schemas/RequestId"
          },
          "results": {
            "$ref": "#/components/schemas/OptionSnapshot"
          }
        },
        "additionalProperties": true
      },
      "OptionSnapshot": {
        "type": "object",
        "properties": {
          "break_even_price": {
            "type": "number"
          },
          "day": {
            "$ref": "#/components/schemas/OptionDay"
          },
          "details": {
            "$ref": "#/components/schemas/OptionSnapshotDetails"
          },
          "greeks": {
            "$ref": "#/components/schemas/Greeks"
          },
          "implied_volatility": {
            "type": "number"
          },
          "last_quote": {
            "$ref": "#/components/schemas/SnapshotQuote"
          },
          "last_trade": {
            "$ref": "#/components/schemas/SnapshotTrade"
          },
          "open_interest": {
            "type": "number"
          },
          "underlying_asset": {
            "$ref": "#/components/schemas/UnderlyingAsset"
          },
          "fmv": {
            "type": "number"
          },
          "fmv_last_updated": {
            "type": "integer",
            "format": "int64"
          }
        },
        "additionalProperties": true
      },
      "OptionDay": {
        "type": "object",
        "properties": {
          "open": {
            "type": "number"
          },
          "high": {
            "type": "number"
          },
          "low": {
            "type": "number"
          },
          "close": {
            "type": "number"
          },
          "previous_close": {
            "type": "number"
          },
          "change": {
            "type": "number"
          },
          "change_percent": {
            "type": "number"
          },
          "volume": {
            "type": "number"
          },
          "vwap": {
            "type": "number"
          },
          "last_updated": {
            "type": "integer",
            "format": "int64",
            "description": "Nanosecond Unix timestamp."
          }
        },
        "additionalProperties": true
      },
      "OptionSnapshotDetails": {
        "type": "object",
        "properties": {
          "ticker": {
            "type": "string",
            "example": "O:NFLX260402C00075000"
          },
          "contract_type": {
            "type": "string",
            "enum": ["call", "put", "other"]
          },
          "exercise_style": {
            "type": "string",
            "enum": ["american", "european", "bermudan"]
          },
          "expiration_date": {
            "type": "string",
            "format": "date"
          },
          "strike_price": {
            "type": "number"
          },
          "shares_per_contract": {
            "type": "number"
          }
        },
        "additionalProperties": true
      },
      "Greeks": {
        "type": "object",
        "properties": {
          "delta": {
            "type": "number"
          },
          "gamma": {
            "type": "number"
          },
          "theta": {
            "type": "number"
          },
          "vega": {
            "type": "number"
          }
        },
        "additionalProperties": true
      },
      "SnapshotQuote": {
        "type": "object",
        "properties": {
          "ask": {
            "type": "number"
          },
          "ask_size": {
            "type": "number"
          },
          "ask_exchange": {
            "type": "integer"
          },
          "bid": {
            "type": "number"
          },
          "bid_size": {
            "type": "number"
          },
          "bid_exchange": {
            "type": "integer"
          },
          "midpoint": {
            "type": "number"
          },
          "last_updated": {
            "type": "integer",
            "format": "int64"
          },
          "timeframe": {
            "type": "string",
            "example": "REAL-TIME"
          }
        },
        "additionalProperties": true
      },
      "SnapshotTrade": {
        "type": "object",
        "properties": {
          "sip_timestamp": {
            "type": "integer",
            "format": "int64"
          },
          "conditions": {
            "type": "array",
            "items": {
              "type": "integer"
            }
          },
          "price": {
            "type": "number"
          },
          "size": {
            "type": "number"
          },
          "exchange": {
            "type": "integer"
          },
          "timeframe": {
            "type": "string",
            "example": "REAL-TIME"
          }
        },
        "additionalProperties": true
      },
      "UnderlyingAsset": {
        "type": "object",
        "properties": {
          "ticker": {
            "type": "string",
            "example": "NFLX"
          },
          "price": {
            "type": "number"
          },
          "change_to_break_even": {
            "type": "number"
          },
          "last_updated": {
            "type": "integer",
            "format": "int64"
          },
          "timeframe": {
            "type": "string",
            "example": "DELAYED"
          }
        },
        "additionalProperties": true
      },
      "ContractsListResponse": {
        "allOf": [
          {
            "$ref": "#/components/schemas/PaginationFields"
          },
          {
            "type": "object",
            "required": ["status", "request_id", "results"],
            "properties": {
              "status": {
                "$ref": "#/components/schemas/StatusOk"
              },
              "request_id": {
                "$ref": "#/components/schemas/RequestId"
              },
              "results": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/Contract"
                }
              },
              "results_count": {
                "type": "integer"
              }
            },
            "additionalProperties": true
          }
        ]
      },
      "ContractDetailResponse": {
        "type": "object",
        "required": ["status", "request_id", "results"],
        "properties": {
          "status": {
            "$ref": "#/components/schemas/StatusOk"
          },
          "request_id": {
            "$ref": "#/components/schemas/RequestId"
          },
          "results": {
            "$ref": "#/components/schemas/Contract"
          }
        },
        "additionalProperties": true
      },
      "Contract": {
        "type": "object",
        "properties": {
          "ticker": {
            "type": "string",
            "example": "O:NFLX260402C00075000"
          },
          "underlying_ticker": {
            "type": "string",
            "example": "NFLX"
          },
          "contract_type": {
            "type": "string",
            "enum": ["call", "put", "other"]
          },
          "exercise_style": {
            "type": "string",
            "enum": ["american", "european", "bermudan"]
          },
          "expiration_date": {
            "type": "string",
            "format": "date"
          },
          "strike_price": {
            "type": "number"
          },
          "shares_per_contract": {
            "type": "number"
          },
          "primary_exchange": {
            "type": "string"
          },
          "cfi": {
            "type": "string"
          },
          "correction": {
            "type": "integer"
          },
          "additional_underlyings": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/AdditionalUnderlying"
            }
          }
        },
        "additionalProperties": true
      },
      "AdditionalUnderlying": {
        "type": "object",
        "properties": {
          "underlying": {
            "type": "string"
          },
          "type": {
            "type": "string"
          },
          "amount": {
            "type": "number"
          }
        },
        "additionalProperties": true
      },
      "TradesListResponse": {
        "allOf": [
          {
            "$ref": "#/components/schemas/PaginationFields"
          },
          {
            "type": "object",
            "required": ["status", "request_id", "results"],
            "properties": {
              "status": {
                "$ref": "#/components/schemas/StatusOk"
              },
              "request_id": {
                "$ref": "#/components/schemas/RequestId"
              },
              "results": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/Trade"
                }
              },
              "results_count": {
                "type": "integer"
              }
            },
            "additionalProperties": true
          }
        ]
      },
      "Trade": {
        "type": "object",
        "properties": {
          "sip_timestamp": {
            "type": "integer",
            "format": "int64"
          },
          "participant_timestamp": {
            "type": "integer",
            "format": "int64"
          },
          "price": {
            "type": "number"
          },
          "size": {
            "type": "number"
          },
          "exchange": {
            "type": "integer"
          },
          "conditions": {
            "type": "array",
            "items": {
              "type": "integer"
            }
          },
          "correction": {
            "type": "integer"
          },
          "id": {
            "type": "string"
          },
          "sequence_number": {
            "type": "integer",
            "format": "int64"
          },
          "decimal_size": {
            "type": "string"
          }
        },
        "additionalProperties": true
      },
      "LastTradeResponse": {
        "type": "object",
        "required": ["status", "request_id", "results"],
        "properties": {
          "status": {
            "$ref": "#/components/schemas/StatusOk"
          },
          "request_id": {
            "$ref": "#/components/schemas/RequestId"
          },
          "results": {
            "$ref": "#/components/schemas/LastTrade"
          }
        },
        "additionalProperties": true
      },
      "LastTrade": {
        "type": "object",
        "properties": {
          "T": {
            "type": "string",
            "description": "Option contract symbol."
          },
          "p": {
            "type": "number",
            "description": "Trade price."
          },
          "s": {
            "type": "number",
            "description": "Trade size."
          },
          "t": {
            "type": "integer",
            "format": "int64",
            "description": "SIP nanosecond Unix timestamp."
          },
          "x": {
            "type": "integer",
            "description": "Exchange id."
          },
          "c": {
            "type": "array",
            "items": {
              "type": "integer"
            },
            "description": "Condition codes."
          },
          "y": {
            "type": "integer",
            "format": "int64"
          },
          "f": {
            "type": "integer",
            "format": "int64"
          },
          "r": {
            "type": "integer"
          },
          "i": {
            "type": "string"
          },
          "q": {
            "type": "integer",
            "format": "int64"
          },
          "e": {
            "type": "integer"
          },
          "z": {
            "type": "integer"
          },
          "ds": {
            "type": "string"
          }
        },
        "additionalProperties": true
      },
      "QuotesListResponse": {
        "allOf": [
          {
            "$ref": "#/components/schemas/PaginationFields"
          },
          {
            "type": "object",
            "required": ["status", "request_id", "results"],
            "properties": {
              "status": {
                "$ref": "#/components/schemas/StatusOk"
              },
              "request_id": {
                "$ref": "#/components/schemas/RequestId"
              },
              "results": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/Quote"
                }
              },
              "results_count": {
                "type": "integer"
              }
            },
            "additionalProperties": true
          }
        ]
      },
      "Quote": {
        "type": "object",
        "properties": {
          "bid_price": {
            "type": "number"
          },
          "ask_price": {
            "type": "number"
          },
          "bid_size": {
            "type": "number"
          },
          "ask_size": {
            "type": "number"
          },
          "bid_exchange": {
            "type": "integer"
          },
          "ask_exchange": {
            "type": "integer"
          },
          "sequence_number": {
            "type": "integer",
            "format": "int64"
          },
          "sip_timestamp": {
            "type": "integer",
            "format": "int64"
          }
        },
        "additionalProperties": true
      },
      "AggregatesResponse": {
        "allOf": [
          {
            "$ref": "#/components/schemas/PaginationFields"
          },
          {
            "type": "object",
            "required": ["status", "request_id", "results"],
            "properties": {
              "status": {
                "$ref": "#/components/schemas/StatusOk"
              },
              "request_id": {
                "$ref": "#/components/schemas/RequestId"
              },
              "ticker": {
                "type": "string",
                "example": "O:NFLX260402C00075000"
              },
              "adjusted": {
                "type": "boolean"
              },
              "queryCount": {
                "type": "integer"
              },
              "resultsCount": {
                "type": "integer"
              },
              "count": {
                "type": "integer"
              },
              "results": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/AggregateBar"
                }
              }
            },
            "additionalProperties": true
          }
        ]
      },
      "AggregateBar": {
        "type": "object",
        "properties": {
          "T": {
            "type": "string",
            "description": "Contract ticker, present on some aggregate responses."
          },
          "o": {
            "type": "number",
            "description": "Open price."
          },
          "h": {
            "type": "number",
            "description": "High price."
          },
          "l": {
            "type": "number",
            "description": "Low price."
          },
          "c": {
            "type": "number",
            "description": "Close price."
          },
          "v": {
            "type": "number",
            "description": "Volume."
          },
          "vw": {
            "type": "number",
            "description": "Volume-weighted average price."
          },
          "t": {
            "type": "integer",
            "format": "int64",
            "description": "Bar start timestamp in milliseconds."
          },
          "n": {
            "type": "integer",
            "description": "Number of trades."
          }
        },
        "additionalProperties": true
      },
      "OpenCloseResponse": {
        "type": "object",
        "required": ["status", "request_id", "symbol", "from"],
        "properties": {
          "status": {
            "$ref": "#/components/schemas/StatusOk"
          },
          "request_id": {
            "$ref": "#/components/schemas/RequestId"
          },
          "symbol": {
            "type": "string",
            "example": "O:NFLX260402C00075000"
          },
          "from": {
            "type": "string",
            "format": "date"
          },
          "open": {
            "type": "number"
          },
          "high": {
            "type": "number"
          },
          "low": {
            "type": "number"
          },
          "close": {
            "type": "number"
          },
          "volume": {
            "type": "number"
          },
          "preMarket": {
            "type": "number"
          },
          "afterHours": {
            "type": "number"
          },
          "otc": {
            "type": "boolean"
          },
          "adjusted": {
            "type": "boolean"
          }
        },
        "additionalProperties": true
      },
      "IndicatorResponse": {
        "allOf": [
          {
            "$ref": "#/components/schemas/PaginationFields"
          },
          {
            "type": "object",
            "required": ["status", "request_id", "results"],
            "properties": {
              "status": {
                "$ref": "#/components/schemas/StatusOk"
              },
              "request_id": {
                "$ref": "#/components/schemas/RequestId"
              },
              "results": {
                "$ref": "#/components/schemas/IndicatorPayload"
              }
            },
            "additionalProperties": true
          }
        ]
      },
      "MacdIndicatorResponse": {
        "allOf": [
          {
            "$ref": "#/components/schemas/PaginationFields"
          },
          {
            "type": "object",
            "required": ["status", "request_id", "results"],
            "properties": {
              "status": {
                "$ref": "#/components/schemas/StatusOk"
              },
              "request_id": {
                "$ref": "#/components/schemas/RequestId"
              },
              "results": {
                "$ref": "#/components/schemas/MacdIndicatorPayload"
              }
            },
            "additionalProperties": true
          }
        ]
      },
      "IndicatorPayload": {
        "type": "object",
        "properties": {
          "values": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/IndicatorValue"
            }
          },
          "underlying": {
            "$ref": "#/components/schemas/ExpandedUnderlying"
          }
        },
        "additionalProperties": true
      },
      "MacdIndicatorPayload": {
        "type": "object",
        "properties": {
          "values": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/MacdIndicatorValue"
            }
          },
          "underlying": {
            "$ref": "#/components/schemas/ExpandedUnderlying"
          }
        },
        "additionalProperties": true
      },
      "IndicatorValue": {
        "type": "object",
        "properties": {
          "timestamp": {
            "type": "integer",
            "format": "int64",
            "description": "Millisecond Unix timestamp."
          },
          "value": {
            "type": "number"
          }
        },
        "additionalProperties": true
      },
      "MacdIndicatorValue": {
        "type": "object",
        "properties": {
          "timestamp": {
            "type": "integer",
            "format": "int64",
            "description": "Millisecond Unix timestamp."
          },
          "value": {
            "type": "number",
            "description": "MACD line."
          },
          "signal": {
            "type": "number",
            "description": "Signal line."
          },
          "histogram": {
            "type": "number",
            "description": "MACD histogram."
          }
        },
        "additionalProperties": true
      },
      "ExpandedUnderlying": {
        "type": "object",
        "properties": {
          "aggregates": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/AggregateBar"
            }
          },
          "url": {
            "type": "string",
            "format": "uri"
          }
        },
        "additionalProperties": true
      },
      "TickerSearchResponse": {
        "type": "object",
        "required": ["status", "request_id", "results"],
        "properties": {
          "status": {
            "$ref": "#/components/schemas/StatusOk"
          },
          "request_id": {
            "$ref": "#/components/schemas/RequestId"
          },
          "results": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/TickerSearchResult"
            }
          }
        },
        "additionalProperties": true
      },
      "TickerSearchResult": {
        "type": "object",
        "properties": {
          "symbol": {
            "type": "string",
            "example": "NFLX"
          },
          "name": {
            "type": "string",
            "example": "NetFlix Inc"
          }
        },
        "additionalProperties": true
      },
      "ExpirationsResponse": {
        "type": "object",
        "required": ["status", "request_id", "ticker", "results"],
        "properties": {
          "status": {
            "$ref": "#/components/schemas/StatusOk"
          },
          "request_id": {
            "$ref": "#/components/schemas/RequestId"
          },
          "ticker": {
            "type": "string",
            "example": "NFLX"
          },
          "results": {
            "type": "array",
            "items": {
              "type": "string",
              "format": "date"
            }
          }
        },
        "additionalProperties": true
      },
      "ErrorResponse": {
        "type": "object",
        "required": ["status", "request_id", "error"],
        "properties": {
          "status": {
            "type": "string",
            "enum": ["ERROR"]
          },
          "request_id": {
            "$ref": "#/components/schemas/RequestId"
          },
          "error": {
            "$ref": "#/components/schemas/ApiError"
          }
        },
        "additionalProperties": true
      },
      "ApiError": {
        "type": "object",
        "required": ["code", "message"],
        "properties": {
          "code": {
            "type": "string",
            "enum": [
              "bad_request",
              "invalid_page_token",
              "unauthorized",
              "forbidden",
              "lookback_exceeded",
              "not_found",
              "rate_limit_exceeded"
            ]
          },
          "message": {
            "type": "string"
          }
        },
        "additionalProperties": true
      }
    }
  }
}
