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

# Get chain by ID

> Look up one supported chain by its chain ID, with name, icon, native asset and per-chain feature flags.



## OpenAPI

````yaml /openapi-v1.yaml get /v1/chains/{chain_id}
openapi: 3.0.3
info:
  version: 1.0.0
  title: REST API
  description: REST-like API provides access to rich Zerion ecosystem.
  contact:
    name: Zerion API
    url: https://developers.zerion.io/
    email: api@zerion.io
servers:
  - description: Production API
    url: https://api.zerion.io
security:
  - APIKeyBasicAuth: []
tags:
  - name: wallets
    description: >-
      Operations related to wallets, such as portfolio charts, positions, and
      transactions.
  - name: wallet sets
    description: >-
      Operations on a wallet set, returning aggregated portfolio data across at
      most one EVM address and one Solana address queried together.
  - name: fungibles
    description: >-
      Operations related to fungible assets, such as list them all, search or
      get by ID.
  - name: chains
    description: Operations related to chains, such as list all chains.
  - name: swap
    description: Operations related to swapping and bridging assets.
  - name: gas
    description: Operations related to gas.
  - name: nfts
    description: >-
      Operations related to non fungible assets, such list them, search or get
      by ID.
  - name: dapps
    description: >-
      Operations related to decentralized applications, such as list them all,
      search or get by ID.
  - name: subscriptions to transactions
    description: Operations related to subscriptions to transactions.
paths:
  /v1/chains/{chain_id}:
    get:
      tags:
        - chains
      summary: Get chain by ID
      description: >
        Returns a single chain by its unique chain ID.


        Each chain's `flags` report per-capability support: whether trading,
        sending, bridging, transaction history, positions and NFT positions are
        available on that chain.


        **See also:** [Testnets (`X-Env:
        testnet`)](https://developers.zerion.io/supported-blockchains#testnets)
      operationId: getChainById
      parameters:
        - name: chain_id
          in: path
          required: true
          description: Unique chain ID.
          schema:
            type: string
        - name: X-Env
          in: header
          description: Set to `testnet` to return testnet data instead of mainnet.
          required: false
          schema:
            type: string
            enum:
              - testnet
      responses:
        '200':
          $ref: '#/components/responses/SingleChainResponse'
        '400':
          $ref: '#/components/responses/MalformedParameters'
        '401':
          $ref: '#/components/responses/UnauthenticatedError'
        '404':
          $ref: '#/components/responses/NotFoundResponse'
        '429':
          $ref: '#/components/responses/TooManyRequests'
components:
  responses:
    SingleChainResponse:
      description: Response for requested chain
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ChainResponse'
    MalformedParameters:
      description: Parameters are malformed
      content:
        application/json:
          schema:
            type: object
            properties:
              errors:
                type: array
                items:
                  type: object
                  properties:
                    title:
                      type: string
                      description: Error short title
                      example: Parameter is malformed
                    detail:
                      type: string
                      description: Long description of the error
                      example: Some validation errors will be described here
    UnauthenticatedError:
      description: Unathenticated request
      content:
        application/json:
          schema:
            type: object
            properties:
              errors:
                type: array
                items:
                  type: object
                  properties:
                    title:
                      type: string
                      description: Error short title
                      example: Unauthorized Error
                    detail:
                      type: string
                      description: Long description of the error
                      example: >-
                        The API key is invalid, please, make sure that you are
                        using a valid key
    NotFoundResponse:
      description: Resource was not found
      content:
        application/json:
          schema:
            type: object
            properties:
              errors:
                type: array
                items:
                  type: object
                  properties:
                    title:
                      type: string
                      description: Error short title
                      example: Resource was not found
                    detail:
                      type: string
                      description: Long description of the error
                      example: Requested resource was not found, try later
    TooManyRequests:
      description: Too many requests error
      content:
        application/json:
          schema:
            type: object
            properties:
              errors:
                type: array
                items:
                  type: object
                  properties:
                    title:
                      type: string
                      description: Error short title
                      example: Too many requests
                    detail:
                      type: string
                      description: Long description of the error
                      example: Your request had been throttled
  schemas:
    ChainResponse:
      type: object
      required:
        - links
        - data
      properties:
        links:
          $ref: '#/components/schemas/ResponseLinks-16'
        data:
          $ref: '#/components/schemas/Container-15'
    ResponseLinks-16:
      type: object
      required:
        - self
      properties:
        self:
          type: string
          format: url
          description: URL of the current chain.
          example: https://api.zerion.io/v1/chains/polygon
    Container-15:
      type: object
      required:
        - type
        - id
      properties:
        type:
          type: string
          description: Chain resource type
          example: chains
        id:
          type: string
          description: Chain unique identifier
          example: polygon
        attributes:
          $ref: '#/components/schemas/Attributes-13'
        relationships:
          $ref: '#/components/schemas/Relationships-7'
    Attributes-13:
      type: object
      description: Attributes of chain resource
      required:
        - name
      properties:
        external_id:
          type: string
          description: Community used chain ID
          example: '0x4e454152'
        name:
          type: string
          description: Human readable chain name
          example: polygon
        icon:
          $ref: '#/components/schemas/Icon'
        explorer:
          $ref: '#/components/schemas/Explorer'
        rpc:
          $ref: '#/components/schemas/RPC'
        flags:
          $ref: '#/components/schemas/Flags-5'
    Relationships-7:
      type: object
      required:
        - native_fungible
      properties:
        native_fungible:
          $ref: '#/components/schemas/ResponseShort'
        wrapped_native_fungible:
          $ref: '#/components/schemas/ResponseShort'
    Icon:
      type: object
      description: Icon related to object.
      properties:
        url:
          type: string
          nullable: true
          format: url
          description: URL of the icon.
          example: >-
            https://token-icons.s3.amazonaws.com/0x0391d2021f89dc339f60fff84546ea23e337750f.png
    Explorer:
      type: object
      required:
        - name
      description: Chain explorer data
      properties:
        name:
          type: string
          description: Human readable explorer name
          example: polygonScan
        token_url_format:
          type: string
          format: url
          description: URL with placeholders that leads to a token page
          example: https://explorer.mainnet.polygon.dev/token/{ADDRESS}
        tx_url_format:
          type: string
          format: url
          description: URL with placeholders that points to a transaction page
          example: https://explorer.mainnet.polygon.dev/tx/{HASH}
        home_url:
          type: string
          format: url
          description: URL leads to the explorer homepage
          example: https://explorer.mainnet.polygon.dev
    RPC:
      type: object
      description: Chain RPC servers data
      properties:
        internal_server_url_format:
          type: string
          format: url
          description: >-
            URL with placeholders of RPC server which can be used for project
            purposes
          example: https://mainnet.polygon.dev/{polygon_API_KEY}
        public_servers_url:
          type: array
          description: List of URL of public RPC servers which can be used by everyone
          items:
            type: string
            format: url
            example: https://mainnet.polygon.dev
    Flags-5:
      type: object
      description: Various chain related boolean flags
      required:
        - supports_trading
        - supports_sending
        - supports_bridge
        - supports_transactions
        - supports_positions
        - supports_nft_positions
      properties:
        supports_trading:
          type: boolean
          description: Whether trading is supported on Zerion for this chain or not
          example: true
        supports_sending:
          type: boolean
          description: Whether sending is supported on Zerion for this chain or not
          example: true
        supports_bridge:
          type: boolean
          description: Whether bridges are supported on Zerion for this chain or not
          example: true
        supports_transactions:
          type: boolean
          description: >-
            Whether transaction history is indexed for this chain. When false,
            the chain is excluded from transaction, chart and PnL responses, and
            naming it explicitly in filter[chain_ids] on those endpoints returns
            400.
          example: true
        supports_positions:
          type: boolean
          description: >-
            Whether wallet positions (token balances and DeFi positions) are
            indexed for this chain. When false, the chain is excluded from
            position, chart and PnL responses, and naming it explicitly in
            filter[chain_ids] on those endpoints returns 400.
          example: true
        supports_nft_positions:
          type: boolean
          description: >-
            Whether NFT positions and NFT collections are indexed for this
            chain. When false, the chain is excluded from NFT responses, and
            naming it explicitly in filter[chain_ids] on those endpoints returns
            400.
          example: true
    ResponseShort:
      type: object
      required:
        - links
        - data
      properties:
        links:
          $ref: '#/components/schemas/ResponseLinks-13'
        data:
          $ref: '#/components/schemas/ContainerShort-5'
    ResponseLinks-13:
      type: object
      properties:
        related:
          type: string
          format: url
          example: >-
            https://api.zerion.io/v1/fungibles/0x2af1df3ab0ab157e1e2ad8f88a7d04fbea0c7dc6
    ContainerShort-5:
      type: object
      required:
        - type
        - id
      properties:
        type:
          type: string
          description: Fungible resource type
          example: fungibles
        id:
          type: string
          description: Fungible unique identifier
          example: '0x2af1df3ab0ab157e1e2ad8f88a7d04fbea0c7dc6'
  securitySchemes:
    APIKeyBasicAuth:
      type: http
      scheme: basic
      description: >-
        To test endpoints here, paste your API key from the
        [Dashboard](https://dashboard.zerion.io/) into the username field and
        leave the password empty.

````

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