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

# REST Clients

> Use the complete V3 API or the SDKs' compatibility methods for older V1 and V2 endpoints.

Use the V3 client for current PolyNode data. It contains a shared registry for every supported V3 route, including wallets, positions, trades, combos, fees, builders, webhooks, credits, identities, profiles, and perps.

The main client also keeps top-level convenience methods for older V1 and V2 endpoints. Those methods are useful for existing integrations, but they are not the complete current product surface.

<Card title="Complete V3 SDK guide" icon="database" href="/sdks/v3-api">
  Learn how to discover and call all 120 registered V3 operations from TypeScript, Python, or Rust.
</Card>

## Compatibility methods

<Tabs>
  <Tab title="TypeScript">
    ```typescript theme={null}
    import { PolyNode } from 'polynode-sdk';

    const apiKey = process.env.POLYNODE_API_KEY;
    if (!apiKey) throw new Error('Set POLYNODE_API_KEY');
    const pn = new PolyNode({ apiKey });

    const markets = await pn.markets({ count: 10 });
    const results = await pn.search('bitcoin', { limit: 10 });
    const recent = await pn.recentSettlements({ count: 25 });

    console.log(markets.count, results.results.length, recent.count);
    ```
  </Tab>

  <Tab title="Python">
    ```python theme={null}
    import os
    from polynode import PolyNode

    with PolyNode(api_key=os.environ["POLYNODE_API_KEY"]) as pn:
        markets = pn.markets(count=10)
        results = pn.search("bitcoin", limit=10)
        recent = pn.recent_settlements(count=25)
        print(markets.count, len(results.results), recent.count)
    ```
  </Tab>

  <Tab title="Rust">
    ```rust theme={null}
    use polynode::PolyNodeClient;

    #[tokio::main]
    async fn main() -> polynode::Result<()> {
        let client = PolyNodeClient::new(
            std::env::var("POLYNODE_API_KEY").expect("Set POLYNODE_API_KEY")
        )?;
        let markets = client.markets(Some(10)).await?;
        let recent = client.recent_settlements(Some(25)).await?;
        println!("{} markets, {} settlements", markets.count, recent.count);
        Ok(())
    }
    ```
  </Tab>
</Tabs>

## Which client should I use?

| Need                                                                                                         | Use                                                                           |
| ------------------------------------------------------------------------------------------------------------ | ----------------------------------------------------------------------------- |
| New wallet, trade, position, combo, fee, builder, webhook, credit, identity, profile, or perps integration   | [V3 client](/sdks/v3-api)                                                     |
| Existing code already using `market()`, `search()`, `recentSettlements()`, or the equivalent language method | Keep the top-level method                                                     |
| Exact endpoint request and response fields                                                                   | [V3 Data API reference](/data/overview) or [Perps reference](/perps/overview) |

Top-level and V3 methods can be used from the same client. Migrating one request at a time does not change the behavior of the remaining compatibility calls.
