4

I want to subscribe to a single event (or a list of events) using the Polkadot.js API. However, I have only found information on how to traverse events and then filter the results. In addition, the documentation about events lists all the events emitted, but I haven't found a way to subscribe to a single one.

Is this possible? How could I do that? Thanks!

alfakini
  • 4,635
  • 2
  • 26
  • 35
  • Short update. The [documentation](https://polkadot.js.org/docs/api/start/basics#metadata) says `...metadata also provides information on events, these are query-able via the api.query.system.events()`, therefore, I don't think it is possible to subscribe to a single event. From what I understood, the event metadata, for exemple `api.events.gilt.BidPlaced.is`, can be used on the `EventRecord` from the `Vec` returned from the `api.query.system.events()` to check whether the event is of that specific kind, like `api.events.gilt.BidPlaced.is()`. – Daniel Bastos Jun 27 '21 at 18:59

0 Answers0