Bware Docs
  • About Bware Labs Decentralized API
  • API Docs
    • Ethereum API
      • RPC
        • eth_getBlockByNumber method
        • eth_getBalance method
        • eth_blockNumber method
        • eth_syncing method
      • Websocket API
        • eth_syncing method
    • Binance Smart Chain API
      • RPC
        • eth_getTransactionByHash method
        • eth_getBlockByNumber method
        • eth_blockNumber method
        • eth_syncing method
        • eth_getBalance method
        • eth_accounts method
        • eth_gasPrice method
      • Websocket API
        • eth_syncing method
    • Avalanche API
      • X-Chain
      • C-Chain
      • P-Chain
      • Keystore API
      • Health API
      • Admin API
      • Info API
      • Metrics API
    • Moonbeam/Moonriver API
      • RPC
        • eth_getBlockByNumber method
        • eth_getBalance method
        • eth_blockNumber method
        • eth_syncing method
      • Websocket
    • Astar/Shiden APIs
      • RPC
        • eth_getBlockByNumber method
        • eth_getBalance method
        • eth_blockNumber method
        • eth_syncing method
      • Websocket
    • Fantom API
      • RPC
        • eth_getBlockByNumber method
        • eth_getBalance method
        • eth_blockNumber method
        • eth_syncing method
      • Websockets
        • eth_syncing method
    • Polkadot API
      • RPC
        • chain_getBlock
        • chain_getHeader
        • system_chainType
        • state_getMetadata
      • Websockets
        • system_chainType
    • Elrond API
      • REST API
        • Get Block By Hash
        • Get Shard Status
  • Tutorials
    • Using Bware Labs Platform
      • Getting a Bware Labs full endpoint
    • Using Bware Labs Endpoint in PolkadotJs
    • Using Bware Labs Endpoint in Metamask
    • Using a Bware Labs endpoint in code
Powered by GitBook
On this page
  • Parameters
  • Returns
  • Example

Was this helpful?

  1. API Docs
  2. Elrond API
  3. REST API

Get Block By Hash

Query a shard block by hash

Parameters

  1. Shard (required)

  2. Hash (required)

Returns

Data about the specified block as seen below

Example

// Request
curl -H "Content-Type: application/json"  https://elrond-mainnet-api.bwarelabs.com/<your_endpoint_id>/block/0/by-hash/932dda4cbe97e76450d065b127d97d0bfdd7d55978dd3d18f1aaa18731e1015f

// Response
{
   "data":{
      "block":{
         "nonce":7615379,
         "round":7616541,
         "hash":"932dda4cbe97e76450d065b127d97d0bfdd7d55978dd3d18f1aaa18731e1015f",
         "prevBlockHash":"ebb0f08cbd8960d35ddb995a24bbdb3631714034094de92ce71553408e766b2b",
         "epoch":528,
         "shard":0,
         "numTxs":10,
         "miniBlocks":[
            {
               "hash":"8896b035f94764815e4542705ad77879a8b499bfb7f7d64799da5bb74dc9d32e",
               "type":"SmartContractResultBlock",
               "sourceShard":1,
               "destinationShard":0
            },
            {
               "hash":"c15c0a83b0c29efb82bfa8467fa09463594cad4576d532694aa15d9b746a874a",
               "type":"TxBlock",
               "sourceShard":0,
               "destinationShard":0
            },
            {
               "hash":"931770307c3bb46bbb66cbd259a9a57a1f37b8dd53044dcdf57fc7ede94e1f40",
               "type":"TxBlock",
               "sourceShard":0,
               "destinationShard":4294967295
            },
            {
               "hash":"8db75401bf30dfee308084850ba288b27b01b74d27aad85029858d1aafa9c4a4",
               "type":"SmartContractResultBlock",
               "sourceShard":0,
               "destinationShard":1
            }
         ],
         "timestamp":1641816846,
         "accumulatedFees":"422000000000000",
         "developerFees":"600000000000",
         "status":"on-chain"
      }
   },
   "error":"",
   "code":"successful"
}
PreviousREST APINextGet Shard Status

Last updated 3 years ago

Was this helpful?