Ubiquity WebSockets Endpoints

Ubiquity provides a WebSockets endpoint for streaming a live feed of blockchain data. Websockets provide real-time information about the network, including new blocks and transactions.

WebSocket endpoints are currently available for the following protocols:

Protocol URI
Algorand wss://ubiquity.api.blockdaemon.com/v2/algorand/mainnet/websockets
Bitcoin wss://ubiquity.api.blockdaemon.com/v2/bitcoin/mainnet/websockets
Bitcoin testnet wss://ubiquity.api.blockdaemon.com/v2/bitcoin/testnet/websockets
Diem wss://ubiquity.api.blockdaemon.com/v2/diem/mainnet/websockets
Dogecoin wss://ubiquity.api.blockdaemon.com/v2/dogecoin/mainnet/websockets
Dogecoin testnet wss://ubiquity.api.blockdaemon.com/v2/dogecoin/testnet/websockets
Ethereum wss://ubiquity.api.blockdaemon.com/v2/ethereum/mainnet/websockets
Ethereum testnet wss://ubiquity.api.blockdaemon.com/v2/ethereum/ropsten/websockets
Oasis wss://ubiquity.api.blockdaemon.com/v2/oasis/mainnet/websockets
Polkadot wss://ubiquity.api.blockdaemon.com/v2/polkadot/mainnet/websockets
Stacks wss://ubiquity.api.blockdaemon.com/v2/stacks/mainnet/websockets
Stellar wss://ubiquity.api.blockdaemon.com/v2/stellar/mainnet/websockets
XRP wss://ubiquity.api.blockdaemon.com/v2/xrp/mainnet/websockets

How to Subscribe to Ubiquity WebSockets

Use the relevant API to create a WebSocket connection with your preferred tool.  You can then use the code below to create a Ubiquity subscription. Once done, the server will return subscription notifications for new blocks. 

Create a Ubiquity Subscription
{"id": 1, "method": "ubiquity.subscribe", "params": {"channel": "ubiquity.block_identifiers"}}