Overview
Welcome to use the CloverPool Browser API!
Welcome to use the Blockchain Data API provided by CloverPool, enabling developers to get real-time access to data about blocks, transactions, addresses, and more on the Bitcoin chain via RestFul.
At CloverPool, we run Bitcoin RPC endpoints. In aggregate, we serve hundreds of billions of requests every month. To make it easier for developers to integrate with CloverPool, we've created this documentation that shows how to call RPC methods using cURL, Python and any applicable Web3 SDKs.
Restful API Request Structure
Get address, transaction and block related information, called by RestFul method with the following call path:
https://$(Endpoint)/${method}/${version}/${model}/${path}
Among them:
Key | Value | Description |
---|---|---|
Endpoint | tools-gateway.api.cloverpool.com | |
method | rest/api | |
version | v1.0 | |
model | nodeapi | |
path | API path, refer to specific request path |
Bitcoin Node RPC Request Structure
Get the Bitcoin node information, an RPC call is used with the following call path:
https://$(Endpoint)/${method}/${version}/${model}
Among them:
Key | Value | Description |
---|---|---|
Endpoint | tools-gateway.api.cloverpool.com | |
method | rpc/api | |
version | v1.0 | |
model | noderpc |
Authentication
When calling Restful API and RPC requests, you need to pass X-API-TOKEN(Access Key) in the Header for authentication.
X-API-TOKEN(Access Key) is the user's identity credentials, which corresponds to an account, please keep your API Token(Access Key) safe.
X-API-TOKEN(Access Key) can be obtained from the API management page at tools.cloverpool.com after logging in to your account.
Response
All responses are of type application/json
The Restful API response format:
Key | Value | Description |
---|---|---|
code | 0 | API response status code |
msg | success | Description of the code |
data | {} | Response data |
timestamp | 1699966857 | Time spent on request |
RPC response format:
Key | Value | Description |
---|---|---|
jsonrpc | 2.0 | jsonrpc version |
result | "" | Request return value |
error | "" | Description of errors |
id | "1699966857" | Request ID, in case of null, replace with timestamp |
Address
Query Address Overview
Consumption per query 3
curl --request GET \
--url https://tools-gateway.api.cloverpool.com/rest/api/v1.0/nodeapi/address/summary/3MTRYJy2ZQMymkSQb226BcHFmQpZsvgkmo \
--header 'X-API-TOKEN: t648e371d1e70aeaad812ecaa9ff438b65043b1e745a0b50e1854eb8042dfa328' \
--header 'content-type: application/json'
import http.client
conn = http.client.HTTPSConnection("tools-gateway.api.cloverpool.com")
payload = ""
headers = {
'X-API-TOKEN': "t648e371d1e70aeaad812ecaa9ff438b65043b1e745a0b50e1854eb8042dfa328",
'content-type': "application/json"
}
conn.request("GET", "/rest/api/v1.0/nodeapi/address/summary/3MTRYJy2ZQMymkSQb226BcHFmQpZsvgkmo", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
Response Example
{
"code": 0,
"data": {
"address": "3MTRYJy2ZQMymkSQb226BcHFmQpZsvgkmo",
"createHeight": 676717,
"createTime": 1616947766,
"latestHeight": 816724,
"lastTime": 1699961655,
"totalReceive": 2007755545,
"totalSend": 2007755545,
"availableBalance": 0,
"balance": 0,
"txCount": 1358,
"unconfirmed_tx_count": 1,
"unconfirmed_received": 21904292061,
"unconfirmed_sent": 21905350470,
"unspent_tx_count": 2
},
"msg": "success",
"timestamp": 1700006439,
"trace_id": ""
}
HTTP Request
GET https://tools-gateway.api.cloverpool.com/rest/api/v1.0/nodeapi/address/summary/:addr
Request Parameters
Parameter | Example | Type | Required | Description |
---|---|---|---|---|
addr | 3MTRYJy2ZQMymkSQb226BcHFmQpZsvgkmo | String | Yes | Queried address |
Response Parameters
Parameter | Type | Description |
---|---|---|
address | String | Queried address |
createHeight | int | Address creation height |
createTime | int64 | Timestamp of address creation |
latestHeight | int | Latest transaction height |
latestTime | int64 | Latest transaction timestamp |
totalReceive | int64 | Total BTC received in satoshi |
totalSend | int64 | Total BTC sent in satoshi |
availableBalance | int64 | Address available balance in satoshi |
balance | int64 | Total address balance in satoshi |
txCount | int | Address txns Count |
unconfirmed_tx_count | int | Unconfirmed transaction count |
unconfirmed_received | int64 | Unconfirmed BTC received in satoshi |
unconfirmed_sent | int64 | Unconfirmed BTC sent in satoshi |
unspent_tx_count | int | Unspent UTXOs count |
Query Address Transaction Flow
Consumption per query 5
curl --request GET \
--url https://tools-gateway.api.cloverpool.com/rest/api/v1.0/nodeapi/address/txlist/1Kr6QSydW9bFQG1mXiPNNu6WpJGmUa9i1g/2/20 \
--header 'X-API-TOKEN: t648e371d1e70aeaad812ecaa9ff438b65043b1e745a0b50e1854eb8042dfa328'
import http.client
conn = http.client.HTTPSConnection("tools-gateway.api.cloverpool.com")
headers = { 'X-API-TOKEN': "t648e371d1e70aeaad812ecaa9ff438b65043b1e745a0b50e1854eb8042dfa328" }
conn.request("GET", "/rest/api/v1.0/nodeapi/address/txlist/1Kr6QSydW9bFQG1mXiPNNu6WpJGmUa9i1g/2/20", headers=headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
Response Example
{
"code": 0,
"data": {
"currentPage": 2,
"totalCount": 419367,
"pageSize": 20,
"list": [
{
"addr": "1Kr6QSydW9bFQG1mXiPNNu6WpJGmUa9i1g",
"addrTxIndex": 419347,
"txId": "14aa6a8744ee7ebfac4357b90bd465fd8b977e8ad4fe54a588a17a565ca5677e",
"height": 816764,
"txIndex": 22,
"addrReceive": 2836409890,
"addrSend": 0,
"addrBalance": 200581162637,
"timestamp": 1699987563
},
...
]
},
"msg": "success",
"timestamp": 1700001927,
"trace_id": ""
}
HTTP Request
GET https://tools-gateway.api.cloverpool.com/rest/api/v1.0/nodeapi/address/txlist/:addr/:page/:pageSize
Request Parameters
Parameter | Example | Type | Required | Description | Default |
---|---|---|---|---|---|
addr | 3MTRYJy2ZQMymkSQb226BcHFmQpZsvgkmo | String | Yes | Queried address | Null |
page | 1 | int | No | Starting page number | 1 |
pageSize | 20 | int | No | Number of items per page | 10 |
Response Parameters
Parameter | Type | Description |
---|---|---|
currentPage | int | Current page number |
pageSize | int | Number of items per page.If returned value is less than this value, then all data has been returned. |
totalCount | int | Address tx Count |
list | array | Address transaction flow details |
Address Transaction Flow Details
Parameter | Type | Description |
---|---|---|
addr | string | Queried address |
addrTxIndex | int | Address transaction index |
txId | string | Transaction ID |
height | int | Block height for tx confirmation |
txIndex | int | Index of tx in the block |
addrReceive | int64 | Total BTC received in satoshi |
addrSend | int64 | Total BTC sent in satoshi |
addrBalance | int64 | Address balance after this transaction |
timestamp | int64 | Timestamp of transaction |
Query Address Transaction Flow by Block Height Range
Consumption per query 5
curl --request GET \
--url https://tools-gateway.api.cloverpool.com/rest/api/v1.0/nodeapi/address/txbyheight/3MTRYJy2ZQMymkSQb226BcHFmQpZsvgkmo/814100/814101/ \
--header 'X-API-TOKEN: t648e371d1e70aeaad812ecaa9ff438b65043b1e745a0b50e1854eb8042dfa328'
import http.client
conn = http.client.HTTPSConnection("tools-gateway.api.cloverpool.com")
headers = { 'X-API-TOKEN': "t648e371d1e70aeaad812ecaa9ff438b65043b1e745a0b50e1854eb8042dfa328" }
conn.request("GET", "/rest/api/v1.0/nodeapi/address/txbyheight/3MTRYJy2ZQMymkSQb226BcHFmQpZsvgkmo/814100/814101/", headers=headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
Response Example
{
"code": 0,
"data": {
"currentPage": 2,
"totalCount": 419367,
"pageSize": 20,
"list": [
{
"addr": "1Kr6QSydW9bFQG1mXiPNNu6WpJGmUa9i1g",
"addrTxIndex": 419347,
"txId": "14aa6a8744ee7ebfac4357b90bd465fd8b977e8ad4fe54a588a17a565ca5677e",
"height": 816764,
"txIndex": 22,
"addrReceive": 2836409890,
"addrSend": 0,
"addrBalance": 200581162637,
"timestamp": 1699987563
},
...
]
},
"msg": "success",
"timestamp": 1700001927,
"trace_id": ""
}
HTTP Request
GET https://tools-gateway.api.cloverpool.com/rest/api/v1.0/nodeapi/address/txbyheight/:addr/:startHeight/:endHeight/:page/:pageSize
Request Parameters
Parameter | Example | Type | Required | Description | Default |
---|---|---|---|---|---|
addr | 3MTRYJy2ZQMymkSQb226BcHFmQpZsvgkmo | String | Yes | Queried address | Null |
startHeight | 1 | int | No | Starting height | 0 |
endHeight | 100 | int | No | End height | 6929999 |
page | 1 | int | No | Starting page number | 1 |
pageSize | 20 | int | No | Number of items per page | 10 |
Response Parameters
Parameter | Type | Description |
---|---|---|
currentPage | int | Current page number |
pageSize | int | Number of items per page.If returned value is less than this value, then all data has been returned. |
totalCount | int | Address tx Count |
list | array | Address transaction flow details |
Address transaction flow details
Parameter | Type | Description |
---|---|---|
addr | string | Queried address |
addrTxIndex | int | Address transaction index |
txId | string | Transaction hash |
height | int | Block height for tx confirmation |
txIndex | int | Index of tx in the block |
addrReceive | int64 | Total BTC received in satoshi |
addrSend | int64 | Total BTC sent in satoshi |
addrBalance | int64 | Address balance after this transaction |
timestamp | int64 | Timestamp of transaction |
Query Address Transaction Flow by Time Range
Consumption per query 5
curl --request GET \
--url https://tools-gateway.api.cloverpool.com/rest/api/v1.0/nodeapi/address/txbytime/3MTRYJy2ZQMymkSQb226BcHFmQpZsvgkmo/1618200091/0/2/20 \
--header 'X-API-TOKEN: t648e371d1e70aeaad812ecaa9ff438b65043b1e745a0b50e1854eb8042dfa328'
import http.client
conn = http.client.HTTPSConnection("tools-gateway.api.cloverpool.com")
headers = { 'X-API-TOKEN': "t648e371d1e70aeaad812ecaa9ff438b65043b1e745a0b50e1854eb8042dfa328" }
conn.request("GET", "/rest/api/v1.0/nodeapi/address/txbytime/3MTRYJy2ZQMymkSQb226BcHFmQpZsvgkmo/1618200091/0/2/20", headers=headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
Response Example
{
"code": 0,
"data": {
"currentPage": 2,
"totalCount": 1358,
"pageSize": 20,
"list": [
{
"addr": "3MTRYJy2ZQMymkSQb226BcHFmQpZsvgkmo",
"addrTxIndex": 1338,
"txId": "8b28b6699e5a2b32caf026ebed7be369372b17ee9dbd30ab6fac08496e202974",
"height": 814101,
"txIndex": 2,
"addrReceive": 0,
"addrSend": 424071,
"addrBalance": 0,
"timestamp": 1698434974
},
]
},
"msg": "success",
"timestamp": 1700006221,
"trace_id": ""
}
HTTP Request
GET https://tools-gateway.api.cloverpool.com/rest/api/v1.0/nodeapi/address/txbytime/:addr/:startTime/:endTime/:page/:pageSize
Request Parameters
Parameter | Example | Type | Required | Description | Default |
---|---|---|---|---|---|
addr | 3MTRYJy2ZQMymkSQb226BcHFmQpZsvgkmo | String | Yes | Queried address | Null |
startTime | 1700003246 | int64 | No | Starting time | 0 |
endTime | 1700003246 | int64 | No | End time | Current time |
page | 1 | int | No | Starting page number | 1 |
pageSize | 20 | int | No | Number of items per page | 10 |
Response Parameters
Parameter | Type | Description |
---|---|---|
currentPage | int | Current page number |
pageSize | int | Number of items per page.If returned value is less than this value, then all data has been returned. |
totalCount | int | Address tx Count |
list | array | Address transaction flow details |
Address Transaction Flow Details
Parameter | Type | Description |
---|---|---|
addr | string | Queried address |
addrTxIndex | int | Address transaction index |
txId | string | Transaction hash |
height | int | Block height for tx confirmation |
txIndex | int | Index of tx in the block |
addrReceive | int64 | Total BTC received in satoshi |
addrSend | int64 | Total BTC sent in satoshi |
addrBalance | int64 | Address balance after this transaction |
timestamp | int64 | Timestamp of transaction |
Query Address Confirmed UTXO List
Consumption per query 5
curl --request GET \
--url https://tools-gateway.api.cloverpool.com/rest/api/v1.0/nodeapi/address/utxolist/1Kr6QSydW9bFQG1mXiPNNu6WpJGmUa9i1g/0/0 \
--header 'X-API-TOKEN: t648e371d1e70aeaad812ecaa9ff438b65043b1e745a0b50e1854eb8042dfa328'
import http.client
conn = http.client.HTTPSConnection("tools-gateway.api.cloverpool.com")
headers = { 'X-API-TOKEN': "t648e371d1e70aeaad812ecaa9ff438b65043b1e745a0b50e1854eb8042dfa328" }
conn.request("GET", "/rest/api/v1.0/nodeapi/address/utxolist/1Kr6QSydW9bFQG1mXiPNNu6WpJGmUa9i1g/0/0", headers=headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
Response Example
{
"code": 0,
"data": {
"currentPage": 1,
"totalCount": 5,
"pageSize": 10,
"list": [
{
"addr": "1Kr6QSydW9bFQG1mXiPNNu6WpJGmUa9i1g",
"height": 816787,
"txId": "1661eac83926e48bf61f5adae79264ec16e958d16323d02609afa908e8b9a4bf",
"index": 1,
"amount": 94391404039,
"timestamp": 1700002323,
"isCoinbase": false
},
...
]
},
"msg": "success",
"timestamp": 1700003856,
"trace_id": ""
}
HTTP Request
GET https://tools-gateway.api.cloverpool.com/rest/api/v1.0/nodeapi/address/utxolist/:addr/:page/:pageSize
Request Parameters
Parameter | Example | Type | Required | Description | Default |
---|---|---|---|---|---|
addr | 3MTRYJy2ZQMymkSQb226BcHFmQpZsvgkmo | String | Yes | Queried address | Null |
page | 1 | int | No | Starting page number | 1 |
pageSize | 20 | int | No | Number of items per page | 10 |
Response Parameters
Parameter | Type | Description |
---|---|---|
currentPage | int | Current page number |
pageSize | int | Number of items per page.If returned value is less than this value, then all data has been returned. |
totalCount | int | Address tx Count |
list | array | Address UTXO transaction list |
Address UTXO Transaction List
Parameter | Type | Description |
---|---|---|
addr | string | Queried address |
txId | string | Transaction hash |
height | int | Block height for tx confirmation |
index | int | Index of tx in the block |
amount | int64 | Number of UTXOs in satoshi |
timestamp | int64 | Timestamp of transaction |
isCoinbase | bool | Is it UTXO generated by coinbase |
Query Address All UTXO Transaction(Including unconfirmed UTXO)
Consumption per query 5
curl --request GET \
--url https://tools-gateway.api.cloverpool.com/rest/api/v1.0/nodeapi/address/allutxolist/1Kr6QSydW9bFQG1mXiPNNu6WpJGmUa9i1g/0/0 \
--header 'X-API-TOKEN: t648e371d1e70aeaad812ecaa9ff438b65043b1e745a0b50e1854eb8042dfa328'
import http.client
conn = http.client.HTTPSConnection("tools-gateway.api.cloverpool.com")
headers = { 'X-API-TOKEN': "t648e371d1e70aeaad812ecaa9ff438b65043b1e745a0b50e1854eb8042dfa328" }
conn.request("GET", "/rest/api/v1.0/nodeapi/address/allutxolist/1Kr6QSydW9bFQG1mXiPNNu6WpJGmUa9i1g/0/0", headers=headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
Response Example
{
"code": 0,
"data": {
"currentPage": 1,
"totalCount": 5,
"pageSize": 10,
"list": [
{
"addr": "1Kr6QSydW9bFQG1mXiPNNu6WpJGmUa9i1g",
"height": 816787,
"txId": "1661eac83926e48bf61f5adae79264ec16e958d16323d02609afa908e8b9a4bf",
"index": 1,
"amount": 94391404039,
"timestamp": 1700002323,
"isCoinbase": false
},
...
]
},
"msg": "success",
"timestamp": 1700003856,
"trace_id": ""
}
HTTP Request
GET https://tools-gateway.api.cloverpool.com/rest/api/v1.0/nodeapi/address/allutxolist/:addr/:page/:pageSize
Request Parameters
Parameter | Example | Type | Required | Description | Default |
---|---|---|---|---|---|
addr | 3MTRYJy2ZQMymkSQb226BcHFmQpZsvgkmo | String | Yes | Queried address | Null |
page | 1 | int | No | Starting page number | 1 |
pageSize | 20 | int | No | Number of items per page | 10 |
Response Parameters
Parameter | Type | Description |
---|---|---|
currentPage | int | Current page number |
pageSize | int | Number of items per page.If returned value is less than this value, then all data has been returned. |
totalCount | int | Address tx Count |
list | array | Address UTXO transaction list(Including unconfirmed UTXO) |
Address UTXO Transaction List
Parameter | Type | Description |
---|---|---|
addr | string | Queried address |
txId | string | Transaction hash |
height | int | Block height for tx confirmation, unconfirmed UTXO is 0 |
index | int | Index of tx in the block |
amount | int64 | Number of UTXOs in satoshi |
timestamp | int64 | Timestamp of transaction |
isCoinbase | bool | Is it UTXO generated by coinbase |
isUnconfirm | bool | Is the tx unconfirmed |
Query Unconfirmed Transaction Flow
Consumption per query 5
curl --request GET \
--url https://tools-gateway.api.cloverpool.com/rest/api/v1.0/nodeapi/address/unconfirm/3JWhLZb3kkYUQuuxFNX2FcerHV62dnXN9T/3/3 \
--header 'X-API-TOKEN: t648e371d1e70aeaad812ecaa9ff438b65043b1e745a0b50e1854eb8042dfa328'
import http.client
conn = http.client.HTTPSConnection("tools-gateway.api.cloverpool.com")
headers = { 'X-API-TOKEN': "t648e371d1e70aeaad812ecaa9ff438b65043b1e745a0b50e1854eb8042dfa328" }
conn.request("GET", "/rest/api/v1.0/nodeapi/address/unconfirm/3JWhLZb3kkYUQuuxFNX2FcerHV62dnXN9T/3/3", headers=headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
Response Example
{
"code": 0,
"data": {
"currentPage": 3,
"totalCount": 8,
"pageSize": 3,
"list": [
{
"addr": "3JWhLZb3kkYUQuuxFNX2FcerHV62dnXN9T",
"addrTxIndex": 0,
"txId": "dfa605710ae77862016202e2db0395989f5dc72899c532fa3018a2e41b8e1b3c",
"height": 0,
"txIndex": 0,
"addrReceive": 0,
"addrSend": 45008,
"addrBalance": 0,
"timestamp": 1699101159
},
...
]
},
"msg": "success",
"timestamp": 1700006977,
"trace_id": ""
}
HTTP Request
GET https://tools-gateway.api.cloverpool.com/rest/api/v1.0/nodeapi/address/unconfirm/:addr/:page/:pageSize
Request Parameters
Parameter | Example | Type | Required | Description | Default |
---|---|---|---|---|---|
addr | 3MTRYJy2ZQMymkSQb226BcHFmQpZsvgkmo | String | Yes | Queried address | Null |
page | 1 | int | No | Starting page number | 1 |
pageSize | 20 | int | No | Number of items per page | 10 |
Response Parameters
Parameter | Type | Description |
---|---|---|
currentPage | int | Current page number |
pageSize | int | Number of items per page.If returned value is less than this value, then all data has been returned. |
totalCount | int | Address tx Count |
list | array | Unconfirmed transactions details |
Unconfirmed Transactions Details
Parameter | Type | Description |
---|---|---|
addr | string | Queried address |
addrTxIndex | int | Address transaction index |
txId | string | Transaction hash |
height | int | Block height of transaction,value is 0(Unconfirmed transaction) |
txIndex | int | Index of tx in the block,value is 0(Unconfirmed transaction) |
addrReceive | int64 | Total BTC received in satoshi |
addrSend | int64 | Total BTC sent in satoshi |
addrBalance | int64 | Value is 0(Unconfirmed transaction) |
timestamp | int64 | Timestamp of transaction |
Transaction
Get Standard Transaction Data by Block Height
Consumption per query 10
curl --request GET \
--url https://tools-gateway.api.cloverpool.com/rest/api/v1.0/nodeapi/tx/standardlist/800000 \
--header 'X-API-TOKEN: t648e371d1e70aeaad812ecaa9ff438b65043b1e745a0b50e1854eb8042dfa328' \
--header 'content-type: application/json'
import http.client
conn = http.client.HTTPSConnection("tools-gateway.api.cloverpool.com")
payload = ""
headers = {
'X-API-TOKEN': "t648e371d1e70aeaad812ecaa9ff438b65043b1e745a0b50e1854eb8042dfa328",
'content-type': "application/json"
}
conn.request("GET", "/rest/api/v1.0/nodeapi/tx/standardlist/800000", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
Response Example
{
"code": 0,
"data": {
"hash": "00000000000000000002a7c4c1e48d76c5a37902165a270156b7a8d72728a054",
"confirmations": 5,
"height": 800000,
"version": 874340352,
"versionHex": "341d6000",
"merkleroot": "91f01a00530c8c83617190048ea8b0814d506cf24dfdbcf8893f8f0cab7f0855",
"time": 1690168629,
"mediantime": 1690165851,
"nonce": 106861918,
"bits": "17053894",
"difficulty": 53911173001054.59,
"chainwork": "00000000000000000000000000000000000000004fc85ab3390629e495bf13d5",
"nTx": 3721,
"previousblockhash": "000000000000000000012117ad9f72c1c0e42227c2d042dca23e6b96bd9fbb55",
"nextblockhash": "00000000000000000000e26b239cf19ec7ace5edd9694d51a3f6933247720947",
"transactions": [
{
"txid": "b75ca3106ed100521aa50e3ec267a06431c6319538898b25e1b757a5736f5fb4",
"hash": "4f684e6a3456df6e321ead86e56d37697340d81174e3da641846b3e23ff962a3",
"version": 1,
"size": 192,
"vsize": 165,
"weight": 660,
"locktime": 0,
"vin": [
{
"txid": "",
"vout": 0,
"scriptSig": {
"asm": "",
"hex": ""
},
"txinwitness": [
"0000000000000000000000000000000000000000000000000000000000000000"
],
"sequence": 4294967295,
"coinbase": "0300350c0120130909092009092009102cda1492140000000000",
"prevout": {
"value": 0,
"n": 0,
"address": "",
"height": 0,
"txid": "",
"timestamp": 0,
"is_coinbase": false
}
}
],
"vout": [
{
"value": 6.3868768,
"n": 0,
"scriptPubKey": {
"asm": "OP_HASH160 c3f8f898ae5cab4f4c1d597ecb0f3a81a9b146c3 OP_EQUAL",
"desc": "",
"hex": "a914c3f8f898ae5cab4f4c1d597ecb0f3a81a9b146c387",
"address": "3KZDwmJHB6QJ13QPXHaW7SS3yTESFPZoxb",
"type": "scripthash"
},
"offset": 0,
"is_miner": false
},
{
"value": 0,
"n": 1,
"scriptPubKey": {
"asm": "OP_RETURN aa21a9ed9fbe517a588ccaca585a868f3cf19cb6897e3c26f3351361fb28ac8509e69a7e",
"desc": "",
"hex": "6a24aa21a9ed9fbe517a588ccaca585a868f3cf19cb6897e3c26f3351361fb28ac8509e69a7e",
"address": "nulldata-76163891097a51fa674e675e987e306b",
"type": "nulldata"
},
"offset": 0,
"is_miner": false
}
],
"hex": "010000000001010000000000000000000000000000000000000000000000000000000000000000ffffffff1a0300350c0120130909092009092009102cda1492140000000000ffffffff02c09911260000000017a914c3f8f898ae5cab4f4c1d597ecb0f3a81a9b146c3870000000000000000266a24aa21a9ed9fbe517a588ccaca585a868f3cf19cb6897e3c26f3351361fb28ac8509e69a7e0120000000000000000000000000000000000000000000000000000000000000000000000000",
"blockhash": "",
"blocktime": 0,
"rectime": 0,
"height": 0,
"is_confirm": false
},
......
]
},
"msg": "success",
"timestamp": 1700007450,
"trace_id": ""
}
HTTP Request
GET https://tools-gateway.api.cloverpool.com/rest/api/v1.0/nodeapi/tx/standardlist/:height/:page/:pagesize
Request Parameters
Parameter | Example | Type | Required | Description | Default |
---|---|---|---|---|---|
height | 800000 | int | Yes | Queried block height | Null |
page | 1 | int | No | Starting page number | 1 |
pageSize | 10 | int | No | Number of items per page | 10 |
Response Parameters
Parameter | Type | Description |
---|---|---|
hash | string | Block hash |
height | int | Block height |
version | int | Block version |
versionHex | string | Block version(Hexadecimal representation) |
merkleroot | string | Merkleroot |
time | int64 | Timestamps for generating block |
nonce | uint32 | Nonce |
Bits | string | Bits |
difficulty | float64 | Difficulty of generating block |
nTx | int | Total count of txns contained in the block |
previousblockhash | string | Previous block hash |
nextblockhash | string | Next block hash |
transactions | array | Transactions list |
Transactions List
Parameter | Type | Description |
---|---|---|
hash | string | Transaction hash |
txid | string | Transaction id |
version | int | Version |
size | int | Total transaction size |
vsize | int | Virtual size |
weight | int | Weight |
locktime | int | Locktime of the UTXO |
vin | array | An array of transaction objects used as inputs for the current transaction |
vout | array | An array of output transaction objects for the current transaction |
Hex | string | The raw hexadecimal representation of the transaction |
Get Data List Containing Tx Input Addresses by Block Height
Consumption per query 30
In the standard transaction, the input part only contains the txid and index of the referenced UTXO, if you need to get the specific address information, you need to re-query, this interface contains the input address of all transactions.
curl --request GET \
--url https://tools-gateway.api.cloverpool.com/rest/api/v1.0/nodeapi/tx/fillvinlist/800000 \ --header 'X-API-TOKEN: t648e371d1e70aeaad812ecaa9ff438b65043b1e745a0b50e1854eb8042dfa328'
import http.client
conn = http.client.HTTPSConnection("tools-gateway.api.cloverpool.com")
headers = { 'X-API-TOKEN': "t648e371d1e70aeaad812ecaa9ff438b65043b1e745a0b50e1854eb8042dfa328" }
conn.request("GET", "/rest/api/v1.0/nodeapi/tx/fillvinlist/c2e8fd13d6bea9d54aeceb83dbbeff631adf4003dce37175fce524e7e28795c2", headers=headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
Response Example
{
"code": 0,
"data": {
"hash": "00000000000000000002a7c4c1e48d76c5a37902165a270156b7a8d72728a054",
"confirmations": 5,
"height": 800000,
"version": 874340352,
"versionHex": "341d6000",
"merkleroot": "91f01a00530c8c83617190048ea8b0814d506cf24dfdbcf8893f8f0cab7f0855",
"time": 1690168629,
"mediantime": 1690165851,
"nonce": 106861918,
"bits": "17053894",
"difficulty": 53911173001054.59,
"chainwork": "00000000000000000000000000000000000000004fc85ab3390629e495bf13d5",
"nTx": 3721,
"previousblockhash": "000000000000000000012117ad9f72c1c0e42227c2d042dca23e6b96bd9fbb55",
"nextblockhash": "00000000000000000000e26b239cf19ec7ace5edd9694d51a3f6933247720947",
"transactions": [
{
"txid": "d41f5de48325e79070ccd3a23005f7a3b405f3ce1faa4df09f6d71770497e9d5",
"hash": "94574a056707bda53ab7e08ddef0ca29100cb42647f5f76b3877cc8f4b694b56",
"version": 2,
"size": 235,
"vsize": 153,
"weight": 610,
"locktime": 0,
"vin": [
{
"txid": "a992dbddbeb7382e3defc6914f970ea769ef813e69a923afa336976f2cbf0465",
"vout": 1,
"scriptSig": {
"asm": "",
"hex": ""
},
"txinwitness": [
"3045022100f404e977e0a3dee1e9da7708db6ce6f3cbe80e6ffbbb6364bd2c725af200520a02201faca96001ac7f82fcea71e03b29deeaac6525c3bb8abe3b3c64544af16b698501",
"025b1b8e6cd2ebc837fc57928c688b9b4d192f9001d03d1831510a6e511ca3fa5e"
],
"sequence": 4294967295,
"coinbase": "",
"prevout": {
"value": 604308,
"n": 1,
"address": "bc1qvndmep839uexn899qy865cvddgj4txm0nkjua9",
"height": 799999,
"txid": "a992dbddbeb7382e3defc6914f970ea769ef813e69a923afa336976f2cbf0465",
"timestamp": 1690168304,
"is_coinbase": false
}
}
],
"vout": [
{
"value": 0.00143332,
"n": 0,
"scriptPubKey": {
"asm": "1 2d618c1f73d5133fdc97d545bfbf55b4cba2ab2a9d41e4596b1df6b8ea9d9348",
"desc": "",
"hex": "51202d618c1f73d5133fdc97d545bfbf55b4cba2ab2a9d41e4596b1df6b8ea9d9348",
"address": "bc1p94scc8mn65fnlhyh64zml064kn9692e2n4q7gkttrhmt365ajdyq0m2mzh",
"type": "witness_v1_taproot"
},
"offset": 0,
"is_miner": false
},
{
"value": 0.00291851,
"n": 1,
"scriptPubKey": {
"asm": "0 64dbbc84f12f32699ca5010faa618d6a25559b6f",
"desc": "",
"hex": "001464dbbc84f12f32699ca5010faa618d6a25559b6f",
"address": "bc1qvndmep839uexn899qy865cvddgj4txm0nkjua9",
"type": "witness_v0_keyhash"
},
"offset": 0,
"is_miner": false
}
],
"hex": "020000000001016504bf2c6f9736a3af23a9693e81ef69a70e974f91c6ef3d2e38b7bedddb92a90100000000ffffffff02e42f0200000000002251202d618c1f73d5133fdc97d545bfbf55b4cba2ab2a9d41e4596b1df6b8ea9d93480b7404000000000016001464dbbc84f12f32699ca5010faa618d6a25559b6f02483045022100f404e977e0a3dee1e9da7708db6ce6f3cbe80e6ffbbb6364bd2c725af200520a02201faca96001ac7f82fcea71e03b29deeaac6525c3bb8abe3b3c64544af16b69850121025b1b8e6cd2ebc837fc57928c688b9b4d192f9001d03d1831510a6e511ca3fa5e00000000",
"blockhash": "",
"blocktime": 0,
"rectime": 0,
"height": 0,
"is_confirm": false
},
......
]
},
"msg": "success",
"timestamp": 1700007450,
"trace_id": ""
}
HTTP Request
GET https://tools-gateway.api.cloverpool.com/rest/api/v1.0/nodeapi/tx/fillvinlist/:height/:page/:pagesize
Request Parameters
Parameter | Example | Type | Required | Description | Default |
---|---|---|---|---|---|
height | 800000 | int | Yes | Queried block height | Null |
page | 1 | int | No | Starting page number | 1 |
pageSize | 10 | int | No | Number of items per page | 10 |
Response Parameters
Parameter | Type | Description |
---|---|---|
hash | string | Block hash |
height | int | Block height |
version | int | Block version |
versionHex | string | Block version(Hexadecimal representation) |
merkleroot | string | Merkleroot |
time | int64 | Timestamps for generating block |
nonce | uint32 | Nonce |
Bits | string | Bits |
difficulty | float64 | Difficulty |
nTx | int | Total count of txns contained in the block |
previousblockhash | string | Previous block hash |
nextblockhash | string | Next block hash |
transactions | array | Transaction list |
Transaction list
Parameter | Type | Description |
---|---|---|
hash | string | Transaction hash |
txid | string | Transaction id |
version | int | Version |
size | int | Total transaction size |
vsize | int | Virtual size |
weight | int | Weight |
locktime | int | Locktime of the UTXO |
vin | array | An array of transaction objects used as inputs for the current transaction |
vout | array | An array of output transaction objects for the current transaction |
Hex | string | Hexadecimal information of the transaction |
Get Data List Containing Tx Addresses Input And Utxo Spend by Block Height
Consumption per query 45
In a standard transaction, the input part contains only the txid and index that reference UTXO. If you need to obtain the specific address information, you need to query it again. This interface contains the input addresses of all transactions. In standard transactions, the output part only contains the generated UTXOs. If you need to obtain the cost information, you need to re-query. This interface contains the cost information of the newly generated UTXOs.
curl --request GET \
--url https://tools-gateway.api.cloverpool.com/rest/api/v1.0/nodeapi/tx/fulllist/800000 \ --header 'X-API-TOKEN: t648e371d1e70aeaad812ecaa9ff438b65043b1e745a0b50e1854eb8042dfa328'
import http.client
conn = http.client.HTTPSConnection("tools-gateway.api.cloverpool.com")
headers = { 'X-API-TOKEN': "t648e371d1e70aeaad812ecaa9ff438b65043b1e745a0b50e1854eb8042dfa328" }
conn.request("GET", "/rest/api/v1.0/nodeapi/tx/fulllist/800000", headers=headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
Response Example
{
"code": 0,
"data": {
"list": [
{
"block_hash": "00000000000000000002a7c4c1e48d76c5a37902165a270156b7a8d72728a054",
"block_height": 800000,
"block_time": 1690168629,
"confirmations": 57002,
"created_at": 0,
"fee": 155500,
"hash": "c2f59c6fc8e812f5f1f00c8a0a9ab1929c1e796788c57f49001b8006a824ea17",
"inputs": [
{
"prev_addresses": [
"bc1pmc5m33qxt55kg3tu5cyxp30xnsva66cppr9qk5urz4vkdv2ctuasy200qx"
],
"prev_position": 1,
"prev_tx_hash": "c3e417e84950e955b523d02be6805955db547d1da6b49094d8357cc236bc5a50",
"prev_type": "WITNESS_V1_TAPROOT",
"prev_value": 3659879,
"sequence": 4294967295
}
],
"inputs_count": 1,
"inputs_value": 3659879,
"is_coinbase": false,
"is_double_spend": false,
"is_sw_tx": true,
"lock_time": 0,
"outputs": [
{
"addresses": [
"bc1p9zujs6f5sndugh6eufu5saynzmmwwwxnfusdytacj0e3enxsraaq03e430"
],
"spent_by_tx": "965f866bf8623bbf956c1b2aeec1efc1ad162fd428ab7fb89f128a0754ebbc32",
"spent_by_tx_position": 0,
"type": "WITNESS_V1_TAPROOT",
"value": 197000
},
{
"addresses": [
"bc1pmc5m33qxt55kg3tu5cyxp30xnsva66cppr9qk5urz4vkdv2ctuasy200qx"
],
"spent_by_tx": "c2d6f84b13058b75a0cb02a748906e88f68b7cc2aa7991a6cb3cf0c264533d18",
"spent_by_tx_position": 0,
"type": "WITNESS_V1_TAPROOT",
"value": 3307379
}
],
"outputs_count": 2,
"outputs_value": 3504379,
"sigops": 0,
"size": 205,
"version": 2,
"vsize": 154,
"weight": 616,
"witness_hash": "7ffbaeba0302e0ac9c8d2855c0fabeec57cd42a80c1a8c7e82eed62efd5825e5"
}
],
"page": 3,
"page_total": 3721,
"pagesize": 1,
"total_count": 3721
},
"msg": "success",
"timestamp": 1723790969,
"trace_id": ""
}
HTTP Request
GET https://tools-gateway.api.cloverpool.com/rest/api/v1.0/nodeapi/tx/fulllist/:height/:page/:pagesize
Request Parameters
Parameter | Example | Type | Required | Description | Default |
---|---|---|---|---|---|
height | 800000 | int | Yes | Queried block height | Null |
page | 1 | int | No | Starting page number | 1 |
pageSize | 10 | int | No | Number of items per page | 10 |
Response Parameters
Transaction list
Parameter | Type | Description |
---|---|---|
block_hash | string | Block hash |
block_height | int | Block height |
block_time | int64 | Timestamps for generating block |
confirmations | int | Confirmations |
created_at | int64 | Timestamps for creating transaction |
fee | int64 | Network fee in satoshis |
hash | string | Transaction hash |
inputs | array | An array of input transaction objects for the current transaction |
inputs_count | int | Number of input transactions |
inputs_value | int64 | Total input value in satoshis |
is_coinbase | bool | Is a coinbase transaction or not |
is_double_spend | bool | Is the transaction a double-spending transaction |
is_sw_tx | bool | Is the transaction a SegWit transaction |
lock_time | int | Locktime of the UTXO |
outputs | array | An array of output transaction objects for the current transaction |
outputs_count | int | Number of output transactions |
outputs_value | int64 | Total output value in satoshis |
sigops | int | Number of signature operations |
size | int | Total transaction size |
version | int | Version |
vsize | int | Virtual size |
weight | int | Weight |
witness_hash | string | Witness hash |
Input Transaction Object
Parameter | Type | Description |
---|---|---|
prev_addresses | array | An array of input addresses |
prev_position | int | Index of the input transaction |
prev_tx_hash | string | Transaction hash of the input transaction |
prev_type | string | Type of the input address |
prev_value | int64 | Value of the input transaction in satoshis |
sequence | int | Sequence of the input transaction |
Output Transaction Object
Parameter | Type | Description |
---|---|---|
addresses | array | An array of output addresses |
spent_by_tx | string | Transaction hash of the output transaction |
spent_by_tx_position | int | Index of the output transaction |
type | string | Type of the output address |
value | int64 | Value of the output transaction in satoshis |
Get Standard Transaction Data by Transaction ID
Consumption per query 1
curl --request GET \
--url https://tools-gateway.api.cloverpool.com/rest/api/v1.0/nodeapi/tx/standard/674fea60d8992b3e630aa7a5c75277c6ed80d55ec8abb80716e8892c45517561 \
--header 'X-API-TOKEN: t648e371d1e70aeaad812ecaa9ff438b65043b1e745a0b50e1854eb8042dfa328'
import http.client
conn = http.client.HTTPSConnection("tools-gateway.api.cloverpool.com")
headers = { 'X-API-TOKEN': "t648e371d1e70aeaad812ecaa9ff438b65043b1e745a0b50e1854eb8042dfa328" }
conn.request("GET", "/rest/api/v1.0/nodeapi/tx/standard/db79d5db75b21b76e47b532d6ec452e9d5860318a3ffce62593731a847d1a73f", headers=headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
Response Example
{
"code":0,
"data":{
"txInfo":{
"txid":"db79d5db75b21b76e47b532d6ec452e9d5860318a3ffce62593731a847d1a73f",
"hash":"cec2143322689ba58a30f68911731440dcb6ceb4dc57cfc4c7800e7ec9783dbd",
"version":2,
"size":742,
"vsize":542,
"weight":2167,
"locktime":0,
"vin":[
{
"txid":"bdc8bbbe6bcf6df6f7dff9992db3406f2718d79b143723c223b494741d31dcc2",
"vout":8,
"scriptSig":{
"asm":"",
"hex":""
},
"txinwitness":[
"c62551bb323f118e29e9282dc732c4a515999997ca98097e1813342bab401f1749147f8500bcb255ffe5b050ccb860244d9e1756a5e5b487820b6152addb9e28"
],
"sequence":4294967295,
"coinbase":"",
"prevout":{
"value":0,
"n":0,
"address":"",
"height":0,
"txid":"",
"timestamp":0,
"is_coinbase":false
}
},
{
"txid":"bdc8bbbe6bcf6df6f7dff9992db3406f2718d79b143723c223b494741d31dcc2",
"vout":5,
"scriptSig":{
"asm":"",
"hex":""
},
"txinwitness":[
"dc41060b7c55ca1779c6f611812af5245df3dacc9d90a608ec3e4bfc9fa050d39af8c2473aa1cf64c91d66e6a3aad79674526275b9316318cd731bb47c0de424"
],
"sequence":4294967295,
"coinbase":"",
"prevout":{
"value":0,
"n":0,
"address":"",
"height":0,
"txid":"",
"timestamp":0,
"is_coinbase":false
}
},
{
"txid":"446d21248d9b3a267a3c7f248088e917e98afe74e0ad06fbacdd8b3b2d518c62",
"vout":0,
"scriptSig":{
"asm":"",
"hex":""
},
"txinwitness":[
"4d6c4911937e5a25c954b653b7d8b61a5f3c5c25552af005e95855bde5266dfb949539989e739528a58bc5ddd3949554787be3d6008824fe69d9f4f35b85017d83"
],
"sequence":4294967295,
"coinbase":"",
"prevout":{
"value":0,
"n":0,
"address":"",
"height":0,
"txid":"",
"timestamp":0,
"is_coinbase":false
}
},
{
"txid":"31d101adff52306311c0a267beba7557f91bd9f4275c6ff2c031dc05a44685e8",
"vout":6,
"scriptSig":{
"asm":"",
"hex":""
},
"txinwitness":[
"fdb1d0850d62a14f1704b9fd8c152685772a4232ec349ee60d77ecd0275cd0e6732208359c6dedc285b9c15a195631f111720a911f6634a84a0b1953e8b61c92"
],
"sequence":4294967295,
"coinbase":"",
"prevout":{
"value":0,
"n":0,
"address":"",
"height":0,
"txid":"",
"timestamp":0,
"is_coinbase":false
}
}
],
"vout":Array[7],
"hex":"02000000000104C2DC311D7494B423C22337149BD718276F40B32D99F9DFF7F66DCF6BBEBBC8BD0800000000FFFFFFFFC2DC311D7494B423C22337149BD718276F40B32D99F9DFF7F66DCF6BBEBBC8BD0500000000FFFFFFFF628C512D3B8BDDACFB06ADE074FE8AE917E98880247F3C7A263A9B8D24216D440000000000FFFFFFFFE88546A405DC31C0F26F5C27F4D91BF95775BABE67A2C011633052FFAD01D1310600000000FFFFFFFF07B004000000000000225120E466F0CC1EE1C2616E43054C90589E428E9271F6C8136FA8DA36E2652EC2C7522202000000000000225120E466F0CC1EE1C2616E43054C90589E428E9271F6C8136FA8DA36E2652EC2C75212BD040000000000225120375CF0291BC74C90210628A2971DD7240FE9196C15FFC91EBD7B2C9F5D5C906D1C0C0000000000002251209B57783FF38333B575F35634BA9795D28DDDBE75B0E5FD582974DF3B4F0FC37C5802000000000000225120E466F0CC1EE1C2616E43054C90589E428E9271F6C8136FA8DA36E2652EC2C7525802000000000000225120E466F0CC1EE1C2616E43054C90589E428E9271F6C8136FA8DA36E2652EC2C752667F040000000000225120E466F0CC1EE1C2616E43054C90589E428E9271F6C8136FA8DA36E2652EC2C7520140C62551BB323F118E29E9282DC732C4A515999997CA98097E1813342BAB401F1749147F8500BCB255FFE5B050CCB860244D9E1756A5E5B487820B6152ADDB9E280140DC41060B7C55CA1779C6F611812AF5245DF3DACC9D90A608EC3E4BFC9FA050D39AF8C2473AA1CF64C91D66E6A3AAD79674526275B9316318CD731BB47C0DE42401414D6C4911937E5A25C954B653B7D8B61A5F3C5C25552AF005E95855BDE5266DFB949539989E739528A58BC5DDD3949554787BE3D6008824FE69D9F4F35B85017D830140FDB1D0850D62A14F1704B9FD8C152685772A4232EC349EE60D77ECD0275CD0E6732208359C6DEDC285B9C15A195631F111720A911F6634A84A0B1953E8B61C9200000000",
"blockhash":"",
"blocktime":0,
"rectime":1703140711,
"height":822189,
"is_confirm":true
}
},
"msg":"success",
"timestamp":1703140711,
"trace_id":""
}
HTTP Request
GET https://tools-gateway.api.cloverpool.com/rest/api/v1.0/nodeapi/tx/standard/:txId
Request Parameters
Parameter | Example | Type | Required | Description | Default |
---|---|---|---|---|---|
txId | string | Yes | Queried transaction id | Null |
Response Parameters
Parameter | Type | Description |
---|---|---|
hash | string | Transaction hash |
txid | string | Transaction id |
version | int | Version |
size | int | Total transaction size |
vsize | int | Virtual size |
weight | int | Weight |
locktime | int | Locktime of the UTXO |
vin | array | An array of transaction objects used as inputs for the current transaction |
vout | array | An array of output transaction objects for the current transaction |
Hex | string | The raw hexadecimal representation of the transaction |
Get Filled Transaction Data by Transaction ID
Consumption per query 3
The input addresses and quantity of the transaction will been filled for easy access.
curl --request GET \
--url https://tools-gateway.api.cloverpool.com/rest/api/v1.0/nodeapi/tx/fillvin/c2e8fd13d6bea9d54aeceb83dbbeff631adf4003dce37175fce524e7e28795c2 \
--header 'X-API-TOKEN: t648e371d1e70aeaad812ecaa9ff438b65043b1e745a0b50e1854eb8042dfa328'
import http.client
conn = http.client.HTTPSConnection("tools-gateway.api.cloverpool.com")
headers = { 'X-API-TOKEN': "t648e371d1e70aeaad812ecaa9ff438b65043b1e745a0b50e1854eb8042dfa328" }
conn.request("GET", "/rest/api/v1.0/nodeapi/tx/fillvin/c2e8fd13d6bea9d54aeceb83dbbeff631adf4003dce37175fce524e7e28795c2", headers=headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
Response Example
{
"code": 0,
"data": {
"txInfo": {
"txid": "c2e8fd13d6bea9d54aeceb83dbbeff631adf4003dce37175fce524e7e28795c2",
"hash": "6685065bbce58799a0a9681fe0a16d9477341f51773f5d8423682d936adb6f0f",
"version": 2,
"size": 192,
"vsize": 110,
"weight": 438,
"locktime": 0,
"vin": [
{
"txid": "1eca064e992d7c27a163ff5f7797da368f81f19752656e34a0ad5438e067245e",
"vout": 158,
"scriptSig": {
"asm": "",
"hex": ""
},
"txinwitness": [
"3045022100baea2e0ac4615d49c1b1ec3476c9ee14f7bd239229a424dd882ffe12f820ed4e022060e81963a39aaf14e59ba0b11fa3d12650cf3da4f7f12dda53dab45c33124b2c01",
"02f00a8a664bab6f0c0240b3e4682d16b0c44a1d5aec8bdc31c3e136b2ba4e7920"
],
"sequence": 4294967293,
"coinbase": "",
"prevout": {
"value": 188729,
"n": 158,
"address": "bc1q2v78vfdldam5r4hft2w63u0ngxt222f4znl3zd",
"height": 815072,
"txid": "1eca064e992d7c27a163ff5f7797da368f81f19752656e34a0ad5438e067245e",
"timestamp": 1698987608,
"is_coinbase": false
}
}
],
"vout": [
{
"value": 0.00133699,
"n": 0,
"scriptPubKey": {
"asm": "0 3fc890e2cb4f4609aad7cb93412c1ec074c3c63e",
"desc": "addr(bc1q8lyfpcktfarqn2khewf5ztq7cp6v83379gfy2l)#awh9zx84",
"hex": "00143fc890e2cb4f4609aad7cb93412c1ec074c3c63e",
"address": "bc1q8lyfpcktfarqn2khewf5ztq7cp6v83379gfy2l",
"type": "witness_v0_keyhash"
},
"offset": 0,
"is_miner": false
}
],
"hex": "020000000001015e2467e03854ada0346e655297f1818f36da97775fff63a1277c2d994e06ca1e9e00000000fdffffff01430a0200000000001600143fc890e2cb4f4609aad7cb93412c1ec074c3c63e02483045022100baea2e0ac4615d49c1b1ec3476c9ee14f7bd239229a424dd882ffe12f820ed4e022060e81963a39aaf14e59ba0b11fa3d12650cf3da4f7f12dda53dab45c33124b2c012102f00a8a664bab6f0c0240b3e4682d16b0c44a1d5aec8bdc31c3e136b2ba4e792000000000",
"blockhash": "",
"blocktime": 0,
"rectime": 0,
"height": 815073,
"is_confirm": true
}
},
"msg": "success",
"timestamp": 1700008863,
"trace_id": ""
}
HTTP Request
GET https://tools-gateway.api.cloverpool.com/rest/api/v1.0/nodeapi/tx/fillvin/:txId
Request Parameters
Parameter | Example | Type | Required | Description | Default |
---|---|---|---|---|---|
txId | string | Yes | Queried transaction id | Null |
Response Parameters
Parameter | Type | Description |
---|---|---|
hash | string | Transaction hash |
txid | string | Transaction id |
version | int | Version |
size | int | Total transaction size |
vsize | int | Virtual size |
weight | int | Weight |
locktime | int | Locktime of the UTXO |
vin | array | An array of transaction objects used as inputs for the current transaction |
vout | array | An array of output transaction objects for the current transaction |
Hex | string | The raw hexadecimal representation of the transaction |
Get Full Transaction Data by Transaction ID
Consumption per query 5
This interface will fill in the input address and the number of transactions in the transaction, and return the cost data of the UTXO and the block information for easy query.
curl --request GET \
--url https://tools-gateway.api.cloverpool.com/rest/api/v1.0/nodeapi/tx/full/c2e8fd13d6bea9d54aeceb83dbbeff631adf4003dce37175fce524e7e28795c2 \
--header 'X-API-TOKEN: t648e371d1e70aeaad812ecaa9ff438b65043b1e745a0b50e1854eb8042dfa328'
import http.client
conn = http.client.HTTPSConnection("tools-gateway.api.cloverpool.com")
headers = { 'X-API-TOKEN': "t648e371d1e70aeaad812ecaa9ff438b65043b1e745a0b50e1854eb8042dfa328" }
conn.request("GET", "/rest/api/v1.0/nodeapi/tx/full/c2e8fd13d6bea9d54aeceb83dbbeff631adf4003dce37175fce524e7e28795c2", headers=headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
Response Example
{
"code": 0,
"data": {
"block_hash": "00000000000000000002923da2d02f2c61abeea7794450fab1676d03f3f6f9d7",
"block_height": 856842,
"block_time": 1723701642,
"confirmations": 160,
"created_at": 1723701643,
"fee": 21150,
"hash": "5a02964f9d0af01b2ac0f4066c6fd4961b3e0cc11396c7b9e2bde00bfbbcade4",
"inputs": [
{
"prev_addresses": [
"bc1qm0kpjcfdhjlmr89834yhenw6cjtlh6c3rdyhvt"
],
"prev_position": 1,
"prev_tx_hash": "7dfca33f82aed0ad528c64d3c39338b2ce44cec5975b39a719e47c91de432b89",
"prev_type": "P2WPKH_V0",
"prev_value": 16554535,
"sequence": 4294967293
}
],
"inputs_count": 1,
"inputs_value": 16554535,
"is_coinbase": false,
"is_double_spend": false,
"is_sw_tx": true,
"lock_time": 856840,
"outputs": [
{
"addresses": [
"bc1q4segqdw3jxxwajd75rala3k6vlvzk3x4mcehsp"
],
"spent_by_tx": "",
"spent_by_tx_position": -1,
"type": "P2WPKH_V0",
"value": 150921
},
{
"addresses": [
"bc1qlz0rmt0k0ms5w78zjv309swet4dcppznefwu7s"
],
"spent_by_tx": "c0684ee2329d7b1bcaaf7ee6af8888a19515c43b4383cacb67d5c9f5d95aeeb7",
"spent_by_tx_position": 0,
"type": "P2WPKH_V0",
"value": 16382464
}
],
"outputs_count": 2,
"outputs_value": 16533385,
"sigops": 1,
"size": 222,
"version": 2,
"vsize": 141,
"weight": 561,
"witness_hash": "56e431a13686e8edf924d33cba043f63a1ca33827035511b91d9750b5ab40391"
},
"msg": "success",
"timestamp": 1723791876,
"trace_id": ""
}
HTTP Request
GET https://tools-gateway.api.cloverpool.com/rest/api/v1.0/nodeapi/tx/full/:txId
Request Parameters
Parameter | Example | Type | Required | Description | Default |
---|---|---|---|---|---|
txId | string | Yes | Queried transaction id | Null |
Response Parameters
Parameter | Type | Description |
---|---|---|
block_hash | string | Block hash |
block_height | int | Block height |
block_time | int64 | Timestamps for generating block |
confirmations | int | Confirmations |
created_at | int64 | Timestamps for creating transaction |
fee | int64 | Netwokr fee in satoshis |
hash | string | Transaction hash |
inputs | array | An array of input transaction objects for the current transaction |
inputs_count | int | Number of input transactions |
inputs_value | int64 | Total input value in satoshis |
is_coinbase | bool | Is a coinbase transaction or not |
is_double_spend | bool | Is a double-spending transaction or not |
is_sw_tx | bool | Is the transaction a SegWit transaction |
lock_time | int | Locktime of the UTXO |
outputs | array | An array of output transaction objects for the current transaction |
outputs_count | int | Number of output transactions |
outputs_value | int64 | Total output value in satoshis |
sigops | int | Number of signature operations |
size | int | Total transaction size |
version | int | Version |
vsize | int | Virtual size |
weight | int | Weight |
witness_hash | string | Witness hash |
Input Transaction Object
Parameter | Type | Description |
---|---|---|
prev_addresses | array | An array of input addresses |
prev_position | int | Index of the input transaction |
prev_tx_hash | string | Transaction hash of the input transaction |
prev_type | string | Type of the input address |
prev_value | int64 | Value of the input transaction in satoshis |
sequence | int | Sequence of the input transaction |
Output Transaction Object
Parameter | Type | Description |
---|---|---|
addresses | array | An array of output addresses |
spent_by_tx | string | Transaction hash of the output transaction |
spent_by_tx_position | int | Index of the output transaction |
type | string | Type of the output address |
value | int64 | Value of the output transaction in satoshis |
Query RAW Transaction
Consumption per query 1
curl --request GET \
--url https://tools-gateway.api.cloverpool.com/rest/api/v1.0/nodeapi/tx/rawtx/674fea60d8992b3e630aa7a5c75277c6ed80d55ec8abb80716e8892c45517561 \
--header 'X-API-TOKEN: t648e371d1e70aeaad812ecaa9ff438b65043b1e745a0b50e1854eb8042dfa328'
import http.client
conn = http.client.HTTPSConnection("tools-gateway.api.cloverpool.com")
headers = { 'X-API-TOKEN': "t648e371d1e70aeaad812ecaa9ff438b65043b1e745a0b50e1854eb8042dfa328" }
conn.request("GET", "/rest/api/v1.0/nodeapi/tx/rawtx/674fea60d8992b3e630aa7a5c75277c6ed80d55ec8abb80716e8892c45517561", headers=headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
Response Example
{
"code": 0,
"data": {
"rawtx": "02000000000101d4ece3844262f5fb8a94137fcf98ce64dbec7eaafa817c9981aa23aff98f22d80e000000000000008002b80b00000000000017a91423e522dfc6656a8fda3d47b4fa53f7585ac758cd877a5f0100000000001600145f24b63f2d8c25a0ad96ffe4d6153302847a0da60247304402204ae30cceaefd01a0df2d39a7be3686909820fc912a11aef4839bba290851e9fc0220077e15f59e6a773c6cfb80ac3b781c0b6b505374ebdc2eb6b544beaa2fe48f34012102f6caaab827b73590d0b8927c8fac0f205127dc2df9bbf3d5fa754ad8038b8a5600000000"
},
"msg": "success",
"timestamp": 1700014786,
"trace_id": ""
}
HTTP Request
GET https://tools-gateway.api.cloverpool.com/rest/api/v1.0/nodeapi/tx/rawtx/:txId
Request Parameters
Parameter | Example | Type | Required | Description | Default |
---|---|---|---|---|---|
txId | string | Yes | Queried transaction id | Null |
Response Parameters
Parameter | Type | Description |
---|---|---|
rawtx | string | Transaction RAW data |
Query Transaction Status
Consumption per query 1
Check if the transaction has been confirmed on the blockchain.
curl --request GET \
--url https://tools-gateway.api.cloverpool.com/rest/api/v1.0/nodeapi/tx/status/c2e8fd13d6bea9d54aeceb83dbbeff631adf4003dce37175fce524e7e28795c2 \
--header 'X-API-TOKEN: t648e371d1e70aeaad812ecaa9ff438b65043b1e745a0b50e1854eb8042dfa328'
import http.client
conn = http.client.HTTPSConnection("tools-gateway.api.cloverpool.com")
headers = { 'X-API-TOKEN': "t648e371d1e70aeaad812ecaa9ff438b65043b1e745a0b50e1854eb8042dfa328" }
conn.request("GET", "/rest/api/v1.0/nodeapi/tx/status/c2e8fd13d6bea9d54aeceb83dbbeff631adf4003dce37175fce524e7e28795c2", headers=headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
Response Example
{
"code": 0,
"data": {
"status": 1
},
"msg": "success",
"timestamp": 1700015048,
"trace_id": ""
}
HTTP Request
GET https://tools-gateway.api.cloverpool.com/rest/api/v1.0/nodeapi/tx/status/:txId
Request Parameters
Parameter | Example | Type | Required | Description | Default |
---|---|---|---|---|---|
txId | string | Yes | Queried transaction id | Null |
Response Parameters
Parameter | Type | Description |
---|---|---|
status | int | 1:Confirmed 0:Unconfirmed |
Query Whether UTXO Has Been Spent
Consumption per query 2
curl --request GET \
--url https://tools-gateway.api.cloverpool.com/rest/api/v1.0/nodeapi/tx/utxo-status/038e09e7afd9a82d74f58e58753fed32e7f4302b6c957957968f564bfa408eac/1 \
--header 'X-API-TOKEN: t648e371d1e70aeaad812ecaa9ff438b65043b1e745a0b50e1854eb8042dfa328'
import http.client
conn = http.client.HTTPSConnection("tools-gateway.api.cloverpool.com")
headers = { 'X-API-TOKEN': "t648e371d1e70aeaad812ecaa9ff438b65043b1e745a0b50e1854eb8042dfa328" }
conn.request("GET", "/rest/api/v1.0/nodeapi/tx/utxo-status/038e09e7afd9a82d74f58e58753fed32e7f4302b6c957957968f564bfa408eac/1", headers=headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
Response Example
{
"code": 0,
"data": {
"addr": "bc1qwqdg6squsna38e46795at95yu9atm8azzmyvckulcc7kytlcckxswvvzej",
"height": 815069,
"tx_id": "038e09e7afd9a82d74f58e58753fed32e7f4302b6c957957968f564bfa408eac",
"output_index": 1,
"amount": 12283240,
"timestamp": 1698985176,
"is_coinbase": false,
"spend_tx_id": "606198df944eafb5c74ff13a8196affa598586fa1ba9130845457f43b82c8c65",
"spend_input_index": 0,
"spend_height": 815072,
"spend_timestamp": 1698987608
},
"msg": "success",
"timestamp": 1700015246,
"trace_id": ""
}
HTTP Request
GET https://tools-gateway.api.cloverpool.com/rest/api/v1.0/nodeapi/tx/utxo-status/:txId/:index
Request Parameters
Parameter | Example | Type | Required | Description | Default |
---|---|---|---|---|---|
txId | string | Yes | Queried transaction id | ||
index | int | Yes | The positional index of the transaction output |
Response Parameters
Parameter | Type | Description |
---|---|---|
addr | string | The address that owns this UTXO |
height | int | The height of generating this UTXO |
tx_id | string | The transaction hash of generating this UTXO |
output_index | int | The positional index of this UTXO in the transaction output |
amount | int64 | Amount |
timestamp | int64 | The timestamp of generating this UTXO |
is_coinbase | bool | Is it UTXO generated by coinbase |
spend_tx_id | string | The transaction hash which spend this UTXO |
spend_input_index | string | The positional index of this UTXO in the transaction input |
spend_height | int | The height of spending this UTXO |
spend_timestamp | int64 | The timestamp of spending this UTXO |
Query UTXO Spending of Transaction
Consumption per query 5
curl --request GET \
--url https://tools-gateway.api.cloverpool.com/rest/api/v1.0/nodeapi/tx/utxo-status-list/038e09e7afd9a82d74f58e58753fed32e7f4302b6c957957968f564bfa408eac \
--header 'X-API-TOKEN: t648e371d1e70aeaad812ecaa9ff438b65043b1e745a0b50e1854eb8042dfa328'
import http.client
conn = http.client.HTTPSConnection("tools-gateway.api.cloverpool.com")
headers = { 'X-API-TOKEN': "t648e371d1e70aeaad812ecaa9ff438b65043b1e745a0b50e1854eb8042dfa328" }
conn.request("GET", "/rest/api/v1.0/nodeapi/tx/utxo-status-list/038e09e7afd9a82d74f58e58753fed32e7f4302b6c957957968f564bfa408eac", headers=headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
Response Example
{
"code": 0,
"data": [
{
"addr": "3GQx7yJLjn9HVqwKV2EhgBWAQq6pxi7vcN",
"height": 815069,
"tx_id": "038e09e7afd9a82d74f58e58753fed32e7f4302b6c957957968f564bfa408eac",
"output_index": 0,
"amount": 5400000,
"timestamp": 1698985176,
"is_coinbase": false,
"spend_tx_id": "46b29e7a85a91296dad41fa743275ecfd1a72668726c21aca9c08eeb803e06f5",
"spend_input_index": 11,
"spend_height": 815118,
"spend_timestamp": 1699014849
},
{
"addr": "bc1qwqdg6squsna38e46795at95yu9atm8azzmyvckulcc7kytlcckxswvvzej",
"height": 815069,
"tx_id": "038e09e7afd9a82d74f58e58753fed32e7f4302b6c957957968f564bfa408eac",
"output_index": 1,
"amount": 12283240,
"timestamp": 1698985176,
"is_coinbase": false,
"spend_tx_id": "606198df944eafb5c74ff13a8196affa598586fa1ba9130845457f43b82c8c65",
"spend_input_index": 0,
"spend_height": 815072,
"spend_timestamp": 1698987608
}
],
"msg": "success",
"timestamp": 1700016016,
"trace_id": ""
}
HTTP Request
GET https://tools-gateway.api.cloverpool.com/rest/api/v1.0/nodeapi/tx/utxo-status-list/:txId/
Request Parameters
Parameter | Example | Type | Required | Description | Default |
---|---|---|---|---|---|
txId | string | Yes | Queried transaction id |
Response Parameters
Parameter | Type | Description |
---|---|---|
addr | string | The address that owns this UTXO |
height | int | The height of generating this UTXO |
tx_id | string | The transaction hash of generating this UTXO |
output_index | int | The positional index of this UTXO in the transaction output |
amount | int64 | Amount |
timestamp | int64 | The timestamp of generating this UTXO |
is_coinbase | bool | Is it UTXO generated by coinbase |
spend_tx_id | string | The transaction hash which spend this UTXO |
spend_input_index | string | The positional index of this UTXO in the transaction input |
spend_height | int | The height of spending this UTXO |
spend_timestamp | int64 | The timestamp of spending this UTXO |
Block
Get Block Data
Consumption per query 100
curl --request GET \
--url https://tools-gateway.api.cloverpool.com/rest/api/v1.0/nodeapi/block/info/80 \
--header 'X-API-TOKEN: t648e371d1e70aeaad812ecaa9ff438b65043b1e745a0b50e1854eb8042dfa328'
import http.client
conn = http.client.HTTPSConnection("tools-gateway.api.cloverpool.com")
headers = { 'X-API-TOKEN': "t648e371d1e70aeaad812ecaa9ff438b65043b1e745a0b50e1854eb8042dfa328" }
conn.request("GET", "/rest/api/v1.0/nodeapi/block/info/80", headers=headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
Response Example
{
"code": 0,
"data": {
"blockInfo": {
"hash": "00000000be62325a98e47d3306f275efe45d39d8cd5df28c795c96b8920ad48f",
"confirmations": 795887,
"height": 80,
"version": 1,
"versionHex": "00000001",
"merkleroot": "5ed287fa7b07229b53b15c6ad95ab49c1c222aa0fcfa2dd6603fa8492fae54c6",
"time": 1231646077,
"mediantime": 1231631822,
"nonce": 320393266,
"bits": "1d00ffff",
"difficulty": 1,
"chainwork": "0000000000000000000000000000000000000000000000000000005100510051",
"nTx": 1,
"previousblockhash": "0000000086e318e8c348dad73199bb6fac8cc1effb9c872a7dda49c5caca0021",
"nextblockhash": "000000007d076a5289751e363ecb01604355730e69de270f04f79d969ff1cf86",
"transactions": [
{
"txid": "5ed287fa7b07229b53b15c6ad95ab49c1c222aa0fcfa2dd6603fa8492fae54c6",
"hash": "5ed287fa7b07229b53b15c6ad95ab49c1c222aa0fcfa2dd6603fa8492fae54c6",
"version": 1,
"size": 134,
"vsize": 134,
"weight": 536,
"locktime": 0,
"vin": [
{
"txid": "",
"vout": 0,
"scriptSig": {
"asm": "",
"hex": ""
},
"txinwitness": null,
"sequence": 4294967295,
"coinbase": "04ffff001d0104",
"prevout": {
"value": 0,
"n": 0,
"address": "",
"height": 0,
"txid": "",
"timestamp": 0,
"is_coinbase": true
}
}
],
"vout": [
{
"value": 50,
"n": 0,
"scriptPubKey": {
"asm": "04e869b280ddc2eb25995d46264e9b94d99214f0c3c3eec3b285c54bba7658edce94a3dca09c2206ec7a81aa1aef82bbf43c548f19731c37744c2bd97742e84173 OP_CHECKSIG",
"desc": "",
"hex": "4104e869b280ddc2eb25995d46264e9b94d99214f0c3c3eec3b285c54bba7658edce94a3dca09c2206ec7a81aa1aef82bbf43c548f19731c37744c2bd97742e84173ac",
"address": "1BwWdLV5wbnZvSYfNA8zaEMqEDDjvA99wX",
"type": "pubkey"
},
"offset": 0,
"is_miner": false
}
],
"hex": "",
"blockhash": "",
"blocktime": 0,
"rectime": 0,
"height": 0,
"is_confirm": false
}
]
}
},
"msg": "success",
"timestamp": 1700016220,
"trace_id": ""
}
HTTP Request
GET https://tools-gateway.api.cloverpool.com/rest/api/v1.0/nodeapi/block/info/:height
Request Parameters
Parameter | Example | Type | Required | Description | Default |
---|---|---|---|---|---|
height | 80 | int | Yes | Queried block height |
Response Parameters
Parameter | Type | Description |
---|---|---|
hash | string | Block hash |
height | int | Block height |
version | int | Block version |
versionHex | string | Block version(Hexadecimal representation) |
merkleroot | string | Merkleroot |
time | int64 | Timestamps for generating block |
nonce | uint32 | Nonce |
Bits | string | Bits |
difficulty | float64 | Difficulty |
nTx | int | Total count of txns contained in the block |
previousblockhash | string | Previous block hash |
nextblockhash | string | Next block hash |
transactions | array | Transaction list |
Transaction List
Parameter | Type | Description |
---|---|---|
hash | string | Transaction hash |
txid | string | Transaction id |
version | int | Version |
size | int | Total transaction size |
vsize | int | Virtual size |
weight | int | Weight |
locktime | int | Locktime of the UTXO |
vin | array | An array of transaction objects used as inputs for the current transaction |
vout | array | An array of output transaction objects for the current transaction |
Hex | string | The raw hexadecimal representation of the transaction |
Get Block Transaction list
Consumption per query 2
curl --request GET \
--url https://tools-gateway.api.cloverpool.com/rest/api/v1.0/nodeapi/block/txlist/800000 \
--header 'X-API-TOKEN: t648e371d1e70aeaad812ecaa9ff438b65043b1e745a0b50e1854eb8042dfa328'
import http.client
conn = http.client.HTTPSConnection("tools-gateway.api.cloverpool.com")
headers = { 'X-API-TOKEN': "t648e371d1e70aeaad812ecaa9ff438b65043b1e745a0b50e1854eb8042dfa328" }
conn.request("GET", "/rest/api/v1.0/nodeapi/block/txlist/800000", headers=headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
Response Example
{
"code": 0,
"data": {
"txCount": 1,
"txIdList": [
"5b340f8c400f59467ecbda0c7f43bdba6e021668424949a02eff377b17b04448"
]
},
"msg": "success",
"timestamp": 1700016577,
"trace_id": ""
}
HTTP Request
GET https://tools-gateway.api.cloverpool.com/rest/api/v1.0/nodeapi/block/txlist/:height
Request Parameters
Parameter | Example | Type | Required | Description | Default |
---|---|---|---|---|---|
height | 800 | int | Yes | Queried block height |
Response Parameters
Parameter | Type | Description |
---|---|---|
txcount | int | Number of txns in this block |
txIdList | array | Transaction ID list |
Get Block Header by Height
Consumption per query 1
curl --request GET \
--url https://tools-gateway.api.cloverpool.com/rest/api/v1.0/nodeapi/block/header-height/800000 \
--header 'X-API-TOKEN: t648e371d1e70aeaad812ecaa9ff438b65043b1e745a0b50e1854eb8042dfa328'
import http.client
conn = http.client.HTTPSConnection("tools-gateway.api.cloverpool.com")
headers = { 'X-API-TOKEN': "t648e371d1e70aeaad812ecaa9ff438b65043b1e745a0b50e1854eb8042dfa328" }
conn.request("GET", "/rest/api/v1.0/nodeapi/block/header-height/800000", headers=headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
Response Example
{
"code": 0,
"data": {
"hash": "00000000000000000002a7c4c1e48d76c5a37902165a270156b7a8d72728a054",
"height": 800000,
"time": 1690168629,
"difficulty": 53911173001054.59,
"previousBlockHash": "000000000000000000012117ad9f72c1c0e42227c2d042dca23e6b96bd9fbb55",
"strippedSize": 786115,
"size": 1634536,
"txCount": 3721,
"fee": 13687680,
"blockReward": 625000000,
"versionHex": "341d6000",
"version": 874340352,
"mrklRoot": "91f01a00530c8c83617190048ea8b0814d506cf24dfdbcf8893f8f0cab7f0855",
"bits": "17053894",
"nonce": 106861918,
"nextBlockHash": "00000000000000000000e26b239cf19ec7ace5edd9694d51a3f6933247720947",
"poolDifficulty": 106001968731943.69,
"curTimestamp": 0,
"isSwBlock": true,
"weight": 3992881,
"extras": null
},
"msg": "success",
"timestamp": 1723790214,
"trace_id": ""
}
HTTP Request
GET https://tools-gateway.api.cloverpool.com/rest/api/v1.0/nodeapi/block/header-height/:height
Request Parameters
Parameter | Example | Type | Required | Description | Default |
---|---|---|---|---|---|
height | 800 | int | Yes | Queried block height |
Response Parameters
Parameter | Type | Description |
---|---|---|
hash | string | Block hash |
height | int | Block height |
version | int | Block version |
versionHex | string | Block version(Hexadecimal representation) |
merkleroot | string | Merkleroot |
time | int64 | Timestamps for generating block |
nonce | uint32 | Nonce |
Bits | string | Bits |
difficulty | float64 | Difficulty |
poolDifficulty | float64 | Pool difficulty |
txCount | int | Total count of txns contained in the block |
previousBlockhash | string | Previous block hash |
nextblockhash | string | Next block hash |
transactions | array | Transaction list |
strippedSize | int | Stripped size |
size | int | Block size |
fee | int | Network fee in satoshis |
blockReward | int | Block reward in satoshis |
isSwBlock | bool | Is it SegWit block |
weight | int | Weight |
extras | string | Extra information |
Extra information
Parameter | Type | Description |
---|---|---|
MinerName | string | Miner name |
MinerUrl | string | Miner url |
Get Block Header by Block hash
Consumption per query 1
curl --request GET \
--url https://tools-gateway.api.cloverpool.com/rest/api/v1.0/nodeapi/block/header-hash/00000000000000000002a7c4c1e48d76c5a37902165a270156b7a8d72728a054 \
--header 'X-API-TOKEN: t648e371d1e70aeaad812ecaa9ff438b65043b1e745a0b50e1854eb8042dfa328'
import http.client
conn = http.client.HTTPSConnection("tools-gateway.api.cloverpool.com")
headers = { 'X-API-TOKEN': "t648e371d1e70aeaad812ecaa9ff438b65043b1e745a0b50e1854eb8042dfa328" }
conn.request("GET", "/rest/api/v1.0/nodeapi/block/header-hash/00000000000000000002a7c4c1e48d76c5a37902165a270156b7a8d72728a054", headers=headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
Response Example
{
"code": 0,
"data": {
"hash": "00000000000000000002a7c4c1e48d76c5a37902165a270156b7a8d72728a054",
"height": 800000,
"time": 1690168629,
"difficulty": 53911173001054.59,
"previousBlockHash": "000000000000000000012117ad9f72c1c0e42227c2d042dca23e6b96bd9fbb55",
"strippedSize": 786115,
"size": 1634536,
"txCount": 3721,
"fee": 13687680,
"blockReward": 625000000,
"versionHex": "341d6000",
"version": 874340352,
"mrklRoot": "91f01a00530c8c83617190048ea8b0814d506cf24dfdbcf8893f8f0cab7f0855",
"bits": "17053894",
"nonce": 106861918,
"nextBlockHash": "00000000000000000000e26b239cf19ec7ace5edd9694d51a3f6933247720947",
"poolDifficulty": 106001968731943.69,
"curTimestamp": 0,
"isSwBlock": true,
"weight": 3992881,
"extras": null
},
"msg": "success",
"timestamp": 1723790214,
"trace_id": ""
}
HTTP Request
GET https://tools-gateway.api.cloverpool.com/rest/api/v1.0/nodeapi/block/header-hash/:hash
Request Parameters
Parameter | Example | Type | Required | Description | Default |
---|---|---|---|---|---|
hash | 00000000000000000002a7c4c1e48d76c5a37902165a270156b7a8d72728a054 | string | Yes | Queried Block hash |
Response Parameters
Parameter | Type | Description |
---|---|---|
hash | string | Block hash |
height | int | Block height |
version | int | Block version |
versionHex | string | Block version(Hexadecimal representation) |
merkleroot | string | Merkleroot |
time | int64 | Timestamps for generating block |
nonce | uint32 | Nonce |
Bits | string | Bits |
difficulty | float64 | Difficulty |
nTx | int | Total count of txns contained in the block |
previousblockhash | string | Previous block hash |
nextblockhash | string | Next block hash |
transactions | array | Transaction list |
Get Block hash by Block height
Consumption per query 1
curl --request GET \
--url https://tools-gateway.api.cloverpool.com/rest/api/v1.0/nodeapi/block/hash/800000 \
--header 'X-API-TOKEN: t648e371d1e70aeaad812ecaa9ff438b65043b1e745a0b50e1854eb8042dfa328'
import http.client
conn = http.client.HTTPSConnection("tools-gateway.api.cloverpool.com")
headers = { 'X-API-TOKEN': "t648e371d1e70aeaad812ecaa9ff438b65043b1e745a0b50e1854eb8042dfa328" }
conn.request("GET", "/rest/api/v1.0/nodeapi/block/hash/800000", headers=headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
Response Example
{
"code": 0,
"data": {
"hash": "00000000000000000002a7c4c1e48d76c5a37902165a270156b7a8d72728a054"
},
"msg": "success",
"timestamp": 1700016967,
"trace_id": ""
}
HTTP Request
GET https://tools-gateway.api.cloverpool.com/rest/api/v1.0/nodeapi/block/hash/:height
Request Parameters
Parameter | Example | Type | Required | Description | Default |
---|---|---|---|---|---|
height | 800 | int | Yes | Queried block height |
Response Parameters
Parameter | Type | Description |
---|---|---|
hash | string | Block hash |
Get Block List by Daytime
Consumption per query 20
curl --request GET \
--url https://tools-gateway.api.cloverpool.com/rest/api/v1.0/nodeapi/block/date/20210102 \
--header 'X-API-TOKEN: t648e371d1e70aeaad812ecaa9ff438b65043b1e745a0b50e1854eb8042dfa328'
import http.client
conn = http.client.HTTPSConnection("tools-gateway.api.cloverpool.com")
headers = { 'X-API-TOKEN': "t648e371d1e70aeaad812ecaa9ff438b65043b1e745a0b50e1854eb8042dfa328" }
conn.request("GET", "/rest/api/v1.0/nodeapi/block/date/20210102", headers=headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
Response Example
{
"code": 0,
"data": [
{
"hash": "0000000000000000000d0048c27f0263b159a5f15b147e6426aa8209ea6b564f",
"height": 664065,
"time": 1609548382,
"difficulty": 18599593048299.49,
"previousBlockHash": "000000000000000000017c66e7346891d8931f250874b61640266055979090c9",
"strippedSize": 875267,
"size": 1367598,
"txCount": 2228,
"fee": 31568122,
"blockReward": 625000000,
"versionHex": "20c00000",
"version": 549453824,
"mrklRoot": "7ebf705db1a59a7064c3f24036c13eb88f920428672d5555b1e7a00252dee7d4",
"bits": "170f2217",
"nonce": 158312124,
"nextBlockHash": "0000000000000000000d185631218709ac424be17d1c2d545af5bcf0fbbcae88",
"poolDifficulty": 21649761277326,
"curTimestamp": 0,
"isSwBlock": true,
"weight": 3993399,
"extras": {
"minerName": "BTC.com",
"minerUrl": "https://pool.btc.com"
}
}
],
"msg": "success",
"timestamp": 1700016967,
"trace_id": ""
}
HTTP Request
GET https://tools-gateway.api.cloverpool.com/rest/api/v1.0/nodeapi/block/date/:day
Request Parameters
Parameter | Example | Type | Required | Description | Default |
---|---|---|---|---|---|
day | 20210102 | string | Yes | Queried block day |
Response Parameters
Parameter | Type | Description |
---|---|---|
hash | string | Block hash |
height | int | Block height |
time | int | Block time |
difficulty | float | Block difficulty |
previousBlockHash | string | previous Block hash |
strippedSize | int | The block size excluding witness data |
size | int | The size of the block |
txCount | int | Number of txns in this block |
fee | int | total transaction fees in satoshis |
blockReward | int | Block rewards without fees in satoshis |
versionHex | string | Block version(Hexadecimal representation) |
version | int | Block version |
mrklRoot | string | Merkle root |
bits | string | Bits |
nonce | uint32 | Nonce |
nextBlockHash | string | Next block hash |
poolDifficulty | float | Pool difficulty |
isSwBlock | bool | Is it SegWit block |
weight | int | The block weight as defined in BIP 141 |
extras | string | Extra information |
Extra information
Parameter | Type | Description |
---|---|---|
minerName | string | The miner who mined the block |
minerUrl | string | Miner's website |
Bitcoin Node RPC
Getblock
Returns information about the block. Consumption per query 100
curl https://tools-gateway.api.cloverpool.com/rpc/api/v1.0/noderpc/ \
-X POST \
-H "Content-Type: application/json" -H "X-API-TOKEN":"tbd3bc805fe6e5b668a475684a3f7a476a79dd6776143e1fe6fc9d57e8e2d3" \
--data '{ "method": "getblock","params":["00000000c937983704a73af28acdec37b049d214adbda81d7e2a3dd146f6ed09"] }'
import requests
import json
url = "https://tools-gateway.api.cloverpool.com/rpc/api/v1.0/noderpc/"
payload = json.dumps({
"method": "getblock"
"params": ["00000000c937983704a73af28acdec37b049d214adbda81d7e2a3dd146f6ed09"]
})
headers = {
'Content-Type': 'application/json'
"X-API-TOKEN":"tcccd68ed9df0e4808e4311397496feb0a57f6f6f4df388b9a2e3812573cf1"
}
response = requests.request("POST", url, headers=headers, data=payload)
print(response.text)
Response Example
{"jsonrpc":"2.0","result":{"hash":"00000000c937983704a73af28acdec37b049d214adbda81d7e2a3dd146f6ed09","confirmations":826432,"height":1000,"version":1,"versionHex":"00000001","merkleroot":"fe28050b93faea61fa88c4c630f0e1f0a1c24d0082dd0e10d369e13212128f33","time":1232346882,"mediantime":1232344831,"nonce":2595206198,"bits":"1d00ffff","difficulty":1,"chainwork":"000000000000000000000000000000000000000000000000000003e903e903e9","nTx":1,"previousblockhash":"0000000008e647742775a230787d66fdf92c46a48c896bfbc85cdc8acc67e87d","nextblockhash":"00000000a2887344f8db859e372e7e4bc26b23b9de340f725afbf2edb265b4c6","strippedsize":216,"size":216,"weight":864,"tx":["fe28050b93faea61fa88c4c630f0e1f0a1c24d0082dd0e10d369e13212128f33"]},"error":null,"id":1706252364}
Request Parameters
Parameter | Type | Description |
---|---|---|
blockhash | string | The hash of the block |
verbosity | int | default = 1, 0 for hex-encoded data, 1 for a JSON object, and 2 for JSON object with transaction data |
Response Parameters
verbosity = 0
Parameter | Type | Description |
---|---|---|
hex | string | A string that is serialized, hex-encoded data for block hash |
verbosity = 1
Parameter | Type | Description |
---|---|---|
hex | string | The block hash |
confirmations | int | The number of confirmations, or -1 if the block is not on the main chain |
height | int | The block height or index |
version | int | The block version |
versionHex | string | The block version formatted in hexadecimal |
merkleroot | string | The merkle root |
time | int | The block time expressed in UNIX epoch time |
mediantime | int | The median block time expressed in UNIX epoch time |
nonce | int | number that miners adjust in order to find a block hash that meets the network's specified difficulty target |
bits | string | The value of the nBits field in the block header |
difficulty | int | The estimated amount of work done to find this block relative to the estimated amount of work done to find block 0 |
chainwork | string | Expected number of hashes required to produce the current chain |
nTx | int | The number of transactions in the block |
previousblockhash | string | The hash of the previous block |
nextblockhash | string | The hash of the next block |
strippedsize | int | The block size excluding witness data |
size | int | The size of the block |
weight | int | The block weight as defined in BIP 141 |
tx | array | An array with transaction ids |
Getblockcount
Returns the height of the fully-validated chain. The genesis block has a height of 0.
Consumption per query 1
curl https://tools-gateway.api.cloverpool.com/rpc/api/v1.0/noderpc/ \
-X POST \
-H "Content-Type: application/json" -H "X-API-TOKEN":"tcccd68ed9df0e4808e4311397496feb0a57f6f6f4df388b9a2e3812573cf1" \
--data '{ "method": "getblockcount" }'
import requests
import json
url = "https://tools-gateway.api.cloverpool.com/rpc/api/v1.0/noderpc/"
payload = json.dumps({
"method": "getblockcount"
})
headers = {
'Content-Type': 'application/json'
"X-API-TOKEN":"tcccd68ed9df0e4808e4311397496feb0a57f6f6f4df388b9a2e3812573cf1"
}
response = requests.request("POST", url, headers=headers, data=payload)
print(response.text)
Response Example
{
"jsonrpc":"2.0",
"result":821742,
"error":null,
"id":1702887370
}
Request Parameters
This method does not accept any parameters
Response Parameters
Parameter | Type | Description |
---|---|---|
result | int | The current block count |
Decoderawtransaction
Decodes the raw transaction and provides chain information in the form of JSON.
Consumption per query 1
curl https://tools-gateway.api.cloverpool.com/rpc/api/v1.0/noderpc/ \
-X POST \
-H "Content-Type: application/json" -H "X-API-TOKEN":"tcccd68ed9df0e4808e4311397496feb0a57f6f6f4df388b9a2e3812573cf1" \
--data '{"method": "decoderawtransaction", "params": ["0100000001eaefefbd1f687ef4e861804aed59ef05e743ea85f432cc146f325d759a026ce6010000006a4730440220718954e28983c875858b5a0094df4607ce2e7c6e9ffea47f3876792b01755c1202205e2adc7c32ff64aaef6d26045f96181e8741e560b6f3a8ef2f4ffd2892add656012103142355370728640592109c3d2bf5592020a6b9226303c8bc98ab2ebcadf057abffffffff02005a6202000000001976a914fe7e0711287688b33b9a5c239336c4700db34e6388ac10ca0f24010000001976a914af92ad98c7f77559f96430dfef2a6805b87b24f888ac00000000"]}'
import requests
import json
url = "https://tools-gateway.api.cloverpool.com/rpc/api/v1.0/noderpc/"
payload = json.dumps({
"method": "decoderawtransaction",
"params": [
"0100000001eaefefbd1f687ef4e861804aed59ef05e743ea85f432cc146f325d759a026ce6010000006a4730440220718954e28983c875858b5a0094df4607ce2e7c6e9ffea47f3876792b01755c1202205e2adc7c32ff64aaef6d26045f96181e8741e560b6f3a8ef2f4ffd2892add656012103142355370728640592109c3d2bf5592020a6b9226303c8bc98ab2ebcadf057abffffffff02005a6202000000001976a914fe7e0711287688b33b9a5c239336c4700db34e6388ac10ca0f24010000001976a914af92ad98c7f77559f96430dfef2a6805b87b24f888ac00000000"
]
})
headers = {
'Content-Type': 'application/json'
"X-API-TOKEN":"tcccd68ed9df0e4808e4311397496feb0a57f6f6f4df388b9a2e3812573cf1"
}
response = requests.request("POST", url, headers=headers, data=payload)
print(response.text)
Response Example
{"jsonrpc":"2.0","result":{"txid":"0e690d6655767c8b388e7403d13dc9ebe49b68e3bd46248c840544f9da87d1e8","hash":"0e690d6655767c8b388e7403d13dc9ebe49b68e3bd46248c840544f9da87d1e8","version":1,"size":225,"vsize":225,"weight":900,"locktime":0,"vin":[{"txid":"e66c029a755d326f14cc32f485ea43e705ef59ed4a8061e8f47e681fbdefefea","vout":1,"scriptSig":{"asm":"30440220718954e28983c875858b5a0094df4607ce2e7c6e9ffea47f3876792b01755c1202205e2adc7c32ff64aaef6d26045f96181e8741e560b6f3a8ef2f4ffd2892add656[ALL] 03142355370728640592109c3d2bf5592020a6b9226303c8bc98ab2ebcadf057ab","hex":"4730440220718954e28983c875858b5a0094df4607ce2e7c6e9ffea47f3876792b01755c1202205e2adc7c32ff64aaef6d26045f96181e8741e560b6f3a8ef2f4ffd2892add656012103142355370728640592109c3d2bf5592020a6b9226303c8bc98ab2ebcadf057ab"},"sequence":4294967295}],"vout":[{"value":0.40000000,"n":0,"scriptPubKey":{"asm":"OP_DUP OP_HASH160 fe7e0711287688b33b9a5c239336c4700db34e63 OP_EQUALVERIFY OP_CHECKSIG","desc":"addr(1QCdcH34KquWP7TrE6TNpjXHCjcADkNx9i)#c74jvp5y","hex":"76a914fe7e0711287688b33b9a5c239336c4700db34e6388ac","address":"1QCdcH34KquWP7TrE6TNpjXHCjcADkNx9i","type":"pubkeyhash"}},{"value":48.99981840,"n":1,"scriptPubKey":{"asm":"OP_DUP OP_HASH160 af92ad98c7f77559f96430dfef2a6805b87b24f8 OP_EQUALVERIFY OP_CHECKSIG","desc":"addr(1H1LxwmSw6f82AeHcQvNcupXjD9nKqQXLd)#m3zmae6u","hex":"76a914af92ad98c7f77559f96430dfef2a6805b87b24f888ac","address":"1H1LxwmSw6f82AeHcQvNcupXjD9nKqQXLd","type":"pubkeyhash"}}]},"error":null,"id":1702891292}
Request Parameters
Parameter | Type | Description |
---|---|---|
hexstring | The transaction hex string |
Response Parameters
Parameter | Type | Description |
---|---|---|
txid | string | Transaction id |
hash | string | The transaction hash (differs from txid for witness transactions) |
size | int | The transaction size |
vsize | string | The virtual transaction size (differs from the size for witness transactions) |
weight | int | The transaction's weight (between vsize*4 - 3 and vsize*4) |
version | int | The block version |
locktime | int | The transaction locktime |
vin | array | A JSON array. Each element in the array serves as a transaction's input vector (vin). |
vout | array | A JSON array containing tx information |
Decodescript
Decodes a hex-encoded script.
Consumption per query 1
curl https://tools-gateway.api.cloverpool.com/rpc/api/v1.0/noderpc/ \
-X POST \
-H "Content-Type: application/json" -H "X-API-TOKEN":"tcccd68ed9df0e4808e4311397496feb0a57f6f6f4df388b9a2e3812573cf1" \
--data '{"method": "decodescript", "params": ["76a914af92ad98c7f77559f96430dfef2a6805b87b24f888ac"]}'
import requests
import json
url = "https://tools-gateway.api.cloverpool.com/rpc/api/v1.0/noderpc/"
payload = json.dumps({
"method": "decodescript",
"params": [
"76a914af92ad98c7f77559f96430dfef2a6805b87b24f888ac"
]
})
headers = {
'Content-Type': 'application/json'
"X-API-TOKEN":"tcccd68ed9df0e4808e4311397496feb0a57f6f6f4df388b9a2e3812573cf1"
}
response = requests.request("POST", url, headers=headers, data=payload)
print(response.text)
Response Example
{"jsonrpc":"2.0","result":{"asm":"OP_DUP OP_HASH160 af92ad98c7f77559f96430dfef2a6805b87b24f8 OP_EQUALVERIFY OP_CHECKSIG","desc":"addr(1H1LxwmSw6f82AeHcQvNcupXjD9nKqQXLd)#m3zmae6u","address":"1H1LxwmSw6f82AeHcQvNcupXjD9nKqQXLd","type":"pubkeyhash","p2sh":"3GjR3YFueMLUqufNmCn8uZF48LYXiUn2nr","segwit":{"asm":"0 af92ad98c7f77559f96430dfef2a6805b87b24f8","desc":"addr(bc1q47f2mxx87a64n7tyxr0772ngqku8kf8cmd9d27)#g0l3qavj","hex":"0014af92ad98c7f77559f96430dfef2a6805b87b24f8","address":"bc1q47f2mxx87a64n7tyxr0772ngqku8kf8cmd9d27","type":"witness_v0_keyhash","p2sh-segwit":"39LsCEAz9RgxMsofDEZFggVjUpNsQojhsi"}},"error":null,"id":1702892437}
Request Parameters
Parameter | Type | Description |
---|---|---|
hexstring | The hex-encoded script |
Response Parameters
Parameter | Type | Description |
---|---|---|
asm | string | The script public key in the form of string |
type | string | The output type. This can be any one of the following: nonstandard, pubkey, pubkeyhash, scripthash, multisig, nulldata, witness_v0_scripthash, witness_v0_keyhash, witness_v1_taproot or witness_unknown |
p2sh | string | An address of the P2SH script wrapping this redeem script (not returned if the script is already a P2SH) |
address | string | A JSON array of addresses used in the transaction |
segwit | map | The result of a witness script public key wrapping this redeem script (not returned if the script is a P2SH or witness) |
Estimatesmartfee
Estimates the smart fee per kilobyte to be paid for a transaction and also returns the number of blocks for which the estimate is valid.
Consumption per query 1
curl https://tools-gateway.api.cloverpool.com/rpc/api/v1.0/noderpc/ \
-X POST \
-H "Content-Type: application/json" -H "X-API-TOKEN":"tcccd68ed9df0e4808e4311397496feb0a57f6f6f4df388b9a2e3812573cf1" \
--data '{"method": "estimatesmartfee", "params": [10]}'
import requests
import json
url = "https://tools-gateway.api.cloverpool.com/rpc/api/v1.0/noderpc/"
payload = json.dumps({
"method": "estimatesmartfee",
"params": [
10
]
})
headers = {
'Content-Type': 'application/json'
"X-API-TOKEN":"tcccd68ed9df0e4808e4311397496feb0a57f6f6f4df388b9a2e3812573cf1"
}
response = requests.request("POST", url, headers=headers, data=payload)
print(response.text)
Response Example
{"jsonrpc":"2.0","result":{"feerate":0.00528772,"blocks":10},"error":null,"id":1702893215}
Request Parameters
Parameter | Type | Description |
---|---|---|
int | Confirmation target in blocks |
Response Parameters
Parameter | Type | Description |
---|---|---|
blocks | int | Block number where estimate was found |
feerate | float64 | estimate fee rate in BTC/kB |
Getbestblockhash
Returns the hash of the tip block in the most-work fully-validated chain.
Consumption per query 1
curl https://tools-gateway.api.cloverpool.com/rpc/api/v1.0/noderpc/ \
-X POST \
-H "Content-Type: application/json" -H "X-API-TOKEN":"tcccd68ed9df0e4808e4311397496feb0a57f6f6f4df388b9a2e3812573cf1" \
--data '{"method": "getbestblockhash"}'
import requests
import json
url = "https://tools-gateway.api.cloverpool.com/rpc/api/v1.0/noderpc/"
payload = json.dumps({
"method": "getbestblockhash",
})
headers = {
'Content-Type': 'application/json'
"X-API-TOKEN":"tcccd68ed9df0e4808e4311397496feb0a57f6f6f4df388b9a2e3812573cf1"
}
response = requests.request("POST", url, headers=headers, data=payload)
print(response.text)
Response Example
{"jsonrpc":"2.0","result":"000000000000000000003069d1f196062efed4a984eb83956ed95b3383a4e719","error":null,"id":1702893692}
Request Parameters
This method does not accept any parameters.
Response Parameters
Parameter | Type | Description |
---|---|---|
hex | string | A string that is serialized, hex-encoded data for block hash |
Getblockhash
Returns the hash of the block provided its height.
Consumption per query 1
curl https://tools-gateway.api.cloverpool.com/rpc/api/v1.0/noderpc/ \
-X POST \
-H "Content-Type: application/json" -H "X-API-TOKEN":"tcccd68ed9df0e4808e4311397496feb0a57f6f6f4df388b9a2e3812573cf1" \
--data '{"method": "getblockhash", "params": [1000]}'
import requests
import json
url = "https://tools-gateway.api.cloverpool.com/rpc/api/v1.0/noderpc/"
payload = json.dumps({
"method": "getblockhash",
"params": [
1000
]
})
headers = {
'Content-Type': 'application/json'
"X-API-TOKEN":"tcccd68ed9df0e4808e4311397496feb0a57f6f6f4df388b9a2e3812573cf1"
}
response = requests.request("POST", url, headers=headers, data=payload)
print(response.text)
Response Example
{"jsonrpc":"2.0","result":"00000000c937983704a73af28acdec37b049d214adbda81d7e2a3dd146f6ed09","error":null,"id":1702951417}
Request Parameters
Parameter | Type | Description |
---|---|---|
height | int | The height index of the block in the blockchain |
Response Parameters
Parameter | Type | Description |
---|---|---|
result | string | Block hash |
Getblockchaininfo
Returns an object that contains the information regarding blockchain processing in different states.
Consumption per query 1
curl https://tools-gateway.api.cloverpool.com/rpc/api/v1.0/noderpc/ \
-X POST \
-H "Content-Type: application/json" -H "X-API-TOKEN":"tcccd68ed9df0e4808e4311397496feb0a57f6f6f4df388b9a2e3812573cf1" \
--data '{"method": "getblockchaininfo"}'
import requests
import json
url = "https://tools-gateway.api.cloverpool.com/rpc/api/v1.0/noderpc/"
payload = json.dumps({
"method": "getblockchaininfo",
})
headers = {
'Content-Type': 'application/json'
"X-API-TOKEN":"tcccd68ed9df0e4808e4311397496feb0a57f6f6f4df388b9a2e3812573cf1"
}
response = requests.request("POST", url, headers=headers, data=payload)
print(response.text)
Response Example
{"jsonrpc":"2.0","result":{"chain":"main","blocks":821753,"headers":821753,"bestblockhash":"00000000000000000001c751d337eb72d9ab917dd88cf5f72de37715b698d3d1","difficulty":67305906902031.39,"time":1702893766,"mediantime":1702890963,"verificationprogress":0.99999962017861,"initialblockdownload":false,"chainwork":"00000000000000000000000000000000000000006193041aac3f6ad26646e6ae","size_on_disk":606778764435,"pruned":false,"warnings":""},"error":null,"id":1702893863}
Request Parameters
This method does not accept any parameters.
Response Parameters
Parameter | Type | Description |
---|---|---|
chain | string | The name of the current network (main, test, regtest) |
blocks | int | The height of the most-work fully-validated chain. The genesis block has height 0 |
headers | int | The current number of headers validated |
bestblockhash | string | The hash of the current best block |
difficulty | float64 | The difficulty of the highest height block |
time | int64 | The time for the current best block |
mediantime | int64 | The median time for the current best block |
verificationprogress | float64 | An estimate of verification progress [0..1] |
initialblockdownload | bool | (debug information) An estimate of whether this node is in Initial Block Download mode |
chainwork | string | Total amount of work in active chain in the hexadecimal form |
size_on_disk | int | The estimated size of the block and undo files on disk |
pruned | bool | It indicates if the blocks are subject to pruning |
warnings | string | Any network and blockchain warnings |
Getblockheader
Returns the header of the block given it's hash.
Consumption per query 1
curl https://tools-gateway.api.cloverpool.com/rpc/api/v1.0/noderpc/ \
-X POST \
-H "Content-Type: application/json" -H "X-API-TOKEN":"tcccd68ed9df0e4808e4311397496feb0a57f6f6f4df388b9a2e3812573cf1" \
--data '{"method": "getblockheader", "params": ["00000000c937983704a73af28acdec37b049d214adbda81d7e2a3dd146f6ed09"]}'
import requests
import json
url = "https://tools-gateway.api.cloverpool.com/rpc/api/v1.0/noderpc/"
payload = json.dumps({
"method": "getblockheader",
"params": [
"00000000c937983704a73af28acdec37b049d214adbda81d7e2a3dd146f6ed09"
]
})
headers = {
'Content-Type': 'application/json'
"X-API-TOKEN":"tcccd68ed9df0e4808e4311397496feb0a57f6f6f4df388b9a2e3812573cf1"
}
response = requests.request("POST", url, headers=headers, data=payload)
print(response.text)
Response Example
{"jsonrpc":"2.0","result":{"hash":"00000000c937983704a73af28acdec37b049d214adbda81d7e2a3dd146f6ed09","confirmations":820867,"height":1000,"version":1,"versionHex":"00000001","merkleroot":"fe28050b93faea61fa88c4c630f0e1f0a1c24d0082dd0e10d369e13212128f33","time":1232346882,"mediantime":1232344831,"nonce":2595206198,"bits":"1d00ffff","difficulty":1,"chainwork":"000000000000000000000000000000000000000000000000000003e903e903e9","nTx":1,"previousblockhash":"0000000008e647742775a230787d66fdf92c46a48c896bfbc85cdc8acc67e87d","nextblockhash":"00000000a2887344f8db859e372e7e4bc26b23b9de340f725afbf2edb265b4c6"},"error":null,"id":1702951915}
Request Parameters
Parameter | Type | Description |
---|---|---|
blockhash | string | Block hash. Required |
verbos | bool | default=true. It's true for a JSON object and false for the hex-encoded data.Unrequired |
Response Parameters
Parameter | Type | Description |
---|---|---|
hash | string | Block hash |
confirms | int | The number of confirmations, or -1 if the block is not on the main chain |
height | int | The block height or index |
version | int | Block version |
versionhex | float64 | The block version formatted in hexadecimal |
merkleroot | hex | Merkleroot |
time | int64 | The block time expressed in UNIX epoch time |
mediantime | int64 | The median block time expressed in UNIX epoch time |
bits | string | The value of the nBits field in the block header |
difficulty | int | The estimated amount of work done to find this block relative to the estimated amount of work done to find block 0 |
chainwork | string | Expected number of hashes required to produce the current chain |
nTx | int | The number of transactions in the block |
previousblockhash | string | The hash of the previous block (if available) |
nextblockhash | string | The hash of the next block (if available) |
Getblockstats
Calculates per block statistics for a given window.
Consumption per query 1
curl https://tools-gateway.api.cloverpool.com/rpc/api/v1.0/noderpc/ \
-X POST \
-H "Content-Type: application/json" -H "X-API-TOKEN":"tcccd68ed9df0e4808e4311397496feb0a57f6f6f4df388b9a2e3812573cf1" \
--data '{"method": "getblockstats", "params": ["00000000c937983704a73af28acdec37b049d214adbda81d7e2a3dd146f6ed09", ["minfeerate","avgfeerate"]]}'
import requests
import json
url = "https://tools-gateway.api.cloverpool.com/rpc/api/v1.0/noderpc/"
payload = json.dumps({
"method": "getblockstats",
"params": [
"00000000c937983704a73af28acdec37b049d214adbda81d7e2a3dd146f6ed09",
[
"minfeerate",
"avgfeerate"
]
]
})
headers = {
'Content-Type': 'application/json'
"X-API-TOKEN":"tcccd68ed9df0e4808e4311397496feb0a57f6f6f4df388b9a2e3812573cf1"
}
response = requests.request("POST", url, headers=headers, data=payload)
print(response.text)
Response Example
{"jsonrpc":"2.0","result":{"avgfeerate":237,"minfeerate":38},"error":null,"id":1702953837}
Request Parameters
Parameter | Type | Description |
---|---|---|
hash | string | Block hash. Required |
stats | jsonArray | JSON array of values to filter from |
Response Parameters
Parameter | Type | Description |
---|---|---|
avgfeerate | int | Average fee rate |
minfeerate | int | Minimum fee rate |
Getchaintips
Returns information about all known chaintips in the block tree, including the main chain as well as orphaned branches.
Consumption per query 1
curl https://tools-gateway.api.cloverpool.com/rpc/api/v1.0/noderpc/ \
-X POST \
-H "Content-Type: application/json" -H "X-API-TOKEN":"tcccd68ed9df0e4808e4311397496feb0a57f6f6f4df388b9a2e3812573cf1" \
--data '{ "method": "getchaintips" }'
import requests
import json
url = "https://tools-gateway.api.cloverpool.com/rpc/api/v1.0/noderpc/"
payload = json.dumps({
"method": "getchaintips"
})
headers = {
'Content-Type': 'application/json'
"X-API-TOKEN":"tcccd68ed9df0e4808e4311397496feb0a57f6f6f4df388b9a2e3812573cf1"
}
response = requests.request("POST", url, headers=headers, data=payload)
print(response.text)
Response Example
{"jsonrpc":"2.0","result":[{"height":821872,"hash":"00000000000000000003438acbd4badb4c54acd8c4f80214e569ad15c7174166","branchlen":0,"status":"active"},{"height":820819,"hash":"000000000000000000008c3db1b630fe634eaef3c5a18d2e6289aa3bb8538d8d","branchlen":1,"status":"valid-headers"},{"height":819343,"hash":"0000000000000000000262af3fb1dd3bc62ad5a119c48a57267a3b96145ce82c","branchlen":1,"status":"valid-fork"},{"height":818038,"hash":"000000000000000000029afbc6cbd660df5548a90ca9202e80866c5c680f29e4","branchlen":1,"status":"valid-fork"},{"height":816358,"hash":"00000000000000000001d5f92e2dbbfcbc1e859873117e7983dd574857da5e14","branchlen":1,"status":"valid-fork"},{"height":815570,"hash":"000000000000000000024c1b977ae540b29e329ccfc3bbb37f3b0880c2336212","branchlen":1,"status":"valid-headers"},{"height":815202,"hash":"0000000000000000000093917031004a140b6db5c6adec217f814db98d7f0bde","branchlen":1,"status":"valid-headers"},{"height":815041,"hash":"000000000000000000018dbe43dce84e99e8b6e3c486b6b99f5d35664ac3d894","branchlen":1,"status":"valid-headers"},{"height":813210,"hash":"000000000000000000021c9f203786c0adcd7ae9a68a25d5e430d2a3dba613d5","branchlen":1,"status":"valid-headers"},{"height":812860,"hash":"000000000000000000005a65fb93cb1793cec24d0bf385dcd62da60f7e9db937","branchlen":1,"status":"valid-headers"},{"height":811703,"hash":"0000000000000000000270d5eed2457bf394e45f5035c1d721f4f3ccecbb2ba5","branchlen":1,"status":"valid-headers"},{"height":809493,"hash":"000000000000000000016b60e199e1f47ea3e3b4e8a6fe50f0ca1bc2d4dab442","branchlen":1,"status":"valid-headers"},{"height":809478,"hash":"000000000000000000006840568a01091022093a176d12a1e8e5e261e4f11853","branchlen":1,"status":"invalid"},{"height":807025,"hash":"000000000000000000048d93a8093bd9b104cadd46957a6d14ba3ce6f2a29b9f","branchlen":1,"status":"valid-headers"},{"height":804900,"hash":"00000000000000000004c20bfe0ed1a9b714fbc07710531b8252dc998f9ccd67","branchlen":1,"status":"valid-fork"},{"height":803389,"hash":"00000000000000000002ea858e57fc91ec34ae26a1d2a53720d7d4e08334fba2","branchlen":1,"status":"valid-fork"},{"height":800786,"hash":"000000000000000000020e419bbdd75f21609d5a050a24bafe45b73a1574127d","branchlen":1,"status":"valid-headers"},{"height":797434,"hash":"00000000000000000000fe9e3172a5d9ee3b815d952476a31056bc007657b83f","branchlen":1,"status":"valid-headers"},{"height":796038,"hash":"0000000000000000000552fdbbe1edbff2887ea7879dc777b33f8cefc4ba665e","branchlen":1,"status":"valid-headers"},{"height":795426,"hash":"000000000000000000045d66a7991b54de7e11776eed27e34df24a59b7de370e","branchlen":1,"status":"headers-only"},{"height":792379,"hash":"000000000000000000032956cbfd8721abe0572d81542e75e38e6185312bee09","branchlen":1,"status":"valid-fork"},{"height":789603,"hash":"00000000000000000002cf6c7ae527fb21ce7721a7772c1da2998aa866b8a37a","branchlen":1,"status":"valid-fork"},{"height":789147,"hash":"000000000000000000044390f8c5e9cfec8b27ba6d876d3cb7986b961f0eb30d","branchlen":1,"status":"valid-fork"},{"height":789135,"hash":"0000000000000000000271e983f5999ee41b8fada533ffeb77a750e7d3a47c31","branchlen":1,"status":"headers-only"},{"height":788837,"hash":"00000000000000000002f51100fafb5c60b2dc9623554c219afef3cf398cecbe","branchlen":1,"status":"valid-fork"},{"height":788805,"hash":"0000000000000000000313dae7541b4c58e93832ddeaf96f8d6a5b5f8157d494","branchlen":1,"status":"valid-fork"},{"height":788687,"hash":"0000000000000000000070ec61b72a3cab40a0f5cea33e4266a08044fd48ee27","branchlen":2,"status":"valid-headers"},{"height":786453,"hash":"00000000000000000004950cc7159fe9a96fbf22b2ee39afb5c0bcfbfa2fef8e","branchlen":1,"status":"headers-only"},{"height":784121,"hash":"000000000000000000046a2698233ed93bb5e74ba7d2146a68ddb0c2504c980d","branchlen":1,"status":"invalid"},{"height":783830,"hash":"0000000000000000000366d2c12772a350f507879a5325203424e58ec440249b","branchlen":1,"status":"valid-headers"},{"height":783478,"hash":"0000000000000000000446f7d3093688ae697386fed3f52a63812678ea6b251d","branchlen":1,"status":"valid-headers"},{"height":783426,"hash":"00000000000000000002ec935e245f8ae70fc68cc828f05bf4cfa002668599e4","branchlen":1,"status":"invalid"},{"height":782333,"hash":"00000000000000000001a1abda3a2eb4acc211f64f8748d1a7635aad80690b7a","branchlen":1,"status":"valid-headers"},{"height":782129,"hash":"000000000000000000036f461ab63c78f08401d3907a67fd2237166d8a373193","branchlen":1,"status":"valid-headers"},{"height":781487,"hash":"0000000000000000000125e5d7c0d2e1b83982e5284ea21e08f5a73b8109d41b","branchlen":1,"status":"valid-fork"},{"height":781277,"hash":"0000000000000000000388f42000fa901c01f2bfae36042bbae133ee430e6485","branchlen":1,"status":"valid-fork"},{"height":780994,"hash":"00000000000000000001b666391fe81859e96fdfdbb83f1a1eafb7951c738c77","branchlen":1,"status":"valid-headers"},{"height":780979,"hash":"000000000000000000012ae175cb998a3057002e532d432f669d0a30e8292c6b","branchlen":1,"status":"headers-only"},{"height":777172,"hash":"0000000000000000000215ac1b6fd564d8d4707631f6b77273521eb1e242cf28","branchlen":1,"status":"valid-headers"},{"height":776941,"hash":"00000000000000000004cc87382e38118248ec926716565d50d63f0637c22c07","branchlen":1,"status":"valid-headers"},{"height":772981,"hash":"0000000000000000000682990a0dae862b48e0451d619938215dd47ed9560200","branchlen":1,"status":"valid-headers"},{"height":771745,"hash":"00000000000000000004370a77a30add64bba97c26a90ca9643b45a75219b2a6","branchlen":1,"status":"valid-headers"},{"height":771627,"hash":"00000000000000000005a92bdb6f9d55ea8d2b42579e0db6ca7764f97b6910e1","branchlen":1,"status":"valid-headers"},{"height":769546,"hash":"00000000000000000006ed9fd2f5c5710e3f6278300516fb90da8685e4cbf0a8","branchlen":1,"status":"valid-headers"},{"height":763445,"hash":"000000000000000000065d0f6847466feeeaffa9663895cedde33aa12c262e00","branchlen":1,"status":"valid-headers"},{"height":759781,"hash":"000000000000000000025edbf5ea025e4af2674b318ba82206f70681d97ca162","branchlen":1,"status":"valid-fork"},{"height":741082,"hash":"00000000000000000004e2891d08337eb9263b703eb1c897e05dc59e8b246a9b","branchlen":1,"status":"headers-only"},{"height":737096,"hash":"00000000000000000002b07a9a9f066d463844960542d96e88b4815e063fab08","branchlen":1,"status":"headers-only"},{"height":733430,"hash":"00000000000000000006ead1cff09f279f7beb31a7290c2a603b0776d98dc334","branchlen":1,"status":"valid-fork"},{"height":730848,"hash":"000000000000000000029ec31578132d01696910f299f8d104f29b8f8bbdc24f","branchlen":1,"status":"valid-headers"},{"height":723102,"hash":"00000000000000000006a970fdd8e537521747aff917d909bf3a78b4b68143e1","branchlen":1,"status":"valid-headers"},{"height":715276,"hash":"00000000000000000009b160476c5f407ccd4957e20346b862d8fc46004759f0","branchlen":1,"status":"valid-headers"},{"height":715139,"hash":"0000000000000000000407bc4e26035c137869cdb677dfcab268b3faf7d7b5d1","branchlen":1,"status":"valid-fork"},{"height":714637,"hash":"00000000000000000009f819d004fea5bcb77bda25f4906d0a39e79c9ba19590","branchlen":1,"status":"valid-headers"},{"height":714367,"hash":"0000000000000000000b2e70d7675bc7b4e89d384d0e6e1a7ecc2779e1d93244","branchlen":1,"status":"valid-fork"},{"height":710226,"hash":"0000000000000000000299304196510f9f40d0e640a94258a473009efe587516","branchlen":1,"status":"valid-headers"},{"height":708426,"hash":"0000000000000000000a5ee4cbb64a5e1496d6840b4744ecf3b559449a96148c","branchlen":1,"status":"valid-headers"},{"height":707433,"hash":"0000000000000000000929e8bd3c60c7b01941c8a46ef5ca98b0f3193c47dd35","branchlen":1,"status":"headers-only"},{"height":705970,"hash":"00000000000000000002328fe71f98eff128c9566bbf344d76234570b4a96e69","branchlen":1,"status":"valid-headers"},{"height":697008,"hash":"000000000000000000077247c3ca9bae18511418667c4562fc6f92477b5d339e","branchlen":1,"status":"valid-fork"},{"height":696145,"hash":"00000000000000000007c8948e5a89cd01804b7e5c6f454597c49d5b3b368b66","branchlen":1,"status":"valid-headers"},{"height":695955,"hash":"0000000000000000000dda4944c25d8845f01d009856e3536a963f4ee3352b8b","branchlen":1,"status":"valid-headers"},{"height":694157,"hash":"00000000000000000006e24bdc5c1875fa40909ace270fb2b8756ac652ede82d","branchlen":1,"status":"valid-headers"},{"height":693118,"hash":"00000000000000000011563e0ffef300d61465d69c92875e510050fc332bbe99","branchlen":1,"status":"headers-only"},{"height":692894,"hash":"00000000000000000007b160fdec44c7a20d01bcfe9ac0b46a3a897359fb1d69","branchlen":1,"status":"valid-headers"},{"height":686408,"hash":"0000000000000000000461f56d66d9638c0ca75520387df4bb9844f5802d4ad7","branchlen":1,"status":"valid-headers"},{"height":685135,"hash":"00000000000000000001737a81638210d3181d3469fa280959cdeb0514bb3d32","branchlen":1,"status":"valid-headers"},{"height":685036,"hash":"000000000000000000058a8ff07f4aacfb1f20ca8482547fdba73ab9bef70b3e","branchlen":1,"status":"valid-headers"},{"height":683862,"hash":"0000000000000000000ac05c6cccccb53afe71b1462c34371af22d56eda96550","branchlen":1,"status":"valid-headers"},{"height":679823,"hash":"000000000000000000000f0d7742e6cd22da819b59af361224f452baee8d31c4","branchlen":1,"status":"valid-fork"},{"height":677102,"hash":"000000000000000000044dfef81ca818882c24cdfb3178dd183ec7f9817b3fa1","branchlen":1,"status":"valid-headers"},{"height":676749,"hash":"0000000000000000000b67a0cd7b6263c524bd3f4d11f715a513b8345db13e7d","branchlen":1,"status":"valid-headers"},{"height":676653,"hash":"000000000000000000013acb9bf5bec0d7cc1a1f697686b5895e539399c8e72b","branchlen":1,"status":"valid-fork"},{"height":676003,"hash":"00000000000000000009e7bed1cc04f048e723bf9acad18aa8effb5f0270e8e4","branchlen":1,"status":"valid-headers"},{"height":675815,"hash":"000000000000000000052677c72ed5786a84fc841125b207e68410fb5084032b","branchlen":1,"status":"valid-headers"},{"height":675407,"hash":"00000000000000000006e2aca3e49d3314782aac196548f8cfe12c34b98c8934","branchlen":1,"status":"valid-fork"},{"height":675392,"hash":"0000000000000000000c64c3eb0e99f14024ca84ccdefc8d01aaf4aa5fadbafa","branchlen":1,"status":"valid-headers"},{"height":671759,"hash":"00000000000000000002ebd581ecbbf98fe96290a9481254ef9fe0eeea569f7c","branchlen":1,"status":"valid-headers"},{"height":671646,"hash":"000000000000000000040e2e14931819cd282023c46c4e19ecc2f9daa36f6eaa","branchlen":1,"status":"valid-headers"},{"height":671511,"hash":"000000000000000000031dbcad41bafe1756aaeb7eddc243625d3627dba023ef","branchlen":1,"status":"valid-headers"},{"height":667881,"hash":"0000000000000000000a2ae23d56ad7bdb31104e9b6b2cdc737db9a3fe325092","branchlen":1,"status":"valid-fork"},{"height":666833,"hash":"00000000000000000005e086e9e74aae37139ba27c5ba8b50ba5c773e22c6b61","branchlen":1,"status":"valid-headers"},{"height":665005,"hash":"00000000000000000001039fa3b04eb66a658c44632ac1d3694f772ea50f865f","branchlen":1,"status":"valid-fork"},{"height":664578,"hash":"0000000000000000000cd89993f89e1414de84169914b487f49d1d0131ac5d62","branchlen":1,"status":"valid-fork"},{"height":663043,"hash":"000000000000000000019a6273252cd334c21baf6cbf727bb3d3e23fe44dbaf1","branchlen":1,"status":"valid-headers"},{"height":662642,"hash":"0000000000000000000c7af1e0b2172f1eed6b4d0707ea135c267ba263c7acf1","branchlen":1,"status":"valid-headers"},{"height":661983,"hash":"00000000000000000006d890e1147294bf6d34bff9028d0567f2d48105c7b56a","branchlen":1,"status":"valid-headers"},{"height":660903,"hash":"000000000000000000095fe6785b8572b933b9d9fda4649cbe33068e743a714c","branchlen":1,"status":"headers-only"},{"height":656478,"hash":"00000000000000000005f8f74e57aa4584aacfed509b8a6feb20bc22e7d60a34","branchlen":2,"status":"valid-headers"},{"height":655191,"hash":"0000000000000000000d84896f7e9ad2c29da4c8bf0766cb167ca7e73e5535b9","branchlen":1,"status":"headers-only"},{"height":655049,"hash":"00000000000000000001d1c130f9f850caa690dbe693716223325d1b0cd7db7f","branchlen":1,"status":"valid-headers"},{"height":654683,"hash":"0000000000000000000a872e5cbdf79938b7fbf429cb63421112a8e919600c3d","branchlen":1,"status":"valid-headers"},{"height":650491,"hash":"00000000000000000007a7691b799d895602ce6b1ccd303c6446703a41e6d6de","branchlen":1,"status":"valid-headers"},{"height":650473,"hash":"0000000000000000000dba80455fcb5a8f9716375845f295dd755edb29e32fd8","branchlen":1,"status":"valid-headers"},{"height":648790,"hash":"0000000000000000000e2cfa23d34bdf1485fcdfdb60e7bff9da95d03a9e18cb","branchlen":1,"status":"valid-fork"},{"height":645179,"hash":"00000000000000000004c1baa2412fd31eb75bbe79def4f66ef97e0e15a20668","branchlen":1,"status":"valid-headers"},{"height":644543,"hash":"0000000000000000000ac8d61492ab76dab7451373c6eaa6803ec0244f623395","branchlen":1,"status":"valid-fork"},{"height":642589,"hash":"00000000000000000000aae7c05b5d930e479f462e9f905c5dc21557bd4a0d0a","branchlen":1,"status":"valid-headers"},{"height":478576,"hash":"000000000000000001416af072f8989829f4c60a1a9658e1cec08411798e4ffa","branchlen":18,"status":"headers-only"}],"error":null,"id":1702957045}
Request Parameters
This method does not accept any parameters.
Response Parameters
Parameter | Type | Description |
---|---|---|
height | int | The height of the chain tip |
haste | string | The block hash of the tip |
branchlen | int | Zero for main chain, otherwise length of branch connecting the tip to the main chain. |
status | string | The status of the chain, "active" for the main chain. Other possible statuses can be::invalid/headers-only/valid-headers/valid-fork/active |
Getchaintxstats
Calculates data about the total number and rate of transactions in the chain.
Consumption per query 1
curl https://tools-gateway.api.cloverpool.com/rpc/api/v1.0/noderpc/ \
-X POST \
-H "Content-Type: application/json" -H "X-API-TOKEN":"tcccd68ed9df0e4808e4311397496feb0a57f6f6f4df388b9a2e3812573cf1" \
--data '{"method": "getchaintxstats", "params": [2016]}'
import requests
import json
url = "https://tools-gateway.api.cloverpool.com/rpc/api/v1.0/noderpc/"
payload = json.dumps({
"method": "getchaintxstats",
"params": [
2016
]
})
headers = {
'Content-Type': 'application/json'
"X-API-TOKEN":"tcccd68ed9df0e4808e4311397496feb0a57f6f6f4df388b9a2e3812573cf1"
}
response = requests.request("POST", url, headers=headers, data=payload)
print(response.text)
Response Example
{"jsonrpc":"2.0","result":{"time":1702956488,"txcount":938283473,"window_final_block_hash":"00000000000000000003438acbd4badb4c54acd8c4f80214e569ad15c7174166","window_final_block_height":821872,"window_block_count":2016,"window_tx_count":7524510,"window_interval":1192350,"txrate":6.310655428355768},"error":null,"id":1702957624}
Request Parameters
Parameter | Type | Description |
---|---|---|
nblocks | int | default=one month. The window's size in number of blocks |
blockhash | string | default=chain tip. The hash of the block that ends the window |
Response Parameters
Parameter | Type | Description |
---|---|---|
time | int | The timestamp for the last block in the window, defined in UNIX epoch time |
txcount | int | The total number of chain transactions up to that point |
window_final_block_hash | string | The hash of the final block in the window |
window_final_block_height | int | The height of the final block in the window |
window_block_count | int | The window's size in terms of blocks |
window_tx_count | int | The number of transactions in the window and only returned if "window_block_count" is > 0 |
window_interval | int | The elapsed time in the window in seconds and only returned if "window_block_count" is > 0 |
txrate | float | The average rate of transactions per second in the window and only returned if "window_interval" is > 0 |
Getconnectioncount
Returns the connection count to other nodes.
Consumption per query 1
curl https://tools-gateway.api.cloverpool.com/rpc/api/v1.0/noderpc/ \
-X POST \
-H "Content-Type: application/json" -H "X-API-TOKEN":"tcccd68ed9df0e4808e4311397496feb0a57f6f6f4df388b9a2e3812573cf1" \
--data '{ "method": "getconnectioncount" }'
import requests
import json
url = "https://tools-gateway.api.cloverpool.com/rpc/api/v1.0/noderpc/"
payload = json.dumps({
"method": "getconnectioncount"
})
headers = {
'Content-Type': 'application/json'
"X-API-TOKEN":"tcccd68ed9df0e4808e4311397496feb0a57f6f6f4df388b9a2e3812573cf1"
}
response = requests.request("POST", url, headers=headers, data=payload)
print(response.text)
Response Example
{"jsonrpc":"2.0","result":182,"error":null,"id":1702958511}
Request Parameters
This method does not accept any parameters
Response Parameters
Parameter | Type | Description |
---|---|---|
n | int | The total number of connections to other nodes, both inbound and outbound |
Getdifficulty
Returns the proof-of-work difficulty as a multiple of the minimum difficulty.
Consumption per query 1
curl https://tools-gateway.api.cloverpool.com/rpc/api/v1.0/noderpc/ \
-X POST \
-H "Content-Type: application/json" -H "X-API-TOKEN":"tcccd68ed9df0e4808e4311397496feb0a57f6f6f4df388b9a2e3812573cf1" \
--data '{ "method": "getdifficulty" }'
import requests
import json
url = "https://tools-gateway.api.cloverpool.com/rpc/api/v1.0/noderpc/"
payload = json.dumps({
"method": "getdifficulty"
})
headers = {
'Content-Type': 'application/json'
"X-API-TOKEN":"tcccd68ed9df0e4808e4311397496feb0a57f6f6f4df388b9a2e3812573cf1"
}
response = requests.request("POST", url, headers=headers, data=payload)
print(response.text)
Response Example
{"jsonrpc":"2.0","result":67305906902031.39,"error":null,"id":1702958676}
Request Parameters
This method does not accept any parameters
Response Parameters
Parameter | Type | Description |
---|---|---|
float | The proof-of-work difficulty as a multiple of the minimum difficulty |
Getmempoolinfo
Returns information about the active state of the TX memory pool.
Consumption per query 1
curl https://tools-gateway.api.cloverpool.com/rpc/api/v1.0/noderpc/ \
-X POST \
-H "Content-Type: application/json" -H "X-API-TOKEN":"tcccd68ed9df0e4808e4311397496feb0a57f6f6f4df388b9a2e3812573cf1" \
--data '{ "method": "getmempoolinfo" }'
import requests
import json
url = "https://tools-gateway.api.cloverpool.com/rpc/api/v1.0/noderpc/"
payload = json.dumps({
"method": "getmempoolinfo"
})
headers = {
'Content-Type': 'application/json'
"X-API-TOKEN":"tcccd68ed9df0e4808e4311397496feb0a57f6f6f4df388b9a2e3812573cf1"
}
response = requests.request("POST", url, headers=headers, data=payload)
print(response.text)
Response Example
{"jsonrpc":"2.0","result":{"loaded":true,"size":231631,"bytes":291120222,"usage":990115792,"total_fee":54.25097257,"maxmempool":1024000000,"mempoolminfee":0.00000183,"minrelaytxfee":0.00000001,"incrementalrelayfee":0.00000001,"unbroadcastcount":0,"fullrbf":true},"error":null,"id":1702959420}
Request Parameters
This method does not accept any parameters
Response Parameters
Parameter | Type | Description |
---|---|---|
loaded | bool | It's true if the mempool is fully loaded otherwise false |
size | int | The current transaction count |
bytes | int | The sum of all virtual transaction sizes as defined in BIP 141. Differs from actual serialized size because witness data is discounted |
usage | int | Total memory usage for the mempool |
total_fee | float | The total fees for the mempool in BTC, ignoring modified fees through prioritisetransaction |
maxmempool | int | Maximum memory usage for the mempool |
mempoolminfee | float | Minimum fee rate in BTC/kB for tx to be accepted |
minrelaytxfee | float | Current minimum relay fee for transactions |
unbroadcastcount | int | Current number of transactions that haven't passed initial broadcast yet |
incrementalrelayfee | float | The minimum fee rate increment for mempool limiting or replacement in BTC/kvB |
fullrbf | bool | It's true if the mempool accepts RBF without replaceability signaling inspection otherwise false |
Getrawmempool
Returns all transaction ids in memory pool as a json array of string transaction ids.
Consumption per query 200
curl https://tools-gateway.api.cloverpool.com/rpc/api/v1.0/noderpc/ \
-X POST \
-H "Content-Type: application/json" -H "X-API-TOKEN":"tcccd68ed9df0e4808e4311397496feb0a57f6f6f4df388b9a2e3812573cf1" \
--data '{"method": "getrawmempool", "params": [true]}'
import requests
import json
url = "https://tools-gateway.api.cloverpool.com/rpc/api/v1.0/noderpc/"
payload = json.dumps({
"method": "getrawmempool",
"params": [
True
]
})
headers = {
'Content-Type': 'application/json'
"X-API-TOKEN":"tcccd68ed9df0e4808e4311397496feb0a57f6f6f4df388b9a2e3812573cf1"
}
response = requests.request("POST", url, headers=headers, data=payload)
print(response.text)
Response Example
Request Parameters
Parameter | Type | Description |
---|---|---|
verbose | bool | default=false. It's true for a JSON object and false for array of transaction ids |
mempool_sequence | bool | default=false. It returns a JSON object with transaction list and mempool sequence number attached |
Response Parameters
For verbose = true
Parameter | Type | Description |
---|---|---|
txids | array | Transaction id array |
visize | int | The virtual transaction size as defined in BIP 141. This is different from actual serialized size for witness transactions as witness data is discounted |
weight | int | The transaction weight as defined in BIP 141 |
time | int | The local time transaction entered pool in seconds since 1 Jan 1970 GMT |
height | int | The block height when the transaction entered pool |
descendantcount | int | The number of in-mempool descendant transactions (including this one) |
descendantsize | int | The virtual transaction size of in-mempool descendants (including this one) |
ancestorcount | int | The number of in-mempool ancestor transactions (including this one) |
ancestorsize | int | The virtual transaction size of in-mempool ancestors (including this one) |
wtxid | string | The hash of serialized transaction, including witness data |
fees | JSON | A JSON array containing information about the transaction fee paid by the transaction |
base | float | The transaction fee in BTC |
modified | float | The transaction fee with fee deltas used for mining priority in BTC |
ancestor | float | The modified fees of in-mempool ancestors (including this one) in BTC |
descendant | float | The modified fees of in-mempool descendants (including this one) in BTC |
depends-hex | array | Unconfirmed transactions used as inputs for this transaction(The parent transaction id) |
spentby | array | Unconfirmed transactions spending outputs from this transaction(The child transaction id) |
bip125-replaceable | bool | Whether this transaction could be replaced due to BIP125 (replace-by-fee) |
unbroadcast | bool | Whether this transaction is currently unbroadcast (initial broadcast not yet acknowledged by any peers) |
For verbose = false
Parameter | Type | Description |
---|---|---|
txids | array | A JSON array of transaction ids |
mempool_sequence | string | The mempool sequence value |
Getrawtransaction
Returns the raw transaction data.
Consumption per query 3
curl https://tools-gateway.api.cloverpool.com/rpc/api/v1.0/noderpc/ \
-X POST \
-H "Content-Type: application/json" -H "X-API-TOKEN":"tcccd68ed9df0e4808e4311397496feb0a57f6f6f4df388b9a2e3812573cf1" \
--data '{"method": "getrawtransaction", "params": ["10b54fd708ab2e5703979b4ba27ca0339882abc2062e77fbe51e625203a49642", 0]}'
import requests
import json
url = "https://tools-gateway.api.cloverpool.com/rpc/api/v1.0/noderpc/"
payload = json.dumps({
"method": "getrawtransaction",
"params": [
"10b54fd708ab2e5703979b4ba27ca0339882abc2062e77fbe51e625203a49642",
0
]
})
headers = {
'Content-Type': 'application/json'
"X-API-TOKEN":"tcccd68ed9df0e4808e4311397496feb0a57f6f6f4df388b9a2e3812573cf1"
}
response = requests.request("POST", url, headers=headers, data=payload)
print(response.text)
Response Example
{"jsonrpc":"2.0","result":{"txId":"10b54fd708ab2e5703979b4ba27ca0339882abc2062e77fbe51e625203a49642","rawTx":"\"01000000000101e17e03d21d051aa2bd9d336c3ac0693cfa92ce71592ceec521b1c48019ff77a101000000171600146d76e574b5f4825fe740ba6c41aaf1b319dfb80cffffffff02819a010000000000160014422002d927a1cae901eac668444cce8dd0ae60d529b31b0b0000000017a914f5b48d1130dc3d366d1eabf6783a552d1c8e08f4870247304402206701306a4750908fd48dead54331a3c7b4dce04ec10bfc6dd32049e2cff061a5022013c9d66827fabbeaadeb30b41c09aca2daddf4628cd00e3b993b1c86a12ff5190121034bcb9be1daf6ce1193774d15f863768b621bc95a363f1da5810129e961a2317400000000\"","blockHash":"","height":0,"receiveTime":0},"error":null,"id":1702965635}
Request Parameters
Parameter | Type | Description |
---|---|---|
txid | string | Transaction hash |
verbose | int | (default: 0) A numeric parameter that can take one of the following values: '0' for hex-encoded data, '1' for JSON object and '2' for JSON object with fee and prevout |
Response Parameters
Parameter | Type | Description |
---|---|---|
str | string | hex-encoded data |
Gettxoutproof
Ensures that the transactions are within block and returns proof of transaction inclusion.
Consumption per query 1
curl https://tools-gateway.api.cloverpool.com/rpc/api/v1.0/noderpc/ \
-X POST \
-H "Content-Type: application/json" -H "X-API-TOKEN":"tcccd68ed9df0e4808e4311397496feb0a57f6f6f4df388b9a2e3812573cf1" \
--data '{"method": "gettxoutproof", "params": [["ee652f0b40209bd02468de0c6336854f5efdd79fb865560aef2c46f4fa0b4a07", "cee11bc3bb3d9db8c4813ed2072a14369a15fcfb9e6bc5cb37a0b5bcc6aa59aa"]]}'
import requests
import json
url = "https://tools-gateway.api.cloverpool.com/rpc/api/v1.0/noderpc/"
payload = json.dumps({
"method": "gettxoutproof",
"params": [
[
"ee652f0b40209bd02468de0c6336854f5efdd79fb865560aef2c46f4fa0b4a07",
"cee11bc3bb3d9db8c4813ed2072a14369a15fcfb9e6bc5cb37a0b5bcc6aa59aa"
]
]
})
headers = {
'Content-Type': 'application/json'
"X-API-TOKEN":"tcccd68ed9df0e4808e4311397496feb0a57f6f6f4df388b9a2e3812573cf1"
}
response = requests.request("POST", url, headers=headers, data=payload)
print(response.text)
Response Example
{"result":"000000202834abd71bdd0d3298542af4506918ea168ce002936b040000000000000000001da8757e4d756e848245cacf3e103c1b9f6ed2405c6d818a73172c8ec72856d4db3864606fdf0c17dcc1000ccb0300000cb86343fc64abcdab51e530303a4ee2b420fa6b5a12b435c9c76fe953ca5471ca074a0bfaf4462cef0a5665b89fd7fd5e4f8536630cde6824d09b20400b2f65eed9f744b2dc695b0ea0c4afd06310a21b93ddd7270a781acd0ada1afdd23b5750aa59aac6bcb5a037cbc56b9efbfc159a36142a07d23e81c4b89d3dbbc31be1cefe0bb7b0369ffc3b1d530e234987543a2613bbb8b06c86f993a930dee7b9d87f661ef556adc0174c7f180aa28006ee93ce2291302801ecd045c234c00b186ea35ff1e77eac3f113492e2eb12f38b9df452f5831f55c861865ac8f3c7dd06be2377f859ba1d12dea2ec44987796a27d42d5727250c1e0181d6a251f8272f21b9a2034069a2471de43de655619904d43b4665f6ce38741320998dc97838c32c79f1ada066ddf7a441357d55cc42a8906970bff2d5342be694002476733ff593af26f320c10df7ba9a76355438f462c040b598868dfb67c5e88d6d9a426ec8cdd74337d42df6b29e9fb319410848f3ff7228d00dc539e2962d185348ab9663a112a03ff6e00","error":null,"id":null}
Request Parameters
Parameter | Type | Description |
---|---|---|
txids | jsonArray | An array of transaction hashes |
blockhase | string | If specified, looks for txid in the block with this hash |
Response Parameters
Parameter | Type | Description |
---|---|---|
str | string | A string that is a serialized, hex-encoded data for the proof |
Gettxoutsetinfo
Returns information about the unspent transaction output set.
Consumption per query 20
curl https://tools-gateway.api.cloverpool.com/rpc/api/v1.0/noderpc/ \
-X POST \
-H "Content-Type: application/json" -H "X-API-TOKEN":"tcccd68ed9df0e4808e4311397496feb0a57f6f6f4df388b9a2e3812573cf1" \
--data '{"method": "gettxoutsetinfo"}'
import requests
import json
url = "https://tools-gateway.api.cloverpool.com/rpc/api/v1.0/noderpc/"
payload = json.dumps({
"method": "gettxoutsetinfo"
})
headers = {
'Content-Type': 'application/json'
"X-API-TOKEN":"tcccd68ed9df0e4808e4311397496feb0a57f6f6f4df388b9a2e3812573cf1"
}
response = requests.request("POST", url, headers=headers, data=payload)
print(response.text)
Response Example
{"result":{"height":821889,"bestblock":"000000000000000000023820b1f8ec522e5bb01f882e26b055ca882e337016ac","txouts":146837990,"bogosize":11157995064,"hash_serialized_3":"7d0be9e1610f10e906acd0156eb44d35cd3ad2df37d4991cfd9b62f098319fda","total_amount":19574093.03211283,"transactions":101536389,"disk_size":9694438692},"error":null,"id":null}
Request Parameters
Parameter | Type | Description |
---|---|---|
hash_type | string | default=hash_serialized_2. It tells about which UTXO set hash should be calculated, with two possible values: "hash_serialized_2", "none" |
Response Parameters
Parameter | Type | Description |
---|---|---|
height | int | The height of current block |
bestblock | string | The hash of the block at the tip of the chain |
txouts | int | The number of unspent transaction outputs |
bogosize | int | A meaningless metric for UTXO set size |
hash_serialized_2 | string | The serialized hash (only present if 'hash_serialized_2' hash_type is chosen) value is used to compare with other nodes to verify the UTXO set's integrity |
total_amount | int | It's the value in BTC about all unspent outputs together |
transactions | int | The number of transactions with unspent outputs |
disk_size | int | The estimated size of the chainstate on disk |
Gettxout
Returns details about an unspent transaction output.
Consumption per query 1
curl https://tools-gateway.api.cloverpool.com/rpc/api/v1.0/noderpc/ \
-X POST \
-H "Content-Type: application/json" -H "X-API-TOKEN":"tcccd68ed9df0e4808e4311397496feb0a57f6f6f4df388b9a2e3812573cf1" \
--data '{"method": "gettxout", "params": ["txid", 1]}'
import requests
import json
url = "https://tools-gateway.api.cloverpool.com/rpc/api/v1.0/noderpc/"
payload = json.dumps({
"method": "gettxout",
"params": [
"txid",
1
]
})
headers = {
'Content-Type': 'application/json'
"X-API-TOKEN":"tcccd68ed9df0e4808e4311397496feb0a57f6f6f4df388b9a2e3812573cf1"
}
response = requests.request("POST", url, headers=headers, data=payload)
print(response.text)
Response Example
{"jsonrpc":"2.0","result":{"bestblock":"00000000000000000003239eae998dc7ad3585c2a08a3afc94d5a2721d1a2608","confirmations":820893,"value":50.00000000,"scriptPubKey":{"asm":"04f5eeb2b10c944c6b9fbcfff94c35bdeecd93df977882babc7f3a2cf7f5c81d3b09a68db7f0e04f21de5d4230e75e6dbe7ad16eefe0d4325a62067dc6f369446a OP_CHECKSIG","desc":"pk(04f5eeb2b10c944c6b9fbcfff94c35bdeecd93df977882babc7f3a2cf7f5c81d3b09a68db7f0e04f21de5d4230e75e6dbe7ad16eefe0d4325a62067dc6f369446a)#vjmelvzd","hex":"4104f5eeb2b10c944c6b9fbcfff94c35bdeecd93df977882babc7f3a2cf7f5c81d3b09a68db7f0e04f21de5d4230e75e6dbe7ad16eefe0d4325a62067dc6f369446aac","type":"pubkey"},"coinbase":true},"error":null,"id":1702968267}
Request Parameters
Parameter | Type | Description |
---|---|---|
txid | string | Transaction hash |
n | int | Vout number |
Response Parameters
Parameter | Type | Description |
---|---|---|
bestblock | string | The block hash at the tip of the chain |
confirmations | int | The number of confirmations received for the transaction |
value | float | The transaction value in BTC |
scriptPubKey | json map | A JSON object containing information about the PubKey script |
asm | string | The script public key in the form of string |
desc | int | Description information |
hex | int | The hexadecimal of the transaction |
type | int | Address type |
coinbase | bool | It is true if the transaction output belongs to a coinbase transaction otherwise it's false for all other transactions |
Sendrawtransaction
Submits a raw transaction (serialized, hex-encoded) to a node.
Consumption per query 1
curl https://tools-gateway.api.cloverpool.com/rpc/api/v1.0/noderpc/ \
-X POST \
-H "Content-Type: application/json" -H "X-API-TOKEN":"tcccd68ed9df0e4808e4311397496feb0a57f6f6f4df388b9a2e3812573cf1" \
--data '{"method": "sendrawtransaction", "params": ["hexstring"]}'
import requests
import json
url = "https://tools-gateway.api.cloverpool.com/rpc/api/v1.0/noderpc/"
payload = json.dumps({
"method": "sendrawtransaction",
"params": [
"hexstring"
]
})
headers = {
'Content-Type': 'application/json'
"X-API-TOKEN":"tcccd68ed9df0e4808e4311397496feb0a57f6f6f4df388b9a2e3812573cf1"
}
response = requests.request("POST", url, headers=headers, data=payload)
print(response.text)
Request Parameters
Parameter | Type | Description |
---|---|---|
hexstring | string | The transaction hex string |
Response Parameters
Parameter | Type | Description |
---|---|---|
hex | string | The transaction hash in hexadecimal format |
Validateaddress
Returns information about the given bitcoin address.
Consumption per query 1
curl https://tools-gateway.api.cloverpool.com/rpc/api/v1.0/noderpc/ \
-X POST \
-H "Content-Type: application/json" -H "X-API-TOKEN":"tcccd68ed9df0e4808e4311397496feb0a57f6f6f4df388b9a2e3812573cf1" \
--data '{"method": "validateaddress", "params": ["bc1q5hy2fmqr7ua0a6rj6scekgszctxmlts8smwxcl"]}'
import requests
import json
url = "https://tools-gateway.api.cloverpool.com/rpc/api/v1.0/noderpc/"
payload = json.dumps({
"method": "validateaddress",
"params": [
"bc1q5hy2fmqr7ua0a6rj6scekgszctxmlts8smwxcl"
]
})
headers = {
'Content-Type': 'application/json'
"X-API-TOKEN":"tcccd68ed9df0e4808e4311397496feb0a57f6f6f4df388b9a2e3812573cf1"
}
response = requests.request("POST", url, headers=headers, data=payload)
print(response.text)
Response Example
{"jsonrpc":"2.0","result":{"isvalid":true,"address":"bc1q5hy2fmqr7ua0a6rj6scekgszctxmlts8smwxcl","scriptPubKey":"0014a5c8a4ec03f73afee872d4319b2202c2cdbfae07","isscript":false,"iswitness":true,"witness_version":0,"witness_program":"a5c8a4ec03f73afee872d4319b2202c2cdbfae07"},"error":null,"id":1702970261}
Request Parameters
Parameter | Type | Description |
---|---|---|
address | string | The bitcoin address to validate |
Response Parameters
Parameter | Type | Description |
---|---|---|
isvalid | bool | If the address is valid or not |
address | string | The validated bitcoin address |
isscript | bool | It verifies if the key is a script or not |
scriptPubKey | string | The hex encoded scriptPubKey generated by the address |
iswitness | bool | It verifies if the address is a witness address or not |
witness_version | int | The version number of the witness program |
witness_program | int | The hex value of the witness program |
Verifymessage
Verifies a signed message.
Consumption per query 1
curl https://tools-gateway.api.cloverpool.com/rpc/api/v1.0/noderpc/ \
-X POST \
-H "Content-Type: application/json" -H "X-API-TOKEN":"tcccd68ed9df0e4808e4311397496feb0a57f6f6f4df388b9a2e3812573cf1" \
--data '{"method": "verifymessage", "params": ["address", "signature", "your_message"]}'
import requests
import json
url = "https://tools-gateway.api.cloverpool.com/rpc/api/v1.0/noderpc/"
payload = json.dumps({
"method": "verifymessage",
"params": [
"address",
"signature",
"your_message"
]
})
headers = {
'Content-Type': 'application/json'
"X-API-TOKEN":"tcccd68ed9df0e4808e4311397496feb0a57f6f6f4df388b9a2e3812573cf1"
}
response = requests.request("POST", url, headers=headers, data=payload)
print(response.text)
Response Example
Request Parameters
Parameter | Type | Description |
---|---|---|
address | string | The bitcoin address to use for the signature |
signature | string | The signature provided by the signer in base 64 encoding |
message | string | The message that was signed |
Response Parameters
Parameter | Type | Description |
---|---|---|
result | bool | If the signature is verified or not |
Errors
Errors Description
Code | Meaning |
---|---|
-32600 | RPC service error, invalid request, please check and retry. |
-32601 | RPC service error, Method not found, please check method name and retry. |
-32602 | RPC service error, parameter error, please check the number and type of parameters and retry. |
-32603 | RPC service error, internal error, please check and retry. |
-32700 | RPC service error, parsing failed, please try again later. |
-33100 | Gateway error |
-33101 | Queried address does not exist |
-33102 | Invalid address |
-33103 | No API Token |
-33104 | Unsupported request method |
-33111 | Authentication failed |
-33112 | No permissions |
-33113 | Frequent access |
-33114 | Disallowed access |
-33115 | Access limit exceeded |
-33199 | Interface exception |
-34040 | Restful API service error, uid is empty. |
-34041 | Restful API service error, insufficient credit balance. |
-34042 | Restful API service error, parameter error, please check the number and type of parameters and try again. |
-34043 | Restful API service error, transaction id is invalid. |
-34044 | Restful API service error, block hash is invalid. |
-34045 | Restful API service error, height is invalid. |
-34046 | Restful API service error, invalid address. |
-34047 | Restful API service error, internal error. |