Bitcoin Cash

Bitcoin cash endpoints

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

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
chevron-right
200

Successful response

application/json
idinteger · int32Required

Request ID

Example: 160907
jsonrpcstringRequired

JSON-RPC Version

Example: 2.0
post
/getAddressesBalance
200

Successful response

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
chevron-right
200

Successful response

application/json
idinteger · int32Required

Request ID

Example: 160907
jsonrpcstringRequired

JSON-RPC Version

Example: 2.0
post
/getAddressHistory
200

Successful response

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
chevron-right
200

Successful response

application/json
idinteger · int32Required

Request ID

Example: 160907
jsonrpcstringRequired

JSON-RPC Version

Example: 2.0
post
/getAddressesHistory
200

Successful response

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
chevron-right
200Success
application/json
idinteger · int32Required

Request ID

Example: 160907
jsonrpcstringRequired

JSON-RPC Version

Example: 2.0
post
/getHeight
200Success

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
chevron-right
200

Bitcoin block

application/json
idinteger · int32Required

Request ID

Example: 160907
jsonrpcstringRequired

JSON-RPC Version

Example: 2.0
post
/getBlockByHash
200

Bitcoin block

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
chevron-right
200

Bitcoin block

application/json
idinteger · int32Required

Request ID

Example: 160907
jsonrpcstringRequired

JSON-RPC Version

Example: 2.0
post
/getBlockByNumber
200

Bitcoin block

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
chevron-right
200

Bitcoin blockchain syncing status

application/json
idinteger · int32Required

Request ID

Example: 160907
jsonrpcstringRequired

JSON-RPC Version

Example: 2.0
post
/syncing
200

Bitcoin blockchain syncing status

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
chevron-right
200

Response succesfull

application/json
idinteger · int32Required

Request ID

Example: 160907
jsonrpcstringRequired

JSON-RPC Version

Example: 2.0
post
/getTransaction
200

Response succesfull

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
chevron-right
200

Response succesfull

application/json
idinteger · int32Required

Request ID

Example: 160907
jsonrpcstringRequired

JSON-RPC Version

Example: 2.0
post
/getTransactions
200

Response succesfull

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
chevron-right
200

Response succesfull

application/json
idinteger · int32Required

Request ID

Example: 160907
jsonrpcstringRequired

JSON-RPC Version

Example: 2.0
post
/notify
200

Response succesfull

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
chevron-right
200

Response succesfull

application/json
idinteger · int32Required

Request ID

Example: 160907
jsonrpcstringRequired

JSON-RPC Version

Example: 2.0
post
/getAddressTransactionCount
200

Response succesfull

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
chevron-right
200

Response succesfull

application/json
idinteger · int32Required

Request ID

Example: 160907
jsonrpcstringRequired

JSON-RPC Version

Example: 2.0
post
/getAddressesTransactionCount
200

Response succesfull

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
chevron-right
200

Response succesfull

application/json
idinteger · int32Required

Request ID

Example: 160907
jsonrpcstringRequired

JSON-RPC Version

Example: 2.0
post
/getFeePerByte
200

Response succesfull

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
chevron-right
200

Successful response

application/json
idinteger · int32Required

Request ID

Example: 160907
jsonrpcstringRequired

JSON-RPC Version

Example: 2.0
post
/getAddressUnspent
200

Successful response

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
chevron-right
200

Successful response

application/json
idinteger · int32Required

Request ID

Example: 160907
jsonrpcstringRequired

JSON-RPC Version

Example: 2.0
post
/getAddressesUnspent
200

Successful response

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
chevron-right
200

Response succesfull

application/json
idinteger · int32Required

Request ID

Example: 160907
jsonrpcstringRequired

JSON-RPC Version

Example: 2.0
post
/getTransactionHex
200

Response succesfull

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
chevron-right
200

Response succesfull

application/json
idinteger · int32Required

Request ID

Example: 160907
jsonrpcstringRequired

JSON-RPC Version

Example: 2.0
post
/broadcastTransaction
200

Response succesfull

Last updated