Monitor all user orders through websocket; Python

Hi guys. Like in topic is it any easy way to monitor all user orders through websocket? I tried tried to subscribe user channel with all available symbols but when order with specified pair does not exists websocket is hanging. To clarify my body looks like + authentication values:

subscribe = {
‘type’: ‘subscribe’,
‘product_ids’: [“ETH-USDT”, “BTC-USDT”],
‘channels’: [
“user”,
],
}

and then how encrypted message should looks like? “orders:ETH-USDTBTC-USDT” ? Because when I do that it’s hanging again. It only works when I use one symbol in message “orders:ETH-USDT”

Hi @pietek , thank you for taking an interest in trying out the Coinbase APIs. For the details regarding your inquiry, we will check on this for you with our team to see how we can best assist. We’ll get back to you once we have more information. Keep in touch!

Hi @pietek upon checking on our end, we have noticed that on the Channel Section, you have extra commas which may result in hanging when you use this channel, Websocket. You may try to check this solution.

From the code you have provided,

{
    "type": "subscribe",
    "product_ids": [
        "ETH-USDT",
        "BTC-USDT"
    ],
    "channels": ["user",],
}

To this.

{
    "type": "subscribe",
    "product_ids": [
        "ETH-USDT",
        "BTC-USDT"
    ],
    "channels": ["user"]
}

Please let us know if it works for you.

Thank you.

2 Likes