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

# Get swap limits

> Returns the minimum and maximum amounts for a deposit/settle token pair, expressed on both sides of the swap. Limits are direction sensitive: the response is keyed to which token is the deposit and which is the settle side, so swap the two ids to get the reverse direction.

Check limits before quoting and again before depositing. Quotes do not enforce them, and order creation does not validate `intendedAmount` against them; only the actual deposit is bound by the order's `minimalAmount` and `maximalAmount`. Always check the minimum and maximum amount returned from the order creation endpoint before making a deposit.

Send a tenant API key in `x-tenant-api-key` (a JWT access token also works).



## OpenAPI

````yaml /openapi.json get /v1/tokens/swap-limits
openapi: 3.1.0
info:
  title: Vane API
  version: 1.0.0
  summary: Cross-chain and same-chain swaps filled by an open network of solvers.
  description: >-
    Vane turns a swap into an intent: you declare what you want to receive, the
    API returns a per-order deposit address, and a solver fills the order
    against the escrowed deposit ([how solvers fill
    orders](/features/solver-auctions)).


    **Authentication.** Most endpoints accept a tenant API key sent as the
    `x-tenant-api-key` header (accountless integration). The key pre-filled in
    the API playground is a shared public key for evaluating the API. Production
    integrations use their own tenant key, requested from support
    (help@vane.xyz) and kept server-side. A JWT access token from SIWX
    wallet-signature auth also satisfies these endpoints and attributes orders
    to a user account, which adds order history (`GET /v1/orders`) and points.


    **Error behavior.** Errors use the envelope `{statusCode, message, error}`.
    Field order varies and some errors omit `error`. Most business validation
    failures (an unknown token id, a malformed address, an invalid amount, an
    unknown order UUID) return HTTP `500` with a descriptive message, while
    `400` appears only for malformed query parameters. Match on the message text
    for programmatic handling, not just the status codes.


    **The fields `exchange` and `tradePath`** describe how a quote is priced and
    routed across order-book legs. They say nothing about settlement, which
    solvers perform separately.
  contact:
    name: Vane support
    email: help@vane.xyz
    url: https://vane.xyz
  termsOfService: https://vane.xyz/terms-and-conditions
servers:
  - url: https://api.vane.xyz/api
    description: Production
security:
  - tenantApiKey: []
tags:
  - name: Tokens
    description: The token catalog, swap limits, and quotes.
  - name: Orders
    description: Create swap orders and track them to a terminal state.
  - name: Auth
    description: >-
      Optional SIWX wallet-signature authentication. Adds order history and
      points.
paths:
  /v1/tokens/swap-limits:
    get:
      tags:
        - Tokens
      summary: Get swap limits
      description: >-
        Returns the minimum and maximum amounts for a deposit/settle token pair,
        expressed on both sides of the swap. Limits are direction sensitive: the
        response is keyed to which token is the deposit and which is the settle
        side, so swap the two ids to get the reverse direction.


        Check limits before quoting and again before depositing. Quotes do not
        enforce them, and order creation does not validate `intendedAmount`
        against them; only the actual deposit is bound by the order's
        `minimalAmount` and `maximalAmount`. Always check the minimum and
        maximum amount returned from the order creation endpoint before making a
        deposit.


        Send a tenant API key in `x-tenant-api-key` (a JWT access token also
        works).
      operationId: getSwapLimits
      parameters:
        - $ref: '#/components/parameters/DepositTokenId'
        - $ref: '#/components/parameters/SettleTokenId'
      responses:
        '200':
          description: Swap limits for the pair, on both sides of the swap.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SwapLimits'
              examples:
                btcToUsdt:
                  summary: >-
                    BTC deposit, USDT settle (depositTokenId=158,
                    settleTokenId=231)
                  value:
                    depositToken: BTC
                    depositTokenMin: 0.00011765
                    depositTokenMax: 0.14166439
                    settleToken: USDT
                    settleTokenMin: 6.24364607
                    settleTokenMax: 9000
                usdtToBtc:
                  summary: >-
                    Same pair reversed (depositTokenId=231, settleTokenId=158);
                    the limits differ by direction
                  value:
                    depositToken: USDT
                    depositTokenMin: 7.28204
                    depositTokenMax: 8999.99794
                    settleToken: BTC
                    settleTokenMin: 0.00009907
                    settleTokenMax: 0.14166214
        '400':
          description: Malformed query parameters (missing or non-numeric token ids).
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              example:
                message: Validation failed (numeric string is expected)
                error: Bad Request
                statusCode: 400
        '401':
          $ref: '#/components/responses/UnauthorizedTenant'
        '500':
          description: >-
            An unknown token id returns `500` with a descriptive message. Read
            the message text to handle it programmatically.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              example:
                message: 'Invalid deposit token id provided: 999999'
                error: Internal Server Error
                statusCode: 500
components:
  parameters:
    DepositTokenId:
      name: depositTokenId
      in: query
      required: true
      description: >-
        Numeric id of the token being deposited. Ids are chain-specific: BTC is
        `158` on Bitcoin, `159` on Ethereum (ERC20), and `157` on BNB Smart
        Chain. Look ids up with `GET /v1/tokens`.
      schema:
        type: integer
      example: 158
    SettleTokenId:
      name: settleTokenId
      in: query
      required: true
      description: >-
        Numeric id of the token to receive. Pick the id on the chain you want to
        receive on; the catalog at `GET /v1/tokens` lists them all.
      schema:
        type: integer
      example: 231
  schemas:
    SwapLimits:
      type: object
      description: >-
        Swap limits for a pair, expressed on both sides. They are direction
        sensitive: fields are keyed to which token is the deposit and which is
        the settle side.
      properties:
        depositToken:
          type: string
          description: Symbol of the deposit token, for example `BTC`.
        depositTokenMin:
          type: number
          description: Minimum deposit amount, in deposit-token units.
        depositTokenMax:
          type: number
          description: Maximum deposit amount, in deposit-token units.
        settleToken:
          type: string
          description: Symbol of the settle token, for example `USDT`.
        settleTokenMin:
          type: number
          description: Minimum settle amount, in settle-token units.
        settleTokenMax:
          type: number
          description: Maximum settle amount, in settle-token units.
      required:
        - depositToken
        - depositTokenMin
        - depositTokenMax
        - settleToken
        - settleTokenMin
        - settleTokenMax
    Error:
      type: object
      description: >-
        Canonical error envelope. Field order varies and `error` is sometimes
        omitted (the unknown-order `500` returns only `statusCode` and
        `message`); message casing varies too (`Internal Server Error` vs
        `Internal server error`). Most business validation failures return `500`
        with a descriptive message, so match on `message` for programmatic
        handling.
      properties:
        statusCode:
          type: integer
          description: HTTP status code.
        message:
          type: string
          description: >-
            Error description. The most reliable field for distinguishing
            causes.
        error:
          type: string
          description: >-
            HTTP status text, for example `Bad Request`, `Unauthorized`.
            Sometimes absent.
      required:
        - statusCode
        - message
  responses:
    UnauthorizedTenant:
      description: >-
        Missing or invalid tenant API key. The message says "access token" but
        refers to the `x-tenant-api-key` header (a valid JWT access token also
        satisfies this endpoint).
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            message: Valid access token required.
            error: Unauthorized
            statusCode: 401
  securitySchemes:
    tenantApiKey:
      type: apiKey
      in: header
      name: x-tenant-api-key
      x-default: c7eccc0aaed64932a85d35658fa55a4fb2d60cd3d2c529cfd643dc676ee82e82
      description: >-
        Vane's shared tenant key. Contact support for a dedicated key if you
        need custom parameters or separate order tracking.

````