TradingView-API icon indicating copy to clipboard operation
TradingView-API copied to clipboard

15 minutes delay for MOEX market

Open AndreyGalitsin opened this issue 2 years ago • 0 comments

I try to execute the following code. If I set "Binance" as the market, I get correct timestamp in response. But if I set "MOEX" as the market, I get a 15 minutes delay in response timestamp. Tell me please, how is it possible to solve this problem?

const TradingView = require('../main');
const client = new TradingView.Client(); // Creates a websocket client
const chart = new client.Session.Chart(); // Init a Chart session

//chart.setMarket('BINANCE:BTCEUR', { // Set the market
//  timeframe: '1',
//});

chart.setMarket('MOEX:GAZP', { // Set the market
timeframe: '1',
});

chart.onUpdate(() => { // When price changes
  if (!chart.periods[0]) return;
  console.log(chart.periods[0]);
});

AndreyGalitsin avatar Apr 28 '23 16:04 AndreyGalitsin