nautechsystems/nautilus_trader · error

Unsupported RTDS custom data type: {other}

Error message

Unsupported RTDS custom data type: {other}

What it means

The RTDS message parser matched a wire payload against a closed set of known custom data types; any unrecognized variant hits the catch-all arm and is rejected. This prevents silently constructing wrong data types from unknown upstream payloads.

Source

Thrown at crates/adapters/polymarket/src/rtds.rs:1648

                let topic = window.topic();
                Ok(Self {
                    key: tracked_key(topic.as_str(), &symbol_lower),
                    wire: RtdsWireSubscription {
                        topic: topic.as_str(),
                        msg_type: "update",
                        filters: None,
                    },
                })
            }
            POLYMARKET_RTDS_EQUITY_PRICE_TYPE_NAME => Ok(Self {
                key: tracked_key(RtdsTopic::EquityPrices.as_str(), &symbol_lower),
                wire: RtdsWireSubscription {
                    topic: RtdsTopic::EquityPrices.as_str(),
                    msg_type: "update",
                    filters: None,
                },
            }),
            other => anyhow::bail!("Unsupported RTDS custom data type: {other}"),
        }
    }
}

fn tracked_key(topic: &str, symbol_lower: &str) -> String {
    format!("{topic}:{symbol_lower}")
}

fn decimal_from_signed_e18(field: &str, value: &str) -> anyhow::Result<Decimal> {
    let digits = value.strip_prefix('-').unwrap_or(value);
    if digits.is_empty() || !digits.bytes().all(|byte| byte.is_ascii_digit()) {
        anyhow::bail!("invalid signed E18 integer for {field}: {value}");
    }

    let mantissa = value
        .parse::<i128>()
        .with_context(|| format!("signed E18 integer out of range for {field}: {value}"))?;
    Decimal::try_from_i128_with_scale(mantissa, 18)

View on GitHub (pinned to 18893faf8b)

Solutions

  1. Log the full `other` payload to identify the unknown message type
  2. Upgrade the nautilus_polymarket adapter / nautilus_trader to a version supporting the new RTDS type
  3. If the type is expected to be ignored, filter unknown message kinds before conversion instead of passing them to the parser
  4. Add the missing enum arm (RtdsCustomDataType variant + wire mapping) and regenerate any generated bindings

Example fix

// before
other => anyhow::bail!("Unsupported RTDS custom data type: {other}"),
// after
other => {
    tracing::debug!("ignoring unknown RTDS custom data type: {other}");
    return Ok(None);
}
Defensive patterns

Strategy: try-catch

Type guard

fn is_known_rtds_type(other: &RtdsCustomDataType) -> bool {
    matches!(other, RtdsCustomDataType::CryptoPrices | RtdsCustomDataType::EquityPrices)
}

Try / catch

match parse_md_message(&raw) {
    Ok(msg) => handle(msg),
    Err(e) if e.to_string().contains("Unsupported RTDS custom data type") => log::debug!("skipped unknown RTDS type: {e}"),
    Err(e) => return Err(e),
}

Prevention

When it happens

Trigger: An RTDS message whose `other` discriminant/field does not match any known custom data type is passed to the conversion that builds wire subscriptions / typed messages (parse_md_message path).

Common situations: Polymarket added a new RTDS topic or message kind the adapter does not know; a typo'd or renamed message type in subscription config; running an adapter version older than the venue's feed schema.

Related errors


AI-assisted analysis of nautechsystems/nautilus_trader@18893faf8b (2026-09-08). Data as JSON: /api/errors/3d140cf1eb98baac. Report an issue: GitHub.