Mathieu2301 / TradingView-API

📈 Get real-time stocks from TradingView
1.31k stars 307 forks source link

15 minutes delay for MOEX market #192

Open AndreyGalitsin opened 1 year ago

AndreyGalitsin commented 1 year ago

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]);
});