Events

Events Api

Get events by type (v1)

get

Get events by type.

Path parameters
event_typestringRequired

Canonical string representation of event type. E.g. 0000000000000000000000000000000a::module_name::type_name

Query parameters
startinteger · u-int64Required

Starting block height (inclusive).

endinteger · u-int64Required

Ending block height (exclusive). The max range is 10 blocks, a.k.a. end - start <= 10.

Responses
200
List of Events contained in blocks
application/json
get
GET /rpc/v1/events/{event_type} HTTP/1.1
Host: rpc-mainnet.supra.com
Accept: */*
200

List of Events contained in blocks

{
  "data": [
    {
      "guid": "text",
      "sequence_number": 1,
      "type": "text",
      "data": null
    }
  ]
}

Get events by type (v3)

get

Get events by type.

Path parameters
event_typestringRequired

The fully qualified name of the event struct, i.e.: contract_address::module_name::event_struct_name. E.g. 0x1::coin::CoinDeposit

Query parameters
start_heightinteger · u-int64Optional

Starting block height (inclusive). Optional.

end_heightinteger · u-int64Optional

Ending block height (exclusive). Optional.

limitintegerOptional

Maximum number of events to return. Defaults to 20, max 100.

startstringOptional

The cursor to start the query from. Optional.

During a paginated query, the cursor returned in the X_SUPRA_CURSOR response header should be specified as the start parameter of the request for the next page.

Responses
200
List of Events contained in blocks
application/json
get
GET /rpc/v3/events/{event_type} HTTP/1.1
Host: rpc-mainnet.supra.com
Accept: */*
200

List of Events contained in blocks

{
  "data": [
    {
      "event": {
        "guid": "text",
        "sequence_number": 1,
        "type": "text",
        "data": null
      },
      "block_height": 1,
      "transaction_hash": "text"
    }
  ]
}