LogoLogo
CSPR.build Portal
1.1.x
1.1.x
  • Documentation
    • Introduction
    • Overview
      • Authorization
      • Rate limits and quotas
      • Pagination
      • Sorting
      • Filtering
      • Optional properties
      • Errors
    • Getting started
    • Highlights
      • Including related entities
      • Including CSPR rates
      • Including account info
      • Accessing auction data
      • Accessing token data
      • Accessing NFT data
      • De-anonymizing account hashes
      • De-anonymizing account purses
      • Receiving contract-level events
    • Changelog
  • REST API
    • Reference
    • Account
      • Get account
      • Get accounts
    • Account Info
      • Get account info
      • Get account infos
    • Auction metrics
      • Get auction metrics
    • Awaiting deploy
      • Create Awaiting Deploy
      • Add Awaiting Deploy signatures
      • Get Awaiting Deploy
    • Block
      • Get block
      • Get blocks
      • Get validator blocks
    • Bidder
      • Get bidder
      • Get bidders
    • Contract
      • Get contract
      • Get contracts
      • Get contracts by contract package
      • Get contract types
    • Contract entry point
      • Get contract entry points
      • Get contract entry point costs
    • Contract package
      • Get contract package
      • Get contract packages
      • Get account contract packages
    • Delegation
      • Get account delegations
      • Get validator delegations
    • Delegator reward
      • Get account delegator rewards
      • Get total validator delegators' rewards
    • Deploy
      • Get deploy
      • Get deploys
      • Get account deploys
      • Get block deploys
      • Get deploy execution types
    • Fungible token action
      • Get fungible token actions
      • Get fungible token action types
      • Get account fungible token actions
      • Get contract package fungible token actions
    • Fungible token ownership
      • Get account fungible token ownership
      • Get contract package fungible token ownership
    • Non-fungible token (NFT)
      • Get NFT
      • Get account NFTs
      • Get contract package NFTs
      • Get NFT standards
      • Get off-chain NFT metadata statuses
    • Non-fungible token (NFT) action
      • Get contract package NFT actions for a token
      • Get account NFT actions
      • Get contract package NFT actions
      • Get NFT action types
    • Non-fungible token (NFT) ownership
      • Get contract package NFT ownership
      • Get account NFT ownership
    • CSPR rate
      • Get the current currency rate
      • Get historical currency rates
      • Get currencies
    • CSPR supply
      • Get supply
    • Transfer
      • Get account transfers
      • Get deploy transfers
    • Validator
      • Get validator
      • Get validators
    • Validator performance
      • Get historical validator performance
      • Get historical average validator performance
      • Get historical average validators performance
    • Validator reward
      • Get validator rewards
      • Get validator total rewards
  • Streaming API
    • Reference
    • Account balance
    • Block
    • Contract
    • Contract package
    • Contract-level events
    • Deploy
    • Fungible token action
    • Non-fungible token (NFT)
    • Non-fungible token (NFT) action
    • Transfer
  • Casper Node API
    • Connecting with an SDK
Powered by GitBook
On this page
  • Query params
  • Sorting
  • Optional properties
  • Response
  • Example
  1. REST API
  2. Block

Get blocks

PreviousGet blockNextGet validator blocks

Last updated 11 months ago

Get paginated list of blocks

GET /blocks

Query params

Query param
Description

proposer_public_key

Proposer public key

Sorting

Property
Description

block_height

Sort blocks by block height

timestamp

Sort blocks by timestamp

Default sorting is block_height DESC

Optional properties

Property
Type
Description

proposer_account_info

JSON

Account info of proposer public key

Response

Example

curl -X 'GET' \
  'https://api.testnet.cspr.cloud/blocks' \
  -H 'accept: application/json' \
  -H 'authorization: 55f79117-fc4d-4d60-9956-65423f39a06a'
{
  "data": [
    {
      "block_height": 2293939,
      "block_hash": "bd1601111651cd2668b92235f6f1f1c55cf7becd0e89712fd4d78b5f4b47e203",
      "parent_block_hash": "decfdc241b04e38b9aa37aaad40f46d67c34e311fd4aa84c7af4544ca6674130",
      "state_root_hash": "89e786fd598f9f2f84955daaacc1573a1414fdf8dfa8c93e116ff70402c0bbfb",
      "era_id": 11750,
      "proposer_public_key": "020377bc3ad54b5505971e001044ea822a3f6f307f8dc93fa45a05b7463c0a053bed",
      "native_transfers_number": 0,
      "contract_calls_number": 0,
      "is_switch_block": false,
      "timestamp": "2023-12-18T13:34:55Z"
    },
    {
      "block_height": 2293938,
      "block_hash": "decfdc241b04e38b9aa37aaad40f46d67c34e311fd4aa84c7af4544ca6674130",
      "parent_block_hash": "64d65dc99dc327105db9137c76c49c840efc950a6bb58e88779177b08481e8c1",
      "state_root_hash": "89e786fd598f9f2f84955daaacc1573a1414fdf8dfa8c93e116ff70402c0bbfb",
      "era_id": 11750,
      "proposer_public_key": "01f340df2c32f25391e8f7924a99e93cab3a6f230ff7af1cacbfc070772cbebd94",
      "native_transfers_number": 0,
      "contract_calls_number": 0,
      "is_switch_block": false,
      "timestamp": "2023-12-18T13:34:22Z"
    },
    ...
    {
      "block_height": 2293930,
      "block_hash": "865b9b0a2bd58eee789a4dfbd48d0139b6b6b62d1e61862d8669acab7508b883",
      "parent_block_hash": "1b50cacc006c50b79c2b097c41ae9bb8c919ebbf709433c05d7cac78fb0196a5",
      "state_root_hash": "f842549d60720f646b5b6b3f27d74745f2a35da8d5444e32eb35ef585322cd25",
      "era_id": 11750,
      "proposer_public_key": "01c9d4ecac1606970fa3c8fa8079aa1c04fd5371d55adf96fc6d3952fc27e8bc04",
      "native_transfers_number": 0,
      "contract_calls_number": 0,
      "is_switch_block": false,
      "timestamp": "2023-12-18T13:30:00Z"
    }
  ],
  "item_count": 2293940,
  "page_count": 229394
}
PaginatedResponse
<Block>