Skip to main content

Endpoint

POST /info

Request Body

ParameterTypeDescription
type*stringMust be "blockByNumber"
blockNumber*numberBlock number to retrieve, e.g., 12345

Response

{
  "blockNumber": 12345,
  "timestamp": 1701234567890,
  "parentHash": "0x5678efgh...",
  "blockHash": "0x1234abcd...",
  "transactions": [
    {
      "transactionId": "0x...",
      "type": "OrderPlaced",
      "timestamp": 1701234567890,
      "blockNumber": 12345,
      "txIndex": 0,
      "orderId": "0x...",
      "data": {}
    }
  ]
}

Response Fields

FieldTypeDescription
blockNumbernumberBlock number
timestampnumberBlock timestamp (ms)
parentHashstringParent block hash
blockHashstringBlock hash
transactionsarrayOrdered transactions for the block
transactions[].transactionIdstringTransaction hash
transactions[].typestringTransaction type (event type)
transactions[].timestampnumberTransaction timestamp
transactions[].blockNumbernumberBlock number
transactions[].txIndexnumberTransaction index within the block
transactions[].orderIdstringRelated order ID (if applicable)
transactions[].dataobjectJSON-safe transaction payload

Example Request

curl -X POST https://api.notional.xyz/info \
  -H "Content-Type: application/json" \
  -d '{
    "type": "blockByNumber",
    "blockNumber": 12345
  }'

Error Responses

{
  "error": "Block 12345 not found"
}
HTTP Status: 400 Bad Request

Notes

  • Block numbers start at 1 (no block 0) - Transactions are ordered by position in the block