/ doc / GET_header.md
GET_header.md
 1  # Get Block Header
 2  
 3  Request the header for a given block.
 4  
 5  
 6  ```http request
 7  GET /header/:hash
 8  ```
 9  
10  ## Parameters
11  * **hash** - `string` - The block hash
12  * **at** - `string` (optional) - Access Token (json web token). Required if authentication is activated. Alternatively, the access token can be passed through the `Authorization` HTTP header (with the `Bearer` scheme).
13  
14  ### Examples
15  
16  ```http request
17  GET /header/000000000019d6689c085ae165831e934ff763ae46a2a6c172b3f1b60a8ce26f
18  ```
19  
20  #### Success
21  Status code 200 with JSON response:
22  ```json
23  {
24    "hash": "000000000019d6689c085ae165831e934ff763ae46a2a6c172b3f1b60a8ce26f",
25    "confirmations": 475000,
26    "height": 0,
27    "version": 1,
28    "versionHex": "00000001",
29    "merkleroot": "4a5e1e4baab89f3a32518a88c31bc87f618f76673e2cc77ab2127b7afdeda33b",
30    "time": 1231006505,
31    "mediantime": 1231006505,
32    "nonce": 2083236893,
33    "bits": "1d00ffff",
34    "difficulty": 1,
35    "chainwork": "0000000000000000000000000000000000000000000000000000000100010001",
36    "nextblockhash": "00000000839a8e6886ab5951d76f411475428afc90947ee320161bbf18eb6048"
37  }
38  ```
39  
40  #### Failure
41  Status code 400 with JSON response:
42  ```json
43  {
44    "status": "error",
45    "error": "<error message>"
46  }
47  ```