Closed unicornsoftwareinc closed 4 years ago
@hugeprestigellc You can use ticker
channel for that:
const { WebsocketClient } = require('coinbase-pro');
const channels = ['ticker'];
const product_ids = ['BTC-USD', 'ETH-USD', 'ETH-USDC', 'LINK-ETH'];
const ws_url = 'wss://ws-feed.pro.coinbase.com';
const websocket = new WebsocketClient(product_ids, ws_url, null, { channels });
websocket.on('message', message => {
if (message.type === 'ticker') {
// new ticker
console.log(message);
}
});
Hi, we are closing out PRs + Issues as this project is being archived.
Hi there, is there some way to get multiple product tickers with one call? I only see the "getProductTicker" function unless I'm missing something.
Thanks