WebSocket - market_trades unsubscribe kills all quotes, not just specified product IDs

for example
I send send:
{“channel”:“market_trades”,“type”:“subscribe”, “api_key”:“…”,“timestamp”:“1674013198”,“signature”:“…”,“product_ids”:[“BTC-USD”,“ETH-USD”]}

… server sends a flow of trade messages for both symbols

I then send command to UNSUBSCRIBE from must ETH-USD, but it kills all quotes:
{“channel”:“market_trades”,“type”:“unsubscribe”,“api_key”:“…”,“timestamp”:“1674013241”,“signature”:“…”,“product_ids”:[“ETH-USD”]}

All quotes stop, for both symbols, not just ETH-USD

Am I missing something here or is it a bug?

Hello @jmedved! Thank you for bringing this up to our attention. For the details regarding your concern, we will check on this for you with our team to see how we can best assist. We will get back to you once we have more information. Keep in touch!

I guess you must have fixed it. I checked today with same code as last week - and it is working correctly

Hi @jmedved! We are glad it all worked for you. We’re always happy to help! Please reach out in the future if you need anything else. Have a good day!

1 Like

Late to the party. I was wondering if you could help with a few questions:

  • The documentation seems to indicate that events and tradesare arrays, however, in the forum they also said that events are emitted as soon as a trade occurs, which is correct (I guess if it is always an array of 1, I could hard-code safely)
  • I am understanding that the snapshot would then be resent if you subscribed after unsubscribing, that seems obvious, but better ask foolish Q than pay for foolish assumptions
  • From your experience, do you see lost events from the streams and is it something that occurs frequently?
  • There is no Sandbox or testnet, meaning, testing would need to be live and with valid API, thus no unittest in workflows, correct?

Both events and trades are arrays. I just have the code set to process both without caring if there is one mor multiple.

Snapshot if you send subscribe - Yes, that is correct. I actually have code that does that when a snapshot re-send is needed for whatever reason

I configured it within our software and have not touched it it since then (4 months) TBH so don’t remember.

Sandbox - y, lack of sandbox is really bad, we already had the framework and implementation for previous API, but would be a pain if someone is writing things from scratch.

Thank you very much for the reply.

Good tips for the array, I was lazily assuming it was a typo.

I was thinking the penalties of unsub/sub would be too high, but that’s a good tip to consider

Thank you

The error handling is confusing me a bit. Am I understanding correctly that SignIn has a different error messaging from Advanced Trade? Assuming that I get an 400, in SignIn I would look for “errors” in the response and with Advanced Trade I would look for “error” in the json?