NodeChain EN
  • NodeChain
  • Learn
    • About NodeChain
    • Infrastructure
      • Connector
        • Wrapper APIs
      • Nodes
      • Startup script
    • License
    • Ecosystem
      • Supported APIs
      • Integrations
      • Acknowledgments
  • Develop
    • Quick start
      • Initial setup
      • Using command-line script
        • Commands
    • How-to
      • Run tests locally
      • Lint automatically with hooks
      • Integrate a new Blockchain/API
      • Connect to a public node
    • Wrapper API definition file
    • Contributing
  • Reference
    • API Reference
      • Admin
      • General Endpoints
      • REST Wrapper API
        • Bitcoin Cash
        • Bitcoin
        • Ethereum
          • ERC-20
      • JSON-RPC Wrapper API
        • Bitcoin Cash
        • Bitcoin
        • Ethereum
          • ERC-20
      • Real-Time Wrapper API
        • Bitcoin
        • Ethereum
Powered by GitBook
On this page
  1. Reference
  2. API Reference
  3. JSON-RPC Wrapper API

Bitcoin Cash

Bitcoin cash endpoints

PreviousJSON-RPC Wrapper APINextBitcoin

Last updated 3 years ago

Bitcoin cash JSON-RPC methods share the same endpoint, by protocol definition, the payload methodparameter is the one used to know which method is the one to be called. To call this methods, is mandatory to specify the currency, bch in this case and the network in which to executed the request. Bitcoin cash JSON-RPC methods are exposed in the following endpoint http://server/bch/{network}/rpc where network has to be replace by the network name in which make the request

  • POSTReturn the balance of an array of addresses
  • POSTReturn the transaction history of any address
  • POSTReturn the transaction history of the given addresses
  • POSTReturns latest block hash and index
  • POSTReturns the information of any block giving its hash
  • POSTReturns the information of any block giving its height
  • POSTReturns if blockchain is syncing
  • POSTReturns the information of any transaction
  • POSTReturns the information of an array of transactions
  • POSTWatch an address. Everytime the address changes, a http POST is sent to the URL.
  • POSTReturns the number of pending or confirmed transactions an address has made
  • POSTReturns the information of any transaction
  • POSTEstimate fee by confirmations
  • POSTReturns the UTXO list of any address
  • POSTReturns the UTXO list of an array of addresses
  • POSTReturns transaction
  • POSTBroadcasts a transaction to the network

Return the balance of an array of addresses

post

Return the balance of an array of addresses

Body
idinteger · int32Required

Request ID

Example: 160907
jsonrpcstringRequired

JSON-RPC Version

Example: 2.0
methodstringRequired

Method name to be called. For this operation, the field value must be getAddressesBalance

Example: getAddressesBalance
Responses
200
Successful response
application/json
post
POST /getAddressesBalance HTTP/1.1
Host: 
Content-Type: application/json
Accept: */*
Content-Length: 130

{
  "id": 160907,
  "jsonrpc": "2.0",
  "method": "getAddressesBalance",
  "params": {
    "addresses": [
      "tb1qm0xyymv7s07rn00dcpuk2ln890sr3my3cmpfdp"
    ]
  }
}
200

Successful response

{
  "id": 160907,
  "jsonrpc": "2.0",
  "result": [
    {
      "address": "tb1qm0xyymv7s07rn00dcpuk2ln890sr3my3cmpfdp",
      "balance": {
        "confirmed": "10000",
        "unconfirmed": "0"
      }
    }
  ]
}

Return the transaction history of any address

post

Return the transaction history of any address

Body
idinteger · int32Required

Request ID

Example: 160907
jsonrpcstringRequired

JSON-RPC Version

Example: 2.0
methodstringRequired

Method name to be called. For this operation, the field value must be getAddressHistory

Example: getAddressHistory
Responses
200
Successful response
application/json
post
POST /getAddressHistory HTTP/1.1
Host: 
Content-Type: application/json
Accept: */*
Content-Length: 124

{
  "id": 160907,
  "jsonrpc": "2.0",
  "method": "getAddressHistory",
  "params": {
    "address": "tb1qm0xyymv7s07rn00dcpuk2ln890sr3my3cmpfdp"
  }
}
200

Successful response

{
  "id": 160907,
  "jsonrpc": "2.0",
  "result": {
    "address": "tb1qm0xyymv7s07rn00dcpuk2ln890sr3my3cmpfdp",
    "txHashes": [
      "b66d096bcb068888d4a6987870647ba9c9d2f1da9e360ddafc73efe1f26f2435"
    ]
  }
}

Return the transaction history of the given addresses

post

Return the transaction history of the given addresses

Body
idinteger · int32Required

Request ID

Example: 160907
jsonrpcstringRequired

JSON-RPC Version

Example: 2.0
methodstringRequired

Method name to be called. For this operation, the field value must be getAddressesHistory

Example: getAddressesHistory
Responses
200
Successful response
application/json
post
POST /getAddressesHistory HTTP/1.1
Host: 
Content-Type: application/json
Accept: */*
Content-Length: 130

{
  "id": 160907,
  "jsonrpc": "2.0",
  "method": "getAddressesHistory",
  "params": {
    "addresses": [
      "tb1qm0xyymv7s07rn00dcpuk2ln890sr3my3cmpfdp"
    ]
  }
}
200

Successful response

{
  "id": 160907,
  "jsonrpc": "2.0",
  "result": [
    {
      "address": "tb1qm0xyymv7s07rn00dcpuk2ln890sr3my3cmpfdp",
      "txHashes": [
        "b66d096bcb068888d4a6987870647ba9c9d2f1da9e360ddafc73efe1f26f2435"
      ]
    }
  ]
}

Returns latest block hash and index

post

Returns latest block hash and index

Body
idinteger · int32Required

Request ID

Example: 160907
jsonrpcstringRequired

JSON-RPC Version

Example: 2.0
methodstringRequired

Method name to be called. For this operation, the field value must be getHeight

Example: getHeight
paramsobjectRequired
Responses
200Success
application/json
post
POST /getHeight HTTP/1.1
Host: 
Content-Type: application/json
Accept: */*
Content-Length: 62

{
  "id": 160907,
  "jsonrpc": "2.0",
  "method": "getHeight",
  "params": {}
}
200Success
{
  "id": 160907,
  "jsonrpc": "2.0",
  "result": {
    "latestBlockHash": "217ba61bc3921764a218f4607a8905108d2dfa4bb8e6e10af61d06e279fa069d",
    "latestBlockIndex": "1"
  }
}

Returns the information of any block giving its hash

post

Returns the information of any block giving its hash. If verbosity is 0, it returns a string that is serialized, hex-encoded data for block hash. If verbosity is 1, it returns an object with information about the block. If verbosity is 2, it returns an Object with information about the block and each transaction

Body
idinteger · int32Required

Request ID

Example: 160907
jsonrpcstringRequired

JSON-RPC Version

Example: 2.0
methodstringRequired

Method name to be called. For this operation, the field value must be getBlockByHash

Example: getBlockByHash
Responses
200
Bitcoin block
application/json
post
POST /getBlockByHash HTTP/1.1
Host: 
Content-Type: application/json
Accept: */*
Content-Length: 159

{
  "id": 160907,
  "jsonrpc": "2.0",
  "method": "getBlockByHash",
  "params": {
    "blockHash": "217ba61bc3921764a218f4607a8905108d2dfa4bb8e6e10af61d06e279fa069d",
    "verbosity": 0
  }
}
200

Bitcoin block

{
  "id": 160907,
  "jsonrpc": "2.0",
  "result": {
    "block": {
      "hash": "217ba61bc3921764a218f4607a8905108d2dfa4bb8e6e10af61d06e279fa069d",
      "previousblockhash": "217ba61bc3921764a218f4607a8905108d2dfa4bb8e6e10af61d06e279fa069d",
      "nextblockhash": "217ba61bc3921764a218f4607a8905108d2dfa4bb8e6e10af61d06e279fa069d",
      "height": 1,
      "nonce": 1,
      "nTx": 123,
      "confirmations": "5",
      "weight": 13123,
      "version": 1,
      "versionHex": "0x1",
      "strippedsize": 54354,
      "bits": "207fffff",
      "difficulty": 4.656542373906925e-10,
      "chainwork": "0000000000000000000000000000000000000000000000000000000000000e9e",
      "time": 1641234640,
      "mediantime": 1641234640,
      "txs": [
        {
          "hash": "b66d096bcb068888d4a6987870647ba9c9d2f1da9e360ddafc73efe1f26f2435",
          "version": 1,
          "txid": "e8966afcca05dfe8e2fa282658835dcfa9e07eb5ea4eef041fd52dfd7d324992",
          "hex": "020000000001010000000000000000000000000000000000000000000000000000000000000000ffffffff05024e070101ffffffff025fa0120000000000160014816e2d40fa18229712228743990670f1f8e0a9fd0000000000000000266a24aa21a9ede2f61c3f71d1defd3fa999dfa36953755c690689799962b48bebd836974e8cf90120000000000000000000000000000000000000000000000000000000000000000000000000",
          "size": 54354,
          "vsize": 54354,
          "weight": 13123,
          "locktime": 0,
          "blockHash": "217ba61bc3921764a218f4607a8905108d2dfa4bb8e6e10af61d06e279fa069d",
          "confirmations": "5",
          "blockTime": 1641234640,
          "time": 1641234640,
          "vin": {
            "txid": "e8966afcca05dfe8e2fa282658835dcfa9e07eb5ea4eef041fd52dfd7d324992",
            "vout": 0,
            "sequence": 4294967293,
            "scriptSig": {
              "asm": "",
              "hex": ""
            },
            "txinWitness": [
              "30440220736e93615d002848553e4db94331a7a8a7a1e46531af7c6bec8fcbf6ec2d5017022024ef3164704f850a60b96f1bb680903c602537b2b30b6ba9c941db96781626c501",
              "023b43d1a6879cc98325d4c79e9169fd5ddaa7f964626c297be3c8e8fdca4d8bc0"
            ]
          },
          "vout": {
            "value": "100000",
            "n": 1,
            "scriptPubKey": {
              "asm": "0 816e2d40fa18229712228743990670f1f8e0a9fd",
              "hex": "0014816e2d40fa18229712228743990670f1f8e0a9fd",
              "reqSigs": 1,
              "type": "witness_v0_keyhash",
              "addresses": [
                "tb1qm0xyymv7s07rn00dcpuk2ln890sr3my3cmpfdp"
              ]
            }
          }
        }
      ]
    }
  }
}

Returns the information of any block giving its height

post

Returns the information of any block giving its height. If verbosity is 0, it returns a string that is serialized, hex-encoded data for block hash. If verbosity is 1, it returns an object with information about the block. If verbosity is 2, it returns an Object with information about the block and each transaction

Body
idinteger · int32Required

Request ID

Example: 160907
jsonrpcstringRequired

JSON-RPC Version

Example: 2.0
methodstringRequired

Method name to be called. For this operation, the field value must be getBlockByNumber

Example: getBlockByNumber
Responses
200
Bitcoin block
application/json
post
POST /getBlockByNumber HTTP/1.1
Host: 
Content-Type: application/json
Accept: */*
Content-Length: 100

{
  "id": 160907,
  "jsonrpc": "2.0",
  "method": "getBlockByNumber",
  "params": {
    "blockNumber": "1",
    "verbosity": 0
  }
}
200

Bitcoin block

{
  "id": 160907,
  "jsonrpc": "2.0",
  "result": {
    "block": {
      "hash": "217ba61bc3921764a218f4607a8905108d2dfa4bb8e6e10af61d06e279fa069d",
      "previousblockhash": "217ba61bc3921764a218f4607a8905108d2dfa4bb8e6e10af61d06e279fa069d",
      "nextblockhash": "217ba61bc3921764a218f4607a8905108d2dfa4bb8e6e10af61d06e279fa069d",
      "height": 1,
      "nonce": 1,
      "nTx": 123,
      "confirmations": "5",
      "weight": 13123,
      "version": 1,
      "versionHex": "0x1",
      "strippedsize": 54354,
      "bits": "207fffff",
      "difficulty": 4.656542373906925e-10,
      "chainwork": "0000000000000000000000000000000000000000000000000000000000000e9e",
      "time": 1641234640,
      "mediantime": 1641234640,
      "txs": [
        {
          "hash": "b66d096bcb068888d4a6987870647ba9c9d2f1da9e360ddafc73efe1f26f2435",
          "version": 1,
          "txid": "e8966afcca05dfe8e2fa282658835dcfa9e07eb5ea4eef041fd52dfd7d324992",
          "hex": "020000000001010000000000000000000000000000000000000000000000000000000000000000ffffffff05024e070101ffffffff025fa0120000000000160014816e2d40fa18229712228743990670f1f8e0a9fd0000000000000000266a24aa21a9ede2f61c3f71d1defd3fa999dfa36953755c690689799962b48bebd836974e8cf90120000000000000000000000000000000000000000000000000000000000000000000000000",
          "size": 54354,
          "vsize": 54354,
          "weight": 13123,
          "locktime": 0,
          "blockHash": "217ba61bc3921764a218f4607a8905108d2dfa4bb8e6e10af61d06e279fa069d",
          "confirmations": "5",
          "blockTime": 1641234640,
          "time": 1641234640,
          "vin": {
            "txid": "e8966afcca05dfe8e2fa282658835dcfa9e07eb5ea4eef041fd52dfd7d324992",
            "vout": 0,
            "sequence": 4294967293,
            "scriptSig": {
              "asm": "",
              "hex": ""
            },
            "txinWitness": [
              "30440220736e93615d002848553e4db94331a7a8a7a1e46531af7c6bec8fcbf6ec2d5017022024ef3164704f850a60b96f1bb680903c602537b2b30b6ba9c941db96781626c501",
              "023b43d1a6879cc98325d4c79e9169fd5ddaa7f964626c297be3c8e8fdca4d8bc0"
            ]
          },
          "vout": {
            "value": "100000",
            "n": 1,
            "scriptPubKey": {
              "asm": "0 816e2d40fa18229712228743990670f1f8e0a9fd",
              "hex": "0014816e2d40fa18229712228743990670f1f8e0a9fd",
              "reqSigs": 1,
              "type": "witness_v0_keyhash",
              "addresses": [
                "tb1qm0xyymv7s07rn00dcpuk2ln890sr3my3cmpfdp"
              ]
            }
          }
        }
      ]
    }
  }
}

Returns if blockchain is syncing

post

Returns True if blocks are syncing and returns False if theres no synchronization or is fully sychronize

Body
idinteger · int32Required

Request ID

Example: 160907
jsonrpcstringRequired

JSON-RPC Version

Example: 2.0
methodstringRequired

Method name to be called. For this operation, the field value must be syncing

Example: syncing
paramsobjectRequired
Responses
200
Bitcoin blockchain syncing status
application/json
post
POST /syncing HTTP/1.1
Host: 
Content-Type: application/json
Accept: */*
Content-Length: 60

{
  "id": 160907,
  "jsonrpc": "2.0",
  "method": "syncing",
  "params": {}
}
200

Bitcoin blockchain syncing status

{
  "id": 160907,
  "jsonrpc": "2.0",
  "result": {
    "syncing": false,
    "syncPercentage": "6.905658629231632%",
    "currentBlockIndex": "1",
    "latestBlockIndex": "1"
  }
}

Returns the information of any transaction

post

Returns the information of any transaction, giving its transaction hash

Body
idinteger · int32Required

Request ID

Example: 160907
jsonrpcstringRequired

JSON-RPC Version

Example: 2.0
methodstringRequired

Method name to be called. For this operation, the field value must be getTransaction

Example: getTransaction
Responses
200
Response succesfull
application/json
post
POST /getTransaction HTTP/1.1
Host: 
Content-Type: application/json
Accept: */*
Content-Length: 142

{
  "id": 160907,
  "jsonrpc": "2.0",
  "method": "getTransaction",
  "params": {
    "txHash": "b66d096bcb068888d4a6987870647ba9c9d2f1da9e360ddafc73efe1f26f2435"
  }
}
200

Response succesfull

{
  "id": 160907,
  "jsonrpc": "2.0",
  "result": {
    "transaction": {
      "txId": "e8966afcca05dfe8e2fa282658835dcfa9e07eb5ea4eef041fd52dfd7d324992",
      "txHash": "b66d096bcb068888d4a6987870647ba9c9d2f1da9e360ddafc73efe1f26f2435",
      "blockNumber": "3",
      "fee": "1000",
      "inputs": {
        "address": "tb1qm0xyymv7s07rn00dcpuk2ln890sr3my3cmpfdp",
        "amount": "text"
      },
      "outputs": {
        "address": "tb1qm0xyymv7s07rn00dcpuk2ln890sr3my3cmpfdp",
        "amount": "text"
      },
      "data": {
        "hash": "b66d096bcb068888d4a6987870647ba9c9d2f1da9e360ddafc73efe1f26f2435",
        "version": 1,
        "txid": "e8966afcca05dfe8e2fa282658835dcfa9e07eb5ea4eef041fd52dfd7d324992",
        "hex": "020000000001010000000000000000000000000000000000000000000000000000000000000000ffffffff05024e070101ffffffff025fa0120000000000160014816e2d40fa18229712228743990670f1f8e0a9fd0000000000000000266a24aa21a9ede2f61c3f71d1defd3fa999dfa36953755c690689799962b48bebd836974e8cf90120000000000000000000000000000000000000000000000000000000000000000000000000",
        "size": 54354,
        "vsize": 54354,
        "weight": 13123,
        "locktime": 0,
        "blockHash": "217ba61bc3921764a218f4607a8905108d2dfa4bb8e6e10af61d06e279fa069d",
        "confirmations": "5",
        "blockTime": 1641234640,
        "time": 1641234640,
        "vin": {
          "txid": "e8966afcca05dfe8e2fa282658835dcfa9e07eb5ea4eef041fd52dfd7d324992",
          "vout": 0,
          "sequence": 4294967293,
          "scriptSig": {
            "asm": "",
            "hex": ""
          },
          "txinWitness": [
            "30440220736e93615d002848553e4db94331a7a8a7a1e46531af7c6bec8fcbf6ec2d5017022024ef3164704f850a60b96f1bb680903c602537b2b30b6ba9c941db96781626c501",
            "023b43d1a6879cc98325d4c79e9169fd5ddaa7f964626c297be3c8e8fdca4d8bc0"
          ]
        },
        "vout": {
          "value": "100000",
          "n": 1,
          "scriptPubKey": {
            "asm": "0 816e2d40fa18229712228743990670f1f8e0a9fd",
            "hex": "0014816e2d40fa18229712228743990670f1f8e0a9fd",
            "reqSigs": 1,
            "type": "witness_v0_keyhash",
            "addresses": [
              "tb1qm0xyymv7s07rn00dcpuk2ln890sr3my3cmpfdp"
            ]
          }
        }
      }
    }
  }
}

Returns the information of an array of transactions

post

Returns the information of an array of transaction, giving its transactions hash

Body
idinteger · int32Required

Request ID

Example: 160907
jsonrpcstringRequired

JSON-RPC Version

Example: 2.0
methodstringRequired

Method name to be called. For this operation, the field value must be getTransactions

Example: getTransactions
Responses
200
Response succesfull
application/json
post
POST /getTransactions HTTP/1.1
Host: 
Content-Type: application/json
Accept: */*
Content-Length: 147

{
  "id": 160907,
  "jsonrpc": "2.0",
  "method": "getTransactions",
  "params": {
    "txHashes": [
      "b66d096bcb068888d4a6987870647ba9c9d2f1da9e360ddafc73efe1f26f2435"
    ]
  }
}
200

Response succesfull

{
  "id": 160907,
  "jsonrpc": "2.0",
  "result": {
    "transactions": [
      {
        "txId": "e8966afcca05dfe8e2fa282658835dcfa9e07eb5ea4eef041fd52dfd7d324992",
        "txHash": "b66d096bcb068888d4a6987870647ba9c9d2f1da9e360ddafc73efe1f26f2435",
        "blockNumber": "3",
        "fee": "1000",
        "inputs": {
          "address": "tb1qm0xyymv7s07rn00dcpuk2ln890sr3my3cmpfdp",
          "amount": "text"
        },
        "outputs": {
          "address": "tb1qm0xyymv7s07rn00dcpuk2ln890sr3my3cmpfdp",
          "amount": "text"
        },
        "data": {
          "hash": "b66d096bcb068888d4a6987870647ba9c9d2f1da9e360ddafc73efe1f26f2435",
          "version": 1,
          "txid": "e8966afcca05dfe8e2fa282658835dcfa9e07eb5ea4eef041fd52dfd7d324992",
          "hex": "020000000001010000000000000000000000000000000000000000000000000000000000000000ffffffff05024e070101ffffffff025fa0120000000000160014816e2d40fa18229712228743990670f1f8e0a9fd0000000000000000266a24aa21a9ede2f61c3f71d1defd3fa999dfa36953755c690689799962b48bebd836974e8cf90120000000000000000000000000000000000000000000000000000000000000000000000000",
          "size": 54354,
          "vsize": 54354,
          "weight": 13123,
          "locktime": 0,
          "blockHash": "217ba61bc3921764a218f4607a8905108d2dfa4bb8e6e10af61d06e279fa069d",
          "confirmations": "5",
          "blockTime": 1641234640,
          "time": 1641234640,
          "vin": {
            "txid": "e8966afcca05dfe8e2fa282658835dcfa9e07eb5ea4eef041fd52dfd7d324992",
            "vout": 0,
            "sequence": 4294967293,
            "scriptSig": {
              "asm": "",
              "hex": ""
            },
            "txinWitness": [
              "30440220736e93615d002848553e4db94331a7a8a7a1e46531af7c6bec8fcbf6ec2d5017022024ef3164704f850a60b96f1bb680903c602537b2b30b6ba9c941db96781626c501",
              "023b43d1a6879cc98325d4c79e9169fd5ddaa7f964626c297be3c8e8fdca4d8bc0"
            ]
          },
          "vout": {
            "value": "100000",
            "n": 1,
            "scriptPubKey": {
              "asm": "0 816e2d40fa18229712228743990670f1f8e0a9fd",
              "hex": "0014816e2d40fa18229712228743990670f1f8e0a9fd",
              "reqSigs": 1,
              "type": "witness_v0_keyhash",
              "addresses": [
                "tb1qm0xyymv7s07rn00dcpuk2ln890sr3my3cmpfdp"
              ]
            }
          }
        }
      }
    ]
  }
}

Watch an address. Everytime the address changes, a http POST is sent to the URL.

post

Watch an address. Everytime the address changes, a http POST is sent to the URL.

Body
idinteger · int32Required

Request ID

Example: 160907
jsonrpcstringRequired

JSON-RPC Version

Example: 2.0
methodstringRequired

Method name to be called. For this operation, the field value must be notify

Example: notify
Responses
200
Response succesfull
application/json
post
POST /notify HTTP/1.1
Host: 
Content-Type: application/json
Accept: */*
Content-Length: 161

{
  "id": 160907,
  "jsonrpc": "2.0",
  "method": "notify",
  "params": {
    "address": "tb1qm0xyymv7s07rn00dcpuk2ln890sr3my3cmpfdp",
    "callBackEndpoint": "http://localhost:8080/path"
  }
}
200

Response succesfull

{
  "id": 160907,
  "jsonrpc": "2.0",
  "result": {
    "success": true
  }
}

Returns the number of pending or confirmed transactions an address has made

post

Returns the number of pending or confirmed transactions an address has made

Body
idinteger · int32Required

Request ID

Example: 160907
jsonrpcstringRequired

JSON-RPC Version

Example: 2.0
methodstringRequired

Method name to be called. For this operation, the field value must be getAddressTransactionCount

Example: getAddressTransactionCount
Responses
200
Response succesfull
application/json
post
POST /getAddressTransactionCount HTTP/1.1
Host: 
Content-Type: application/json
Accept: */*
Content-Length: 148

{
  "id": 160907,
  "jsonrpc": "2.0",
  "method": "getAddressTransactionCount",
  "params": {
    "address": "tb1qm0xyymv7s07rn00dcpuk2ln890sr3my3cmpfdp",
    "pending": true
  }
}
200

Response succesfull

{
  "id": 160907,
  "jsonrpc": "2.0",
  "result": {
    "address": "tb1qm0xyymv7s07rn00dcpuk2ln890sr3my3cmpfdp",
    "transactionCount": "12"
  }
}

Returns the information of any transaction

post

Returns the information of any transaction, giving it transaction hash

Body
idinteger · int32Required

Request ID

Example: 160907
jsonrpcstringRequired

JSON-RPC Version

Example: 2.0
methodstringRequired

Method name to be called. For this operation, the field value must be getAddressesTransactionCount

Example: getAddressesTransactionCount
Responses
200
Response succesfull
application/json
post
POST /getAddressesTransactionCount HTTP/1.1
Host: 
Content-Type: application/json
Accept: */*
Content-Length: 166

{
  "id": 160907,
  "jsonrpc": "2.0",
  "method": "getAddressesTransactionCount",
  "params": {
    "addresses": [
      {
        "address": "tb1qm0xyymv7s07rn00dcpuk2ln890sr3my3cmpfdp",
        "pending": true
      }
    ]
  }
}
200

Response succesfull

{
  "id": 160907,
  "jsonrpc": "2.0",
  "result": [
    {
      "address": "tb1qm0xyymv7s07rn00dcpuk2ln890sr3my3cmpfdp",
      "transactionCount": "12"
    }
  ]
}

Estimate fee by confirmations

post

Estimates the approximate fee per kilobyte needed for a transaction to begin confirmation within "confirmations" blocks if possible and return the number of blocks for which the estimate is valid.

Body
idinteger · int32Required

Request ID

Example: 160907
jsonrpcstringRequired

JSON-RPC Version

Example: 2.0
methodstringRequired

Method name to be called. For this operation, the field value must be getFeePerByte

Example: getFeePerByte
Responses
200
Response succesfull
application/json
post
POST /getFeePerByte HTTP/1.1
Host: 
Content-Type: application/json
Accept: */*
Content-Length: 85

{
  "id": 160907,
  "jsonrpc": "2.0",
  "method": "getFeePerByte",
  "params": {
    "confirmations": "5"
  }
}
200

Response succesfull

{
  "id": 160907,
  "jsonrpc": "2.0",
  "result": {
    "feePerByte": "1000"
  }
}

Returns the UTXO list of any address

post

Returns the UTXO list of any address

Body
idinteger · int32Required

Request ID

Example: 160907
jsonrpcstringRequired

JSON-RPC Version

Example: 2.0
methodstringRequired

Method name to be called. For this operation, the field value must be getAddressUnspent

Example: getAddressUnspent
Responses
200
Successful response
application/json
post
POST /getAddressUnspent HTTP/1.1
Host: 
Content-Type: application/json
Accept: */*
Content-Length: 124

{
  "id": 160907,
  "jsonrpc": "2.0",
  "method": "getAddressUnspent",
  "params": {
    "address": "tb1qm0xyymv7s07rn00dcpuk2ln890sr3my3cmpfdp"
  }
}
200

Successful response

{
  "id": 160907,
  "jsonrpc": "2.0",
  "result": [
    {
      "txHash": "b66d096bcb068888d4a6987870647ba9c9d2f1da9e360ddafc73efe1f26f2435",
      "vout": "0",
      "status": {
        "confirmed": true,
        "blockHeight": "1"
      },
      "value": "100000"
    }
  ]
}

Returns the UTXO list of an array of addresses

post

Returns the UTXO list of an array of addresses

Body
idinteger · int32Required

Request ID

Example: 160907
jsonrpcstringRequired

JSON-RPC Version

Example: 2.0
methodstringRequired

Method name to be called. For this operation, the field value must be getAddressesUnspent

Example: getAddressesUnspent
paramsstring[]Required

Bitcoin Cash address

Example: tb1qm0xyymv7s07rn00dcpuk2ln890sr3my3cmpfdp
Responses
200
Successful response
application/json
post
POST /getAddressesUnspent HTTP/1.1
Host: 
Content-Type: application/json
Accept: */*
Content-Length: 116

{
  "id": 160907,
  "jsonrpc": "2.0",
  "method": "getAddressesUnspent",
  "params": [
    "tb1qm0xyymv7s07rn00dcpuk2ln890sr3my3cmpfdp"
  ]
}
200

Successful response

{
  "id": 160907,
  "jsonrpc": "2.0",
  "result": [
    {
      "address": "tb1qm0xyymv7s07rn00dcpuk2ln890sr3my3cmpfdp",
      "outputs": [
        {
          "txHash": "b66d096bcb068888d4a6987870647ba9c9d2f1da9e360ddafc73efe1f26f2435",
          "vout": "0",
          "status": {
            "confirmed": true,
            "blockHeight": "1"
          },
          "value": "100000"
        }
      ]
    }
  ]
}

Returns transaction

post

Returns raw schema of any transaction. If verbosity is set to true, transaction object is returned, otherwise raw transaction will be returned

Body
idinteger · int32Required

Request ID

Example: 160907
jsonrpcstringRequired

JSON-RPC Version

Example: 2.0
methodstringRequired

Method name to be called. For this operation, the field value must be getTransactionHex

Example: getTransactionHex
Responses
200
Response succesfull
application/json
post
POST /getTransactionHex HTTP/1.1
Host: 
Content-Type: application/json
Accept: */*
Content-Length: 163

{
  "id": 160907,
  "jsonrpc": "2.0",
  "method": "getTransactionHex",
  "params": {
    "txHash": "b66d096bcb068888d4a6987870647ba9c9d2f1da9e360ddafc73efe1f26f2435",
    "verbosity": false
  }
}
200

Response succesfull

{
  "id": 160907,
  "jsonrpc": "2.0",
  "result": {
    "rawTransaction": "01000000000101c0d72dcba53996705fff03465f23b594ec934c29a7645045abe07385a58470a101000000171600140e2c5153cf335a150df44013c4572cd52a70aa8bfdffffff020100000000000000165114391234a573b02814f03ff59673c86b68c2869537091839000000000017a914004863ca1a414c0a174b2666bf067c69524aabd4870247304402201cc95f4683cf0fc46923b1a7f78454adbd57150268ab4960efd3c7df6fc83e22022035917f815bfd80052812b8b1559d314f2459e5876abe9bf1b36f8d4e0dda6e0e012102c379336fce4796dc9bbaa953ef5003e070853b2bf53bdf00b9cfb83e3e1ef84f00000000"
  }
}

Broadcasts a transaction to the network

post

Broadcasts a transaction to the network

Body
idinteger · int32Required

Request ID

Example: 160907
jsonrpcstringRequired

JSON-RPC Version

Example: 2.0
methodstringRequired

Method name to be called. For this operation, the field value must be broadcastTransaction

Example: broadcastTransaction
Responses
200
Response succesfull
application/json
post
POST /broadcastTransaction HTTP/1.1
Host: 
Content-Type: application/json
Accept: */*
Content-Length: 584

{
  "id": 160907,
  "jsonrpc": "2.0",
  "method": "broadcastTransaction",
  "params": {
    "rawTransaction": "01000000000101c0d72dcba53996705fff03465f23b594ec934c29a7645045abe07385a58470a101000000171600140e2c5153cf335a150df44013c4572cd52a70aa8bfdffffff020100000000000000165114391234a573b02814f03ff59673c86b68c2869537091839000000000017a914004863ca1a414c0a174b2666bf067c69524aabd4870247304402201cc95f4683cf0fc46923b1a7f78454adbd57150268ab4960efd3c7df6fc83e22022035917f815bfd80052812b8b1559d314f2459e5876abe9bf1b36f8d4e0dda6e0e012102c379336fce4796dc9bbaa953ef5003e070853b2bf53bdf00b9cfb83e3e1ef84f00000000"
  }
}
200

Response succesfull

{
  "id": 160907,
  "jsonrpc": "2.0",
  "result": {
    "broadcasted": "b66d096bcb068888d4a6987870647ba9c9d2f1da9e360ddafc73efe1f26f2435"
  }
}