Post
Share your knowledge.
How to subscribe to blockchain events in Sui?
Hi! I'm diving into using Sui and I'd love to subscribe to specific blockchain events. However, I'm hitting a roadblock. I know about using suix_subscribeEvent in JSON API, but I've heard it's becoming outdated. But in my hunt through the GraphQL API, I can't find the equivalent feature. Should I just stick with the legacy JSON API, or is there another way to achieve event subscriptions?
- Move CLI
Answers
2You're correct in your understanding: with GraphQL, you're limited to polling right now. Whereas, the JSON API allows both polling and websockets for subscribing, though do note that websockets are on the way out. If you're weighing your options, keep in mind that Sui may phase out the JSON API soon, so it's wise to plan accordingly.
Subscribing to events isn't available yet through the GraphQL RPC. Your best bet, even with the JSON RPC, might be to opt for polling instead.
Do you know the answer?
Please log in and share it.
Move is an executable bytecode language used to implement custom transactions and smart contracts.

- ... SUIderiss+5
- ... SUIRamirez+5
- ... SUIElvin CLONE +5
- ... SUI
- ... SUI
- ... SUI
- ... SUIBritain+2