Skip to content

Node API

Node provides REST API to access the current blockchain status.

Get the events generated by program

You can get the generated events by name and the address of the program where they were generated.

Request

GET api/events

Parameters

Parameter Optional Type
program No hex
name No string
transactionId Yes hex
offset Yes integer
count Yes integer

Response

The list of data from events with given name at the given address:

[
    {
        "data": "<some data from the first event>",
        "transactionId": 0000000,
        "offset": 0
    },
    {
        "data": "<some data from the second event>",
        "transactionId": 1111111,
        "offset": 1
    }
    ...
]

Examples

curl <api url>/api/events?address=e1941077e00b3cf81a8275788334292d9b2e2f0002bd622444cb37fa5e4d08a0&name=myevent

will return all events for give address and name

curl <api url>/api/events?address=e1941077e00b3cf81a8275788334292d9b2e2f0002bd622444cb37fa5e4d08a0&name=myevent&offset=10

will return all events starting from offset 10

curl <api url>/api/events?address=e1941077e00b3cf81a8275788334292d9b2e2f0002bd622444cb37fa5e4d08a0&name=myevent&offset=10&count=20

will return only first 20 events from offset 10