Sei

Sei Events API

Event subscription APIs

Operations 4

GET /events Fetch events posted by the consensus node #
GET /subscribe Subscribe for events via WebSocket #
GET /unsubscribe Unsubscribe from event on Websocket #
GET /unsubscribe_all Unsubscribe from all events via WebSocket #

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/sei-events-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Discovery needs no key. Ratings and market analysis are Pro.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

sei-events-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Tendermint RPC Events API
  contact:
    name: Tendermint RPC
    url: https://github.com/tendermint/tendermint/issues/new/choose
  description: 'Tendermint supports the following RPC protocols:


    * URI over HTTP

    * JSON-RPC 2.0 over HTTP

    * JSON-RPC 2.0 over websockets (deprecated)


    ## Configuration


    RPC can be configured by tuning parameters under `[rpc]` table in the

    `$TMHOME/config/config.toml` file or by using the `--rpc.X` command-line

    flags.'
  version: Master
  license:
    name: Apache 2.0
    url: https://github.com/tendermint/tendermint/blob/master/LICENSE
servers:
- url: https://rpc.cosmos.network
  description: Cosmos mainnet node to interact with the Tendermint RPC
- url: http://localhost:26657
  description: Interact with the Tendermint RPC locally on your device
tags:
- name: Events
  description: Event subscription APIs
paths:
  /events:
    get:
      summary: Fetch events posted by the consensus node
      tags:
      - Events
      operationId: events
      description: 'Fetch a batch of events posted by the consensus node and matching a

        specified query string.


        The query grammar is defined in pubsub/query/syntax.

        An empty query matches all events; otherwise a query comprises one or

        more terms comparing event metadata to target values. For example, to

        select new block events:


        tm.event = ''NewBlock''


        Multiple terms can be combined with AND, for example to match the

        transaction event with a given hash, use:


        tm.event = ''Tx'' AND tx.hash = ''EA7B33F''


        The comparison operators include `=`, ``, `>=`, and

        `CONTAINS`. Operands may be strings (in single quotes), numbers, dates,

        or timestamps. In addition, the `EXISTS` operator allows you to check

        for the presence of an attribute regardless of its value.


        Tendermint defines a `tm.event` attribute for all events. Transactions

        are also assigned `tx.hash` and `tx.height` attributes. Other attributes

        are provided by the application as ABCI Event records. The name of the

        event in the query is formed by combining the type and attribute key

        with a period. For example, given:


        []abci.Event{{

        Type: "reward",

        Attributes: []abci.EventAttribute{

        {Key: "address", Value: "cosmos1xyz012pdq"},

        {Key: "amount", Value: "45.62"},

        {Key: "balance", Value: "100.390001"},

        },

        }}


        the query may refer to the names`"reward.address`,`"reward.amount`, and

        `reward.balance`, as in:


        reward.address EXISTS AND reward.balance > 45


        The node maintains a log of all events within an operator-defined time

        window. The /events method returns the most recent items from the log

        that match the query. Each item returned includes a cursor that marks

        its location in the log. Cursors can be passed via the `before` and

        `after` parameters to fetch events earlier in the log.'
      parameters:
      - in: query
        name: filter
        schema:
          $ref: '#/components/schemas/EventFilter'
      - in: query
        name: maxItems
        schema:
          type: integer
          example: 10
      - in: query
        name: after
        schema:
          type: string
          example: 0005d7c09065e9a7-01cf
      - in: query
        name: before
        schema:
          type: string
          example: 0005d7c09065e9a7-01cf
      - in: query
        name: waitTime
        schema:
          type: integer
          example: 5000000000
      responses:
        '200':
          description: Reports a batch of matching events
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/EventsResponse'
        '500':
          description: Reports an error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
  /subscribe:
    get:
      summary: Subscribe for events via WebSocket
      tags:
      - Events
      operationId: subscribe
      description: 'To tell which events you want, you need to provide a query. query is a

        string, which has a form: "condition AND condition ..." (no OR at the

        moment). condition has a form: "key operation operand". key is a string with

        a restricted set of possible symbols ( \t\n\r\\()"''=>", ">=", "CONTAINS" AND "EXISTS". operand

        can be a string (escaped with single quotes), number, date or time.


        Examples:

        tm.event = ''NewBlock'' # new blocks

        tm.event = ''CompleteProposal'' # node got a complete proposal

        tm.event = ''Tx'' AND tx.hash = ''XYZ'' # single transaction

        tm.event = ''Tx'' AND tx.height = 5 # all txs of the fifth block

        tx.height = 5 # all txs of the fifth block


        Tendermint provides a few predefined keys: tm.event, tx.hash and tx.height.

        Note for transactions, you can define additional keys by providing events with

        DeliverTx response.


        import (

        abci "github.com/tendermint/tendermint/abci/types"

        "github.com/tendermint/tendermint/libs/pubsub/query"

        )


        abci.ResponseDeliverTx{

        Events: []abci.Event{

        {

        Type: "rewards.withdraw",

        Attributes: []abci.EventAttribute{

        {Key: "address", Value: "AddrA", Index: true},

        {Key: "source", Value: "SrcX", Index: true},

        {Key: "amount", Value: "...", Index: true},

        {Key: "balance", Value: "...", Index: true},

        },

        },

        {

        Type: "rewards.withdraw",

        Attributes: []abci.EventAttribute{

        {Key: "address", Value: "AddrB", Index: true},

        {Key: "source", Value: "SrcY", Index: true},

        {Key: "amount", Value: "...", Index: true},

        {Key: "balance", Value: "...", Index: true},

        },

        },

        {

        Type: "transfer",

        Attributes: []abci.EventAttribute{

        {Key: "sender", Value: "AddrC", Index: true},

        {Key: "recipient", Value: "AddrD", Index: true},

        {Key: "amount", Value: "...", Index: true},

        },

        },

        },

        }


        All events are indexed by a composite key of the form {eventType}.{evenAttrKey}.

        In the above examples, the following keys would be indexed:

        - rewards.withdraw.address

        - rewards.withdraw.source

        - rewards.withdraw.amount

        - rewards.withdraw.balance

        - transfer.sender

        - transfer.recipient

        - transfer.amount


        Multiple event types with duplicate keys are allowed and are meant to

        categorize unique and distinct events. In the above example, all events

        indexed under the key `rewards.withdraw.address` will have the following

        values stored and queryable:


        - AddrA

        - AddrB


        To create a query for txs where address AddrA withdrew rewards:

        query.MustParse("tm.event = ''Tx'' AND rewards.withdraw.address = ''AddrA''")


        To create a query for txs where address AddrA withdrew rewards from source Y:

        query.MustParse("tm.event = ''Tx'' AND rewards.withdraw.address = ''AddrA'' AND rewards.withdraw.source = ''Y''")


        To create a query for txs where AddrA transferred funds:

        query.MustParse("tm.event = ''Tx'' AND transfer.sender = ''AddrA''")


        The following queries would return no results:

        query.MustParse("tm.event = ''Tx'' AND transfer.sender = ''AddrZ''")

        query.MustParse("tm.event = ''Tx'' AND rewards.withdraw.address = ''AddrZ''")

        query.MustParse("tm.event = ''Tx'' AND rewards.withdraw.source = ''W''")


        See list of all possible events here

        https://godoc.org/github.com/tendermint/tendermint/types#pkg-constants


        For complete query syntax, check out

        https://godoc.org/github.com/tendermint/tendermint/libs/pubsub/query.


        ```go

        import rpchttp "github.com/tendermint/rpc/client/http"

        import "github.com/tendermint/tendermint/types"


        client, err := rpchttp.New("tcp://0.0.0.0:26657", "/websocket")

        if err != nil {

        // handle error

        }


        err = client.Start()

        if err != nil {

        // handle error

        }

        defer client.Stop()

        ctx, cancel := context.WithTimeout(context.Background(), 1 * time.Second)

        defer cancel()

        query := "tm.event = ''Tx'' AND tx.height = 3"

        txs, err := client.Subscribe(ctx, "test-client", query)

        if err != nil {

        // handle error

        }


        go func() {

        for e := range txs {

        fmt.Println("got ", e.Data.(types.EventDataTx))

        }

        }()

        ```


        NOTE: if you''re not reading events fast enough, Tendermint might

        terminate the subscription.'
      parameters:
      - in: query
        name: query
        required: true
        schema:
          type: string
          example: tm.event = 'Tx' AND tx.height = 5
        description: 'query is a string, which has a form: "condition AND condition ..." (no OR at the

          moment). condition has a form: "key operation operand". key is a string with

          a restricted set of possible symbols ( \t\n\r\\()"''=>< are not allowed).

          operation can be "=", "<", "<=", ">", ">=", "CONTAINS". operand can be a

          string (escaped with single quotes), number, date or time.

          '
      responses:
        '200':
          description: empty answer
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/EmptyResponse'
        '500':
          description: empty error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
  /unsubscribe:
    get:
      summary: Unsubscribe from event on Websocket
      tags:
      - Events
      operationId: unsubscribe
      description: '```go

        client, err := rpchttp.New("tcp://0.0.0.0:26657", "/websocket")

        if err != nil {

        // handle error

        }


        err := client.Start()

        if err != nil {

        // handle error

        }

        defer client.Stop()

        query := "tm.event = ''Tx'' AND tx.height = 3"

        err = client.Unsubscribe(context.Background(), "test-client", query)

        if err != nil {

        // handle error

        }

        ```'
      parameters:
      - in: query
        name: query
        required: true
        schema:
          type: string
          example: tm.event = 'Tx' AND tx.height = 5
        description: 'query is a string, which has a form: "condition AND condition ..." (no OR at the

          moment). condition has a form: "key operation operand". key is a string with

          a restricted set of possible symbols ( \t\n\r\\()"''=>< are not allowed).

          operation can be "=", "<", "<=", ">", ">=", "CONTAINS". operand can be a

          string (escaped with single quotes), number, date or time.

          '
      responses:
        '200':
          description: Answer
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/EmptyResponse'
        '500':
          description: Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
  /unsubscribe_all:
    get:
      summary: Unsubscribe from all events via WebSocket
      tags:
      - Events
      operationId: unsubscribe_all
      responses:
        '200':
          description: empty answer
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/EmptyResponse'
        '500':
          description: empty error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
components:
  schemas:
    EmptyResponse:
      description: Empty Response
      allOf:
      - $ref: '#/components/schemas/JSONRPC'
      - type: object
        properties:
          result:
            type: object
            additionalProperties: {}
    EventsResponse:
      description: Events response
      allOf:
      - $ref: '#/components/schemas/JSONRPC'
      - type: object
        properties:
          items:
            type: array
            items:
              $ref: '#/components/schemas/EventItem'
          more:
            type: boolean
          oldest:
            type: string
            example: 0005d7c09065e9a7-01cf
          newest:
            type: string
            example: 0005d7c090660099-0200
    EventItem:
      description: Event item metadata
      type: object
      properties:
        cursor:
          type: string
          example: 0005d7c09065e9a7-01cf
        data:
          type: object
          properties:
            type:
              type: string
              example: tendermint/event/Tx
            value:
              type: string
              format: json
    ErrorResponse:
      description: Error Response
      allOf:
      - $ref: '#/components/schemas/JSONRPC'
      - type: object
        properties:
          error:
            type: string
            example: Description of failure
    JSONRPC:
      type: object
      properties:
        id:
          type: integer
          example: 0
        jsonrpc:
          type: string
          example: '2.0'
    EventFilter:
      description: Event filter query
      type: object
      properties:
        query:
          type: string
          example: tm.event = 'Tx'