nautechsystems/nautilus_trader · error · anyhow::Error

invalid callback_rate='{raw}': multiplication overflow

Error message

invalid callback_rate='{raw}': multiplication overflow

What it means

Error "invalid callback_rate='{raw}': multiplication overflow" thrown in nautechsystems/nautilus_trader.

Source

Thrown at crates/adapters/binance/src/futures/http/models.rs:1767

    let decimal = parse_required_decimal(raw, field)?;
    if decimal <= Decimal::ZERO {
        return Ok(None);
    }

    Price::from_decimal_dp(decimal, precision)
        .map(Some)
        .map_err(|e| anyhow::anyhow!("invalid {field} precision: {e}"))
}

fn parse_callback_rate_basis_points(raw: &str) -> anyhow::Result<Option<Decimal>> {
    let rate = parse_required_decimal(raw, "callback_rate")?;
    if rate <= Decimal::ZERO {
        return Ok(None);
    }

    rate.checked_mul(Decimal::from(100))
        .map(Some)
        .ok_or_else(|| anyhow::anyhow!("invalid callback_rate='{raw}': multiplication overflow"))
}

fn parse_working_type(working_type: Option<BinanceWorkingType>) -> TriggerType {
    match working_type {
        Some(BinanceWorkingType::ContractPrice) => TriggerType::LastPrice,
        Some(BinanceWorkingType::MarkPrice) => TriggerType::MarkPrice,
        Some(BinanceWorkingType::Unknown) | None => TriggerType::Default,
    }
}

fn requires_algo_trigger_price(order_type: BinanceFuturesOrderType) -> bool {
    matches!(
        order_type,
        BinanceFuturesOrderType::Stop
            | BinanceFuturesOrderType::StopMarket
            | BinanceFuturesOrderType::TakeProfit
            | BinanceFuturesOrderType::TakeProfitMarket
            | BinanceFuturesOrderType::TrailingStopMarket

View on GitHub (pinned to a4b06ed870)

When it happens

Trigger: Thrown at crates/adapters/binance/src/futures/http/models.rs:1767 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of nautechsystems/nautilus_trader@a4b06ed870 (2026-08-16). Data as JSON: /api/errors/afa6e05ccbddef90. Report an issue: GitHub.