Skip to main content

Endpoint

POST /info

Request Body

ParameterTypeDescription
type*stringMust be "blockByHash"
hash*stringBlock hash (0x-prefixed hex), e.g., "0x1234abcd..."

Response

Same format as Block by Number:
{
  "blockNumber": 12345,
  "timestamp": 1701234567890,
  "transactionCount": 15,
  "blockHash": "0x1234abcd...",
  "transactions": [...]
}

Example Request

curl -X POST https://api.notional.xyz/info \
  -H "Content-Type: application/json" \
  -d '{
    "type": "blockByHash",
    "hash": "0x1234abcd..."
  }'

Error Responses

{
  "error": "Block with hash 0x1234abcd... not found"
}
HTTP Status: 400 Bad Request

Notes

  • Block hash lookup requires scanning the chain (O(n))
  • Use block number for faster lookups when possible