Websocket Help converting from coinbase pro to advanced

I’ve tried various posts on here with working websockets but can’t get them to work. Looks like coinbase advanced websocket needs the api keys and I put those in and still couldn’t get it to work.

Here’s my scenario. I have a websocket that works with coinbase pro and I’m trying to convert it to work with coinbase advanced. I had installed a package from github called “cbpro” and used that for the websocket on coinbase pro. I would run the websocket every 20 seconds or so and bring the prices in. I’m not wanting it to run continuously. It also put it in a dataframe and returned the results.

Here is my code for the coinbase pro websocket. Can anyone convert this to work with coinbase advanced? Any help is appreciated.

import time
import cbpro
import numpy
import pandas as pd

results =

class myWebsocketClient(cbpro.WebsocketClient):

def on_open(self):
self.url = “wss://ws-feed.pro.coinbase.com/”
self.products = [“00-USD”,
self.channels = [“ticker”]

def on_message(self, msg):
if “price” in msg and “product_id” in msg:

wsClient = myWebsocketClient()


df = pd.DataFrame(results)

Hi @Hawkster In order to migrate from Pro to Advanced trade, we would suggest you to create new APIs key and then try.For more information about migration from pro to Advanced you can refer this link
The WebSocket feed is publicly available and provides real-time market data updates for orders and trades.The WebSocket feed uses a bidirectional protocol that encodes all messages as JSON objects. All messages have a type attribute that can be used to handle the message appropriately.
For Advanced Trade Websocket, you can refer this documentation.Thank you!