x.Stream.subscribe.getCandles doesn't working if you didn't do a price history request for specific symbol
example with BITCOIN:
x.Stream.subscribe.getCandles('BITCOIN')
.catch(() => { console.error('subscribe for BITCOIN failed')});
It won't work.
You have to do a request to BITCOIN price history then subscribe for candles
example with BITCOIN:
x.getPriceHistory({
symbol: 'BITCOIN',
period: PERIOD_FIELD.PERIOD_M1,
ticks: -1
})
x.Stream.subscribe.getCandles('BITCOIN')
.catch(() => { console.error('subscribe for BITCOIN failed')});