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

# REST API quickstart

> List Shield Swap pools, inspect the response, and use a pool key in a second public request.

This quickstart uses `GET /pools`, a public endpoint. You do not need an account, wallet signature, or API token.

<Steps>
  <Step title="List pools">
    Send a request to the selected network. Mainnet is the default; use the network selector in the upper-right corner to switch every example on this site to testnet.

    <CodeGroup>
      ```bash cURL theme={"languages":{"custom":["/languages/leo.tmLanguage.json"]}}
      curl --fail-with-body \
        "https://api.swap.shield.fi/pools?limit=10&offset=0"
      ```

      ```javascript JavaScript theme={"languages":{"custom":["/languages/leo.tmLanguage.json"]}}
      const url = new URL("https://api.swap.shield.fi/pools");
      url.search = new URLSearchParams({ limit: "10", offset: "0" });

      const response = await fetch(url);
      if (!response.ok) {
        throw new Error(`GET /pools returned ${response.status}`);
      }

      const pools = await response.json();
      console.log(pools.data);
      ```

      ```python Python theme={"languages":{"custom":["/languages/leo.tmLanguage.json"]}}
      import json
      from urllib.request import urlopen

      url = "https://api.swap.shield.fi/pools?limit=10&offset=0"

      with urlopen(url, timeout=10) as response:
          pools = json.load(response)

      print(pools["data"])
      ```
    </CodeGroup>
  </Step>

  <Step title="Check the response">
    A successful response has a `data` array and a `pagination` object. Each pool includes its identifiers, enabled state, and fee.

    ```json theme={"languages":{"custom":["/languages/leo.tmLanguage.json"]}}
    {
      "data": [
        {
          "key": "3748...8179field",
          "token0": "2118...3732field",
          "token1": "4096...6596field",
          "enabled": true,
          "fee": "3000"
        }
      ],
      "pagination": {
        "total": 4,
        "limit": 10,
        "offset": 0
      }
    }
    ```

    The values above are shortened for readability. Treat pool keys, token IDs, amounts, and fees as exact strings in application code.
  </Step>

  <Step title="Read one pool">
    Copy the exact `key` from a result and request that pool:

    ```bash theme={"languages":{"custom":["/languages/leo.tmLanguage.json"]}}
    curl --fail-with-body \
      "https://api.swap.shield.fi/pools/POOL_KEY"
    ```

    Replace `POOL_KEY` with the complete field value returned by `GET /pools`. Do not derive a pool key from token symbols.
  </Step>
</Steps>

## Success check

You are done when:

* both requests return HTTP `200`
* `data` contains the expected pool
* the returned pool key is unchanged between requests
* your client preserves integer-like values as strings

## Before you call other endpoints

Pool and token metadata reads are public. Routes, market history, positions, swaps, balances, protocol configuration, and transaction schemas require an invited wallet session or an `ss_...` API token.

Read [Authentication](./authentication) before adding those endpoints to a backend or bot.

## Continue from here

* [Choose an integration path](../developers/integration-path) if you are deciding between API data, schema-assisted execution, and direct program calls.
* [Build a trading bot](./trading-bot) if you need routes, history, and live updates.
* [Browse the API reference](./overview) for endpoint access requirements and exact schemas.
