# Block Height Information Retrieval API

## Get Block Height Information

<mark style="color:green;">`POST`</mark> `https://admin.ccpayment.com/ccpayment/v1/get/network/height/info`

#### Headers

| Name                                           | Type   | Description                                                                                                                                                                                |
| ---------------------------------------------- | ------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| Sign<mark style="color:red;">\*</mark>         | string | SHA-256 (APPID + APP Secret +timestamp+<mark style="color:red;">**body (json string)**</mark>). [Signature guide](https://docs.ccpayment.com/ccpayment-v1.0-api/to-get-started/signature). |
| Timestamp<mark style="color:red;">\*</mark>    | string | Timestamp in seconds (10-digit). The request is valid for two minutes.                                                                                                                     |
| Appid<mark style="color:red;">\*</mark>        | string | Merchant's unique credential. Find it on the [Developer page](https://admin.ccpayment.com/developer/config)                                                                                |
| Content-Type<mark style="color:red;">\*</mark> | String | application/json; charset=utf-8                                                                                                                                                            |

{% tabs %}
{% tab title="200: OK Success (200)/Fail (200)" %}
{% tabs %}
{% tab title="Success (200)" %}

#### **Response (Success 200)**

**Header**

**Body**

```json
{
  "code": 10000,
  "msg": "success",
  "data": [
    {
      "chain": "BCH",
      "current_chain_height": 803435,
      "tx_confirm_block_num": 2,
      "block_rate": 0
    },
    {
      "chain": "BSC",
      "current_chain_height": 30297917,
      "tx_confirm_block_num": 15
    }
    ...
  ]
}
```

**Parameters**
{% endtab %}

{% tab title="Fail (200)" %}

#### **Response (Fail 200)**

```json
{
	"code": 224066,
	"msg": "Service error, pleaser try again",
	"data": null
}
```

<table><thead><tr><th>Name</th><th>Value</th><th width="108" data-type="checkbox">Required</th><th>Type</th><th>Description</th></tr></thead><tbody><tr><td>code</td><td>224066</td><td>true</td><td>Number</td><td></td></tr><tr><td>msg</td><td>Service error, please try again</td><td>true</td><td>String</td><td></td></tr><tr><td>data</td><td></td><td>true</td><td>Object</td><td></td></tr></tbody></table>
{% endtab %}

{% tab title="Remarks" %}
As a security measure, we will sign the returned data (and according to this only { code: 10000 } should be signed, but it's signing all the returned body.). Additionally, it will return Appid, Sign, Timestamp  in the header of the response.  The signature method SHA-256 (appid+appSecret+Timestamp+body).

Please use the data with caution if the signature verification fails. It indicates that the data has been tampered with.
{% endtab %}
{% endtabs %}
{% endtab %}
{% endtabs %}
