Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

BTC_USD Not working #34

Open
pkmnmstr98 opened this issue Oct 26, 2019 · 0 comments
Open

BTC_USD Not working #34

pkmnmstr98 opened this issue Oct 26, 2019 · 0 comments

Comments

@pkmnmstr98
Copy link

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant