Use WebSocket subscription to get real-time data from Orangepill
Listen for events on your Realm so your integration can automatically trigger reactions. Orangepill uses Websocket to notify your application when an event occures in your Realm. WebSockets are particularly useful for asynchronous events like when a new account is created, new transaction is processed or when incoming deposits are receieved.
Events
Events marked with * supported with Infobip extension enabled.
Event data
Each notification will include name of the event and id of the entity affected by event. If details of event are of your interest, use information from event data to retrieve entity details.
{"type":"notification",// event notification"event":"transaction.processed",// event name"data":"63967141191e9023f356df9f",// id of affected entity"timestamp":"162553625262"// Date.now()}
Connect to WebSocket notification server using URL wss://stream.orangepill.cloud.
To subscribe for notification events use your Realm Key in message.
{ "type":"subscribe","realm": <YOUR_REALM_KEY> }
You can unsubscribe from receiving notification events using similar message.