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

# Quickstart

> Zero to a completed swap: list tokens, get a quote, create the order, fund the deposit, and track it to COMPLETED.

Five steps take 0.005 BTC on Bitcoin to USDT on Ethereum. Every URL builds on `https://api.vane.xyz/api`. Pricing and order creation need a tenant API key in the `x-tenant-api-key` header. The key in these examples is Vane's shared tenant key, so the commands run as written, and it's all a normal integration needs. If you need custom parameters or separate order tracking, such as for a wallet integration, contact [support](/resources/support) for a dedicated API key. Keep any key on your server. If you get a `401` back, fix that header first ([Authentication](/api-reference/authentication)).

<Steps>
  <Step title="List tokens">
    The catalog is public, over 2,000 tokens on 18 chains.

    <CodeGroup>
      ```bash cURL theme={null}
      curl https://api.vane.xyz/api/v1/tokens
      ```

      ```typescript TypeScript theme={null}
      const tokens = await fetch("https://api.vane.xyz/api/v1/tokens").then((r) => r.json());
      const btc = tokens.find((t) => t.symbol === "BTC" && t.blockchainId === 1);
      ```

      ```python Python theme={null}
      import requests

      tokens = requests.get("https://api.vane.xyz/api/v1/tokens").json()
      btc = next(t for t in tokens if t["symbol"] == "BTC" and t["blockchainId"] == 1)
      ```
    </CodeGroup>

    Offer only tokens with `active: true` whose `blockchain.depositsActive` is also `true`.
  </Step>

  <Step title="Get a quote">
    `amountIsDeposit=true` prices from the deposit side; `false` fixes the settle amount instead. Quotes don't enforce limits, so an oversized amount still returns `200` with slippage folded into `exchangeRate`. Check `GET /v1/tokens/swap-limits` for the pair before showing a price.

    <CodeGroup>
      ```bash cURL theme={null}
      curl 'https://api.vane.xyz/api/v1/tokens/quote?depositTokenId=158&settleTokenId=231&amount=0.005&amountIsDeposit=true' \
        -H 'x-tenant-api-key: c7eccc0aaed64932a85d35658fa55a4fb2d60cd3d2c529cfd643dc676ee82e82'
      ```

      ```typescript TypeScript theme={null}
      const quote = await fetch(
        "https://api.vane.xyz/api/v1/tokens/quote?depositTokenId=158&settleTokenId=231&amount=0.005&amountIsDeposit=true",
        { headers: { "x-tenant-api-key": "c7eccc0aaed64932a85d35658fa55a4fb2d60cd3d2c529cfd643dc676ee82e82" } }
      ).then((r) => r.json());
      ```

      ```python Python theme={null}
      quote = requests.get(
          "https://api.vane.xyz/api/v1/tokens/quote",
          params={"depositTokenId": 158, "settleTokenId": 231, "amount": 0.005, "amountIsDeposit": "true"},
          headers={"x-tenant-api-key": "c7eccc0aaed64932a85d35658fa55a4fb2d60cd3d2c529cfd643dc676ee82e82"},
      ).json()
      ```
    </CodeGroup>

    `settleAmount` stays indicative until your deposit confirms.
  </Step>

  <Step title="Create the order">
    <CodeGroup>
      ```bash cURL theme={null}
      curl -X POST https://api.vane.xyz/api/v1/orders/create \
        -H 'x-tenant-api-key: c7eccc0aaed64932a85d35658fa55a4fb2d60cd3d2c529cfd643dc676ee82e82' \
        -H 'Content-Type: application/json' \
        -d '{"depositTokenId":158,"settleTokenId":231,"receivingAddress":"0x1234567890abcdef1234567890abcdef12345678","intendedAmount":0.005,"intendedIsDeposit":true}'
      ```

      ```typescript TypeScript theme={null}
      const order = await fetch("https://api.vane.xyz/api/v1/orders/create", {
        method: "POST",
        headers: { "Content-Type": "application/json", "x-tenant-api-key": "c7eccc0aaed64932a85d35658fa55a4fb2d60cd3d2c529cfd643dc676ee82e82" },
        body: JSON.stringify({
          depositTokenId: 158,
          settleTokenId: 231,
          receivingAddress: "0x1234567890abcdef1234567890abcdef12345678",
          intendedAmount: 0.005,
          intendedIsDeposit: true,
        }),
      }).then((r) => r.json());
      ```

      ```python Python theme={null}
      order = requests.post(
          "https://api.vane.xyz/api/v1/orders/create",
          headers={"x-tenant-api-key": "c7eccc0aaed64932a85d35658fa55a4fb2d60cd3d2c529cfd643dc676ee82e82"},
          json={
              "depositTokenId": 158,
              "settleTokenId": 231,
              "receivingAddress": "0x1234567890abcdef1234567890abcdef12345678",
              "intendedAmount": 0.005,
              "intendedIsDeposit": True,
          },
      ).json()
      ```
    </CodeGroup>

    The `201` response carries `uuid`, a deposit address (`walletAddress`) generated for this order alone, the binding `minimalAmount` and `maximalAmount`, and a `timeout` about 30 minutes out. The `uuid` alone grants read access to the order, so persist it server-side and keep it out of public URLs.
  </Step>

  <Step title="Fund the deposit">
    Send BTC from any wallet to `walletAddress`. Send the exact token and chain the order names; anything else won't go through. Keep the amount between `minimalAmount` and `maximalAmount`, since creation never checks your intent against them. Beat the `timeout`; a detected deposit stops the expiry clock for good. After the chain's confirmations, a solver fills the order and USDT arrives at your `receivingAddress` ([how solvers fill orders](/features/solver-auctions)).
  </Step>

  <Step title="Track it to COMPLETED">
    Poll `GET /v1/orders/{uuid}` with no headers until the status reads `COMPLETED`, `ERROR`, or `TIMED_OUT`. A mistyped UUID returns `500`, not `404`.

    <CodeGroup>
      ```bash cURL theme={null}
      curl https://api.vane.xyz/api/v1/orders/7f9c2e4a-1b3d-4c5e-8f6a-2d9b0c1e3f5a
      ```

      ```typescript TypeScript theme={null}
      const terminal = new Set(["COMPLETED", "ERROR", "TIMED_OUT"]);
      let state;
      do {
        await new Promise((r) => setTimeout(r, 5000));
        state = await fetch(`https://api.vane.xyz/api/v1/orders/${order.uuid}`).then((r) => r.json());
      } while (!terminal.has(state.status));
      ```

      ```python Python theme={null}
      import time

      TERMINAL = {"COMPLETED", "ERROR", "TIMED_OUT"}
      while True:
          state = requests.get(f"https://api.vane.xyz/api/v1/orders/{order['uuid']}").json()
          if state["status"] in TERMINAL:
              break
          time.sleep(5)
      ```
    </CodeGroup>

    At `COMPLETED`, `settleAmount` is the exact amount delivered and `exchangeWithdrawTx` holds the delivery hash. For push updates over SSE, see [Track orders](/api-reference/track-orders).
  </Step>
</Steps>
