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

# Check chain support

> Check whether Olympex supports a chain, for example when you enable it in your product.

`POST /support-chain` returns `data: true` when Olympex supports a chain and `data: false` when it doesn't. Use it to check one chain ID at runtime, for example a chain ID from your own configuration. To get every enabled chain at once, call [`GET /chains`](/api-reference/chains/list-chains): both endpoints read the same list. Cache the result instead of calling it before every [quote](/api-reference/quotes/get-quote).

Signed endpoint. Send `Content-Type: application/json`, the canonical JSON body, and the four headers `x-api-key-id`, `x-value-info`, `x-passphrase` and `x-signature` described in [Sign requests](/authentication/sign-requests). The body is `{"chainId":137}`: `chainId` is an integer, and a string returns `400 VALIDATION_ERROR`. An unsupported chain returns `200` with `data: false`. Other body fields are ignored. To list every enabled chain, call `GET /chains`.

## Send the chain ID as an integer

`chainId` is a JSON integer (`137`), as on every endpoint. A string such as `"137"` fails validation with `400 VALIDATION_ERROR` and the detail `"Invalid input: expected number, received string"`. Pass the IDs from [`GET /chains`](/api-reference/chains/list-chains) unchanged: they're integers too.

[Conventions](/api-reference/conventions#chain-ids) lists every chain ID field.

<Note>
  A chain ID that isn't enabled returns `200` with `data: false`, not an error. Only an invalid body returns `400`: invalid JSON, or a `chainId` that is missing or isn't a positive integer. Other body fields are ignored.
</Note>

## Supported chains

| Chain | Chain ID | Single-chain swaps | Cross-chain source | Limit orders and DCA |
| - | - | - | - | - |
| <img src="https://mintcdn.com/olympex/Hv2idqJvAaUqU38v/images/chains/ethereum.svg?fit=max&auto=format&n=Hv2idqJvAaUqU38v&q=85&s=293c0e1b97dc747a3955f204461beb6f" alt="" width="24" height="24" style={{background:"#fff",borderRadius:"6px",verticalAlign:"middle",marginRight:"8px",display:"inline-block"}} data-path="images/chains/ethereum.svg" /> Ethereum | `1` | Yes | Yes | Yes |
| <img src="https://mintcdn.com/olympex/Hv2idqJvAaUqU38v/images/chains/optimism.svg?fit=max&auto=format&n=Hv2idqJvAaUqU38v&q=85&s=cf6a4bcfad7bd05a78cf8faa7f216968" alt="" width="24" height="24" style={{background:"#fff",borderRadius:"6px",verticalAlign:"middle",marginRight:"8px",display:"inline-block"}} data-path="images/chains/optimism.svg" /> Optimism | `10` | Yes | Yes | Yes |
| <img src="https://mintcdn.com/olympex/Hv2idqJvAaUqU38v/images/chains/bnb.svg?fit=max&auto=format&n=Hv2idqJvAaUqU38v&q=85&s=17fb2131b216c51121697b697c161133" alt="" width="24" height="24" style={{background:"#fff",borderRadius:"6px",verticalAlign:"middle",marginRight:"8px",display:"inline-block"}} data-path="images/chains/bnb.svg" /> BNB Chain | `56` | Yes | Yes | Yes |
| <img src="https://mintcdn.com/olympex/Hv2idqJvAaUqU38v/images/chains/polygon.svg?fit=max&auto=format&n=Hv2idqJvAaUqU38v&q=85&s=f9ef4e672e0743e17ce9fe99d1506f4b" alt="" width="24" height="24" style={{background:"#fff",borderRadius:"6px",verticalAlign:"middle",marginRight:"8px",display:"inline-block"}} data-path="images/chains/polygon.svg" /> Polygon | `137` | Yes | Yes | Yes |
| <img src="https://mintcdn.com/olympex/Hv2idqJvAaUqU38v/images/chains/base.svg?fit=max&auto=format&n=Hv2idqJvAaUqU38v&q=85&s=f9a8742fcbf950055443d8581fa13f6d" alt="" width="24" height="24" style={{background:"#fff",borderRadius:"6px",verticalAlign:"middle",marginRight:"8px",display:"inline-block"}} data-path="images/chains/base.svg" /> Base | `8453` | Yes | No | Yes |
| <img src="https://mintcdn.com/olympex/Hv2idqJvAaUqU38v/images/chains/arbitrum.svg?fit=max&auto=format&n=Hv2idqJvAaUqU38v&q=85&s=70d855119ee63c451321c7db0e731eba" alt="" width="24" height="24" style={{background:"#fff",borderRadius:"6px",verticalAlign:"middle",marginRight:"8px",display:"inline-block"}} data-path="images/chains/arbitrum.svg" /> Arbitrum | `42161` | Yes | Yes | Yes |
| <img src="https://mintcdn.com/olympex/Hv2idqJvAaUqU38v/images/chains/avalanche.svg?fit=max&auto=format&n=Hv2idqJvAaUqU38v&q=85&s=5940c1ce2e4ea155ac4cc6400725f442" alt="" width="24" height="24" style={{background:"#fff",borderRadius:"6px",verticalAlign:"middle",marginRight:"8px",display:"inline-block"}} data-path="images/chains/avalanche.svg" /> Avalanche | `43114` | Yes | Yes | Yes |
| <img src="https://mintcdn.com/olympex/Hv2idqJvAaUqU38v/images/chains/linea.svg?fit=max&auto=format&n=Hv2idqJvAaUqU38v&q=85&s=0246b017a75e24be1d41ba6fde70c3c5" alt="" width="24" height="24" style={{background:"#fff",borderRadius:"6px",verticalAlign:"middle",marginRight:"8px",display:"inline-block"}} data-path="images/chains/linea.svg" /> Linea | `59144` | Yes | No | Yes |

A cross-chain transfer starts on a chain marked Yes in the cross-chain source column and ends on another chain in the table. Whether a specific pair has a route depends on the providers when you ask, so request a quote to confirm it.

Limit orders and DCA execute only on the chains marked Yes in the last column, through the Olympex order contract on each one. [Order signatures and allowances](/concepts/order-authorization#the-order-contract) lists the contract address on each chain.

`GET /chains` returns chain IDs only, without names, logos or capabilities. If your product needs them, keep this table's names and columns in your code, and use [`GET /chains`](/api-reference/chains/list-chains) to decide which of these chains to offer: offer a chain only while its ID is in the response. [`POST /support-chain`](/api-reference/chains/check-chain-support) checks one chain ID against the same list.

[`GET /tokens`](/api-reference/tokens/list-tokens) lists the tokens on each chain. [Supported chains](/concepts/supported-chains) covers token addresses, amounts and decimals.

<RequestExample>
  ```bash cURL theme={null}
  # Check whether Olympex supports Polygon (chain ID 137).
  # Needs openssl, curl and OLYMPEX_API_KEY_ID, OLYMPEX_SECRET_KEY, OLYMPEX_PASSPHRASE.
  METHOD=POST
  ENDPOINT=/support-chain
  QUERY=''
  BODY='{"chainId":137}'
  TS="${OLYMPEX_TIMESTAMP:-$(date +%s)}"
  NONCE="${OLYMPEX_NONCE:-$(openssl rand -hex 12)}"
  BODY_HASH="$(printf '%s' "$BODY" | openssl dgst -sha256 -binary | openssl base64 -A | tr '+/' '-_' | tr -d '=')"
  VALUE_INFO="$(printf '%s\n%s\n%s' "$TS" "$NONCE" "$BODY_HASH")"
  MESSAGE="$(printf 'OLPX-HMAC-SHA256-V2\n%s\n%s\n%s\n%s\n%s\n%s' "$TS" "$NONCE" "$METHOD" "/api/v1$ENDPOINT" "$QUERY" "$BODY_HASH")"
  curl -sS -X "$METHOD" "https://api-rest.olympex.io/api/v1$ENDPOINT${QUERY:+?$QUERY}" \
    -H "content-type: application/json" \
    -H "x-api-key-id: $OLYMPEX_API_KEY_ID" \
    -H "x-value-info: $(printf '%s' "$VALUE_INFO" | openssl base64 -A)" \
    -H "x-passphrase: $OLYMPEX_PASSPHRASE" \
    -H "x-signature: $(printf '%s' "$MESSAGE" | openssl dgst -sha256 -hmac "$OLYMPEX_SECRET_KEY" -binary | od -An -v -tx1 | tr -d ' \n')" \
    --data-raw "$BODY"
  ```

  ```ts TypeScript theme={null}
  import { olympexRequest } from "./sign-request.ts"; // /authentication/sign-requests

  const supported = await olympexRequest<boolean>("POST", "/support-chain", { chainId: 137 });
  console.log(supported ? "Polygon is supported" : "Polygon is not supported");
  ```

  ```python Python theme={null}
  from sign_request import olympex_request  # /authentication/sign-requests

  supported = olympex_request("POST", "/support-chain", {"chainId": 137})
  print("Polygon is supported" if supported else "Polygon is not supported")
  ```
</RequestExample>

<ResponseExample>
  ```json 200 Supported theme={null}
  {
    "success": true,
    "data": true,
    "meta": {
      "requestId": "ENUlxjCsIAMEMUA=",
      "version": "v1",
      "accountType": "integrator",
      "apiKeyId": "00000000-0000-4000-8000-000000000000"
    }
  }
  ```

  ```json 200 Not supported theme={null}
  {
    "success": true,
    "data": false,
    "meta": {
      "requestId": "ENUmEhC2oAMEMtQ=",
      "version": "v1",
      "accountType": "integrator",
      "apiKeyId": "00000000-0000-4000-8000-000000000000"
    }
  }
  ```

  ```json 400 theme={null}
  {
    "success": false,
    "error": {
      "code": "VALIDATION_ERROR",
      "message": "Invalid request body",
      "details": [
        {
          "field": "chainId",
          "message": "Invalid input: expected number, received string"
        }
      ]
    },
    "meta": {
      "requestId": "E7ee3hLMoAMEZxg=",
      "version": "v1",
      "accountType": "integrator",
      "apiKeyId": "00000000-0000-4000-8000-000000000000"
    }
  }
  ```

  ```json 403 Gateway theme={null}
  {
    "message": "Forbidden"
  }
  ```
</ResponseExample>


## OpenAPI

````yaml api-reference/openapi.json POST /support-chain
openapi: 3.0.3
info:
  title: Olympex REST API
  version: 1.0.0
  description: >-
    Aggregated swap quotes and transactions, limit orders and DCA strategies on
    EVM chains, plus the chain and token catalog. Every response uses the same
    envelope, except the API gateway's own responses (`{"message": …}`): `401`
    or `403` when the signed headers are missing or rejected, `429` when it
    throttles requests, and `500` or `503` when it can't get a response from
    Olympex in time. Chain IDs are integers on every endpoint. Signed endpoints
    require four signed headers; see [Sign
    requests](https://docs.olympex.io/authentication/sign-requests).
  termsOfService: https://docs.olympex.io/legal/terms
  contact:
    name: Olympex partnerships
    email: partners@olympex.io
    url: https://docs.olympex.io
servers:
  - url: https://api-rest.olympex.io/api/v1
    description: Olympex REST API v1
security: []
tags:
  - name: Accounts
    description: Create API credentials.
  - name: Quotes
    description: Aggregated single-chain and cross-chain quotes.
  - name: Swap
    description: Unsigned transaction calldata for a quoted route.
  - name: TxStatus
    description: Track a cross-chain transfer after you broadcast it.
  - name: Transactions
    description: On-chain status of a transaction you broadcast.
  - name: Chains and tokens
    description: Enabled chains and the tokens listed on each.
  - name: Limit orders
    description: Orders that Olympex executes when the market reaches your price.
  - name: DCA
    description: Strategies that buy a token in equal orders over time.
  - name: Docs
    description: Machine-readable API description.
paths:
  /support-chain:
    post:
      tags:
        - Chains and tokens
      summary: Check chain support
      description: >-
        Returns `true` when Olympex supports the chain and `false` when it
        doesn't.
      operationId: checkChainSupport
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/SupportChainRequest'
            example:
              chainId: 137
      responses:
        '200':
          description: Chain support status.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SupportChainSuccessResponse'
              examples:
                supported:
                  summary: Supported (137)
                  value:
                    success: true
                    data: true
                    meta:
                      requestId: ENUlxjCsIAMEMUA=
                      version: v1
                      accountType: integrator
                      apiKeyId: 00000000-0000-4000-8000-000000000000
                unsupported:
                  summary: Not supported (324)
                  value:
                    success: true
                    data: false
                    meta:
                      requestId: ENUmEhC2oAMEMtQ=
                      version: v1
                      accountType: integrator
                      apiKeyId: 00000000-0000-4000-8000-000000000000
        '400':
          description: >-
            The body failed validation. `error.details` lists each field and why
            it failed.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                success: false
                error:
                  code: VALIDATION_ERROR
                  message: Invalid request body
                  details:
                    - field: chainId
                      message: 'Invalid input: expected number, received string'
                meta:
                  requestId: E7ee3hLMoAMEZxg=
                  version: v1
                  accountType: integrator
                  apiKeyId: 00000000-0000-4000-8000-000000000000
        '401':
          description: >-
            A signing header is missing. The gateway answers with
            `{"message":"Unauthorized"}` before your request reaches Olympex;
            the handler answers with the `UNAUTHORIZED` envelope when the
            authorizer context is missing.
          content:
            application/json:
              schema:
                oneOf:
                  - $ref: '#/components/schemas/GatewayError'
                  - $ref: '#/components/schemas/ErrorResponse'
              example:
                message: Unauthorized
        '403':
          description: >-
            Authentication failed: unknown key, wrong passphrase, invalid
            signature, timestamp outside the ±300 s window, reused nonce, or
            inactive account (gateway `{"message":"Forbidden"}`). The handler
            answers with the `FORBIDDEN` envelope when the body does not match
            the signed `bodyHash`.
          content:
            application/json:
              schema:
                oneOf:
                  - $ref: '#/components/schemas/GatewayError'
                  - $ref: '#/components/schemas/ErrorResponse'
              examples:
                gateway:
                  summary: Signature rejected by the gateway
                  value:
                    message: Forbidden
                bodyHash:
                  summary: Body does not match the signed hash
                  value:
                    success: false
                    error:
                      code: FORBIDDEN
                      message: Invalid body hash
                      details: []
                    meta:
                      requestId: ENXGDhsXIAMEMEw=
                      version: v1
                      accountType: integrator
                      apiKeyId: 00000000-0000-4000-8000-000000000000
        '404':
          description: >-
            Unknown path or wrong method (`NOT_FOUND`). `error.message` names
            the method and path.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                success: false
                error:
                  code: NOT_FOUND
                  message: No route for GET /api/v1/quote
                  details: []
                meta:
                  requestId: E7edogG4IAMEPYA=
                  version: v1
        '500':
          description: >-
            Olympex could not complete the request (`SUPPORT_CHAIN_ERROR` or
            `INTERNAL_ERROR`), or the gateway could not get a response
            (`{"message":"Internal Server Error"}`), for example after a timeout
            of about 30 seconds. Retry with backoff.
          content:
            application/json:
              schema:
                oneOf:
                  - $ref: '#/components/schemas/ErrorResponse'
                  - $ref: '#/components/schemas/GatewayError'
              example:
                success: false
                error:
                  code: SUPPORT_CHAIN_ERROR
                  message: Unexpected support chain handler error
                  details:
                    - message: Unknown error
                meta:
                  requestId: ENW91mPgIAMEMEw=
                  version: v1
                  accountType: integrator
                  apiKeyId: 00000000-0000-4000-8000-000000000000
        '503':
          description: >-
            The gateway could not get a response in time (the integration
            timeout is about 30 seconds) or the service is briefly unavailable.
            Returned by the gateway. Retry with backoff.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GatewayError'
              example:
                message: Service Unavailable
      security:
        - ApiKeyId: []
          ValueInfo: []
          Passphrase: []
          Signature: []
components:
  schemas:
    SupportChainRequest:
      type: object
      required:
        - chainId
      properties:
        chainId:
          type: integer
          minimum: 0
          exclusiveMinimum: true
          maximum: 9007199254740991
          description: EVM chain ID as an integer, for example `137`.
          example: 137
    SupportChainSuccessResponse:
      type: object
      required:
        - success
        - data
        - meta
      properties:
        success:
          type: boolean
          enum:
            - true
        data:
          type: boolean
          description: '`true` when the chain is supported.'
        meta:
          $ref: '#/components/schemas/Meta'
    ErrorResponse:
      type: object
      required:
        - success
        - error
        - meta
      properties:
        success:
          type: boolean
          enum:
            - false
        error:
          $ref: '#/components/schemas/ErrorBody'
        meta:
          $ref: '#/components/schemas/Meta'
    GatewayError:
      type: object
      required:
        - message
      description: >-
        Returned by the API gateway itself: `401` or `403` when the signed
        headers are missing or rejected, `429` when it throttles requests, and
        `500` or `503` when it can't get a response from Olympex in time. It has
        no `success`, `error` or `meta`.
      properties:
        message:
          type: string
          example: Forbidden
    Meta:
      type: object
      required:
        - requestId
        - version
      properties:
        requestId:
          type: string
          description: Unique ID for this request. Include it when you contact support.
        version:
          type: string
          default: v1
          description: API version that served the request.
        accountType:
          type: string
          description: >-
            Account type resolved by the signature check, for example
            `integrator`. Present when the request was authenticated; absent on
            the `404` for an unknown path or method.
        apiKeyId:
          type: string
          format: uuid
          description: >-
            The API key ID that signed the request. Present when the request was
            authenticated; absent on the `404` for an unknown path or method.
    ErrorBody:
      type: object
      required:
        - code
        - message
        - details
      properties:
        code:
          type: string
          description: >-
            Machine-readable error code. `VALIDATION_ERROR` (400),
            `UNAUTHORIZED` (401), `FORBIDDEN` (403), `NOT_FOUND` (404, also for
            an unknown path or method), `CONFLICT` (409), `NO_ROUTE` (422), and
            for 500: `QUOTE_ERROR`, `CROSS_CHAIN_QUOTE_ERROR`, `SWAP_ERROR`,
            `CROSS_CHAIN_SWAP_ERROR`, `SUPPORT_CHAIN_ERROR`,
            `ENABLED_CHAINS_ERROR`, `TOKEN_LIST_ERROR`, `TX_STATUS_ERROR`,
            `INTERNAL_ERROR`. Olympex can add codes: handle an unknown code by
            its HTTP status.
        message:
          type: string
          description: Human-readable summary. Don't parse it.
        details:
          type: array
          items:
            $ref: '#/components/schemas/ErrorDetail'
    ErrorDetail:
      type: object
      additionalProperties: true
      description: >-
        Validation errors carry `field` and `message`; other errors carry
        `message` only.
      properties:
        field:
          type: string
          description: >-
            Dot path of the invalid field, for example `params.chainId`. Empty
            for the top level.
        message:
          type: string
  securitySchemes:
    ApiKeyId:
      type: apiKey
      in: header
      name: x-api-key-id
      description: >-
        Your API key ID (UUID). See [Sign
        requests](https://docs.olympex.io/authentication/sign-requests).
    ValueInfo:
      type: apiKey
      in: header
      name: x-value-info
      description: >-
        Base64 of `timestamp + "\n" + nonce + "\n" + bodyHash`, where
        `timestamp` is Unix seconds, `nonce` is 24 new hexadecimal characters
        and `bodyHash` is the unpadded base64url SHA-256 of the canonical body.
    Passphrase:
      type: apiKey
      in: header
      name: x-passphrase
      description: Your account passphrase. Treat it like the secret key.
    Signature:
      type: apiKey
      in: header
      name: x-signature
      description: >-
        Lowercase hex HMAC-SHA256 (signature v2), keyed with your secret key
        string (UTF-8, not decoded), of seven lines joined with `\n`, with no
        trailing newline: `OLPX-HMAC-SHA256-V2`, `timestamp`, `nonce`, the
        uppercase method, `path`, `canonicalQuery` and `bodyHash`. `path` is the
        request path including `/api/v1`, without the query string, for example
        `/api/v1/limit-order/<id>`. `canonicalQuery` is the query parameters
        decoded (`+` is a space), sorted by key and then by value, re-encoded
        per RFC 3986 and joined with `&`, or the empty string when there is no
        query. Headers signed for one request are rejected on any other. See
        [Sign requests](https://docs.olympex.io/authentication/sign-requests).

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.