Real-time blockchain monitoring via persistent WebSocket connections.
WebSocket Connection(zetrix_ws_connect)
Connect and register to WebSocket for real-time updates.
Purpose: Establish persistent bidirectional connection to Zetrix node.
Returns:
Connection Details:
Mainnet: ws://node-ws.zetrix.com
Testnet: ws://test-node-ws.zetrix.com
Automatic Handling:
Queues messages during reconnection
Transaction via WebSocket(zetrix_ws_submit_transaction)
Submit transaction via WebSocket with real-time status.
Purpose: Send transaction and receive instant status updates as it processes.
Advantages over HTTP:
Instant confirmation notifications
Timeout: 30 seconds for confirmation, then falls back to polling.
Transaction Events(zetrix_ws_subscribe_tx)
Subscribe to transaction notifications for addresses.
Purpose: Monitor specific addresses and get notified of any transactions.
Parameters:
addresses (array): List of addresses to monitor
Notifications:
Limits: Maximum 100 subscriptions per connection
Use Cases:
Exchange deposit monitoring
Transaction Events(zetrix_ws_disconnect)
Disconnect from WebSocket.
Purpose: Properly close WebSocket connection and clean up resources.
Note: Can reconnect after disconnect by calling ws_connect again.
WebSocket Connection Status(zetrix_ws_status)
Check WebSocket connection status.
Purpose: Verify connection state and health.
Returns:
Connection state (connected/disconnected)
Last updated