{"record":{"id":"01bcc40498fc8286","repo":"OpenBB-finance/OpenBB","slug":"invalid-deribit-symbol-supported-symbols-are","errorCode":null,"errorMessage":"Invalid Deribit symbol. Supported symbols are: {', '.join(DERIBIT_OPTIONS_SYMBOLS)}","messagePattern":"Invalid Deribit symbol\\. Supported symbols are: (.+?)","errorType":"validation","errorClass":"ValueError","httpStatus":null,"severity":"error","filePath":"openbb_platform/providers/deribit/openbb_deribit/models/options_chains.py","lineNumber":34,"sourceCode":"from pydantic import Field, field_validator\n\n\nclass DeribitOptionsChainsQueryParams(OptionsChainsQueryParams):\n    \"\"\"Deribit Options Chains Query Parameters Model.\"\"\"\n\n    __json_schema_extra__ = {\n        \"symbol\": {\n            \"multiple_items_allowed\": False,\n            \"choices\": DERIBIT_OPTIONS_SYMBOLS,\n        }\n    }\n\n    @field_validator(\"symbol\", mode=\"before\", check_fields=False)\n    @classmethod\n    def _validate_symbol(cls, v):\n        \"\"\"Validate the symbol.\"\"\"\n        if v.upper() not in DERIBIT_OPTIONS_SYMBOLS:\n            raise ValueError(\n                f\"Invalid Deribit symbol. Supported symbols are: {', '.join(DERIBIT_OPTIONS_SYMBOLS)}\",\n            )\n        return v\n\n\nclass DeribitOptionsChainsData(OptionsChainsData):\n    \"\"\"Deribit Options Chains Data Model.\"\"\"\n\n    __alias_dict__ = {\n        \"contract_symbol\": \"instrument_name\",\n        \"change_percent\": \"price_change\",\n        \"underlying_symbol\": \"underlying_index\",\n        \"underlying_spot_price\": \"index_price\",\n        \"bid_size\": \"best_bid_amount\",\n        \"ask_size\": \"best_ask_amount\",\n        \"bid\": \"best_bid_price\",\n        \"ask\": \"best_ask_price\",\n        \"implied_volatility\": \"mark_iv\",","sourceCodeStart":16,"sourceCodeEnd":52,"githubUrl":"https://github.com/OpenBB-finance/OpenBB/blob/3e071fcc2cd9f891cac6040ae60296dba76dab46/openbb_platform/providers/deribit/openbb_deribit/models/options_chains.py#L16-L52","documentation":"ValueError from DeribitOptionsChainsQueryParams._validate_symbol when the uppercased symbol is not one of the six Deribit option underlyings: BTC, ETH, SOL, XRP, BNB, PAXG. This is a static allow-list (unlike the futures models which fetch symbols live), so it fails fast with no network dependency.","triggerScenarios":"Passing 'BTCUSDT', 'AVAX', 'DOGE', or any underlying Deribit does not list options for. Lowercase input is fine (validator calls .upper()), but any non-listed asset fails.","commonSituations":"Assuming Deribit lists options for every crypto asset, reusing symbols from other option providers, or copy-paste of exchange-pair formats.","solutions":["Use one of: BTC, ETH, SOL, XRP, BNB, PAXG.","Note BNB, PAXG, SOL, XRP options are quoted in USDC internally — pass the underlying, not 'USDC'.","Check the JSON schema choices via the query model's __json_schema_extra__ if building a dynamic UI."],"exampleFix":"# before\nobb.derivatives.options.chains(symbol=\"AVAX\", provider=\"deribit\")\n\n# after\nobb.derivatives.options.chains(symbol=\"BTC\", provider=\"deribit\")","handlingStrategy":"validation","validationCode":"DERIBIT_OPTION_UNDERLYINGS = {\"BTC\", \"ETH\", \"SOL\", \"XRP\", \"BNB\", \"PAXG\"}\nsym = sym.strip().upper()\nassert sym in DERIBIT_OPTION_UNDERLYINGS, f\"use one of {sorted(DERIBIT_OPTION_UNDERLYINGS)}\"","typeGuard":"from typing import Literal, TypeGuard\nOptionsUnderlying = Literal[\"BTC\", \"ETH\", \"SOL\", \"XRP\", \"BNB\", \"PAXG\"]\n\ndef is_options_underlying(s: str) -> TypeGuard[OptionsUnderlying]:\n    return s.strip().upper() in {\"BTC\", \"ETH\", \"SOL\", \"XRP\", \"BNB\", \"PAXG\"}","tryCatchPattern":null,"preventionTips":["Expose the six underlyings as a dropdown/enum in UIs instead of free text.","Pass the underlying asset only — never pair names like BTCUSDT.","Upper-case user input before the call."],"tags":["deribit","options","validation","symbol","allow-list"],"backgroundTag":null,"analyzedSha":"3e071fcc2cd9f891cac6040ae60296dba76dab46","analyzedAt":"2026-08-14T23:40:48.960Z","schemaVersion":2},"datasetVersion":"2026-08-15T17:31:12.345Z"}