I found a Websockets bug!

I subscribe to a “level2” channel for ADA-GBP.

This is what the message comes back as:

Look at the message “timestamp” and the event’s “event_time”. Something looks seriously wrong there. All the event_time fields are “1970-01-01T00:00:00Z”.

This response is also overly complex. Not sure why it was done like this. Just copy what was in Coinbase Pro or any other exchange for that matter.

Is there a channel that will stream a ticker only? My code constructs candles on the fly but all I need is the timestamp, market and price. It looks like what is coming through now are the orders.

This is what I have now…

    channel = "level2"

    self.ws = create_connection(self._ws_url)
                "type": "subscribe",
                "product_ids": product_ids,
                "channel": channel,
                "api_key": self.app.api_key,
                "timestamp": timestamp,
                "signature": signature,

It is already known - Level2 websocket channel too verbose!?.

For candles you might want ticker and/or market_trades channels.

Ok, thanks. I’ll try that.

I’ve got a logical hankering and question: Knowing that the websockets from Coinbase pro will have to stay active forever as part of the Exchange API offered to institutional / business clients makes me wonder why we will ever need to use the Advanced Trade websocket, since issuing commands to advanced trade does not require the new websocket integration. What I’m suggesting is that all interested parties (who are not trying to build an advanced trade orderbook) continue to use the old websocket even when submitting orders with the new api. Although coinbase pro is being sunsetted, the exchange API and websockets will need to remain for the institutional APIs. The pro API is actually being updated more frequently than the new one. Since the pro websockets are truly public endpoints, you can always connect to them without authentication from any machine in the world. This means there is no reason to mess with the new websockets at all until they are functioning properly, especially for simple ticker price data.

I’ve decided to use websockets from Coinbase Pro and market data from Coinbase in my app. The websocket data in Coinbase doesn’t look right to be and not easy to work with. I mean just one basic example is the data timestamps include nanoseconds. I don’t know why they did this as Python doesn’t handle it. I had to use Pandas to deal with the dates.