{"record":{"id":"ece6318fea77c5bf","repo":"OpenBB-finance/OpenBB","slug":"the-response-was-returned-empty","errorCode":null,"errorMessage":"The response was returned empty.","messagePattern":"The response was returned empty\\.","errorType":"exception","errorClass":"EmptyDataError","httpStatus":null,"severity":"warning","filePath":"openbb_platform/providers/cboe/openbb_cboe/models/futures_curve.py","lineNumber":90,"sourceCode":"        credentials: dict[str, str] | None,\n        **kwargs: Any,\n    ) -> list[dict]:\n        \"\"\"Return the raw data from the CBOE endpoint.\"\"\"\n        # pylint: disable=import-outside-toplevel\n        from openbb_cboe.utils.vix import get_vx_by_date, get_vx_current\n\n        symbol = \"am\" if query.symbol == \"VX_AM\" else \"eod\"\n        if query.date is not None:\n            data = await get_vx_by_date(\n                date=query.date,  # type: ignore\n                vx_type=symbol,\n                use_cache=False,\n            )\n        else:\n            data = await get_vx_current(vx_type=symbol, use_cache=False)\n\n        if data.empty:\n            raise EmptyDataError(\"The response was returned empty.\")\n\n        return data.to_dict(\"records\")\n\n    @staticmethod\n    def transform_data(\n        query: CboeFuturesCurveQueryParams,\n        data: list[dict],\n        **kwargs: Any,\n    ) -> list[CboeFuturesCurveData]:\n        \"\"\"Transform data.\"\"\"\n        return [CboeFuturesCurveData.model_validate(d) for d in data]\n","sourceCodeStart":72,"sourceCodeEnd":102,"githubUrl":"https://github.com/OpenBB-finance/OpenBB/blob/3e071fcc2cd9f891cac6040ae60296dba76dab46/openbb_platform/providers/cboe/openbb_cboe/models/futures_curve.py#L72-L102","documentation":"Raised by the Cboe futures_curve fetcher when the DataFrame returned by get_vx_current/get_vx_by_date (Cboe volatility futures, VX) is empty. The helper downloads the VX EOD or AM settlement file; an empty frame means no settlement rows for the requested symbol type or date. It is an EmptyDataError.","triggerScenarios":"Calling obb.derivatives.futures.curve(symbol='VX', provider='cboe', date=...) where the date is a non-trading day, a date with no published settlement, or before the VX_AM data starts; querying on a weekend/holiday without a date (stale empty cache file).","commonSituations":"Weekend/holiday queries; historical dates predating the selected vx_type; Cboe feed files briefly empty right after rollover.","solutions":["Use a recent trading day for the date parameter","Try the other symbol variant (VX_AM vs VX/eod)","Retry later if querying intraday during feed publication windows","Catch EmptyDataError and report 'no settlement data for this date'"],"exampleFix":"// before\ncurve = obb.derivatives.futures.curve(symbol='VX', provider='cboe', date='2026-08-09')  # Sunday -> EmptyDataError\n\n// after\ncurve = obb.derivatives.futures.curve(symbol='VX', provider='cboe', date='2026-08-13')  # trading day","handlingStrategy":"validation","validationCode":"from pandas.tseries.holiday import USFederalHolidayCalendar\nfrom datetime import datetime, timedelta\n\ndef last_trading_day() -> str:\n    cal = USFederalHolidayCalendar()\n    d = datetime.now() - timedelta(days=1)\n    holidays = cal.holidays(start=d - timedelta(days=10), end=d)\n    while d.weekday() >= 5 or d in holidays:\n        d -= timedelta(days=1)\n    return d.strftime('%Y-%m-%d')","typeGuard":null,"tryCatchPattern":"try:\n    curve = obb.derivatives.futures.curve(symbol='VX', provider='cboe', date=d)\nexcept EmptyDataError:\n    curve = None  # no settlement published for this date/type","preventionTips":["Only pass trading-day dates to the date parameter","Alternate between VX and VX_AM when one has no data","Avoid querying during settlement publication windows"],"tags":["cboe","futures","volatility","empty-data"],"backgroundTag":null,"analyzedSha":"3e071fcc2cd9f891cac6040ae60296dba76dab46","analyzedAt":"2026-08-14T23:40:48.960Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}