You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
`// Live trades
const tickerStream = new TickerStream();
const tickerTopic = tickerStream.subscribe(CURRENCY.BTC_USD);
const tickerTopicTwo = tickerStream.subscribe(CURRENCY.ETH_USD);
/*
as tickers are re-usable (subscribe to multiple currencies)
every subscribe actions returns a topic name, which is the actual event you
can listen to after subscription
*/
/*
sadly pusher-js does not really expose errors in an acceptable manner
therefore you will have to trust its automatic re-connect handling
in case of disconnections and network errors
*/
It's not pulling the info for BTC_USD
`// Live trades
const tickerStream = new TickerStream();
const tickerTopic = tickerStream.subscribe(CURRENCY.BTC_USD);
const tickerTopicTwo = tickerStream.subscribe(CURRENCY.ETH_USD);
/*
as tickers are re-usable (subscribe to multiple currencies)
every subscribe actions returns a topic name, which is the actual event you
can listen to after subscription
*/
tickerStream.on("connected", () => {
console.log("Connected");
});
tickerStream.on("disconnected", () => {
console.log("Disconnect");
});
/*
sadly pusher-js does not really expose errors in an acceptable manner
therefore you will have to trust its automatic re-connect handling
in case of disconnections and network errors
*/
tickerStream.on(tickerTopic, data => {
console.log(data);
console.log("============New Data==========");
/* e.g.
{
amount: 0.01513062,
buy_order_id: 297260696,
sell_order_id: 297260910,
amount_str: '0.01513062',
price_str: '212.80',
timestamp: '1505558814',
price: 212.8,
type: 1,
id: 21565524,
cost: 3.219795936
}
*/
});`
works with ETH_EUR
The text was updated successfully, but these errors were encountered: