#Blocks
#Get a Block
#Method
1blocks.info
#Body Parameters
Name |
Type |
Description |
Required |
jsonrpc |
string |
The protocol version. |
Yes |
id |
string |
The identifier of the request. |
Yes |
method |
string |
The method name. |
Yes |
params |
object |
The parameters of the request. |
Yes |
params.id |
string |
The identifier of the block to be retrieved. |
Yes |
#Request
1{
2 "jsonrpc": "2.0",
3 "id": "unique-request-id",
4 "method": "blocks.info",
5 "params": {
6 "id": "9336364900436444611"
7 }
8}
#Response
1{
2 "jsonrpc": "2.0",
3 "id": "unique-request-id",
4 "result": {
5 "id": "9336364900436444611",
6 "version": 0,
7 "height": 23,
8 "previous": "17180650139879860733",
9 "forged": {
10 "reward": 0,
11 "fee": 0,
12 "total": 0
13 },
14 "payload": {
15 "hash": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
16 "length": 0
17 },
18 "generator": {
19 "username": "genesis_43",
20 "address": "AQBo4exLwyapRiDoDteh1fF2ctWWdxofSf",
21 "publicKey": "034985f6f2167cc8c9df1204aaf6744bc97c0d7f3c07c43ee6c0978bc91b6c680e"
22 },
23 "signature": "3045022100b5c6ebb1c4c6694b82b98eea6c6eb889547908d8c1aff98d16f3f9df810fe34b02207266371081ffc6461da6fbb2811065aabe135c6e47863605416e6e5ddb4c7806",
24 "transactions": 0,
25 "timestamp": {
26 "epoch": 50686634,
27 "unix": 1540787834,
28 "human": "2018-10-29T04:37:14Z"
29 }
30 }
31}
#Error Response
1{
2 "jsonrpc": "2.0",
3 "id": "unique-request-id",
4 "error": {
5 "code": "unique-error-code",
6 "message": "descriptive-error-message",
7 "data": "detailed-error-information"
8 }
9}
#Get the Latest Block
#Method
1blocks.latest
#Body Parameters
Name |
Type |
Description |
Required |
jsonrpc |
string |
The protocol version. |
Yes |
id |
string |
The identifier of the request. |
Yes |
method |
string |
The method name. |
Yes |
#Request
1{
2 "jsonrpc": "2.0",
3 "id": "unique-request-id",
4 "method": "blocks.latest"
5}
#Response
1{
2 "jsonrpc": "2.0",
3 "id": "unique-request-id",
4 "result": {
5 "id": "1453043075643523354",
6 "version": 0,
7 "height": 29,
8 "previous": "14915069404850182157",
9 "forged": {
10 "reward": 0,
11 "fee": 0,
12 "total": 0
13 },
14 "payload": {
15 "hash": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
16 "length": 0
17 },
18 "generator": {
19 "username": "genesis_42",
20 "address": "AcmXmomxpP8NahbbFivq32QmLuKFkTkqRg",
21 "publicKey": "0311077c86a98b67850e7ed2c81775d094cf81c6991082ddc33fc7be5347dc765d"
22 },
23 "signature": "3045022100d94630fc328f5e70a4fa6134fa8aadbaab42eff15b22e91ae17438b6f28cfd3a022014df10ff42cea9d02e549353c24a6207c3de10d85b4f91742b44ffb4f303592e",
24 "transactions": 0,
25 "timestamp": {
26 "epoch": 50686712,
27 "unix": 1540787912,
28 "human": "2018-10-29T04:38:32Z"
29 }
30 }
31}
#Error Response
1{
2 "jsonrpc": "2.0",
3 "id": "unique-request-id",
4 "error": {
5 "code": "unique-error-code",
6 "message": "descriptive-error-message",
7 "data": "detailed-error-information"
8 }
9}
#Get a Blocks Transactions
#Method
1blocks.transactions
#Body Parameters
Name |
Type |
Description |
Required |
jsonrpc |
string |
The protocol version. |
Yes |
id |
string |
The identifier of the request. |
Yes |
method |
string |
The method name. |
Yes |
params |
object |
The parameters of the request. |
Yes |
params.id |
string |
The identifier of the block to be retrieved. |
Yes |
params.offset |
int |
The offset of transactions to be retrieved. |
Yes |
#Request
1{
2 "jsonrpc": "2.0",
3 "id": "unique-request-id",
4 "method": "blocks.transactions",
5 "params": {
6 "id": "17184958558311101492"
7 }
8}
#Response
1{
2 "jsonrpc": "2.0",
3 "id": "unique-request-id",
4 "result": {
5 "count": 153,
6 "data": [
7 {
8 "id": "db1aa687737858cc9199bfa336f9b1c035915c30aaee60b1e0f8afadfdb946bd",
9 "blockId": "17184958558311101492",
10 "type": 0,
11 "amount": 245098000000000,
12 "fee": 0,
13 "sender": "APnhwwyTbMiykJwYbGhYjNgtHiVJDSEhSn",
14 "recipient": "AHXtmB84sTZ9Zd35h9Y1vfFvPE2Xzqj8ri",
15 "signature": "304402205fcb0677e06bde7aac3dc776665615f4b93ef8c3ed0fddecef9900e74fcb00f302206958a0c9868ea1b1f3d151bdfa92da1ce24de0b1fcd91933e64fb7971e92f48d",
16 "confirmations": 3,
17 "timestamp": {
18 "epoch": 0,
19 "unix": 1490101200,
20 "human": "2017-03-21T13:00:00Z"
21 }
22 }
23 ]
24 }
25}
#Error Response
1{
2 "jsonrpc": "2.0",
3 "id": "unique-request-id",
4 "error": {
5 "code": "unique-error-code",
6 "message": "descriptive-error-message",
7 "data": "detailed-error-information"
8 }
9}