nautechsystems/nautilus_trader · error · anyhow::Error
get_open_orders failed: {e}
Error message
get_open_orders failed: {e} What it means
Wraps a failure of the low-level get_open_orders HTTP call made while collecting order status reports for the Kraken Futures adapter. The underlying request itself failed (network, auth signing, transport), distinct from an API-level error which is reported separately as 'Failed to get open orders'.
Source
Thrown at crates/adapters/kraken/src/http/futures/client.rs:1685
))
}
pub async fn request_order_status_reports(
&self,
account_id: AccountId,
instrument_id: Option<InstrumentId>,
start: Option<Timestamp>,
end: Option<Timestamp>,
open_only: bool,
) -> anyhow::Result<Vec<OrderStatusReport>> {
let ts_init = self.generate_ts_init();
let mut all_reports = Vec::new();
let response = self
.inner
.get_open_orders()
.await
.map_err(|e| anyhow::anyhow!("get_open_orders failed: {e}"))?;
if response.result != KrakenApiResult::Success {
let error_msg = response
.error
.unwrap_or_else(|| "Unknown error".to_string());
anyhow::bail!("Failed to get open orders: {error_msg}");
}
let position_sizes = if response
.open_orders
.iter()
.any(|order| order.unfilled_size.is_none())
{
match self.inner.get_open_positions().await {
Ok(response) if response.result == KrakenApiResult::Success => response
.open_positions
.into_iter()
.map(|position| (position.symbol, position.size))View on GitHub (pinned to 18893faf8b)
Solutions
- Read the wrapped error to see if it's network, auth, or rate limiting.
- Verify Kraken Futures API credentials are correct and have the right permissions.
- Check connectivity/proxy settings and Kraken API status.
- Retry the polling cycle; the adapter's retry manager may already handle transient failures.
Defensive patterns
Strategy: retry
Try / catch
match client.request_order_status_reports(...).await {
Ok(reports) => reports,
Err(e) if is_transient(&e) => { tokio::time::sleep(backoff).await; retry(); }
Err(e) => return Err(anyhow!("order status poll failed permanently: {e:#}")),
} Prevention
- Keep credentials valid and rotated; signing failures surface here.
- Monitor connectivity/proxy health on live nodes.
- Rely on the adapter's retry manager; don't disable it for polling loops.
- Gracefully handle shutdown so polls don't race the cancellation token.
When it happens
Trigger: request_order_status_reports polling loop invokes inner.get_open_orders() and the request errors — connection failure, timeout, request-signing failure, or rate-limiter shutdown.
Common situations: Network outages or DNS failures on a live node; invalid/expired API credentials failing HMAC signing; proxy misconfiguration; polling during shutdown when the cancellation token has fired.
Understand the failure class
Background: "API request failed": what wrapped HTTP errors from external APIs mean and how to find the real cause — this error's family across 29 libraries.
Related errors
- get_order_events failed: {e}
- Failed to get open orders: {error_msg}
- Failed to fetch CFM balance summary: {e}
- Failed to fetch CFM positions: {e}
- Failed to fetch CFM position '{product_id}': {e}
AI-assisted analysis of nautechsystems/nautilus_trader@18893faf8b (2026-09-08).
Data as JSON: /api/errors/44bdac4a1fbda08c.
Report an issue: GitHub.