HYCON
  • Docs
  • Topics api/v1
    • Introduction
    • Installation
    • Make your first call
    • API Request
    • API Response
      • HTTP success status codes
      • HTTP error status codes
  • Interacting directly with the network api/v1
    • Prerequisites
    • Address Management
      • Generating a new address
      • Generating a new HD wallet root key
    • Querying an address
      • Getting details of an address
      • Getting details of an HD wallet root key
      • Getting the balance
      • Getting a list of transactions
    • Transaction Management
      • Getting the details of a transaction
      • Creating an outgoing transaction with a private key
      • Creating an outgoing transaction with a signature
      • Creating an outgoing transaction from HD wallet root key
  • Interacting with local Hycon Node api/v1
    • Prerequisites
    • Wallet Management
      • Generating a new wallet
      • Generating a new HD wallet
      • Deleting a wallet
      • Recover a wallet
      • Recover an HD wallet
      • Getting details of a wallet
      • Getting details of an HD wallet
      • Getting a list of wallets
      • Making an outgoing transaction
    • Getting Blockchain Information
      • Getting block info at a specific height
      • Getting highest block on current chain
    • Fetching Block(s)
      • Getting the details of a block
      • Getting a list of recently published blocks
    • Fetching Peer(s)
      • Getting a list of peers
    • Miscellaneous Tools
      • Generating a new mnemonic
      • Get network market cap
      • Query if block is an uncle block
      • Amount of mining reward from block
  • Reference api/v1
    • Language Support
    • Blockchain Reorganization
  • Topics api/v3
    • Introduction
    • Installation
    • Make your first call
    • API Request
    • API Response
      • HTTP success status codes
      • HTTP error status codes
  • Address API api/v3
    • Prerequisites (/address)
    • Getting address information
      • Query method (get address)
      • URL method (get address)
      • Response (get address)
  • Block API api/v3
    • Prerequisites (/block)
    • Getting the latest block information
      • Response (latest block)
    • Getting specific block information
      • Query method (specified block)
      • URL method (specified block)
      • Response (specified block)
    • Getting mined block information
      • Query method (mined blocks)
      • URL method (mined blocks)
      • Response (mined blocks)
    • Getting tip information
      • Response (tip info)
  • Network API api/v3
    • Prerequisites (/network)
    • Getting market information
      • Response (market cap info)
    • Getting list of peers
      • Query method (peer list)
      • URL method (peer list)
      • Response (peer list)
    • Getting information of specific peer
      • Query method (specified peer)
      • URL method (specified peer)
      • Response (specified peer)
  • Transaction API api/v3
    • Prerequisites (/tx)
    • Getting specific transaction information
      • Query method (specified tx)
      • URL method (specified tx)
      • Response (specified tx)
    • Getting transactions by address
      • Query method (tx by address)
      • URL method (tx by address)
      • Response (tx by address)
    • Getting pending transactions
      • Query method (pending txs)
      • URL method (pending txs)
      • Response (pending txs)
    • Creating an outgoing transaction
      • Response (created tx)
  • Wallet API api/v3
    • Prerequisites (/wallet)
    • Getting information of wallet list
      • Query method (wallet list)
      • Response (wallet list)
    • Getting information of specific wallet
      • Query method (specified wallet)
      • URL method (specified wallet)
      • Response (specified wallet)
    • Delete Wallet
      • Query method (delete wallet)
      • URL method (delete wallet)
      • Response (delete wallet)
    • Generate random mnemonic
      • Response (random mnemonic)
    • Generate / Recover normal wallet or HD wallet with password or passphrase
      • Response (generate/recover wallet)
    • Decrypt and get an HD wallet information
      • Response (get HD wallet information)
  • Reference api/v3
    • Blockchain Reorganization
    • Language Support
Powered by GitBook
On this page

Was this helpful?

  1. Interacting with local Hycon Node api/v1
  2. Fetching Block(s)

Getting a list of recently published blocks

api/v1

Retrieve a list of ten (10) most recent blocks published on the Hycon network.

Path Parameter

Parameter

Type

Required

Description

index

number

Yes

Index value of the recent block list (0 returns the 10 most recent blocks)

Response - 200 OK, application/json

Parameter

Type

Description

hash

string

Hash representation of the transaction

difficulty

string

Mining difficulty of block

height

number

Height of the block

size

number

Size of block information, in bytes

txs

list

List of transactions in the block

timestamp

number

Timestamp when the block was added

prevBlock

string

Previous block hash

nonce

string

Value assigned by the miner that constitutes proof of work

miner

string

Wallet address of the miner

length

string

Page number of the block list, used for pagination

Response Error Table

Status

Error

Message

404

INVALID_ROUTE

resource not found

GET/api/v1/blockList/{index}

Example request

$ curl -X GET http://localhost:2442/api/v1/blockList/0 \
    -H 'Content-Type: application/json;charset=utf-8'

Response (Success)

{
    "blocks": [
        {
            "hash": "5rjhUnz94wBE4Aakq4Hb5NhSiy3XcTmvmDFdJG6dcLvW",
            "difficulty": "2.391887430150769e-9",
            "height": 348632,
            "size": 3995,
            "txs": [
                {
                    "amount": "1.128210794",
                    "hash": "3SmACLKLj9ydUQUn77r1ZVGWsUuhNeUFmMVVQ2qWBUEh",
                    "fee": "0.000001",
                    "from": "H23fF8ktBWYwK7aHFbPSW52LtoHcbDvmT",
                    "to": "H3PFczLsRMtq2pNndqD64TrWVKpAc2u6x",
                    "estimated": "1.128211794"
                },
                ...
            ],
            "timeStamp": 1542077044227,
            "prevBlock": [
                {
                    "0": 131,
                    "1": 160,
                    "2": 31,
                    "3": 182,
                    "4": 50,
                    "5": 249,
                    "6": 29,
                    "7": 80,
                    "8": 172,
                    "9": 221,
                    "10": 181,
                    "11": 17,
                    "12": 145,
                    "13": 51,
                    "14": 248,
                    "15": 108,
                    "16": 111,
                    "17": 68,
                    "18": 184,
                    "19": 238,
                    "20": 68,
                    "21": 45,
                    "22": 91,
                    "23": 222,
                    "24": 230,
                    "25": 84,
                    "26": 83,
                    "27": 121,
                    "28": 14,
                    "29": 64,
                    "30": 37,
                    "31": 168
                }
            ],
            "nonce": "000008613fffeb00",
            "miner": "H23fF8ktBWYwK7aHFbPSW52LtoHcbDvmT"
        },
        ...
    ],
    "length": 17433
}
PreviousGetting the details of a blockNextFetching Peer(s)

Last updated 3 years ago

Was this helpful?