# Events

Events Api

## Get events by type (v1)

> Get events by type.

```json
{"openapi":"3.1.0","info":{"title":"Supra RPC Node","version":"59f32573d4ca6e9e0f8e04896600ea56ff9fd0bc"},"tags":[{"name":"Events","description":"Events Api"}],"servers":[{"url":"https://rpc-testnet.supra.com","description":"RPC For Supra Scan and Faucet"},{"url":"https://rpc-wallet-testnet.supra.com","description":"RPC For Wallet"},{"url":"https://rpc-suprascan-testnet.supra.com","description":"RPC For Suprascan"},{"url":"https://rpc-archive-testnet.supra.com","description":"RPC For Suprascan"},{"url":"https://rpc-suprascan-reprocessing-testnet.supra.com","description":"RPC For Suprascan"},{"url":"https://rpc-testnet1.supra.com","description":"RPC For nodeops group1"},{"url":"http://localhost:27000","description":"LocalNet"}],"paths":{"/rpc/v1/events/{event_type}":{"get":{"tags":["Events"],"summary":"Get events by type (v1)","description":"Get events by type.","operationId":"events_by_type","parameters":[{"name":"start","in":"query","description":"Starting block height (inclusive).","required":true,"schema":{"type":"integer","format":"u-int64","minimum":0},"style":"form"},{"name":"end","in":"query","description":"Ending block height (exclusive). The max range is 10 blocks, a.k.a. end - start <= 10.","required":true,"schema":{"type":"integer","format":"u-int64","minimum":0},"style":"form"},{"name":"event_type","in":"path","description":"Canonical string representation of event type. E.g. 0000000000000000000000000000000a::module_name::type_name","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"List of Events contained in blocks","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Events"}}}}}}}},"components":{"schemas":{"Events":{"type":"object","required":["data"],"properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Event"}}}},"Event":{"type":"object","description":"On-chain event.","required":["guid","sequence_number","type","data"],"properties":{"guid":{"type":"string","description":"The globally unique identifier of this event stream."},"sequence_number":{"type":"integer","format":"u-int64","minimum":0},"type":{"type":"string","description":"The `MoveType` of the event"},"data":{"description":"The JSON representation of the event"}}}}}}
```

## Get events by type (v3)

> Get events by type.

```json
{"openapi":"3.1.0","info":{"title":"Supra RPC Node","version":"59f32573d4ca6e9e0f8e04896600ea56ff9fd0bc"},"tags":[{"name":"Events","description":"Events Api"}],"servers":[{"url":"https://rpc-testnet.supra.com","description":"RPC For Supra Scan and Faucet"},{"url":"https://rpc-wallet-testnet.supra.com","description":"RPC For Wallet"},{"url":"https://rpc-suprascan-testnet.supra.com","description":"RPC For Suprascan"},{"url":"https://rpc-archive-testnet.supra.com","description":"RPC For Suprascan"},{"url":"https://rpc-suprascan-reprocessing-testnet.supra.com","description":"RPC For Suprascan"},{"url":"https://rpc-testnet1.supra.com","description":"RPC For nodeops group1"},{"url":"http://localhost:27000","description":"LocalNet"}],"paths":{"/rpc/v3/events/{event_type}":{"get":{"tags":["Events"],"summary":"Get events by type (v3)","description":"Get events by type.","operationId":"events_by_type_v3","parameters":[{"name":"start_height","in":"query","description":"Starting block height (inclusive). Optional.","required":false,"schema":{"type":"integer","format":"u-int64","minimum":0},"style":"form"},{"name":"end_height","in":"query","description":"Ending block height (exclusive). Optional.","required":false,"schema":{"type":"integer","format":"u-int64","minimum":0},"style":"form"},{"name":"limit","in":"query","description":"Maximum number of events to return. Defaults to 20, max 100.","required":false,"schema":{"type":"integer","minimum":0},"style":"form"},{"name":"start","in":"query","description":"The cursor to start the query from. Optional.\n\nDuring a paginated query, the cursor returned in the `X_SUPRA_CURSOR` response header\nshould be specified as the `start` parameter of the request for the next page.","required":false,"schema":{"type":"string"},"style":"form"},{"name":"event_type","in":"path","description":"The fully qualified name of the event struct, i.e.: `contract_address::module_name::event_struct_name`. E.g. `0x1::coin::CoinDeposit`","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"List of Events contained in blocks","headers":{},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EventsV3"}}}},"410":{"description":"All data in the requested range has been pruned and is no longer available.","headers":{},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrResp"}}}}}}}},"components":{"schemas":{"EventsV3":{"type":"object","description":"Events structure for v3 API","required":["data"],"properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/EventWithContext"}}}},"EventWithContext":{"type":"object","description":"Event wrapper with block height and transaction hash","required":["event","block_height","transaction_hash"],"properties":{"event":{"$ref":"#/components/schemas/Event"},"block_height":{"type":"integer","format":"u-int64","description":"The height of the block where the event was emitted","minimum":0},"transaction_hash":{"$ref":"#/components/schemas/Hash"}}},"Event":{"type":"object","description":"On-chain event.","required":["guid","sequence_number","type","data"],"properties":{"guid":{"type":"string","description":"The globally unique identifier of this event stream."},"sequence_number":{"type":"integer","format":"u-int64","minimum":0},"type":{"type":"string","description":"The `MoveType` of the event"},"data":{"description":"The JSON representation of the event"}}},"Hash":{"type":"string","description":"Hex encoded hash"},"ErrResp":{"type":"object","required":["message"],"properties":{"message":{"type":"string"}}}}}}
```


---

# 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://supraoracles.gitbook.io/supra/network/move/rest-api/testnet/events.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.
