Coinbase Cloud Prime offers a WebSocket feed to provide real-time market data updates for orders and trades. The developer documentation is your best resource for setting up WebSocket feeds, but some basic information is provided here in the help center.
The Prime WebSocket feed requires that you authenticate yourself when you subscribe, meaning that you must provide a signature with your messages. If the server does not receive your message within 5 seconds, your TCP SSL connection is dropped.
Once you have subscribed to the feed, Prime will establish a persistent connection that delivers market data directly to your client.
The following channels are available through the WebSocket feed:
The heartbeats channel updates once a second for specific products.
The orders channel provides real-time updates on orders you’ve made.
The level2 channel gives you a snapshot by delivering all updates, which will provide real-time information on each order’s side (buy/sell), price, and size (or amount).