Polkadot Midnight API

The Midnight API from Polkadot — 11 operation(s) for midnight.

Operations 11

POST /api/scan/midnight/compact_version Midnight Supported Compact Compiler Versions
POST /api/scan/midnight/contract Midnight Contract Detail
POST /api/scan/midnight/contract/cma Midnight Contract CMA info
POST /api/scan/midnight/contract/state Midnight Contract State
POST /api/scan/midnight/contracts Midnight Contracts
POST /api/scan/midnight/transaction Midnight Transaction Detail
POST /api/scan/midnight/transactions Midnight Transactions
POST /api/scan/midnight/unshielded_tokens/balance Midnight Unshielded Balance
POST /api/scan/midnight/unshielded_tokens/balances Midnight Unshielded Token Balance List
POST /api/scan/midnight/unshielded_tokens/ledger Midnight Unshielded Ledger
POST /api/scan/midnight/unshielded_tokens/types Midnight Unshielded Token Type List

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/polkadot-midnight-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Discovery needs no key. Ratings and market analysis are Pro.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

polkadot-midnight-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  contact:
    email: bruce.sun@itering.io
    name: API Support
    url: http://www.swagger.io/support
  description: This is a subscan API server.
  license:
    name: Apache 2.0
    url: http://www.apache.org/licenses/LICENSE-2.0.html
  termsOfService: http://swagger.io/terms/
  title: Subscan Midnight API
  version: '1.0'
servers:
- url: https://https://www.subscan.io/
tags:
- name: Midnight
paths:
  /api/scan/midnight/compact_version:
    post:
      description: This API is only available midnight network
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                allOf:
                - $ref: '#/components/schemas/subscan_internal_plugin_share.J'
                - properties:
                    data:
                      items:
                        type: string
                      type: array
                  type: object
      summary: Midnight Supported Compact Compiler Versions
      tags:
      - Midnight
      x-synonyms:
      - midnight
      - supported
      - compact
      - compiler
      - versions
      - scan
      - version
  /api/scan/midnight/contract:
    post:
      description: This API is only available midnight network
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                allOf:
                - $ref: '#/components/schemas/subscan_internal_plugin_share.J'
                - properties:
                    data:
                      $ref: '#/components/schemas/internal_pluginv2_customizeds_midnight.MidContract'
                  type: object
      summary: Midnight Contract Detail
      tags:
      - Midnight
      x-synonyms:
      - midnight
      - contract
      - scan
      - smart contract
      - wasm contract
      - evm contract
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/internal_pluginv2_customizeds_midnight.MidnightContractParams'
        description: params
        required: true
  /api/scan/midnight/contract/cma:
    post:
      description: This API is only available midnight network
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                allOf:
                - $ref: '#/components/schemas/subscan_internal_plugin_share.J'
                - properties:
                    data:
                      items:
                        type: string
                      type: array
                  type: object
      summary: Midnight Contract CMA info
      tags:
      - Midnight
      x-synonyms:
      - midnight
      - contract
      - cma
      - scan
      - smart contract
      - wasm contract
      - evm contract
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/internal_pluginv2_customizeds_midnight.MidnightContractParams'
        description: params
        required: true
  /api/scan/midnight/contract/state:
    post:
      description: This API is only available midnight network
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                allOf:
                - $ref: '#/components/schemas/subscan_internal_plugin_share.J'
                - properties:
                    data:
                      additionalProperties: true
                      type: object
                  type: object
      summary: Midnight Contract State
      tags:
      - Midnight
      x-synonyms:
      - midnight
      - contract
      - state
      - scan
      - smart contract
      - wasm contract
      - evm contract
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/internal_pluginv2_customizeds_midnight.MidnightContractState'
        description: params
        required: true
  /api/scan/midnight/contracts:
    post:
      description: This API is only available midnight network
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                allOf:
                - $ref: '#/components/schemas/subscan_internal_plugin_share.J'
                - properties:
                    data:
                      properties:
                        count:
                          type: integer
                        list:
                          items:
                            $ref: '#/components/schemas/internal_pluginv2_customizeds_midnight.MidContract'
                          type: array
                      type: object
                  type: object
      summary: Midnight Contracts
      tags:
      - Midnight
      x-synonyms:
      - midnight
      - contracts
      - scan
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/internal_pluginv2_customizeds_midnight.MidnightContractsParams'
        description: params
        required: true
  /api/scan/midnight/transaction:
    post:
      description: This API is only available midnight network
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                allOf:
                - $ref: '#/components/schemas/subscan_internal_plugin_share.J'
                - properties:
                    data:
                      $ref: '#/components/schemas/internal_pluginv2_customizeds_midnight.MidCallJson'
                  type: object
      summary: Midnight Transaction Detail
      tags:
      - Midnight
      x-synonyms:
      - midnight
      - transaction
      - scan
      - extrinsic
      - tx
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/internal_pluginv2_customizeds_midnight.midnightTransactionParams'
        description: params
        required: true
  /api/scan/midnight/transactions:
    post:
      description: This API is only available midnight network
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                allOf:
                - $ref: '#/components/schemas/subscan_internal_plugin_share.J'
                - properties:
                    data:
                      properties:
                        count:
                          type: integer
                        list:
                          items:
                            $ref: '#/components/schemas/internal_pluginv2_customizeds_midnight.MidCallJson'
                          type: array
                      type: object
                  type: object
      summary: Midnight Transactions
      tags:
      - Midnight
      x-synonyms:
      - midnight
      - transactions
      - scan
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/internal_pluginv2_customizeds_midnight.MidnightTransactionsParams'
        description: params
        required: true
  /api/scan/midnight/unshielded_tokens/balance:
    post:
      description: This API is only available midnight network and supports optional address, direction, extrinsic, time, and value filters.
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                allOf:
                - $ref: '#/components/schemas/subscan_internal_plugin_share.J'
                - properties:
                    data:
                      $ref: '#/components/schemas/internal_pluginv2_customizeds_midnight.MidUnshieldedBalanceResult'
                  type: object
      summary: Midnight Unshielded Balance
      tags:
      - Midnight
      x-synonyms:
      - midnight
      - unshielded
      - balance
      - account
      - scan
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/internal_pluginv2_customizeds_midnight.MidnightUnshieldedBalanceParams'
        description: params
        required: true
  /api/scan/midnight/unshielded_tokens/balances:
    post:
      description: This API is only available midnight network
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                allOf:
                - $ref: '#/components/schemas/subscan_internal_plugin_share.J'
                - properties:
                    data:
                      properties:
                        count:
                          type: integer
                        list:
                          items:
                            $ref: '#/components/schemas/internal_pluginv2_customizeds_midnight.MidUnshieldedBalanceListItem'
                          type: array
                      type: object
                  type: object
      summary: Midnight Unshielded Token Balance List
      tags:
      - Midnight
      x-synonyms:
      - midnight
      - unshielded
      - token
      - balances
      - list
      - scan
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/internal_pluginv2_customizeds_midnight.MidnightUnshieldedBalanceListParams'
        description: params
        required: true
  /api/scan/midnight/unshielded_tokens/ledger:
    post:
      description: This API is only available midnight network
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                allOf:
                - $ref: '#/components/schemas/subscan_internal_plugin_share.J'
                - properties:
                    data:
                      $ref: '#/components/schemas/internal_pluginv2_customizeds_midnight.MidnightUnshieldedLedgerResult'
                  type: object
      summary: Midnight Unshielded Ledger
      tags:
      - Midnight
      x-synonyms:
      - midnight
      - unshielded
      - ledger
      - account
      - history
      - scan
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/internal_pluginv2_customizeds_midnight.MidnightUnshieldedLedgerParams'
        description: params
        required: true
  /api/scan/midnight/unshielded_tokens/types:
    post:
      description: This API is only available midnight network
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                allOf:
                - $ref: '#/components/schemas/subscan_internal_plugin_share.J'
                - properties:
                    data:
                      properties:
                        count:
                          type: integer
                        list:
                          items:
                            $ref: '#/components/schemas/internal_pluginv2_customizeds_midnight.MidUnshieldedTokenTypeListItem'
                          type: array
                      type: object
                  type: object
      summary: Midnight Unshielded Token Type List
      tags:
      - Midnight
      x-synonyms:
      - midnight
      - unshielded
      - token
      - types
      - list
      - scan
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/internal_pluginv2_customizeds_midnight.MidnightUnshieldedTokenTypeListParams'
        description: params
        required: true
components:
  schemas:
    internal_pluginv2_customizeds_midnight.MidnightUnshieldedLedgerParams:
      properties:
        address:
          type: string
        cursor:
          type: string
        direction:
          type: string
        end_time:
          minimum: 0
          type: integer
        extrinsic_index:
          type: string
        max_value:
          type: string
        min_value:
          type: string
        row:
          maximum: 100
          minimum: 1
          type: integer
        start_time:
          minimum: 0
          type: integer
        token_type:
          type: string
      required:
      - row
      type: object
    internal_pluginv2_customizeds_midnight.MidnightContractsParams:
      properties:
        order:
          description: asc or desc
          enum:
          - asc
          - desc
          type: string
        page:
          minimum: 0
          type: integer
        row:
          maximum: 100
          minimum: 1
          type: integer
        sort:
          description: sort by transaction_count or verify_time
          enum:
          - transaction_count
          - verify_time
          type: string
        verified:
          type: boolean
      required:
      - row
      type: object
    internal_pluginv2_customizeds_midnight.MidnightUnshieldedBalanceParams:
      properties:
        address:
          type: string
        token_type:
          type: string
      required:
      - address
      type: object
    internal_pluginv2_customizeds_midnight.MidnightUnshieldedBalanceListParams:
      properties:
        page:
          minimum: 0
          type: integer
        row:
          maximum: 100
          minimum: 1
          type: integer
        token_type:
          type: string
      required:
      - row
      type: object
    internal_pluginv2_customizeds_midnight.MidContract:
      properties:
        abi: {}
        address:
          type: string
        circuits_count:
          type: integer
        cma:
          description: 'VerifiedCircuits int            `json:"verified_circuits" gorm:"size:32"`

            maintain info'
        compiler_version:
          type: string
        create_at:
          type: integer
        event_index:
          type: integer
        extrinsic_index:
          type: integer
        last_verify_error:
          type: string
        source_code:
          type: string
        source_type:
          description: single_file, multi_file
          type: string
        transaction_count:
          type: integer
        tx_hash:
          type: string
        verification_key:
          allOf:
          - $ref: '#/components/schemas/internal_pluginv2_customizeds_midnight.VerificationKey'
          description: '{"circuit_name"=>"key"}'
        verify_time:
          type: integer
        verifying:
          type: boolean
        viewer: {}
      type: object
    internal_pluginv2_customizeds_midnight.MidnightUnshieldedTokenTypeListParams:
      properties:
        page:
          minimum: 0
          type: integer
        row:
          maximum: 100
          minimum: 1
          type: integer
      required:
      - row
      type: object
    internal_pluginv2_customizeds_midnight.MidUnshieldedTokenTypeListItem:
      properties:
        token_type:
          type: string
      type: object
    internal_pluginv2_customizeds_midnight.MidUnshieldedBalanceListItem:
      properties:
        address:
          type: string
        balance:
          type: string
        token_type:
          type: string
      type: object
    internal_pluginv2_customizeds_midnight.midnightTransactionParams:
      properties:
        extrinsic_index:
          type: string
        tx_hash:
          type: string
      type: object
    internal_pluginv2_customizeds_midnight.MidUnshieldedLedgerItem:
      properties:
        address:
          type: string
        direction:
          type: string
        event_at:
          type: integer
        event_index:
          type: string
        extrinsic_index:
          type: string
        intent_hash:
          type: string
        output_no:
          type: integer
        token_type:
          type: string
        txn_hash:
          type: string
        value:
          type: string
      type: object
    internal_pluginv2_customizeds_midnight.MidnightTransactionsParams:
      properties:
        after_id:
          description: optional, for pagination, get records after this ID
          minimum: 0
          type: integer
        block_range:
          description: optional, e.g. "1000-2000"
          type: string
        contract:
          type: string
        page:
          minimum: 0
          type: integer
        row:
          maximum: 100
          minimum: 1
          type: integer
        txn_type:
          description: optional, filter by transaction type
          enum:
          - zk
          - contract
          type: string
      required:
      - row
      type: object
    internal_pluginv2_customizeds_midnight.MidCallJson:
      properties:
        contract:
          type: string
        contract_actions:
          items:
            $ref: '#/components/schemas/internal_pluginv2_customizeds_midnight.MidContractActionJson'
          type: array
        cost_fee:
          type: string
        event_index:
          type: string
        extrinsic_index:
          type: string
        id:
          type: integer
        public_identifiers:
          items:
            type: string
          type: array
        timestamp:
          type: integer
        tx_hash:
          type: string
      type: object
    subscan_internal_plugin_share.J:
      properties:
        code:
          example: 0
          type: integer
        data: {}
        generated_at:
          example: 1699600641
          type: integer
        message:
          example: Success
          type: string
      type: object
    internal_pluginv2_customizeds_midnight.MidnightContractParams:
      properties:
        contract:
          type: string
      required:
      - contract
      type: object
    internal_pluginv2_customizeds_midnight.MidnightUnshieldedLedgerResult:
      properties:
        has_more:
          type: boolean
        list:
          items:
            $ref: '#/components/schemas/internal_pluginv2_customizeds_midnight.MidUnshieldedLedgerItem'
          type: array
        next_cursor:
          type: string
      type: object
    internal_pluginv2_customizeds_midnight.MidnightContractState:
      properties:
        contract:
          type: string
        hash:
          description: optional, if not provided, get latest state
          type: string
      required:
      - contract
      type: object
    internal_pluginv2_customizeds_midnight.MidUnshieldedBalanceResult:
      properties:
        address:
          type: string
        balances:
          additionalProperties:
            type: string
          type: object
      type: object
    internal_pluginv2_customizeds_midnight.MidContractActionJson:
      properties:
        contract:
          type: string
        entry_point:
          type: string
        operations_type:
          type: string
      type: object
    internal_pluginv2_customizeds_midnight.VerificationKey:
      additionalProperties:
        type: string
      type: object