> ## Documentation Index
> Fetch the complete documentation index at: https://docs.polynode.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Rust REST Compatibility

> Use the current Rust V3 client and understand retained V1/V2 helper methods.

Use `client.v3()` for new data integrations. Existing typed methods remain for V1/V2 compatibility and focused helpers such as health, legacy market search, and RPC.

```rust theme={null}
use polynode::{PolyNodeClient, V3RequestOptions};

#[tokio::main]
async fn main() -> polynode::Result<()> {
    let client = PolyNodeClient::new(std::env::var("POLYNODE_API_KEY").unwrap())?;
    let stats = client.v3()
        .execute_named("GET /v3/stats", V3RequestOptions::default())
        .await?;
    let health = client.healthz().await?;
    let results = client.search_events("bitcoin", Some(5)).await?;
    let typed_markets = match results.events.first() {
        Some(event) => event.typed_markets()?,
        None => Vec::new(),
    };
    let condition_id = typed_markets.first().and_then(|market| market.condition_id.as_deref());
    println!("{stats:#} {health} {} {condition_id:?}", results.events.len());
    Ok(())
}
```

`typed_markets()` preserves the existing raw search payload while parsing it into `EventSearchMarket`. Its `condition_id` is optional because nested compatibility-search markets can omit that field.

Do not interpret the compatibility method list as the complete product API. Use [Rust V3](/sdks/rust/v3-api) for wallets, grouped trades, positions, combos, builders, credits, identities, profiles, webhooks, and perps.

`client.rpc_call(method, params)` is an HTTP JSON-RPC helper and does not implement `eth_subscribe`; see the [RPC guide](/sdks/rpc).
