From 095d6a9f4fafb009b130d9172f4e777e81bf4c7b Mon Sep 17 00:00:00 2001 From: Jerko J <83344666+JJ-Cro@users.noreply.github.com> Date: Thu, 26 Sep 2024 15:13:28 +0200 Subject: [PATCH] chore(): added all ws examples --- examples/CBExchange/WebSockets/publicWs.ts | 22 +++++++++++++++++++++- 1 file changed, 21 insertions(+), 1 deletion(-) diff --git a/examples/CBExchange/WebSockets/publicWs.ts b/examples/CBExchange/WebSockets/publicWs.ts index 3b30e61..a460bde 100644 --- a/examples/CBExchange/WebSockets/publicWs.ts +++ b/examples/CBExchange/WebSockets/publicWs.ts @@ -133,7 +133,27 @@ async function start() { // product_ids: ['ETH-USD', 'BTC-USD'], }, }, - // TODO: @jerko add other PUBLIC channels here as example + // https://docs.cdp.coinbase.com/exchange/docs/websocket-channels#ticker-channel + { + topic: 'ticker', + payload: { + product_ids: ['ETH-USD', 'BTC-USD'], + }, + }, + // https://docs.cdp.coinbase.com/exchange/docs/websocket-channels#ticker-batch-channel + { + topic: 'ticker_batch', + payload: { + product_ids: ['ETH-USD', 'BTC-USD'], + }, + }, + // https://docs.cdp.coinbase.com/exchange/docs/websocket-channels#level2-batch-channel + { + topic: 'level2_batch', + payload: { + product_ids: ['ETH-USD', 'BTC-USD'], + }, + }, ], 'exchangeMarketData', );