{"record":{"id":"184ee0bf0ae5a93e","repo":"nautechsystems/nautilus_trader","slug":"dex-dex-id-doesn-t-exist-for-chain","errorCode":null,"errorMessage":"Dex {dex_id} doesn't exist for chain {}","messagePattern":"Dex (.+?) doesn't exist for chain (.+?)","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"crates/adapters/blockchain/src/data/core.rs","lineNumber":2402,"sourceCode":"        Ok(())\n    }\n\n    /// Determines the starting block for syncing operations.\n    fn determine_from_block(&self) -> u64 {\n        self.config\n            .from_block\n            .unwrap_or_else(|| self.cache.min_dex_creation_block().unwrap_or(0))\n    }\n\n    /// Retrieves extended DEX information for a registered DEX.\n    fn get_dex_extended(&self, dex_id: &DexType) -> anyhow::Result<&DexExtended> {\n        if !self.cache.get_registered_dexes().contains(dex_id) {\n            anyhow::bail!(\"DEX {dex_id} is not registered in the data client\");\n        }\n\n        match get_dex_extended(self.chain.name, dex_id) {\n            Some(dex) => Ok(dex),\n            None => anyhow::bail!(\"Dex {dex_id} doesn't exist for chain {}\", self.chain.name),\n        }\n    }\n\n    /// Retrieves a pool from the cache by its address.\n    ///\n    /// # Errors\n    ///\n    /// Returns an error if the pool is not registered in the cache.\n    pub fn get_pool(&self, pool_identifier: &PoolIdentifier) -> anyhow::Result<&SharedPool> {\n        match self.cache.get_pool(pool_identifier) {\n            Some(pool) => Ok(pool),\n            None => anyhow::bail!(\"Pool {pool_identifier} is not registered\"),\n        }\n    }\n\n    /// Sends a data event to all subscribers through the data channel.\n    pub fn send_data(&self, data: DataEvent) {\n        if let Some(data_tx) = &self.data_tx {","sourceCodeStart":2384,"sourceCodeEnd":2420,"githubUrl":"https://github.com/nautechsystems/nautilus_trader/blob/18893faf8b356be3320add8de2f861b0b647cf06/crates/adapters/blockchain/src/data/core.rs#L2384-L2420","documentation":"After confirming the DEX is registered, get_dex_extended looks up static extended metadata (DexExtended) for the (chain, dex) pair and bails when no such entry exists. This means the DEX is known to the client but has no definition for the configured chain — an unsupported chain/DEX combination.","triggerScenarios":"Calling get_dex_extended (directly or via sync_pool_events, sync_exchange_pools, register_dex, construct_pool_profiler_from_hypersync_rpc) with a DEX registered for the client but not present in the static DEX catalog for self.chain.name.","commonSituations":"Configuring a DEX on a chain where it does not exist (e.g. a DEX only deployed on mainnet configured for an L2); adding a new DEX to config before the catalog/adapter ships support for it; wrong chain name in client construction.","solutions":["Verify the DEX is supported on the configured chain and remove it if not","Correct the chain name used to construct the data client","Add/extend the DEX catalog entry for this chain if you are developing the adapter","Use a chain-DEX compatibility list in config validation at startup"],"exampleFix":"// before: assuming dex works on any chain\nlet dex = get_dex_extended(\"arbitrum\", &dex_id).expect(\"dex exists\");\n// after: check support first\nmatch get_dex_extended(chain.name, &dex_id) {\n    Some(dex) => Ok(dex),\n    None => bail!(\"Dex {dex_id} unsupported on chain {}\", chain.name),\n}","handlingStrategy":"validation","validationCode":"let supported = get_dex_extended(chain_name, dex_id).is_some();\nif !supported {\n    return Err(anyhow!(\"dex {dex_id} unsupported on {chain_name}\"));\n}","typeGuard":"fn dex_supports_chain(chain: &str, dex_id: &DexType) -> bool {\n    get_dex_extended(chain, dex_id).is_some()\n}","tryCatchPattern":"match client.sync_exchange_pools(&dex_id, ...) {\n    Err(e) if e.to_string().contains(\"doesn't exist for chain\") => {\n        tracing::warn!(\"skipping {dex_id}: unsupported on this chain\");\n        Ok(())\n    }\n    other => other,\n}","preventionTips":["Keep a chain/DEX compatibility list and validate config against it at startup","Verify the chain name used to construct the client","Confirm adapter catalog support before enabling a new DEX"],"tags":["blockchain","dex","unsupported","chain"],"backgroundTag":"entity-not-found","analyzedSha":"18893faf8b356be3320add8de2f861b0b647cf06","analyzedAt":"2026-09-08T20:49:34.690Z","contentChangedAt":"2026-09-08T20:49:34.690Z","schemaVersion":2},"datasetVersion":"2026-09-14T00:17:10.932Z"}