Chainstack Bitcoin Node API
Chainstack-managed Bitcoin Core nodes exposing the canonical Bitcoin JSON-RPC API. 40 documented methods covering blocks, transactions, wallet, mining, network, and raw-transaction operations.
Chainstack-managed Bitcoin Core nodes exposing the canonical Bitcoin JSON-RPC API. 40 documented methods covering blocks, transactions, wallet, mining, network, and raw-transaction operations.
openapi: 3.0.3
info:
title: Chainstack Bitcoin Node API
version: 1.0.0
description: Chainstack-managed RPC node API for the Bitcoin 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/bitcoin_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:
/decoderawtransaction:
post:
tags:
- General
summary: Decoderawtransaction
operationId: decodeRawTransaction
requestBody:
required: true
content:
application/json:
schema:
type: object
properties:
jsonrpc:
type: string
default: '1.0'
method:
type: string
default: decoderawtransaction
params:
type: array
items:
type: string
description: The raw transaction in hex format to decode.
default:
- 010000000001010000000000000000000000000000000000000000000000000000000000000000ffffffff5603b2c50c194d696e656420627920416e74506f6f6c206e0006071c93cbcdfabe6d6db50cdb1bd4713d7d8e48a75ce34c044bd84ee9f67e53dd443e3f24ccdabb687a100000000000000000006bf6dd49000000000000ffffffff05220200000000000017a91442402a28dd61f2718a4b27ae72a4791d5bbdade7876f81e0250000000017a9145249bdf2c131d43995cff42e8feee293f79297a8870000000000000000266a24aa21a9ed7a97cbb5b2366e5185da4ca412ca7ec1a3474c3ea2160e6fdf78d6f2924971c300000000000000002f6a2d434f5245012953559db5cc88ab20b1960faa9793803d0703375997be5a09d05bb9bac27ec60419d0b373f32b2000000000000000002b6a2952534b424c4f434b3a1d2a85762502a28245b3f5103a8f26ef0754f340b291af79649be425005ecdaf0120000000000000000000000000000000000000000000000000000000000000000000000000
id:
type: integer
default: 1
responses:
'200':
description: Details about the decoded transaction.
content:
application/json:
schema:
type: object
properties:
result:
type: object
description: Contains detailed information about the transaction, including its inputs, outputs, and various
metadata.
error:
type: object
id:
type: integer
/decodescript:
post:
tags:
- General
summary: Decodescript
operationId: decodeScript
requestBody:
required: true
content:
application/json:
schema:
type: object
properties:
jsonrpc:
type: string
default: '1.0'
method:
type: string
default: decodescript
params:
type: array
items:
type: string
description: The hex-encoded script to decode.
default:
- 76a914af92ad98c7f77559f96430dfef2a6805b87b24f888ac
id:
type: integer
default: 1
responses:
'200':
description: Details about the decoded script.
content:
application/json:
schema:
type: object
properties:
result:
type: object
description: Contains information about the script, such as its type, addresses involved, and if it's
a segwit script.
error:
type: object
id:
type: integer
/estimatesmartfee:
post:
tags:
- General
summary: Estimatesmartfee
operationId: estimateSmartFee
requestBody:
required: true
content:
application/json:
schema:
type: object
properties:
jsonrpc:
type: string
default: '1.0'
method:
type: string
default: estimatesmartfee
params:
type: array
items:
type: integer
description: The number of blocks within which the transaction is expected to be confirmed.
default:
- 6
id:
type: integer
default: 1
responses:
'200':
description: The estimated fee per kilobyte for a transaction to be confirmed within the specified number of blocks.
content:
application/json:
schema:
type: object
properties:
result:
type: object
properties:
feerate:
type: number
description: The estimated fee per kilobyte.
blocks:
type: integer
description: The number of blocks within which the transaction is expected to be confirmed.
description: Contains the estimated fee rate and the number of blocks.
error:
type: object
id:
type: integer
/getbestblockhash:
post:
tags:
- General
summary: Getbestblockhash
operationId: getBestBlockHash
requestBody:
required: true
content:
application/json:
schema:
type: object
properties:
jsonrpc:
type: string
default: '1.0'
method:
type: string
default: getbestblockhash
id:
type: integer
default: 1
responses:
'200':
description: The hash of the best (tip) block
content:
application/json:
schema:
type: object
properties:
result:
type: string
error:
type: object
id:
type: integer
/getblock:
post:
tags:
- General
summary: Getblock
operationId: getblock
requestBody:
required: true
content:
application/json:
schema:
type: object
properties:
jsonrpc:
type: string
default: '1.0'
method:
type: string
default: getblock
params:
type: array
items:
oneOf:
- type: string
description: The block hash
example: 000000000019d6689c085ae165831e934ff763ae46a2a6c172b3f1b60a8ce26f
- type: integer
description: The block height
example: '0'
default:
- 000000000019d6689c085ae165831e934ff763ae46a2a6c172b3f1b60a8ce26f
id:
type: integer
default: 1
responses:
'200':
description: The requested block
content:
application/json:
schema:
type: object
properties:
result:
type: object
description: The block object
error:
type: object
id:
type: integer
/getblockchaininfo:
post:
tags:
- General
summary: Getblockchaininfo
operationId: getBlockchainInfo
requestBody:
required: true
content:
application/json:
schema:
type: object
properties:
jsonrpc:
type: string
default: '1.0'
method:
type: string
default: getblockchaininfo
params:
type: array
items: {}
default: []
id:
type: integer
default: 1
responses:
'200':
description: Various state info regarding blockchain processing
content:
application/json:
schema:
type: object
properties:
result:
type: object
description: An object containing various state info
error:
type: object
id:
type: integer
/getblockfilter:
post:
tags:
- General
summary: Getblockfilter
operationId: getBlockFilter
requestBody:
required: true
content:
application/json:
schema:
type: object
properties:
jsonrpc:
type: string
default: '1.0'
method:
type: string
default: getblockfilter
params:
type: array
items:
oneOf:
- type: string
description: The block hash
example: 000000000000000000100c3c4b0b07a64612385408f6c7d97c422a5a0c1d859d
- type: string
description: The filter type
example: basic
default:
- 000000000000000000100c3c4b0b07a64612385408f6c7d97c422a5a0c1d859d
- basic
id:
type: integer
default: 1
responses:
'200':
description: The BIP 157 content filter for the block
content:
application/json:
schema:
type: object
properties:
result:
type: object
description: An object containing the block filter
error:
type: object
id:
type: integer
/getblockhash:
post:
tags:
- General
summary: Getblockhash
operationId: getBlockHash
requestBody:
required: true
content:
application/json:
schema:
type: object
properties:
jsonrpc:
type: string
default: '1.0'
method:
type: string
default: getblockhash
params:
type: array
items:
type: integer
description: The block height
example: 836491
default:
- 836491
id:
type: integer
default: 1
responses:
'200':
description: The hash of the block at the given height
content:
application/json:
schema:
type: object
properties:
result:
type: string
description: The block hash
error:
type: object
id:
type: integer
/getblockheader:
post:
tags:
- General
summary: Getblockheader
operationId: getblockheader
requestBody:
required: true
content:
application/json:
schema:
type: object
properties:
jsonrpc:
type: string
default: '1.0'
method:
type: string
default: getblockheader
params:
type: array
items:
oneOf:
- type: string
description: The block hash
example: 000000000019d6689c085ae165831e934ff763ae46a2a6c172b3f1b60a8ce26f
- type: boolean
description: If true, returns the blockheader as a hex-encoded string
example: true
default:
- 000000000019d6689c085ae165831e934ff763ae46a2a6c172b3f1b60a8ce26f
- true
id:
type: integer
default: 1
responses:
'200':
description: Information about the block header
content:
application/json:
schema:
type: object
properties:
result:
type: object
error:
type: object
id:
type: integer
/getblockstats:
post:
tags:
- General
summary: Getblockstats
operationId: getBlockStats
requestBody:
required: true
content:
application/json:
schema:
type: object
properties:
jsonrpc:
type: string
default: '1.0'
method:
type: string
default: getblockstats
params:
type: array
items:
oneOf:
- type: string
description: The block hash
example: 00000000000000000002d517d73d1abd09730ea69aa688207c281944300e8a50
- type: array
description: An array of stats to include
items:
type: string
enum:
- avgfee
- avgfeerate
- avgtxsize
- blockhash
- feerate_percentiles
- height
- ins
- maxfee
- maxfeerate
- maxtxsize
- medianfee
- mediantime
- mediantxsize
- minfee
- minfeerate
- mintxsize
- outs
- subsidy
- swtotal_size
- swtotal_weight
- swtxs
- time
- total_out
- total_size
- total_weight
- totalfee
- txs
- utxo_increase
- utxo_size_inc
default:
- avgfee
- avgfeerate
- avgtxsize
- blockhash
- feerate_percentiles
- height
- ins
- maxfee
- maxfeerate
- maxtxsize
- medianfee
- mediantime
- mediantxsize
- minfee
- minfeerate
- mintxsize
- outs
- subsidy
- swtotal_size
- swtotal_weight
- swtxs
- time
- total_out
- total_size
- total_weight
- totalfee
- txs
- utxo_increase
- utxo_size_inc
default:
- 00000000000000000002d517d73d1abd09730ea69aa688207c281944300e8a50
- - avgfee
- avgfeerate
- avgtxsize
- blockhash
- feerate_percentiles
- height
- ins
- maxfee
- maxfeerate
- maxtxsize
- medianfee
- mediantime
- mediantxsize
- minfee
- minfeerate
- mintxsize
- outs
- subsidy
- swtotal_size
- swtotal_weight
- swtxs
- time
- total_out
- total_size
- total_weight
- totalfee
- txs
- utxo_increase
- utxo_size_inc
id:
type: integer
default: 1
responses:
'200':
description: The requested block statistics
content:
application/json:
schema:
type: object
properties:
result:
type: object
description: An object containing the block statistics
error:
type: object
id:
type: integer
/getblocktemplate:
post:
tags:
- General
summary: Getblocktemplate
operationId: getBlockTemplate
requestBody:
required: true
content:
application/json:
schema:
type: object
properties:
jsonrpc:
type: string
default: '1.0'
method:
type: string
default: getblocktemplate
params:
type: array
items:
type: object
properties:
mode:
type: string
description: This must be set to 'template', 'proposal', or left unset.
enum:
- template
- proposal
capabilities:
type: array
items:
type: string
description: List of capabilities
example:
- coinbasetxn
- workid
- coinbase/append
rules:
type: array
items:
type: string
description: A list of strings
example:
- segwit
required:
- mode
example:
- mode: template
capabilities:
- coinbasetxn
- workid
- coinbase/append
rules:
- segwit
default:
- mode: template
capabilities:
- coinbasetxn
- workid
- coinbase/append
rules:
- segwit
id:
type: integer
default: 1
responses:
'200':
description: A block template or proposal for mining.
content:
application/json:
schema:
type: object
properties:
result:
type: object
description: The block template or proposal.
error:
type: object
id:
type: integer
/getchaintips:
post:
tags:
- General
summary: Getchaintips
operationId: getChainTips
requestBody:
required: true
content:
application/json:
schema:
type: object
properties:
jsonrpc:
type: string
default: '1.0'
method:
type: string
default: getchaintips
params:
type: array
items: {}
default: []
id:
type: integer
default: 1
responses:
'200':
description: Information about the current chain tips
content:
application/json:
schema:
type: object
properties:
result:
type: array
description: An array of chain tip information
error:
type: object
id:
type: integer
/getchaintxstats:
post:
tags:
- General
summary: Getchaintxstats
operationId: getChainTxStats
requestBody:
required: true
content:
application/json:
schema:
type: object
properties:
jsonrpc:
type: string
default: '1.0'
method:
type: string
default: getchaintxstats
params:
type: object
properties:
nblocks:
type: integer
description: The block height
example: 100
blockhash:
type: string
description: The block hash
example: 000000000000000000024b16f3c9bfd109d0c666dd8a694cfaeca1b6a0f0d112
required:
- nblocks
- blockhash
default:
nblocks: 100
blockhash: 000000000000000000024b16f3c9bfd109d0c666dd8a694cfaeca1b6a0f0d112
id:
type: integer
default: 1
responses:
'200':
description: Statistics about the total number and rate of transactions in the chain
content:
application/json:
schema:
type: object
properties:
result:
type: object
description: An object containing transaction statistics
error:
type: object
id:
type: integer
/getconnectioncount:
post:
tags:
- General
summary: Getconnectioncount
operationId: getConnectionCount
requestBody:
required: true
content:
application/json:
schema:
type: object
properties:
jsonrpc:
type: string
default: '1.0'
method:
type: string
default: getconnectioncount
params: {}
id:
type: integer
default: 1
responses:
'200':
description: The number of connections to other nodes.
content:
application/json:
schema:
type: object
properties:
result:
type: integer
description: The current number of connections to other nodes.
error:
type: object
id:
type: integer
/getdifficulty:
post:
tags:
- General
summary: Getdifficulty
operationId: getDifficulty
requestBody:
required: true
content:
application/json:
schema:
type: object
properties:
jsonrpc:
type: string
default: '1.0'
method:
type: string
default: getdifficulty
params: {}
id:
type: integer
default: 1
responses:
'200':
description: The current network difficulty
content:
application/json:
schema:
type: object
properties:
result:
type: number
description: The current network difficulty as a number
error:
type: object
id:
type: integer
/getmemoryinfo:
post:
tags:
- General
summary: Getmemoryinfo
operationId: getMemoryInfo
requestBody:
required: true
content:
application/json:
schema:
type: object
properties:
jsonrpc:
type: string
default: '1.0'
method:
type: string
default: getmemoryinfo
params:
type: array
items:
type: string
enum:
- stats
- mallocinfo
description: The mode in which memory information should be returned. 'stats' for a summary view, 'mallocinfo'
for detailed XML format.
default:
- stats
id:
type: integer
default: 1
responses:
'200':
description: Detailed information about the node's memory usage.
content:
application/json:
schema:
type: object
properties:
result:
type: object
description: Memory information in the requested format.
error:
type: object
id:
type: integer
/getmempoolancestors:
post:
tags:
- General
summary: Getmempoolancestors
operationId: getMempoolAncestors
requestBody:
required: true
content:
application/json:
schema:
type: object
properties:
jsonrpc:
type: string
default: '1.0'
method:
type: string
default: getmempoolancestors
params:
type: array
items:
type: string
description: The transaction ID
example: f6a4beaf3b26ae273d50eb8f6ea18e776932b4fefd24c8b915b94b6d22e89bc9
default:
- f6a4beaf3b26ae273d50eb8f6ea18e776932b4fefd24c8b915b94b6d22e89bc9
id:
type: integer
default: 1
responses:
'200':
description: All in-mempool ancestors for the specified transaction
content:
application/json:
schema:
type: object
properties:
result:
type: array
description: An array of in-mempool ancestor transactions
error:
type: object
id:
type: integer
/getmempooldescendants:
post:
tags:
- General
summary: Getmempooldescendants
operationId: getMempoolDescendants
requestBody:
required: true
content:
application/json:
schema:
type: object
properties:
jsonrpc:
type: string
default: '1.0'
method:
type: string
default: getmempooldescendants
params:
type: array
items:
type: string
description: The transaction ID
example: 48b46e5905386ea21ff94d2be67dd7a75cc177c53e301d1ca29c5721d502793e
default:
- 48b46e5905386ea21ff94d2be67dd7a75cc177c53e301d1ca29c5721d502793e
id:
type: integer
default: 1
responses:
'200':
description: All in-mempool descendants for the specified transaction
content:
application/json:
schema:
type: object
properties:
result:
type: array
description: An array of in-mempool descendant transactions
error:
type: object
id:
type: integer
/getmempoolentry:
post:
tags:
- General
summary: Getmempoolentry
operationId: getMempoolEntry
requestBody:
required: true
content:
application/json:
schema:
type: object
properties:
jsonrpc:
type: string
default: '1.0'
method:
type: string
default: getmempoolentry
params:
type: array
items:
type: string
description: The transaction ID
example: 48b46e5905386ea21ff94d2be67dd7a75cc177c53e301d1ca29c5721d502793e
default:
- 48b46e5905386ea21ff94d2be67dd7a75cc177c53e301d1ca29c5721d502793e
id:
type: integer
default: 1
responses:
'200':
description: Detailed information about the specified transaction in the mempool
content:
application/json:
schema:
type: object
properties:
result:
type: object
description: Detailed information about the transaction in the mempool
error:
type: object
id:
type: integer
/getmempoolinfo:
post:
tags:
- General
summary: Getmempoolinfo
operationId: getMempoolInfo
requestBody:
required: true
content:
application/json:
schema:
type: object
properties:
jsonrpc:
type: string
default: '1.0'
method:
type: string
default: getmempoolinfo
params: {}
id:
type: integer
default: 1
responses:
'200':
description: Information about the current state of the transaction mempool
content:
application/json:
# --- truncated at 32 KB (63 KB total) ---
# Full source: https://raw.githubusercontent.com/api-evangelist/chainstack/refs/heads/main/openapi/chainstack-bitcoin-node-api-openapi.yml