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
I've tried to get the realtime candles, even waited more the one minute as the official docs says and apparently the listener never gets called, see the code from below:
const x = new XAPI.default({
accountId: <MY-ACCOUNT-ID>,
password: <MY-PASSWORD>,
type: 'demo' // or demo
});
x.connect();
x.onReady(async () => {
console.log('Connection is ready');
x.Stream.listen.getCandles((data) => {
// THIS IS NEVER REACHED
console.log("GOT DATA", data);
});
x.Stream.subscribe.getCandles('BITCOIN')
.catch(() => { console.error('subscribe for BITCOIN failed')});
})
Am I doing something wrong ?
PS: getTickPrices works as expected
The text was updated successfully, but these errors were encountered:
I've tried to get the realtime candles, even waited more the one minute as the official docs says and apparently the listener never gets called, see the code from below:
Am I doing something wrong ?
PS: getTickPrices works as expected
The text was updated successfully, but these errors were encountered: