List Latest Mined Blocks

Through this endpoint customers can list up to 50 from the latest blocks that were mined.

List of Results - This endpoint returns multiple objects which means pagination is applicable. GET /blockchain-data/{blockchain}/{network}/blocks/last/{count}

Path Parameters

  • Required
    network string

    Represents the name of the blockchain network used; blockchain networks are usually identical as technology and software, but they differ in data, e.g. - "mainnet" is the live network with actual data while networks like "testnet", "ropsten" are test networks

    Example : ropsten
    Possible Values : testnet mordor mainnet ropsten
  • Required
    blockchain string

    Represents the specific blockchain protocol name, e.g. Ethereum, Bitcoin, etc.

    Example : ethereum
    Possible Values : bitcoin bitcoin-cash ethereum-classic ethereum litecoin dash dogecoin binance-smart-chain zilliqa zcash xrp
  • Required
    count integer

    Specifies how many records were requested.

    Example : 2

Query parameters

  • Optional
    context string

    In batch situations the user can use the context to correlate responses with requests. This property is present regardless of whether the response was successful or returned as an error. context is specified by the user.

Response schema

200 400 401 402 403 404 409 415 422 429 500
HTTP Status Code: 200
Content-Type: application/json

The request has been successful.

  • Object :

  • Required
    apiVersion string

    Specifies the version of the API that incorporates this endpoint.

    Example : 2.0
  • Required
    requestId string

    Defines the ID of the request. The requestId is generated by Crypto APIs and it's unique for every request.

    Example : 601c1710034ed6d407996b30
  • Optional
    context string

    In batch situations the user can use the context to correlate responses with requests. This property is present regardless of whether the response was successful or returned as an error. context is specified by the user.

    Example : You can add any text here
  • Required
    data object
    • Required
      offset integer

      The starting index of the response items, i.e. where the response should start listing the returned items.

      Example : 0
    • Required
      limit integer

      Defines how many items should be returned in the response per page basis.

      Example : 50
    • Required
      total integer

      Defines the total number of items returned in the response.

      Example : 100
    • Required
      items array
      Example : Array ( )
      • Required
        hash string

        Represents the hash of the block, which is its unique identifier. It represents a cryptographic digital fingerprint made by hashing the block header twice through the SHA256 algorithm.

        Example : 000000000000000426bd189cdfaab96a94d72089dda11cf110bd2a87116174a9
      • Required
        height integer

        Represents the number of blocks in the blockchain preceding this specific block. Block numbers have no gaps. A blockchain usually starts with block 0 called the "Genesis block".

        Example : 2099743
      • Required
        previousBlockHash string

        Represents the hash of the previous block, also known as the parent block.

        Example : 000000000000001e592591fc762bd2bf4d37d0b75e29c49b41576507a501cbc3
      • Required
        timestamp integer

        Defines the exact date/time when this block was mined in Unix Timestamp.

        Example : 1634642334
      • Required
        transactionsCount integer

        Represents the total number of all transactions as part of this block.

        Example : 3
      • Required
        totalCoins object
        • Required
          amount string

          Defines the amount of all coins.

          Example : 22.0012
        • Required
          unit string

          Defines the unit of the amount of all coins.

          Example : ETH
      • Required
        totalFees object
        • Required
          amount string

          Defines the amount of all fees.

          Example : 0.00001
        • Required
          unit string

          Defines the unit of the amount of all fees.

          Example : ETH
      • Required
        blockchainSpecific object One Of
        object
        • Required
          bits string

          A sub-unit of BCH equal to 0.000001 BCH, or 100 Satoshi, and is the same as microbitcoincash (μBCH). Bits have two-decimal precision.

          Example : 423838743
        • Required
          chainwork string

          Represents a hexadecimal number of all the hashes necessary to produce the current chain. E.g., when converting 0000000000000000000000000000000000000000000086859f7a841475b236fd to a decimal you get 635262017308958427068157 hashes, or 635262 exahashes.

          Example : 0000000000000000000000000000000000000000000005c9475aae89058a50a6
        • Required
          merkleRoot string

          Defines the single and final (root) node of a Merkle tree. It is the combined hash of all transactions' hashes that are part of a blockchain block.

          Example : d3a49e75a5c53ef277bfe0f6474c8ff35c9d3d8f9f9e65a1d3bf45ecff601c82
        • Required
          strippedSize integer

          Defines the numeric representation of the block size excluding the witness data.

          Example : 502
        • Required
          version integer

          Represents the version of the specific block on the blockchain.

          Example : 536870916
        • Required
          versionHex string

          Is the hexadecimal string representation of the block's version.

          Example : 20000004
        • Required
          weight integer

          Represents a measurement to compare the size of different transactions to each other in proportion to the block size limit.

          Example : 2263

Credits Cost : 10 Credits For 1 Result(s)

Try it out

Request Example

GET
https://rest.cryptoapis.io/v2/blockchain-data/ethereum/ropsten/blocks/last/2
Headers
Host: https://rest.cryptoapis.io/v2
Content-Type: application/json
X-API-Key: my-api-key

Response Example

{
    "apiVersion": "2.0",
    "requestId": "601c1710034ed6d407996b30",
    "context": "You can add any text here",
    "data": {
        "offset": 0,
        "limit": 50,
        "total": 100,
        "items": [
            {
                "hash": "000000000000000426bd189cdfaab96a94d72089dda11cf110bd2a87116174a9",
                "height": 2099743,
                "previousBlockHash": "000000000000001e592591fc762bd2bf4d37d0b75e29c49b41576507a501cbc3",
                "timestamp": 1634642334,
                "transactionsCount": 3,
                "totalCoins": {
                    "amount": "22.0012",
                    "unit": "ETH"
                },
                "totalFees": {
                    "amount": "0.00001",
                    "unit": "ETH"
                },
                "blockchainSpecific": {
                    "bits": "423838743",
                    "chainwork": "0000000000000000000000000000000000000000000005c9475aae89058a50a6",
                    "merkleRoot": "d3a49e75a5c53ef277bfe0f6474c8ff35c9d3d8f9f9e65a1d3bf45ecff601c82",
                    "strippedSize": 502,
                    "version": 536870916,
                    "versionHex": "20000004",
                    "weight": 2263
                }
            }
        ]
    }
}