Chainlens Token-Controller API

The Token-Controller API from Chainlens — 3 operation(s) for token-controller.

OpenAPI Specification

chainlens-token-controller-api-openapi.yml Raw ↑
openapi: 3.0.1
info:
  title: Chainlens Account-Controller Token-Controller API
  description: Chainlens provides a robust and intuitive platform combining user-friendly exploration with powerful analytics and advanced features. Whether monitoring real-time blockchain transactions, verifying smart contracts, or tracking NFTs, Chainlens ensures you have all the necessary tools at your fingertips.
  version: master
tags:
- name: Token-Controller
paths:
  /tokens:
    get:
      tags:
      - Token-Controller
      summary: Chainlens Retrieve token contracts.
      operationId: findTokens
      parameters:
      - name: query
        in: query
        required: true
        schema:
          $ref: '#/components/schemas/FindTokensQuery'
      responses:
        '200':
          description: OK
          content:
            '*/*':
              schema:
                $ref: '#/components/schemas/ListTokenModel'
  /tokens/{addressHash}:
    get:
      tags:
      - Token-Controller
      summary: Chainlens Retrieve a token by its address hash.
      operationId: getToken
      parameters:
      - name: addressHash
        in: path
        description: The address hash identifying the contract.
        required: true
        schema:
          type: string
      responses:
        '200':
          description: OK
          content:
            '*/*':
              schema:
                $ref: '#/components/schemas/TokenModel'
  /tokens/{addressHash}/{tokenId}:
    get:
      tags:
      - Token-Controller
      summary: Chainlens Retrieve token contracts by tokenId.
      operationId: findTokensByTokenId
      parameters:
      - name: addressHash
        in: path
        description: The address hash identifying the contract.
        required: true
        schema:
          type: string
      - name: tokenId
        in: path
        required: true
        schema:
          type: string
      responses:
        '200':
          description: OK
          content:
            '*/*':
              schema:
                $ref: '#/components/schemas/TokenModel'
components:
  schemas:
    Link:
      required:
      - display
      - href
      - rel
      type: object
      properties:
        href:
          type: string
        rel:
          type: string
        display:
          type: string
    FindTokensQuery:
      required:
      - direction
      - page
      - size
      - sort
      - tokenType
      type: object
      properties:
        page:
          minimum: 0
          type: integer
          format: int32
        size:
          maximum: 100
          minimum: 1
          type: integer
          format: int32
        direction:
          type: string
          enum:
          - ASC
          - DESC
        sort:
          type: string
          enum:
          - lastActivity
          - transactionCount
          - totalTokenCount
          - holdersCount
          - totalSupply
          - contractType
          - verified
        filter:
          type: string
        tokenType:
          type: string
          enum:
          - NFT
          - RWA
          - TOKEN
          - DEFAULT
    TokenModel:
      required:
      - address
      - contractType
      - lastExecutedTimestampISO
      - transactionCount
      - verified
      type: object
      properties:
        address:
          type: string
        addressLinks:
          type: array
          items:
            $ref: '#/components/schemas/Link'
        name:
          type: string
        symbol:
          type: string
        decimals:
          type: integer
          format: int32
        totalSupply:
          type: number
        contractType:
          type: string
        transactionCount:
          type: integer
          format: int64
        lastExecutedTimestampISO:
          type: string
        coverImage:
          type: string
        holdersCount:
          type: integer
          format: int64
        tokenCount:
          type: integer
          format: int64
        metadata:
          $ref: '#/components/schemas/CollectionMetadataModel'
        metadataUrl:
          type: string
        originalAssetLink:
          type: string
        verified:
          type: boolean
        verifiedStatus:
          type: string
          enum:
          - Partial
          - Full
        project:
          $ref: '#/components/schemas/ProjectModel'
        marketData:
          $ref: '#/components/schemas/MarketDataModel'
    ProjectModel:
      required:
      - address
      - isActive
      type: object
      properties:
        address:
          type: string
        name:
          type: string
        description:
          type: string
        type:
          type: string
          enum:
          - CONTRACT
          - DAPP
        socialMedia:
          type: array
          items:
            $ref: '#/components/schemas/SocialLink'
        isActive:
          type: boolean
        coverImage:
          type: string
        website:
          type: string
    ListTokenModel:
      required:
      - data
      - paging
      type: object
      properties:
        paging:
          $ref: '#/components/schemas/PagingModel'
        data:
          type: array
          items:
            $ref: '#/components/schemas/TokenModel'
    CollectionMetadataModel:
      required:
      - attributes
      type: object
      properties:
        name:
          type: string
        collectionName:
          type: string
        artistAddress:
          type: string
        description:
          type: string
        image:
          type: string
        externalUrl:
          type: string
        attributes:
          type: array
          items:
            $ref: '#/components/schemas/Attribute'
        resolvedImageUrl:
          type: string
        metadataUrl:
          type: string
        tokenId:
          type: string
    SocialLink:
      required:
      - name
      - url
      type: object
      properties:
        name:
          type: string
        url:
          type: string
    PagingModel:
      required:
      - direction
      - page
      - size
      - sort
      - totalElements
      type: object
      properties:
        page:
          type: integer
          format: int32
        size:
          type: integer
          format: int32
        sort:
          type: string
        direction:
          type: string
          enum:
          - ASC
          - DESC
        totalElements:
          type: integer
          format: int64
    MarketDataModel:
      required:
      - fdv
      - market_cap
      - market_change_24h_percent
      - price_eth
      - price_usd
      - total_circulating_supply
      - total_volume_24h
      type: object
      properties:
        fdv:
          type: number
        market_cap:
          type: number
        total_volume_24h:
          type: number
        total_circulating_supply:
          type: number
        price_usd:
          type: number
        price_eth:
          type: number
        market_change_24h_percent:
          type: number
        image:
          type: string
    Attribute:
      required:
      - traitType
      - value
      type: object
      properties:
        traitType:
          type: string
        value:
          type: string
externalDocs:
  description: Chainlens Documentation
  url: https://docs.chainlens.com/