getdifficulty
Gives back the difficulty of the proof-of-work as a multiple of the minimum difficulty.
Example Request and Result for getdifficulty method
In this section, we provide an illustrative example of a request made to retrieve details contents using the getdifficulty
method. Additionally, we present the resulting response containing information about the difficulty of the proof-of-work.
Parameters
- none
info
The example in this section uses a non-existing project id.
Make sure you replace it with your Bitcoin mainnet or Bitcoin Testnet endpoint when issuing the API calls.
Don't have a project id? Here's a straightforward guide on how to obtain one!
Returns the difficulty of the proof-of-work
POST
https://bitcoin-mainnet.blastapi.io/<project-id>
Request Body
Name | Type | Description |
---|---|---|
jsonrpc* | string | 1.0 |
id* | string | bwarelabs |
method* | string | getdifficulty |
params* | array<string> | [] |
- 200: OK Expand for a detailed response example
{
"result": 75502165623893.72,
"error": null,
"id": "bwarelabs"
}
Curl Request example
curl --location 'https://bitcoin-mainnet.blastapi.io/<project-id>' \
--header 'Content-Type: application/json' \
--data '{
"jsonrpc": "1.0",
"id": "bwarelabs",
"method": "getdifficulty",
"params": []
}'