Block

Get a block

post

Fetches a block by index or hash on the ICRC-1 ledger.

Body
Responses
200
Block response
application/json
post
POST /v1/<YOUR_API_KEY_HERE>/block HTTP/1.1
Host: icrc-mainnet.icp.validationcloud.io
Content-Type: application/json
Accept: */*
Content-Length: 239

{
  "network_identifier": {
    "blockchain": "Internet Computer",
    "network": "mxzaz-hqaaa-aaaar-qaada-cai",
    "sub_network_identifier": {
      "network": "text",
      "metadata": {
        "ANY_ADDITIONAL_PROPERTY": "anything"
      }
    }
  },
  "block_identifier": {
    "index": null,
    "hash": "text"
  }
}
{
  "block": {
    "block_identifier": {
      "index": 1,
      "hash": "text"
    },
    "parent_block_identifier": {
      "index": 1,
      "hash": "text"
    },
    "timestamp": 1,
    "transactions": [
      {
        "transaction_identifier": {
          "hash": null
        },
        "operations": [
          {
            "operation_identifier": {
              "index": 1,
              "network_index": 1
            },
            "related_operations": [
              {
                "index": 1,
                "network_index": 1
              }
            ],
            "type": "text",
            "status": "text",
            "account": {
              "address": "text",
              "sub_account": {
                "address": "text",
                "metadata": {
                  "ANY_ADDITIONAL_PROPERTY": "anything"
                }
              },
              "metadata": {
                "ANY_ADDITIONAL_PROPERTY": "anything"
              }
            },
            "amount": {
              "value": "text",
              "currency": {
                "symbol": "text",
                "decimals": 1,
                "metadata": {
                  "ANY_ADDITIONAL_PROPERTY": "anything"
                }
              },
              "metadata": {
                "ANY_ADDITIONAL_PROPERTY": "anything"
              }
            },
            "metadata": {
              "ANY_ADDITIONAL_PROPERTY": "anything"
            }
          }
        ],
        "metadata": {
          "ANY_ADDITIONAL_PROPERTY": "anything"
        }
      }
    ],
    "metadata": {
      "ANY_ADDITIONAL_PROPERTY": "anything"
    }
  },
  "other_transactions": [
    {
      "hash": null
    }
  ]
}

Was this helpful?