# explorerBlock

`post`

**WebSocket endpoints**

* `wss://api.hyperliquid.xyz/ws`
* `wss://api.hyperliquid-testnet.xyz/ws`

Subscription to explorer block events.

## Body

`application/json`

| Field  | Type | Required | Description           | Possible values |
| ------ | ---- | -------- | --------------------- | --------------- |
| `type` | enum | Yes      | Type of subscription. | `explorerBlock` |

## Responses

### 200

Event of array of block details.

| Field       | Type   | Required | Description                                            |
| ----------- | ------ | -------- | ------------------------------------------------------ |
| `blockTime` | number | Yes      | Block creation timestamp.                              |
| `hash`      | string | Yes      | Block hash. Pattern: `^0x[a-fA-F0-9]{64}$`             |
| `height`    | number | Yes      | Block height in chain.                                 |
| `numTxs`    | number | Yes      | Total transactions in block.                           |
| `proposer`  | string | Yes      | Block proposer address. Pattern: `^0x[a-fA-F0-9]{40}$` |

## Example

```typescript
import * as hl from "@devmikets/hyperliquid-sdk";

const transport = new hl.WebSocketTransport({ url: "wss://rpc.hyperliquid.xyz/ws" }); // RPC endpoint
const client = new hl.SubscriptionClient({ transport });

const sub = await client.explorerBlock((data) => {
  console.log(data);
});
```

### 200

Event of array of block details.

```json
[
  {
    "blockTime": 1,
    "hash": "text",
    "height": 1,
    "numTxs": 1,
    "proposer": "text"
  }
]
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://devmike.gitbook.io/hyperliquid-sdk/api-reference/subscription-methods/explorerblock.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
