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

# Get Chains

> List all supported blockchains

Returns the list of all blockchains supported by Hypermid, including EVM chains, Solana, Bitcoin, and intent-based chains.

<ParamField query="type" type="string">
  Filter by chain type. Possible values: `EVM`, `SVM`, `UTXO`, `NEAR_INTENTS`.
</ParamField>

<ResponseExample>
  ```json 200 theme={"system"}
  {
    "data": {
      "chains": [
        {
          "id": 1,
          "name": "Ethereum",
          "type": "EVM",
          "nativeToken": {
            "symbol": "ETH",
            "decimals": 18,
            "address": "0x0000000000000000000000000000000000000000",
            "priceUSD": "3250.00"
          },
          "blockExplorerUrl": "https://etherscan.io",
          "rpcUrl": "https://eth.llamarpc.com"
        },
        {
          "id": 42161,
          "name": "Arbitrum",
          "type": "EVM",
          "nativeToken": {
            "symbol": "ETH",
            "decimals": 18,
            "address": "0x0000000000000000000000000000000000000000",
            "priceUSD": "3250.00"
          },
          "blockExplorerUrl": "https://arbiscan.io",
          "rpcUrl": "https://arb1.arbitrum.io/rpc"
        },
        {
          "id": 900000001,
          "name": "NEAR",
          "type": "NEAR_INTENTS",
          "nativeToken": {
            "symbol": "NEAR",
            "decimals": 24,
            "address": "near",
            "priceUSD": "5.20"
          },
          "blockExplorerUrl": "https://nearblocks.io"
        }
      ]
    },
    "error": null,
    "meta": {
      "requestId": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
      "timestamp": 1711234567,
      "rateLimit": {
        "limit": 2000,
        "remaining": 1999,
        "reset": 1711234627
      }
    }
  }
  ```
</ResponseExample>

<CodeGroup>
  ```typescript TypeScript theme={"system"}
  const chains = await client.getChains();

  // Filter for EVM chains only
  const evmChains = chains.data.chains.filter(c => c.type === "EVM");
  console.log(`Found ${evmChains.length} EVM chains`);
  ```

  ```bash cURL theme={"system"}
  curl https://api.hypermid.io/v1/chains \
    -H "X-API-Key: your-api-key"
  ```

  ```go Go theme={"system"}
  req, _ := http.NewRequest("GET", "https://api.hypermid.io/v1/chains", nil)
  req.Header.Set("X-API-Key", "your-api-key")
  resp, _ := http.DefaultClient.Do(req)
  ```
</CodeGroup>


## OpenAPI

````yaml GET /v1/chains
openapi: 3.0.3
info:
  title: Hypermid Partner API
  version: 1.0.0
  description: >-
    Cross-chain swap aggregator API. Supports 30+ EVM chains, Solana, Bitcoin,
    Sui, and Near Intents chains (NEAR, TON, Tron, XRP, etc.).


    ## Authentication

    Pass your API key via the `X-API-Key` header. Public endpoints work without
    a key (anonymous tier). Partner endpoints (`/v1/partner/*`) require a valid
    key.


    ## Rate Limits

    - **Anonymous**: 30 requests/minute (per IP)

    - **Partner (authenticated)**: 100 requests/minute (per API key)


    These limits are designed for human-driven widget usage and mirror our
    upstream aggregator (LiFi) limits to prevent any single user from exhausting
    shared quota.


    Rate limit info is returned in `meta.rateLimit` on every response.


    ## Response Envelope

    All responses follow the shape:

    ```json

    { "data": <T | null>, "error": <{ code, message, details? } | null>, "meta":
    { "requestId", "timestamp", "rateLimit?" } }

    ```
  contact:
    name: Hypermid
    url: https://hypermid.io
servers:
  - url: https://api.hypermid.io
    description: Production
security:
  - ApiKeyAuth: []
  - {}
tags:
  - name: Swap
    description: Cross-chain swap quoting, routing, status, and reference data
  - name: Execute
    description: Transaction execution and deposit management for Near Intents swaps
  - name: On-Ramp
    description: Fiat-to-crypto on-ramp via RampNow
  - name: Partner
    description: Partner account, analytics, and webhook management (requires X-API-Key)
  - name: Tracking
    description: Swap event tracking for partner attribution
  - name: System
    description: Health check and API metadata
paths:
  /v1/chains:
    get:
      tags:
        - Swap
      summary: List supported chains
      description: >-
        Returns all supported chains: LI.FI chains (EVM, Solana, Bitcoin, Sui)
        plus Near Intents-only chains. Cached for 1 hour.
      operationId: getChains
      responses:
        '200':
          description: List of chains
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/ApiResponse'
                  - type: object
                    properties:
                      data:
                        type: object
                        properties:
                          chains:
                            type: array
                            items:
                              $ref: '#/components/schemas/Chain'
        '502':
          $ref: '#/components/responses/UpstreamError'
components:
  schemas:
    ApiResponse:
      type: object
      properties:
        data:
          description: Response payload (null on error)
        error:
          nullable: true
          type: object
          properties:
            code:
              type: string
              example: INVALID_PARAMS
            message:
              type: string
              example: 'Missing required parameters: fromChain'
            details:
              type: object
              additionalProperties: true
          required:
            - code
            - message
        meta:
          $ref: '#/components/schemas/Meta'
      required:
        - data
        - error
        - meta
    Chain:
      type: object
      properties:
        id:
          type: integer
          example: 1
        key:
          type: string
          example: eth
        name:
          type: string
          example: Ethereum
        chainType:
          type: string
          example: EVM
        nativeToken:
          type: object
          properties:
            symbol:
              type: string
            name:
              type: string
            decimals:
              type: integer
        provider:
          type: string
          enum:
            - lifi
            - near-intents
    Meta:
      type: object
      properties:
        requestId:
          type: string
          format: uuid
        timestamp:
          type: integer
          description: Unix epoch seconds
        rateLimit:
          type: object
          properties:
            limit:
              type: integer
            remaining:
              type: integer
            reset:
              type: integer
              description: Unix epoch seconds when the window resets
      required:
        - requestId
        - timestamp
  responses:
    UpstreamError:
      description: Upstream provider error
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ApiResponse'
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: X-API-Key
      description: >-
        Partner API key. Optional for public endpoints, required for
        /v1/partner/*.

````