nautechsystems/nautilus_trader · error
No result in book summary response
Error message
No result in book summary response
What it means
request_book_summaries_kind requires a `result` array from public/get_book_summary_by_currency. The call succeeded at HTTP level but the response had no `result`, so no book summaries can be returned. Deribit omits `result` when it returns an error object.
Source
Thrown at crates/adapters/deribit/src/http/client.rs:1932
///
/// Returns an error if the request fails.
pub async fn request_book_summaries_kind(
&self,
currency: &str,
kind: Option<&str>,
) -> anyhow::Result<Vec<DeribitBookSummaryRaw>> {
let params = GetBookSummaryByCurrencyParams {
currency: currency.to_string(),
kind: kind.map(str::to_string),
};
let full_response = self
.inner
.get_book_summary_by_currency(params)
.await
.map_err(|e| anyhow::anyhow!(e))?;
full_response
.result
.ok_or_else(|| anyhow::anyhow!("No result in book summary response"))
}
/// Requests traded option expirations for a settlement currency.
///
/// # Errors
///
/// Returns an error if the request fails.
pub async fn request_option_expirations(
&self,
currency: DeribitCurrency,
) -> anyhow::Result<Vec<String>> {
let params = GetExpirationsParams::new(currency.as_str(), DeribitExpirationKind::Option);
let full_response = self
.inner
.get_expirations(params)
.await
.map_err(|e| anyhow::anyhow!(e))?;
let response = full_responseView on GitHub (pinned to 18893faf8b)
Solutions
- Confirm the currency code is exact and supported on this environment (test vs main).
- Check the response `error` field for the JSON-RPC error code.
- If the currency legitimately has no books, treat empty as expected rather than an error in caller logic.
Example fix
// before
full_response
.result
.ok_or_else(|| anyhow::anyhow!("No result in book summary response"))
// after
full_response.result.ok_or_else(|| {
anyhow::anyhow!(
"No result in book summary response for {currency} (error: {:?})",
full_response.error
)
}) Defensive patterns
Strategy: validation
Validate before calling
// Ensure currency is supported on this environment before querying let currencies = ["BTC", "ETH", "SOL", "USDT", "USDC"]; assert!(currencies.contains(¤cy.to_uppercase().as_str()));
Try / catch
match client.request_book_summaries(currency).await {
Ok(s) if s.is_empty() => info!("no books for {currency}"),
Ok(s) => handle(s),
Err(e) if e.to_string().contains("No result in book summary") => treat_as_no_market(currency),
Err(e) => return Err(e),
} Prevention
- Check the response `error` field to distinguish invalid currency from empty market
- Verify testnet vs mainnet currency availability
- Normalize currency codes to Deribit's canonical form
When it happens
Trigger: Calling request_book_summaries/request_book_summaries_kind with a currency that has no instruments or an invalid currency code, yielding an error response with null result.
Common situations: Typo'd or lowercase currency code, querying a currency not listed on the connected environment, or brand-new currency with no published summaries yet.
Understand the failure class
Background: "empty response", "returned no data", "empty embeddings": what HTTP 200-with-empty-body errors mean across libraries — this error's family across 36 libraries.
Related errors
- No result in ticker response
- No result in expirations response
- failed to request AX whoami: {e}
- {e}
- No option expirations for {currency}
AI-assisted analysis of nautechsystems/nautilus_trader@18893faf8b (2026-09-08).
Data as JSON: /api/errors/5a360acde5109708.
Report an issue: GitHub.