ping_block - 连通测试
使用ping_block
指令测试blockchain.info的websocket服务的连通性,附带反馈最新区块数据。
请求
{
"op":"ping_block"
}
响应
如果服务正常,将返回block指令:
{
"op":"block"
....
}
示例代码
通过websocket连接发送ping_block指令:
{
"op":"ping_block"
}
响应结果如下:
{
"op" : "block",
"x" : {
"txIndexes" : [ 446712293, 446711894, 446712016, 446712056, 446711428, 446712020,
446712102, 446712123, 446712139, 446712163, 446711971, 446711502, 446712115,
446711988, 446711959, 446712108, 446711953, 446711515, 446711981, 446711512,
446711839, 446712001, 446712114, 446711968, 446711433, 446711996, 446711479,
...
],
"nTx" : 2575,
"totalBTCSent" : 1665303217582,
"estimatedBTCSent" : 56901939072,
"reward" : 0,
"size" : 1170588,
"weight" : 3992463,
"blockIndex" : 1763195,
"prevBlockIndex" : 1763194,
"height" : 575775,
"hash" : "0000000000000000001540adeae69cbb8080c9ed9181c2b95c7852d94193a916",
"mrklRoot" : "e120ebb53203527c7a5389cd5281ebfd0779b5468d2ac4414af01e83a889fe73",
"version" : 536870912,
"time" : 1557716612,
"bits" : 388628280,
"nonce" : 974296378,
"foundBy" : {
"description" : "BitFury",
"ip" : "0.0.0.0",
"link" : "http://bitfury.com/",
"time" : 1557716612
}
}
}