nautechsystems/nautilus_trader · error
Polymarket CLOB protocol version {version} is unsupported; a
Error message
Polymarket CLOB protocol version {version} is unsupported; adapter supports V2 only What it means
On connect, the adapter queries the Polymarket CLOB API for its protocol version and refuses to proceed unless it equals SUPPORTED_CLOB_VERSION (V2). This guard prevents the adapter from speaking an incompatible protocol against a changed server API. The error surfaces the server-reported version so the mismatch is diagnosable.
Source
Thrown at crates/adapters/polymarket/src/execution/lifecycle.rs:672
}
self.stopping.store(false, Ordering::Release);
let ws_shutdown = self.ws_client.shutdown_handle();
let stopping = Arc::clone(&self.stopping);
let setup_guard =
TaskGroupGuard::new(&[&self.session_tasks, &self.pending_tasks], move || {
stopping.store(true, Ordering::Release);
ws_shutdown.begin_shutdown();
});
let version = self
.http_client
.get_version()
.await
.context("failed to query Polymarket CLOB protocol version")?
.version;
if version != SUPPORTED_CLOB_VERSION {
anyhow::bail!(
"Polymarket CLOB protocol version {version} is unsupported; adapter supports V2 only"
);
}
self.load_instruments_from_cache();
self.load_orders_from_cache();
self.core.set_instruments_initialized();
if let Err(e) = self.start_ws_stream().await {
if let Err(teardown_error) = self.teardown_partial_connect().await {
return Err(e.context(format!(
"Polymarket startup teardown failed: {teardown_error}"
)));
}
return Err(e);
}
self.ensure_order_event_subscription();
self.ensure_position_event_subscription();View on GitHub (pinned to 18893faf8b)
Solutions
- Check the reported version in the message against SUPPORTED_CLOB_VERSION in the adapter
- Upgrade the nautilus polymarket adapter crate to a version supporting the server's protocol version
- Verify the configured CLOB API base URL points at the production V2 endpoint
- If the server regressed or is staging, point the adapter at an environment running V2
- Track Polymarket API release notes for protocol version changes
Example fix
// before let adapter = PolymarketExecutionClient::new(clob_url: "https://staging-clob.polymarket.com", ...); // after let adapter = PolymarketExecutionClient::new(clob_url: "https://clob.polymarket.com", ...); // V2 endpoint
Defensive patterns
Strategy: validation
Validate before calling
let version = clob_client.get_version().await?.version;
if version != "V2" {
anyhow::bail!("CLOB endpoint reports {version}; adapter requires V2 - check base URL or upgrade adapter");
} Try / catch
match adapter.connect().await {
Err(e) if e.to_string().contains("unsupported") => {
error!("protocol version mismatch: {e:#}");
// halt trading; require config or crate upgrade
}
Err(e) => return Err(e),
Ok(_) => {},
} Prevention
- Pin the adapter to a Polymarket API version and check release notes on upgrades
- Use the production clob.polymarket.com endpoint unless deliberately testing
- Add a startup version preflight check before initializing the adapter
- Alert on this error in production - it means server/client protocol drift
When it happens
Trigger: connect_client -> get_version() returns a version string other than V2 (e.g. V1, V3, or an unexpected value) during adapter connect.
Common situations: Polymarket deploys a new CLOB protocol version; pointing the adapter at a test/staging endpoint running a different version; pinned old adapter against an upgraded API; misconfigured base URL hitting a proxy serving a different version.
Related errors
- Polymarket execution shutdown failed: {}
- provider venue order {} is not owned by the account
- unmapped in-scope open order instrument {instrument_id} (tok
- unmapped in-scope position instrument {instrument_id}; {hint
- generate_order_status_report requires venue_order_id
AI-assisted analysis of nautechsystems/nautilus_trader@18893faf8b (2026-09-08).
Data as JSON: /api/errors/844533f262055d43.
Report an issue: GitHub.