# stakingEvents

### Overview

Returns historical staking events from ClickHouse. Supports filtering by user, validator, event type, and time range.

### Request

* **Endpoint**: `POST /info`

```json
{
  "type": "stakingEvents",
  "user": "0xabc123...",
  "validator": "0x000000000056f99d36b6f2e0c51fd41496bbacb8",
  "eventType": "delegate",
  "startTime": 1694764800000,
  "endTime": 1694851200000,
  "limit": 500
}
```

| Parameter   | Type   | Required | Description                                          |
| ----------- | ------ | -------- | ---------------------------------------------------- |
| `user`      | string | No       | Filter by user address                               |
| `validator` | string | No       | Filter by validator address                          |
| `eventType` | string | No       | Filter by event type (e.g. `delegate`, `undelegate`) |
| `startTime` | number | No       | Start time in milliseconds                           |
| `endTime`   | number | No       | End time in milliseconds                             |
| `limit`     | number | No       | Max results (default 500, max 2000)                  |

### Response

```json
[
  {
    "time": 1694764800000,
    "hash": "0xabc123...",
    "eventType": "delegate",
    "txIndex": 0,
    "user": "0xabc123...",
    "validator": "0x000000000056f99d36b6f2e0c51fd41496bbacb8",
    "amount": "1000.0",
    "currency": "HYPE",
    "isFinalized": true,
    "isUndelegate": false
  }
]
```

### Response Fields

| Field          | Type           | Description                           |
| -------------- | -------------- | ------------------------------------- |
| `time`         | number         | Event timestamp in milliseconds       |
| `hash`         | string         | Transaction hash                      |
| `eventType`    | string         | Type of staking event                 |
| `txIndex`      | number         | Transaction index within block        |
| `user`         | string         | User address                          |
| `validator`    | string         | Validator address                     |
| `amount`       | string \| null | HYPE amount (decimal string)          |
| `currency`     | string         | Currency (always `HYPE`)              |
| `isFinalized`  | boolean        | Whether the event is finalized        |
| `isUndelegate` | boolean        | Whether this is an undelegation event |


---

# 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://docs.hydromancer.xyz/readme/rest-api/staking/stakingevents.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.
