> ## Documentation Index
> Fetch the complete documentation index at: https://docs.uniblock.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# starknet_getEvents

> Returns all event objects matching the conditions in the specified filter.

### Parameters

<ParamField query="chainId" type="string" default="starknet-sepolia" required>
  Unique identifier for a blockchain network.
</ParamField>

<ParamField body="id" type="number" default={1} required>
  Request identifier used to match responses.
</ParamField>

<ParamField body="jsonrpc" type="string" default="2.0" required>
  JSON-RPC version.
</ParamField>

<ParamField body="method" type="string" default="starknet_getEvents" required>
  JSON-RPC method name.
</ParamField>

<ParamField body="params" type="object" default={{"filter":{"from_block":"latest","to_block":"latest","address":"0x04c0a5193d58f74fbace4b74dcf65481e734ed1714121bdc571da345540efa05","chunk_size":10}}} placeholder="{&#x22;filter&#x22;:{&#x22;from_block&#x22;:&#x22;latest&#x22;,&#x22;to_block&#x22;:&#x22;latest&#x22;,&#x22;address&#x22;:&#x22;0x04c0a5193d58f74fbace4b74dcf65481e734ed1714121bdc571da345540efa05&#x22;,&#x22;chunk_size&#x22;:10}}" required>
  Paramters for method starknet\_getEvents: \[filter].

  Parameters for <code>starknet\_getEvents</code>:

  <ul>
    <li><code>params.filter</code>: Filter conditions used to return event objects.</li>
  </ul>
</ParamField>

### Returns

<ResponseField name="result" type="object">
  Response object containing events matching the provided filter.

  <Expandable title="properties">
    <ResponseField name="continuation_token" type="string">
      Token to fetch the next page of results if more results exist.
    </ResponseField>

    <ResponseField name="events" type="array">
      Array of event objects matching the filter.

      <Expandable title="items">
        <ResponseField name="items[]" type="object">
          Event object.

          <Expandable title="properties">
            <ResponseField name="from_address" type="string">
              Contract address that emitted the event.
            </ResponseField>

            <ResponseField name="keys" type="array">
              Event keys.

              <Expandable title="items">
                <ResponseField name="items[]" type="string" />
              </Expandable>
            </ResponseField>

            <ResponseField name="data" type="array">
              Event data payload.

              <Expandable title="items">
                <ResponseField name="items[]" type="string" />
              </Expandable>
            </ResponseField>

            <ResponseField name="block_hash" type="string">
              Hash of the block where the event was emitted.
            </ResponseField>

            <ResponseField name="block_number" type="integer">
              Block number where the event was emitted.
            </ResponseField>

            <ResponseField name="transaction_hash" type="string">
              Hash of the transaction that emitted the event.
            </ResponseField>
          </Expandable>
        </ResponseField>
      </Expandable>
    </ResponseField>
  </Expandable>
</ResponseField>

<RequestExample>
  ```bash Curl theme={null}
  curl --request POST \
    --url https://api.uniblock.dev/uni/v1/json-rpc?chainId=starknet-sepolia \
    --header 'content-type: application/json' \
    --data '{
      "id": 1,
      "jsonrpc": "2.0",
      "method": "starknet_getEvents",
      "params": {
        "filter": {
          "from_block": "latest",
          "to_block": "latest",
          "address": "0x04c0a5193d58f74fbace4b74dcf65481e734ed1714121bdc571da345540efa05",
          "chunk_size": 10
        }
      }
    }'
  ```
</RequestExample>

<ResponseExample>
  ```json Success theme={null}
  {
    "jsonrpc": "2.0",
    "id": 1,
    "result": {
      "continuation_token": "637544-10",
      "events": [
        {
          "block_hash": "0x38b2028fb31299733c25f55316721a90497f3300970f4a69b8774fe4d8cb600",
          "block_number": 637544,
          "data": [
            "..."
          ],
          "from_address": "0x4c0a5193d58f74fbace4b74dcf65481e734ed1714121bdc571da345540efa05",
          "keys": [
            "..."
          ],
          "transaction_hash": "0x642fcafc5bdaa756c410cc6a968497551e86a783a5f21ea34c0f9214c2240af"
        },
        {
          "block_hash": "0x38b2028fb31299733c25f55316721a90497f3300970f4a69b8774fe4d8cb600",
          "block_number": 637544,
          "data": [
            "..."
          ],
          "from_address": "0x4c0a5193d58f74fbace4b74dcf65481e734ed1714121bdc571da345540efa05",
          "keys": [
            "..."
          ],
          "transaction_hash": "0x642fcafc5bdaa756c410cc6a968497551e86a783a5f21ea34c0f9214c2240af"
        },
        {
          "block_hash": "0x38b2028fb31299733c25f55316721a90497f3300970f4a69b8774fe4d8cb600",
          "block_number": 637544,
          "data": [
            "..."
          ],
          "from_address": "0x4c0a5193d58f74fbace4b74dcf65481e734ed1714121bdc571da345540efa05",
          "keys": [
            "..."
          ],
          "transaction_hash": "0x642fcafc5bdaa756c410cc6a968497551e86a783a5f21ea34c0f9214c2240af"
        }
      ]
    }
  }
  ```
</ResponseExample>
