nautechsystems/nautilus_trader · error
Coinbase Advanced Trade does not publish mark prices; cannot
Error message
Coinbase Advanced Trade does not publish mark prices; cannot subscribe for {} (cmd.instrument_id) What it means
Coinbase Advanced Trade publishes no live mark price for its perpetuals on WebSocket or REST; the settlement_price field is the prior daily settlement and diverges from a live index. subscribe_mark_prices therefore rejects all mark-price subscriptions explicitly rather than returning misleading synthesized data.
Source
Thrown at crates/adapters/coinbase/src/data/mod.rs:607
self.spawn_command(async move {
if let Err(e) = ws
.subscribe(CoinbaseWsChannel::MarketTrades, &[wire_id])
.await
{
log::error!("Failed to subscribe to trades: {e:?}");
}
});
Ok(())
}
fn subscribe_mark_prices(&mut self, cmd: SubscribeMarkPrices) -> anyhow::Result<()> {
// Coinbase Advanced Trade does not publish a live mark price for its
// perpetuals on either WS or REST. `settlement_price` is the prior
// daily settlement and drifts from the live index, so synthesizing a
// mark from it would be misleading. Reject explicitly so callers
// failing this subscription know why.
anyhow::bail!(
"Coinbase Advanced Trade does not publish mark prices; \
cannot subscribe for {}",
cmd.instrument_id
)
}
fn subscribe_index_prices(&mut self, cmd: SubscribeIndexPrices) -> anyhow::Result<()> {
self.deriv_polls.subscribe_index(cmd.instrument_id);
Ok(())
}
fn subscribe_funding_rates(&mut self, cmd: SubscribeFundingRates) -> anyhow::Result<()> {
self.deriv_polls.subscribe_funding(cmd.instrument_id);
Ok(())
}
fn subscribe_instrument_status(
&mut self,View on GitHub (pinned to 18893faf8b)
Solutions
- Do not subscribe to mark prices on Coinbase; compute marks from mid/last trade prices locally
- Disable mark-price subscriptions for this venue in your strategy/config
- If a mark is required, approximate it from the order book mid and document the drift risk
- File or track an upstream request for Coinbase to publish a live mark price
Example fix
// before
client.subscribe_mark_prices(mark_cmd)?; // always fails on Coinbase
// after
if client.is_coinbase() {
// derive mark from book mid instead
let mark = book.best_bid_price.midpoint(book.best_ask_price);
} else {
client.subscribe_mark_prices(mark_cmd)?;
} Defensive patterns
Strategy: fallback
Validate before calling
// skip mark-price subscriptions on Coinbase let supports_marks = !matches!(venue, Venue::Coinbase(_));
Try / catch
match client.subscribe_mark_prices(cmd).await {
Err(e) if e.to_string().contains("does not publish mark prices") => {
// fall back to book-mid mark estimation
}
other => other?,
} Prevention
- Maintain a venue capability matrix (mark price support: Coinbase = no)
- Compute marks from book mid or last trade on venues without a mark feed
- Gate mark-price subscriptions behind venue checks in risk modules
- Do not synthesize marks from settlement_price — it drifts from the live index
When it happens
Trigger: Calling subscribe_mark_prices on the Coinbase execution/data client for any instrument_id, typically for CFM perpetual products.
Common situations: Running a funding/mark-price-dependent strategy on Coinbase perps after porting from Binance/Bybit; a generic risk module that subscribes to mark prices on every venue.
Related errors
- `InstrumentId` not applicable to `Block`
- Unsupported order type: {:?}, the Architect AX adapter accep
- Binance Spot supports L1_MBP and L2_MBP order book subscript
- Coinbase only supports L2_MBP order book deltas
- Unsupported TIF {time_in_force} for MARKET on Coinbase (use
AI-assisted analysis of nautechsystems/nautilus_trader@18893faf8b (2026-09-08).
Data as JSON: /api/errors/68435032b3014dcd.
Report an issue: GitHub.