> ## 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.

# Python REST Compatibility

> Use the current Python V3 client and understand retained top-level V1/V2 helpers.

Use `pn.v3` for new data integrations. The top-level sync and async methods remain available for existing V1/V2 integrations and focused helpers such as health, legacy market search, and RPC.

```python theme={null}
import os
from polynode import PolyNode

with PolyNode(api_key=os.environ["POLYNODE_API_KEY"]) as pn:
    stats = pn.v3.execute("GET /v3/stats")
    health = pn.healthz()
    results = pn.search_events("bitcoin", limit=5)
    first_market = results.events[0].markets[0] if results.events else None
    condition_id = first_market.conditionId if first_market else None
    print(stats, health, len(results.events), condition_id)
```

Nested compatibility-search markets can omit `conditionId`, so the model exposes it as `str | None`. Use a token ID or slug when your workflow requires an identifier.

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

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