Block Height Information Retrieval API
Merchants use this API to receive the block height to confirm the transaction and the current block height from different networks.
Get Block Height Information
POST https://admin.ccpayment.com/ccpayment/v1/get/network/height/info
Headers
Timestamp*
string
Timestamp in seconds (10-digit). The request is valid for two minutes.
Content-Type*
String
application/json; charset=utf-8
Response (Success 200)
Header
Appid
202302010636261620672405236006912
Y
String
Merchant's unique credential. Find it on the Developer page
Timestamp
1677152490
Y
String
Timestamp in seconds (10-digit). The request is valid for two minutes.
Sign
871f0223c66ea72435208d03603a0cb00b90f6ac4a4ba725d00164d967e291f6
Y
String
SHA-256(appId + appSecret + timestamp+body(json string))
Body
{
"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
code
10000
integer
msg
Success
string
data
object
data.chain
BCH
string
The network's unique identification on the blockchain
data.current_chain_height
803435
int64
Current block height of the network
data.tx_confirm_block_num
2
int64
The number of block confirmations required for the trasnaction on the blockchain
data.block_rate
0
float64
The time gap of every blocks, in seconds
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.
Last updated