-
Notifications
You must be signed in to change notification settings - Fork 1
explorer api
dappstore123 edited this page Mar 31, 2019
·
5 revisions
该接口用于ipos区块链浏览器。
根据地址查询交易
POST /addr
{"draw":1,"columns":[
{"data":0,"name":"","searchable":true,"orderable":false,"search":{"value":"","regex":false}},{"data":1,"name":"","searchable":true,"orderable":true,"search":{"value":"","regex":false}},{"data":2,"name":"","searchable":true,"orderable":false,"search":{"value":"","regex":false}},{"data":3,"name":"","searchable":true,"orderable":false,"search":{"value":"","regex":false}},{"data":4,"name":"","searchable":true,"orderable":false,"search":{"value":"","regex":false}},{"data":5,"name":"","searchable":false,"orderable":true,"search":{"value":"","regex":false}},{"data":6,"name":"","searchable":true,"orderable":true,"search":{"value":"","regex":false}}
],
"order":[{"column":6,"dir":"desc"}],"start":0,"length":20,"search":{"value":"","regex":false},"addr":"0x123456793663953103cf70235fe37b9893a4db6f","count":6}
说明
说明
addr为地址
start 是起始位置。 length为长度。
翻页时,需自己计算 起始位置。
第一页 start为0,length为 20.
第二页 start为20 ,length为20;
第n页 start为20n,length为 20;
排序按第六列排序。即时间 desc排序
{
"draw": 1,
"recordsFiltered": 6,
"recordsTotal": 6,
"mined": 0,
"data": [
["0x609ce1df983e316e3483b3e3bdb697d832a975d7d8812af00002910df006490b", 92356, "0xe686ab5d1ff7682aeb88d30bec92b8d92374016b", "0x123456793663953103cf70235fe37b9893a4db6f", "2", 50000, 1553758326, null],
["0x9c4ecfe326bc0d33749d20c7dd203883b8dbb6e029d2625179975a47e7f4c7af", 92244, "0xe686ab5d1ff7682aeb88d30bec92b8d92374016b", "0x123456793663953103cf70235fe37b9893a4db6f", "1", 50000, 1553756841, null],
["0xfa2fca31b1a47270884ab06869c183a7f10b1c88e456cf9f85b8bbd02abeaf20", 92213, "0xe686ab5d1ff7682aeb88d30bec92b8d92374016b", "0x123456793663953103cf70235fe37b9893a4db6f", "1", 50000, 1553756544, null],
["0xdaf91b5eec3d845e17f0af49eebb13cf9170e165a23da97a4a2bf9f7e8e25bc1", 92077, "0xe686ab5d1ff7682aeb88d30bec92b8d92374016b", "0x123456793663953103cf70235fe37b9893a4db6f", "0.3", 50000, 1553755001, null],
["0x8a9bac4b0fe4507de7dbccae5a20670ce0287309e5fae5c2f38b1b0fcd4207da", 91880, "0xe686ab5d1ff7682aeb88d30bec92b8d92374016b", "0x123456793663953103cf70235fe37b9893a4db6f", "0.1", 50000, 1553752482, null],
["0x9f8d8132ba271cf1e9e68c7ed77325281ffa22a34623e1761b3eb1b06a5a20f4", 91849, "0xe686ab5d1ff7682aeb88d30bec92b8d92374016b", "0x123456793663953103cf70235fe37b9893a4db6f", "0.1", 50000, 1553752067, null],
["0xb265c4e5f290aa582734c9a23d461f87b05602e51299cbaa62086e00586c31dc", 91802, "0xe686ab5d1ff7682aeb88d30bec92b8d92374016b", "0x123456793663953103cf70235fe37b9893a4db6f", "1", 50000, 1553751641, null],
["0x5f3735e2cc24514253ea577946e3af5a8bdb02baa3e7325ece7845bb0d3026d6", 91698, "0xe686ab5d1ff7682aeb88d30bec92b8d92374016b", "0x123456793663953103cf70235fe37b9893a4db6f", "1", 50000, 1553750170, null],
["0x7a7a28eeeeb025a5f545129038f1c76d2439cbc154d9e616e5b1c73ac77080ed", 54112, "0x123456793663953103cf70235fe37b9893a4db6f", "0xe686ab5d1ff7682aeb88d30bec92b8d92374016b", "100", 90000, 1553269241, null],
["0x6f9545ffb1625bf956915c1a5308ab4bcadfd26909dc589798e92337a3c5ed56", 30083, "0x123456793663953103cf70235fe37b9893a4db6f", "0x12f27e18f818dce079986ac59f2fdd03c6223ebb", "100", 90000, 1553051946, null],
["0x37687b3e9fc30665b9ab37040f08341c507c12e46c2f2bd323af3ebfea800f58", 29953, "0x123456793663953103cf70235fe37b9893a4db6f", "0x7085c6b3c2275f4c6380ef637a46aa6b5ee99bbe", "100", 90000, 1553048814, null],
["0x775dc41e5dcb0ee0c0f806d992ce7b021fb72c12b86d96721fe7d270a1f5e004", 29952, "0x123456793663953103cf70235fe37b9893a4db6f", "0x12f27e18f818dce079986ac59f2fdd03c6223ebb", "100", 90000, 1553048715, null],
["0x832582b915b55c400c9968361dd279372a5dfb9a4788349998bc90e12190a629", 19738, "0x123456793663953103cf70235fe37b9893a4db6f", "0x1234567767e89773b0c27b28089c4e6eb8d7e682", "1", 90000, 1552916614, null],
["0x83f8722a71571a343a5b64d2e0b9e127d0151f8ce45a9636bb6b4c228d869138", 19730, "0x123456793663953103cf70235fe37b9893a4db6f", "0x1234567767e89773b0c27b28089c4e6eb8d7e682", "1", 90000, 1552916512, null]
]
}
data[0].[0] : TxHash
data[0].[1] : block
data[0].[2] : from
data[0].[3] : to
data[0].[4] : 数量
data[0].[5] : Gas Limit
data[0].[6] : 时间戳
data[0].[7] : null
示例
curl 'http://explorer.iposlab.com/addr' -H 'Content-Type: application/json;charset=UTF-8' -H 'Accept: application/json, text/plain, */*' --data-binary '{"draw":1,"columns":[{"data":0,"name":"","searchable":true,"orderable":false,"search":{"value":"","regex":false}},{"data":1,"name":"","searchable":true,"orderable":true,"search":{"value":"","regex":false}},{"data":2,"name":"","searchable":true,"orderable":false,"search":{"value":"","regex":false}},{"data":3,"name":"","searchable":true,"orderable":false,"search":{"value":"","regex":false}},{"data":4,"name":"","searchable":true,"orderable":false,"search":{"value":"","regex":false}},{"data":5,"name":"","searchable":false,"orderable":true,"search":{"value":"","regex":false}},{"data":6,"name":"","searchable":true,"orderable":true,"search":{"value":"","regex":false}}],"order":[{"column":6,"dir":"desc"}],"start":0,"length":20,"search":{"value":"","regex":false},"addr":"0xe686ab5d1ff7682aeb88d30bec92b8d92374016b","count":8}' --compressed
POST /web3relay
{"tx":"0x609ce1df983e316e3483b3e3bdb697d832a975d7d8812af00002910df006490b"}
{
"_id": "5c9e0b423a313c6e4febe773",
"blockHash": "0x04808c9cb28f35681496ccbd18a4e84b4cb403bfe9d30c047ad6db052d77c1cf",
"blockNumber": 92356,
"from": "0xe686ab5d1ff7682aeb88d30bec92b8d92374016b",
"hash": "0x609ce1df983e316e3483b3e3bdb697d832a975d7d8812af00002910df006490b",
"value": "2",
"nonce": 7,
"r": "0x33ac9536a5bae464f1a3d0b429fa5bca4a55ab6e03867b7ca6fe00938b1f90b7",
"s": "0x3a52ec710c8bdb9fcaeeba479fc352f7c8590730b6d8112af07d75db0e74102",
"v": "0x1b",
"gas": 50000,
"gasUsed": 21000,
"gasPrice": "18000000000",
"input": "0x",
"transactionIndex": 0,
"timestamp": 1553758326,
"status": true,
"to": "0x123456793663953103cf70235fe37b9893a4db6f",
"confirmations": 20393,
"gasPriceGwei": "18",
"gasPriceEther": "0.000000018",
"txFee": 0.00037799999999999997
}
示例
curl 'http://explorer.iposlab.com/web3relay' -H 'Content-Type: application/json;charset=UTF-8' -H 'Accept: application/json, text/plain, */*' --data-binary '{"tx":"0x609ce1df983e316e3483b3e3bdb697d832a975d7d8812af00002910df006490b"}' --compressed
其他接口 可使用 http的 rpc