Chainstack BNB Smart Chain Node API

Chainstack-managed BNB Smart Chain JSON-RPC nodes. 43+ documented EVM methods plus archive support on dedicated nodes.

OpenAPI Specification

chainstack-bnb-node-api-openapi.yml Raw ↑
openapi: 3.0.3
info:
  title: Chainstack BNB Smart Chain Node API
  version: 1.0.0
  description: Chainstack-managed RPC node API for the BNB Smart Chain blockchain. Endpoints follow the canonical JSON-RPC
    over HTTPS interface for the network. Authenticate against your Chainstack node's per-node URL (e.g. https://nd-XXX-XXX-XXX.p2pify.com/<key>).
    Merged from the Chainstack Developer Portal per-method fragments at https://github.com/chainstack/dev-portal/tree/main/openapi/bnb_node_api.
  contact:
    name: Chainstack API Support
    email: [email protected]
  license:
    name: Chainstack Terms
    url: https://chainstack.com/terms-of-service/
servers:
- url: https://{node_id}.p2pify.com/{api_key}
  description: Chainstack-managed node endpoint
  variables:
    node_id:
      default: nd-000-000-000
      description: Your Chainstack node identifier
    api_key:
      default: <api-key>
      description: Per-node access key
tags:
- name: General
paths:
  /custom_js_tracer:
    post:
      tags:
      - General
      summary: Custom JS tracer
      operationId: traceTransaction
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                id:
                  type: integer
                  default: 1
                jsonrpc:
                  type: string
                  default: '2.0'
                method:
                  type: string
                  default: debug_traceTransaction
                params:
                  type: array
                  items:
                    anyOf:
                    - type: string
                      title: Transaction hash
                      description: The hash of the transaction to trace.
                    - type: object
                      title: The JS custom tracer object
                  default:
                  - '0x19b65f065ba8ebe235f0180bfcbc62ec0e7a043073f9f11f46c5775e898ac763'
                  - tracer: '{gasUsed: [], step: function(log) { this.gasUsed.push(log.getGas()); }, result: function() {
                      return this.gasUsed; }, fault: function() {}}'
      responses:
        '200':
          description: The transaction's trace
          content:
            application/json:
              schema:
                type: object
                properties:
                  jsonrpc:
                    type: string
                  id:
                    type: integer
                  result:
                    type: object
  /debug_traceBlockByHash:
    post:
      tags:
      - General
      summary: debug_traceBlockByHash
      operationId: traceBlockByHash
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                id:
                  type: integer
                  default: 1
                jsonrpc:
                  type: string
                  default: '2.0'
                method:
                  type: string
                  default: debug_traceBlockByHash
                params:
                  type: array
                  items:
                    anyOf:
                    - type: string
                      title: Block Hash
                      description: The block hash.
                    - type: object
                      title: Tracer type
                      properties:
                        tracer:
                          type: string
                      description: The type of tracer.
                  default:
                  - '0x77bb5442d7e8138f95dc192cb5933c20dbe333ff6cfc57747e40ebd47c2d45d7'
                  - tracer: 4byteTracer
      responses:
        '200':
          description: The block traces.
          content:
            application/json:
              schema:
                type: object
                properties:
                  jsonrpc:
                    type: string
                  id:
                    type: integer
                  result:
                    type: object
  /debug_traceBlockByNumber:
    post:
      tags:
      - General
      summary: debug_traceBlockByNumber
      operationId: traceBlockByNumber
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                id:
                  type: integer
                  default: 1
                jsonrpc:
                  type: string
                  default: '2.0'
                method:
                  type: string
                  default: debug_traceBlockByNumber
                params:
                  type: array
                  items:
                    anyOf:
                    - type: string
                      title: Block identifier
                      description: The block hash.
                    - type: object
                      title: Tracer type
                      properties:
                        tracer:
                          type: string
                      description: The type of tracer.
                  default:
                  - latest
                  - tracer: callTracer
      responses:
        '200':
          description: The block traces.
          content:
            application/json:
              schema:
                type: object
                properties:
                  jsonrpc:
                    type: string
                  id:
                    type: integer
                  result:
                    type: object
  /debug_traceCall:
    post:
      tags:
      - General
      summary: debug_traceCall
      operationId: traceCall
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                id:
                  type: integer
                  default: 1
                jsonrpc:
                  type: string
                  default: '2.0'
                method:
                  type: string
                  default: debug_traceCall
                params:
                  type: array
                  items:
                    anyOf:
                    - type: object
                      title: Transaction call Object
                    - type: string
                      title: Block Identifier
                  default:
                  - from: '0xA936fC19a00162AbE0e40323b64C2afE1c7f88Ff'
                    to: '0x0000000000a39bb272e79075ade125fd351887ac'
                    gas: '0x1E9EF'
                    gasPrice: '0xBD32B2ABC'
                    data: '0xd0e30db0'
                  - latest
                  - tracer: callTracer
      responses:
        '200':
          description: The call's trace.
          content:
            application/json:
              schema:
                type: object
                properties:
                  jsonrpc:
                    type: string
                  id:
                    type: integer
                  result:
                    type: object
  /debug_traceTransaction:
    post:
      tags:
      - General
      summary: debug_traceTransaction
      operationId: traceTransaction
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                id:
                  type: integer
                  default: 1
                jsonrpc:
                  type: string
                  default: '2.0'
                method:
                  type: string
                  default: debug_traceTransaction
                params:
                  type: array
                  items:
                    anyOf:
                    - type: string
                      title: Transaction hash
                      description: The hash of the transaction to trace.
                    - type: object
                      title: Tracing options
                  default:
                  - '0x0e77e2cf5a6999f616b56f1378b6c7b127b5a4e20cb2e12611d808af0979dacf'
                  - tracer: unigramTracer
      responses:
        '200':
          description: The transaction's trace.
          content:
            application/json:
              schema:
                type: object
                properties:
                  jsonrpc:
                    type: string
                  id:
                    type: integer
                  result:
                    type: object
  /eth_blockNumber:
    post:
      tags:
      - General
      summary: eth_blockNumber
      operationId: eth_blockNumber
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                id:
                  type: integer
                  default: 1
                jsonrpc:
                  type: string
                  default: '2.0'
                method:
                  type: string
                  default: eth_blockNumber
                params:
                  type: array
                  default: []
      responses:
        '200':
          description: The latest block number.
          content:
            application/json:
              schema:
                type: object
                properties:
                  jsonrpc:
                    type: string
                  id:
                    type: integer
                  result:
                    type: object
  /eth_call:
    post:
      tags:
      - General
      summary: Eth_Call
      operationId: ethCall
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                jsonrpc:
                  type: string
                  default: '2.0'
                method:
                  type: string
                  default: eth_call
                id:
                  type: integer
                  default: 1
                params:
                  type: array
                  items:
                    type: object
                    title: Call object
                    properties:
                      to:
                        type: string
                        description: The address of the contract to call.
                      data:
                        type: string
                        description: The data to send with the call.
                  default:
                  - to: '0x0E09FaBB73Bd3Ade0a17ECC321fD13a19e81cE82'
                    data: '0x893d20e8'
                  - latest
      responses:
        '200':
          description: The result of the call.
          content:
            application/json:
              schema:
                type: object
                properties:
                  jsonrpc:
                    type: string
                  id:
                    type: integer
                  result:
                    type: string
  /eth_chainId:
    post:
      tags:
      - General
      summary: eth_chainId
      operationId: getChainId
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                id:
                  type: integer
                  default: 1
                jsonrpc:
                  type: string
                  default: '2.0'
                method:
                  type: string
                  default: eth_chainId
                params:
                  type: array
                  default: []
      responses:
        '200':
          description: The network Chain ID
          content:
            application/json:
              schema:
                type: object
                properties:
                  jsonrpc:
                    type: string
                  id:
                    type: integer
                  result:
                    type: string
  /eth_estimateGas:
    post:
      tags:
      - General
      summary: eth_estimateGas
      operationId: estimateGas
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                id:
                  type: integer
                  default: 1
                jsonrpc:
                  type: string
                  default: '2.0'
                method:
                  type: string
                  default: eth_estimateGas
                params:
                  type: array
                  items:
                    type: object
                    properties:
                      from:
                        type: string
                        format: byte
                      to:
                        type: string
                        format: byte
                  default:
                  - from: '0xb218C5D6aF1F979aC42BC68d98A5A0D796C6aB01'
                    to: '0x2A39319dB98A3982F7C363380b72C66Ab1FFe228'
                  - latest
      responses:
        '200':
          description: The estimated gas amount
          content:
            application/json:
              schema:
                type: object
                properties:
                  jsonrpc:
                    type: string
                  id:
                    type: integer
                  result:
                    type: string
                    format: byte
  /eth_gasPrice:
    post:
      tags:
      - General
      summary: eth_gasPrice
      operationId: getGasPrice
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                id:
                  type: integer
                  default: 1
                jsonrpc:
                  type: string
                  default: '2.0'
                method:
                  type: string
                  default: eth_gasPrice
                params:
                  type: array
                  default: []
      responses:
        '200':
          description: The value of the current gas base fee in Wei.
          content:
            application/json:
              schema:
                type: object
                properties:
                  jsonrpc:
                    type: string
                  id:
                    type: integer
                  result:
                    type: string
  /eth_getBalance:
    post:
      tags:
      - General
      summary: eth_getBalance
      operationId: getBalance
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                id:
                  type: integer
                  default: 1
                jsonrpc:
                  type: string
                  default: '2.0'
                method:
                  type: string
                  default: eth_getBalance
                params:
                  type: array
                  items:
                    anyOf:
                    - type: string
                      title: Address
                      description: The address identifier.
                    - type: string
                      title: Block identifier
                      description: The block identifier.
                  default:
                  - '0x6B8E1585035b5B53afcd9791076E43b53D3e1AA4'
                  - pending
      responses:
        '200':
          description: The account balance.
          content:
            application/json:
              schema:
                type: object
                properties:
                  jsonrpc:
                    type: string
                  id:
                    type: integer
                  result:
                    type: object
  /eth_getBlockByHash:
    post:
      tags:
      - General
      summary: eth_getBlockByHash
      operationId: getBlockByHash
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                id:
                  type: integer
                  default: 1
                jsonrpc:
                  type: string
                  default: '2.0'
                method:
                  type: string
                  default: eth_getBlockByHash
                params:
                  type: array
                  items:
                    anyOf:
                    - type: string
                      title: Block Hash
                      description: The hash identifying the block.
                    - type: boolean
                      title: Transaction selector
                      description: True for the full transactions, false for only the transaction hashes.
                  default:
                  - '0x06edbf31479cd7452a1d579ec7990a631068b670de89c06822ceaef58f3729d4'
                  - false
      responses:
        '200':
          description: The block information
          content:
            application/json:
              schema:
                type: object
                properties:
                  jsonrpc:
                    type: string
                  id:
                    type: integer
                  result:
                    type: object
  /eth_getBlockByNumber:
    post:
      tags:
      - General
      summary: eth_getBlockByNumber
      operationId: getBlockByNumber
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                id:
                  type: integer
                  default: 1
                jsonrpc:
                  type: string
                  default: '2.0'
                method:
                  type: string
                  default: eth_getBlockByNumber
                params:
                  type: array
                  items:
                    anyOf:
                    - type: string
                      title: Block identifier
                      description: The block number or tag.
                    - type: boolean
                      title: Transaction selector
                      description: True for the full transactions, false for only the transaction hashes.
                  default:
                  - latest
                  - false
      responses:
        '200':
          description: The block information
          content:
            application/json:
              schema:
                type: object
                properties:
                  jsonrpc:
                    type: string
                  id:
                    type: integer
                  result:
                    type: object
  /eth_getBlockReceipts:
    post:
      tags:
      - General
      summary: eth_getBlockReceipts
      operationId: getBlockReceipts
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                id:
                  type: integer
                  default: 1
                jsonrpc:
                  type: string
                  default: '2.0'
                method:
                  type: string
                  default: eth_getBlockReceipts
                params:
                  type: array
                  items:
                    type: string
                    title: Block identifier
                  default:
                  - latest
      responses:
        '200':
          description: The block receipts information
          content:
            application/json:
              schema:
                type: object
                properties:
                  jsonrpc:
                    type: string
                  id:
                    type: integer
                  result:
                    type: array
                    items:
                      type: object
  /eth_getBlockTransactionCountByHash:
    post:
      tags:
      - General
      summary: eth_getBlockTransactionCountByHash
      operationId: getBlockTransactionCountByHash
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                id:
                  type: integer
                  default: 1
                jsonrpc:
                  type: string
                  default: '2.0'
                method:
                  type: string
                  default: eth_getBlockTransactionCountByHash
                params:
                  type: array
                  items:
                    type: string
                    title: Block hash
                    description: The block hash identifier.
                  default:
                  - '0x06edbf31479cd7452a1d579ec7990a631068b670de89c06822ceaef58f3729d4'
      responses:
        '200':
          description: The block information
          content:
            application/json:
              schema:
                type: object
                properties:
                  jsonrpc:
                    type: string
                  id:
                    type: integer
                  result:
                    type: string
  /eth_getBlockTransactionCountByNumber:
    post:
      tags:
      - General
      summary: eth_getBlockTransactionCountByNumber
      operationId: getBlockTransactionCountByNumber
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                id:
                  type: integer
                  default: 1
                jsonrpc:
                  type: string
                  default: '2.0'
                method:
                  type: string
                  default: eth_getBlockTransactionCountByNumber
                params:
                  type: array
                  items:
                    type: string
                    title: Block identifier
                    description: The block number or tag.
                  default:
                  - latest
      responses:
        '200':
          description: The block transaction count information
          content:
            application/json:
              schema:
                type: object
                properties:
                  jsonrpc:
                    type: string
                  id:
                    type: integer
                  result:
                    type: string
  /eth_getCode:
    post:
      tags:
      - General
      summary: eth_getCode
      operationId: getCode
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                id:
                  type: integer
                  default: 1
                jsonrpc:
                  type: string
                  default: '2.0'
                method:
                  type: string
                  default: eth_getCode
                params:
                  type: array
                  items:
                    anyOf:
                    - type: string
                      title: Smart contract address
                      description: The address identifier.
                    - type: string
                      title: Block identifier
                      description: The block identifier.
                  default:
                  - '0x0E09FaBB73Bd3Ade0a17ECC321fD13a19e81cE82'
                  - latest
      responses:
        '200':
          description: The smart contract code.
          content:
            application/json:
              schema:
                type: object
                properties:
                  jsonrpc:
                    type: string
                  id:
                    type: integer
                  result:
                    type: object
  /eth_getFilterChanges:
    post:
      summary: eth_getFilterChanges
      operationId: getFilterChanges
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                jsonrpc:
                  type: string
                  default: '2.0'
                method:
                  type: string
                  default: eth_getFilterChanges
                params:
                  type: array
                  items:
                    type: string
                    title: The filter ID
                  default:
                  - '0xbdc5b4b99ca699e1d734fc4202afee79'
                id:
                  type: integer
                  default: 1
      responses:
        '200':
          description: The filter changes.
          content:
            application/json:
              schema:
                type: object
                properties:
                  jsonrpc:
                    type: string
                  id:
                    type: integer
                  result:
                    type: array
                    items:
                      type: string
      tags:
      - General
  /eth_getLogs:
    post:
      tags:
      - General
      summary: eth_getLogs
      operationId: getLogs
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                method:
                  type: string
                  default: eth_getLogs
                params:
                  type: array
                  items:
                    type: object
                    properties:
                      fromBlock:
                        type: string
                        title: from block
                        description: The block number or tag to start searching for logs from.
                        default: latest
                      address:
                        type: string
                        title: smart contract address
                        description: The contract address to retrieve the logs for.
                      topics:
                        type: array
                        title: topics
                        items:
                          type: string
                        description: An array of 32-byte topics to filter for. Each topic is treated as an OR condition.
                  default:
                  - fromBlock: latest
                    address: '0x0E09FaBB73Bd3Ade0a17ECC321fD13a19e81cE82'
                    topics:
                    - '0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef'
                id:
                  type: integer
                  default: 1
                jsonrpc:
                  type: string
                  default: '2.0'
      responses:
        '200':
          description: An array of log objects matching the specified filter.
          content:
            application/json:
              schema:
                type: object
                properties:
                  jsonrpc:
                    type: string
                  id:
                    type: integer
                  result:
                    type: array
                    items:
                      type: object
  /eth_getProof:
    post:
      tags:
      - General
      summary: eth_getProof
      operationId: getProof
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                method:
                  type: string
                  default: eth_getProof
                params:
                  type: array
                  items:
                    anyOf:
                    - type: string
                      title: Account address
                      description: The address of the account to query.
                    - type: array
                      title: Storage keys
                      description: An array of storage keys to query.
                      items:
                        type: string
                    - type: string
                      title: Block ID
                      description: The block number or tag to use as a reference.
                  default:
                  - '0x0E09FaBB73Bd3Ade0a17ECC321fD13a19e81cE82'
                  - - '0xf6e506a9cbe7546a796b187c40609a170ea8073e047129a3cae1c38e6d7559b7'
                  - latest
                id:
                  type: integer
                  default: 1
                jsonrpc:
                  type: string
                  default: '2.0'
      responses:
        '200':
          description: The account state proof.
          content:
            application/json:
              schema:
                type: object
                properties:
                  jsonrpc:
                    type: string
                  id:
                    type: integer
                  result:
                    type: object
                    properties:
                      accountProof:
                        type: array
                        items:
                          type: string
                      storageProof:
                        type: array
                        items:
                          type: object
                          properties:
                            key:
                              type: string
                            value:
                              type: string
                            proof:
                              type: array
                              items:
                                type: string
  /eth_getStorageAt:
    post:
      tags:
      - General
      summary: eth_getStorageAt
      operationId: getStorageAt
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                method:
                  type: string
                  default: eth_getStorageAt
                params:
                  type: array
                  items:
                    anyOf:
                    - type: string
                      title: Smart contract address
                      description: The address of the contract to query.
                    - type: string
                      title: Slot index
                      description: The index of the storage position to query.
                    - type: string
                      title: Block ID
                      description: The block number or tag to use as a reference.
                  default:
                  - '0x0E09FaBB73Bd3Ade0a17ECC321fD13a19e81cE82'
                  - '0x0'
                  - latest
                id:
                  type: integer
                  default: 1
                jsonrpc:
                  type: string
                  default: '2.0'
      responses:
        '200':
          description: The value stored at the specified position.
          content:
            application/json:
              schema:
                type: object
                properties:
                  jsonrpc:
                    type: string
                  id:
                    type: integer
                  result:
                    type: string
  /eth_getTransactionByBlockHashAndIndex:
    post:
      tags:
      - General
      summary: eth_getTransactionByBlockHashAndIndex
      operationId: getTransactionByBlockHashAndIndex
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                id:
                  type: integer
                  default: 1
                jsonrpc:
                  type: string
                  default: '2.0'
                method:
                  type: string
                  default: eth_getTransactionByBlockHashAndIndex
                params:
                  type: array
                  items:
                    anyOf:
                    - type: string
                      title: Block hash
               

# --- truncated at 32 KB (60 KB total) ---
# Full source: https://raw.githubusercontent.com/api-evangelist/chainstack/refs/heads/main/openapi/chainstack-bnb-node-api-openapi.yml