Block

getBlock

Returns a latest block raw data.

Parameters

None

Return Value

Block raw data

Example

{
    "jsonrpc": "2.0",
    "id": 1,
    "result": {
        "resultCode": "200",
        "resultMessage": "Success",
        "resultData": {
            "blockNumber": 10416,
            "rawData": "{\"number\":10416,\"hash\":\"0x3312bd6c260ba0525fdff8d...",\"timestampRaw\":\"0x6253f1e1\"}",
            "txCount": 1,
            "hash": "0x3312bd6c260ba0525fdff8df507bb84105d24e2af0068a1b898d1f7bd20c3045",
            "blockTime": "2022-04-11T09:16:17"
        }
    }
}

getBlockNumber

Returns a block raw data of block number.

Parameters

NameTypeDescription

blockNumber

Long

Block number to get.

Return Value

Block raw data

Example

{
    "jsonrpc": "2.0",
    "id": 1,
    "result": {
        "resultCode": "200",
        "resultMessage": "Success",
        "resultData": {
            "blockNumber": 10416,
            "rawData": "{\"number\":10416,\"hash\":\"0x3312bd6c260ba0525fdff8d...",\"timestampRaw\":\"0x6253f1e1\"}",
            "txCount": 1,
            "hash": "0x3312bd6c260ba0525fdff8df507bb84105d24e2af0068a1b898d1f7bd20c3045",
            "blockTime": "2022-04-11T09:16:17"
        }
    }
}

getBlockCount

Returns a list of creations per day for the last 15 days.

Parameters

None

Return Value

NameTypeDescription

totalCount

Long

Count block for the last 15 days.

list

see below list item

list item

NameTypeDescription

date

String

Date. ex) "1116"

count

Long

count of day

Example

{
    "jsonrpc": "2.0",
    "id": "00456",
    "result": {
        "resultCode": "200",
        "resultMessage": "Success",
        "resultData": {
            "totalCount": 14914,
            "list": [
                {
                    "date": "1116",
                    "count": 0
                },
                ...
                {
                    "date": "1130",
                    "count": 0
                }
            ]
        }
    }                      
}

getBlockList

Returns the block information list in units of pages.

Parameters

NameTypeDescription

pageNumber

Long

Page number to get. start from 1.

pageSize

Integer

Number per page.

order

Integer

0 : Order of descending, 1 : Order of ascending

Return Value

NameTypeDescription

pageNumber

Long

pageSize

Integer

totalPages

Long

totalElements

Long

list

list of block info

Example

{
    "jsonrpc": "2.0",
    "id": "00456",
    "result": {
        "pageNumber": 1,
        "pageSize": 10,
        "totalPages": 1499,
        "totalElements": 14989,
        "list": [
            {
            "blockNumber": 1,
            "rawData": "{\"number\":10416,\"hash\":\"0x3312bd6c260ba0525fdff8d...",\"timestampRaw\":\"0x6253f1e1\"}",
            "txCount": 0,
            "hash": "0xafa16572d3fc484b3a7c6e0eeb07dd7936a8d4165d64a4e1db1df8b6ec6dc5e4",
            "blockTime": "2017-04-12T23:59:06"
            },
            ...
            
        ]
    }                      
}

getBlockRecentList

Returns a list that is as recent as count from block information.

Parameters

NameTypeDescription

count

Integer

Number of recent count

Return Value

NameTypeDescription

pageNumber

Long

pageSize

Integer

totalPages

Long

totalElements

Long

list

list of block info

Example

{
    "jsonrpc": "2.0",
    "id": "00456",
    "result": {
        "pageNumber": 1,
        "pageSize": 10,
        "totalPages": 1,
        "totalElements": 10,
        "list": [
            {
            "blockNumber": 0,
            "txCount": 0,
            "rawData": "{\"number\":10416,\"hash\":\"0x3312bd6c260ba0525fdff8d...",\"timestampRaw\":\"0x6253f1e1\"}",
            "hash": "0xafa16572d3fc484b3a7c6e0eeb07dd7936a8d4165d64a4e1db1df8b6ec6dc5e4",
            "blockTime": "2017-04-12T23:59:06"
            },
            ...
            
        ]
    }                      
}

Last updated