Dynamic Chains API

The Chains API from Dynamic — 1 operation(s) for chains.

OpenAPI Specification

dynamic-xyz-chains-api-openapi.yml Raw ↑
openapi: 3.0.1
info:
  title: Dashboard Allowlists Chains API
  description: Dashboard API documentation
  version: 1.0.0
servers:
- url: https://app.dynamicauth.com/api/v0
- url: https://app.dynamic.xyz/api/v0
- url: http://localhost:3333/api/v0
tags:
- name: Chains
paths:
  /chains/{chainName}/tokens:
    get:
      summary: Get tokens for passed chainName.
      operationId: getAllTokensByChain
      tags:
      - Chains
      security:
      - bearerAuth: []
      parameters:
      - $ref: '#/components/parameters/chainName'
      - in: query
        name: networkId
        required: false
        schema:
          type: number
      responses:
        '200':
          description: Get all tokens for chain
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ChainTokensResponse'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '500':
          $ref: '#/components/responses/InternalServerError'
components:
  schemas:
    ChainToken:
      description: Defined an one token which can have multiple contract addresses dependent to networkId
      type: object
      required:
      - name
      - symbol
      - tokenAddresses
      properties:
        name:
          description: Name of the token
          type: string
          example: Shiba Inu
        symbol:
          description: Symbol of the token
          type: string
          example: SHIB
        tokenAddresses:
          description: Array of different contract addresses dependent to networkId
          type: array
          items:
            $ref: '#/components/schemas/TokenAddress'
    WalletPublicKey:
      type: string
      pattern: ^[A-Za-z0-9]{18,100}$
      description: Valid blockchain wallet address, must be an alphanumeric string without any special characters
      example: '0xbF394748301603f18d953C90F0b087CBEC0E1834'
      maxLength: 255
    ChainTokensResponse:
      type: array
      items:
        $ref: '#/components/schemas/ChainToken'
    Unauthorized:
      type: object
      properties:
        error:
          type: string
          example: No jwt provided!
    BadRequest:
      type: object
      properties:
        error:
          type: string
    TokenAddress:
      description: Defines one token address connected with network Id on which it's working
      type: object
      required:
      - networkId
      - contractAddress
      properties:
        networkId:
          description: Id of the network
          type: number
          example: 1
        contractAddress:
          $ref: '#/components/schemas/WalletPublicKey'
    ChainEnum:
      type: string
      enum:
      - ETH
      - EVM
      - FLOW
      - SOL
      - ALGO
      - STARK
      - COSMOS
      - BTC
      - ECLIPSE
      - SUI
      - SPARK
      - TRON
      - APTOS
      - TON
      - STELLAR
    InternalServerError:
      type: object
      properties:
        error:
          type: string
          example: Internal Server Error
  responses:
    Unauthorized:
      description: Unauthorized
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Unauthorized'
    InternalServerError:
      description: Internal Server Error
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/InternalServerError'
    BadRequest:
      description: Bad Request
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/BadRequest'
  parameters:
    chainName:
      name: chainName
      in: path
      description: Shortened chain name
      example: EVM
      required: true
      schema:
        $ref: '#/components/schemas/ChainEnum'
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT