BscScan Transactions API

The Transactions API from BscScan — 2 operation(s) for transactions.

OpenAPI Specification

bscscan-transactions-api-openapi.yml Raw ↑
openapi: 3.1.0
info:
  title: BscScan Accounts Transactions API
  version: 1.0.0
  description: BscScan is the leading block explorer and analytics platform for BNB Smart Chain (BSC), providing a REST API for querying transactions, token transfers, smart contract ABIs, gas prices, BEP-20 token information, and on-chain statistics. API subscriptions are unified under the Etherscan V2 platform, enabling access to 60+ EVM chains via a single API key using the chainid parameter (BSC chainid=56).
  license:
    name: UNLICENSED
    url: https://docs.bscscan.com/
servers:
- url: https://api.bscscan.com/v2/api
  description: BscScan BNB Smart Chain Mainnet (Etherscan V2, chainid=56)
- url: https://api-testnet.bscscan.com/api
  description: BscScan BNB Smart Chain Testnet
security:
- apiKeyAuth: []
tags:
- name: Transactions
paths:
  /?module=transaction&action=getstatus:
    get:
      operationId: check-contract-execution-status
      externalDocs:
        url: https://docs.bscscan.com/api-endpoints/stats#check-contract-execution-status
      summary: Check Contract Execution Status
      description: Returns the status code of a contract execution.
      tags:
      - Transactions
      parameters:
      - in: query
        name: txhash
        schema:
          $ref: '#/components/schemas/TxHash'
        required: true
        example: '0x15f8e5ea1079d9a0bb04a4c58ae5fe7654b5b2b4463375ff7ffb490aa0032f3a'
      responses:
        '200':
          description: 'Operation result. 📖 Tip: The isError field returns 0 for successful transactions and 1 for failed transactions.'
          content:
            application/json:
              schema:
                oneOf:
                - allOf:
                  - $ref: '#/components/schemas/ResponseOK'
                  - $ref: '#/components/schemas/Result.transaction.getstatus'
                - $ref: '#/components/schemas/ResponseNOTOK'
              example:
                status: '1'
                message: OK
                result:
                  isError: '1'
                  errDescription: Bad jump destination
  /?module=transaction&action=gettxreceiptstatus:
    get:
      operationId: check-transaction-receipt-status
      externalDocs:
        url: https://docs.bscscan.com/api-endpoints/stats#check-transaction-receipt-status
      summary: Check Transaction Receipt Status
      description: 'Returns the status code of a transaction execution. 📝 Note: Only applicable for post Byzantium Fork transactions.'
      tags:
      - Transactions
      parameters:
      - in: query
        name: txhash
        schema:
          $ref: '#/components/schemas/TxHash'
        required: true
        example: '0x513c1ba0bebf66436b5fed86ab668452b7805593c05073eb2d51d3a52f480a76'
      responses:
        '200':
          description: 'Operation result. 📖 Tip: The status field returns 0 for failed transactions and 1 for successful transactions.'
          content:
            application/json:
              schema:
                oneOf:
                - allOf:
                  - $ref: '#/components/schemas/ResponseOK'
                  - $ref: '#/components/schemas/Result.transaction.gettxreceiptstatus'
                - $ref: '#/components/schemas/ResponseNOTOK'
              example:
                status: '1'
                message: OK
                result:
                  status: '1'
components:
  schemas:
    ResponseNOTOK:
      type: object
      properties:
        status:
          type: string
          enum:
          - '0'
        message:
          type: string
          pattern: ^NOTOK(-.*)?$
          examples:
          - NOTOK
          - NOTOK-Missing/Invalid API Key, rate limit of 1/5sec applied
        result:
          type: string
      required:
      - status
      - message
      - result
    Result.transaction.getstatus:
      type: object
      additionalProperties: true
    ResponseOK:
      type: object
      properties:
        status:
          type: string
          enum:
          - '1'
        message:
          type: string
          enum:
          - OK
        result:
          description: call result
      required:
      - status
      - message
      - result
    Result.transaction.gettxreceiptstatus:
      type: object
      additionalProperties: true
    TxHash:
      type: string
      pattern: 0x[A-Fa-f0-9]{64}
      example: '0x01234567890abcdef01234567890abcdef01234567890abcdef01234567890ab'
  securitySchemes:
    apiKeyAuth:
      type: apiKey
      in: query
      name: apikey
externalDocs:
  url: https://docs.bscscan.com/