List Transactions by Block Height

This endpoint will list transactions by an attribute blockHeight. The transactions listed will detail additional information such as hash, addresses, time of creation in Unix timestamp, etc.

GET /blockchain-data/{blockchain}/{network}/blocks/height/{height}/transactions

Path Parameters

  • Required
    blockchain string

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

    Example : bitcoin
    Possible Values : bitcoin ethereum dash dogecoin litecoin bitcoin-cash ethereum-classic
  • 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", "rinkeby" are test networks.

    Example : testnet
    Possible Values : mainnet testnet ropsten rinkeby mordor
  • 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 : 673852

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.

  • Optional
    limit integer

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

    Default : 50
    Example : 50
  • Optional
    offset integer

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

    Default : 0
    Example : 10

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
        index integer

        Represents the index position of the transaction in the specific block.

        Example : 2
      • Required
        minedInBlockHash string

        Represents the hash of the block where this transaction was mined/confirmed for first time. The hash is defined as a cryptographic digital fingerprint made by hashing the block header twice through the SHA256 algorithm.

        Example : 00000000407f119ecb74b44229228910400aaeb9f4e3b9869955b85a53e9b7db
      • Required
        minedInBlockHeight integer

        Represents the hight of the block where this transaction was mined/confirmed for first time. The height is defined as the number of blocks in the blockchain preceding this specific block.

        Example : 1939750
      • Required
        recipients array

        Represents a list of recipient addresses with the respective amounts. In account-based protocols like Ethereum there is only one address in this list.

        • Required
          address string

          The address which receives this transaction. In UTXO-based protocols like Bitcoin there could be several senders while in account-based protocols like Ethereum there is always only one recipient.

          Example : 2MzakdGTEp8SMWEHKwKM4HYv6uNCBXtHpkV
        • Required
          amount string

          Represents the amount received to this address.

          Example : 0.000144
      • Required
        senders array

        Represents a list of sender addresses with the respective amounts. In account-based protocols like Ethereum there is only one address in this list.

        • Required
          address string

          Represents the address which sends this transaction. In UTXO-based protocols like Bitcoin there could be several senders while in account-based protocols like Ethereum there is always only one sender.

          Example : 2N5PcdirZUzKF9bWuGdugNuzcQrCbBudxv1
        • Required
          amount string

          Represents the total amount sent by this address including the fee.

          Example : 0.00873472
      • Required
        timestamp integer

        Defines the exact date/time in Unix Timestamp when this transaction was mined, confirmed or first seen in Mempool, if it is unconfirmed.

        Example : 1582202940
      • Required
        transactionHash string

        Represents the same as transactionId for account-based protocols like Ethereum, while it could be different in UTXO-based protocols like Bitcoin. E.g., in UTXO-based protocols hash is different from transactionId for SegWit transactions.

        Example : 1ec73b0f61359927d02376b35993b756b1097cb9a857bec23da4c98c4977d2b2
      • Required
        transactionId string

        Represents the unique identifier of a transaction, i.e. it could be transactionId in UTXO-based protocols like Bitcoin, and transaction hash in Ethereum blockchain.

        Example : 4b66461bf88b61e1e4326356534c135129defb504c7acb2fd6c92697d79eb250
      • Required
        fee object
        • Required
          amount string

          Defines the amount of the fee.

          Example : 0.00016932
        • Required
          unit string

          Defines the unit of the fee amount, e.g. BTC, ETH, XRP.

          Example : BTC
      • Required
        blockchainSpecific object One Of
        object
        • Required
          locktime integer

          Represents the time at which a particular transaction can be added to the blockchain.

          Example : 1781965
        • Required
          size integer

          Represents the total size of this transaction.

          Example : 248
        • Required
          vSize integer

          Represents the virtual size of this transaction.

          Example : 166
        • Required
          version integer

          Represents the transaction version number.

          Example : 1
        • Required
          vin array

          Represents the transaction inputs.

          • Required
            addresses array
          • Required
            coinbase string

            Represents the coinbase hex.

            Example : 0399991d20706f6f6c2e656e6a6f79626f646965732e636f6d20393963336532346234374747a53e994c4a000001
          • Required
            scriptSig object

            Specifies the required signatures.

            • Required
              asm string

              The asm strands for assembly, which is the symbolic representation of the Bitcoin's Script language op-codes.

              Example : 0014daaf6d5cb86befe42df851a4d1df052e663754c1
            • Required
              hex string

              Represents the hex of the public key of the address.

              Example : 160014daaf6d5cb86befe42df851a4d1df052e663754c1
            • Required
              type string

              Represents the script type of the reference transaction identifier.

              Example : scripthash
          • Required
            sequence string

            Represents the script sequence number.

            Example : 4294967295
          • Required
            txid string

            Represents the reference transaction identifier.

            Example : caee978cae255bbe303ac86152679e46113a8b12925aa3afaa312d89d11ccbf8
          • Required
            txinwitness array
          • Required
            value string

            Represents the sent/received amount.

            Example : 0.00873472
          • Required
            vout integer

            It refers to the index of the output address of this transaction. The index starts from 0.

            Example : 1
        • Required
          vout array

          Represents the transaction outputs.

          • Required
            isSpent boolean

            Defines whether the output is spent or not.

            Example : True
          • Required
            scriptPubKey object

            Represents the script public key.

            • Required
              addresses array
            • Required
              asm string

              Represents the assembly of the script public key of the address.

              Example : OP_HASH160 507a5bd8cac1d9efdf4c0a4bfacb3e0abb4f8d15 OP_EQUAL
            • Required
              hex string

              Represents the hex of the script public key of the address.

              Example : a914507a5bd8cac1d9efdf4c0a4bfacb3e0abb4f8d1587
            • Required
              reqSigs integer

              Represents the required signatures.

              Example : 2
            • Required
              type string

              Represents the script type.

              Example : scripthash
          • Required
            value string

            Represents the sent/received amount.

            Example : 0.000144
Try it out

Request Example

GET
https://rest.cryptoapis.io/v2/blockchain-data/bitcoin/testnet/blocks/height/673852/transactions?limit=50&offset=10
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": [
            {
                "index": 2,
                "minedInBlockHash": "00000000407f119ecb74b44229228910400aaeb9f4e3b9869955b85a53e9b7db",
                "minedInBlockHeight": 1939750,
                "recipients": [
                    {
                        "address": "2MzakdGTEp8SMWEHKwKM4HYv6uNCBXtHpkV",
                        "amount": "0.000144"
                    }
                ],
                "senders": [
                    {
                        "address": "2N5PcdirZUzKF9bWuGdugNuzcQrCbBudxv1",
                        "amount": "0.00873472"
                    }
                ],
                "timestamp": 1582202940,
                "transactionHash": "1ec73b0f61359927d02376b35993b756b1097cb9a857bec23da4c98c4977d2b2",
                "transactionId": "4b66461bf88b61e1e4326356534c135129defb504c7acb2fd6c92697d79eb250",
                "fee": {
                    "amount": "0.00016932",
                    "unit": "BTC"
                },
                "blockchainSpecific": {
                    "locktime": 1781965,
                    "size": 248,
                    "vSize": 166,
                    "version": 1,
                    "vin": [
                        {
                            "addresses": {
                                "0": "2N5PcdirZUzKF9bWuGdugNuzcQrCbBudxv1"
                            },
                            "coinbase": "0399991d20706f6f6c2e656e6a6f79626f646965732e636f6d20393963336532346234374747a53e994c4a000001",
                            "scriptSig": {
                                "asm": "0014daaf6d5cb86befe42df851a4d1df052e663754c1",
                                "hex": "160014daaf6d5cb86befe42df851a4d1df052e663754c1",
                                "type": "scripthash"
                            },
                            "sequence": "4294967295",
                            "txid": "caee978cae255bbe303ac86152679e46113a8b12925aa3afaa312d89d11ccbf8",
                            "txinwitness": {
                                "0": "\"3045022100c11ea5740bcd69f0f68a4914279838014d28923134d18e05c5a5486dfd06cc8c02200dadccec3f07bed0d1040f9e5a155efa5fdd40fc91f92342578d26848da4c6b901\", \"0287e995526aa6ccb96141bb598fc7f73323279e026c55039d15f0cfbda5dea841\""
                            },
                            "value": "0.00873472",
                            "vout": 1
                        }
                    ],
                    "vout": [
                        {
                            "isSpent": true,
                            "scriptPubKey": {
                                "addresses": [
                                    "2N5PcdirZUzKF9bWuGdugNuzcQrCbBudxv1"
                                ],
                                "asm": "OP_HASH160 507a5bd8cac1d9efdf4c0a4bfacb3e0abb4f8d15 OP_EQUAL",
                                "hex": "a914507a5bd8cac1d9efdf4c0a4bfacb3e0abb4f8d1587",
                                "reqSigs": 2,
                                "type": "scripthash"
                            },
                            "value": "0.000144"
                        }
                    ]
                }
            }
        ]
    }
}