nautechsystems/nautilus_trader · error
Binance Spot trade limit must not exceed 1000
Error message
Binance Spot trade limit must not exceed 1000
What it means
Request validation in the Binance Spot data client's request_trades: the requested trade limit exceeds Binance's API maximum of 1000 recent trades per request, so the request is rejected instead of being sent and failing server-side.
Solutions
- Clamp the limit to 1000 or omit it
- Page through trades by time window using start/end parameters
Defensive patterns
Strategy: validation
When it happens
Trigger: Thrown at crates/adapters/binance/src/spot/data.rs:2322 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of nautechsystems/nautilus_trader@18893faf8b (2026-09-08).
Data as JSON: /api/errors/eee82fbe4bfcae46.
Report an issue: GitHub.
Appendix: source
Thrown at crates/adapters/binance/src/spot/data.rs:2322
}
});
Ok(())
}
fn request_trades(&self, request: RequestTrades) -> anyhow::Result<()> {
let http = self.http_client.clone();
let sender = self.data_sender.clone();
let instrument_id = request.instrument_id;
let limit = request.limit.map(|n| n.get() as u32);
let request_id = request.request_id;
let client_id = request.client_id.unwrap_or(self.client_id);
let params = request.params;
let clock = self.clock;
let start_nanos = datetime_to_unix_nanos(request.start);
let end_nanos = datetime_to_unix_nanos(request.end);
let start = request.start;
let end = request.end;
anyhow::ensure!(
limit.is_none_or(|value| value <= 1000),
"Binance Spot trade limit must not exceed 1000"
);
self.spawn_command(async move {
let result = if start.is_some() || end.is_some() {
http.request_agg_trades(instrument_id, start, end, limit)
.await
} else {
http.request_trades(instrument_id, limit).await
};
match result.context("failed to request trades from Binance") {
Ok(trades) => {
let response = DataResponse::Trades(TradesResponse::new(
request_id,
client_id,
instrument_id,View on GitHub (pinned to 18893faf8b)