Cloud

Exchange WebSocket feeds

Coinbase Cloud Exchange 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. 

Once you have subscribed to the feed, the Exchange will establish a persistent connection that delivers market data directly to your client. You can also authenticate yourself when subscribing for a more detailed and personalized feed.

The following channels are available through the WebSocket feed:

  • The heartbeat channel updates once a second for specific products.

  • The status channel sends all products and currencies at regular intervals.

  • The ticker channel updates prices when bids and offers are matched. Match cascades are batched to keep bandwidth requirements low.

  • The ticker batch channel updates prices every 5 seconds if there is a change. It has the same JSON scheme as the ticker channel.

  • 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).

  • The level2 batch channel batches level2 messages every 0.05 seconds and has the same JSON schema as the level2 channel.

  • The user channel, which requires authentication, delivers relevant messages from the full channel.

  • The matches channel is most useful as a complement to the level2 channel. It sends a message when a match is made.

  • The full channel provides the most comprehensive feed. Full channel users will receive WebSocket stream messages for:

    • Received orders.

    • Open orders.

    • Orders that are done.

    • Trades that occur following a match.

    • A change on an order.

    • When a stop order activates the order lifecycle.

  • The auction channel sends information about auctions for products when they are in Auction Mode.