I am not getting any order updates when I connect to the user channle

public (string Signature, string Timestamp) ComputeSignature(string Data)
{
    var timestamp = DateTimeOffset.UtcNow.ToUnixTimeSeconds().ToString(CultureInfo.InvariantCulture);
    using var hma = new HMACSHA256(Encoding.ASCII.GetBytes("Secret Key here..."));
    var Hash = hma.ComputeHash(Encoding.UTF8.GetBytes($"{timestamp}{Data}"));
    return (BitConverter.ToString(Hash).Replace("-", "").ToLower(), timestamp);
}

var (Signature, Timestamp) = ComputeSignature($"user{string.Join(",", productIds)}");

Websocket.SendAsync(JsonConvert.SerializeObject(new
{
    type = "subscribe",
    channel = "user",
    product_ids = productIds,
    signature = Signature,
    api_key = "My API Key...",
    timestamp = Timestamp,
    user_id = "APIKey obtained from calling v2/user",
}));

When I connect to the websocket and send this message to subscribe all I get is this:

{"channel":"user","client_id":"","timestamp":"2023-08-27T03:39:26.398610824Z","sequence_num":0,"events":[{"type":"snapshot","orders":[]}]}

and 

{"channel":"subscriptions","client_id":"","timestamp":"2023-08-27T03:39:26.398631225Z","sequence_num":1,"events":[{"subscriptions":{"user":["Removed my user id for privacy reasons..."]}}]}

The documentation states that I will get all open orders when I connect and authenticate to the “user” channel but I don’t get any orders even though I have a bunch of BTC-USD/USDC orders open.

I am also not getting any order updates whatsoever doesn’t matter if I create them using Coinbases advanced trading website of place them myself using API calls which is no the expected behavior.

What am I missing? I mean obviously the connection remains open and is valid, The signature is valid because it was not rejected and the subscription was successful because I am getting the user channel reply and there is no errors being returned.

All other channels behave as expected except for the user channel.
I tried to omit the the user_id or even use empty “” but nothing works.

I appreciate any insight and tips.

What helped for me was to clear the productIds, by sending an empty list it subscribes to everything. I noticed my issue was with the USDC base pair. Other pairs were working for me accordingly. I filed it as a bug. Maybe this helps you as well?

1 Like

Yeah, Sending an empty list of product ids actually works, Thanks for the tip.