{"record":{"id":"6c89722745422766","repo":"nautechsystems/nautilus_trader","slug":"no-rpc-url-provided-for-set-rpc-url-infura","errorCode":null,"errorMessage":"No RPC URL provided for {}. Set --rpc-url, INFURA_API_KEY, or RPC_HTTP_URL","messagePattern":"No RPC URL provided for (.+?)\\. Set --rpc-url, INFURA_API_KEY, or RPC_HTTP_URL","errorType":"validation","errorClass":"anyhow::Error","httpStatus":null,"severity":"error","filePath":"crates/cli/src/blockchain/analyze.rs","lineNumber":560,"sourceCode":"            .map(ToString::to_string)\n            .collect::<Vec<_>>()\n            .join(\", \");\n        anyhow::bail!(\n            \"DEX '{dex_type}' on chain '{}' cannot be analyzed: missing pool-event parser(s) for {families}. \\\n             Pool analysis needs Initialize, Swap, Mint, Burn, and Collect parsers.\",\n            chain.name\n        );\n    }\n\n    Ok(())\n}\n\nfn rpc_http_url(chain: &Chain, rpc_url: Option<String>) -> anyhow::Result<String> {\n    rpc_url\n        .or_else(|| check_infura_rpc_provider(&chain.name))\n        .or_else(|| std::env::var(\"RPC_HTTP_URL\").ok())\n        .ok_or_else(|| {\n            anyhow::anyhow!(\n                \"No RPC URL provided for {}. Set --rpc-url, INFURA_API_KEY, or RPC_HTTP_URL\",\n                chain.name\n            )\n        })\n}\n\nasync fn resolve_to_block(data_client: &BlockchainDataClientCore, to_block: Option<u64>) -> u64 {\n    match to_block {\n        Some(block) => block,\n        None => data_client.hypersync_client.current_block().await,\n    }\n}\n\nfn load_pool_addresses(\n    addresses: Vec<String>,\n    addresses_file: Option<String>,\n) -> anyhow::Result<Vec<String>> {\n    let mut pool_addresses = addresses;","sourceCodeStart":542,"sourceCodeEnd":578,"githubUrl":"https://github.com/nautechsystems/nautilus_trader/blob/18893faf8b356be3320add8de2f861b0b647cf06/crates/cli/src/blockchain/analyze.rs#L542-L578","documentation":"Thrown by rpc_http_url when no HTTP RPC endpoint can be resolved for the chain from any of three sources: the --rpc-url CLI argument, the Infura provider lookup via INFURA_API_KEY, or the RPC_HTTP_URL environment variable. The client cannot be created without an endpoint.","triggerScenarios":"Calling create_data_client -> rpc_http_url with rpc_url=None while check_infura_rpc_provider returns None and the RPC_HTTP_URL env var is unset.","commonSituations":"Forgetting --rpc-url on the CLI; INFURA_API_KEY not exported in the shell/CI environment; using a chain not served by the default Infura provider while RPC_HTTP_URL is unset; running in a container without env passthrough.","solutions":["Pass --rpc-url <https://...> explicitly on the command line.","Export INFURA_API_KEY so check_infura_rpc_provider can build an Infura URL for the chain.","Set the RPC_HTTP_URL environment variable to an HTTP(S) RPC endpoint for the chain.","If using a private node, confirm the URL is reachable and uses http(s):// scheme."],"exampleFix":"// before\nRPC_HTTP_URL= nautilusctl blockchain analyze-pool --chain polygon --dex quickswap\n// after\nexport RPC_HTTP_URL=https://polygon-rpc.com\nnautilusctl blockchain analyze-pool --chain polygon --dex quickswap","handlingStrategy":"validation","validationCode":"let rpc = rpc_url.clone()\n    .or_else(|| std::env::var(\"INFURA_API_KEY\").ok().map(|_| \"infura\".to_string()))\n    .or_else(|| std::env::var(\"RPC_HTTP_URL\").ok());\nif rpc.is_none() {\n    eprintln!(\"set --rpc-url, INFURA_API_KEY, or RPC_HTTP_URL for {}\", chain.name);\n    std::process::exit(2);\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Check INFURA_API_KEY and RPC_HTTP_URL are exported in the execution environment (CI, cron, containers).","Always pass --rpc-url in scripted/automated runs to avoid env dependence.","Use a .env file loaded by the wrapper script for local runs.","Ensure the env var is forwarded through docker/systemd/sudo (sudo strips env by default)."],"tags":["cli","configuration","rpc","network"],"backgroundTag":"missing-env-var","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"}