-
-
Notifications
You must be signed in to change notification settings - Fork 527
Closed
Labels
bugSomething isn't workingSomething isn't working
Description
Describe the bug
Basically I'm re-running the functions in MultipleSyncFetch.js but getting the error:
The maximum number of studies per chart has been reached for current subscription
run this file continuously
about 3-5 times continuously will appear the above error.
To Reproduce
here is my code :
const TradingView = require("@mathieuc/tradingview");
/**
* This examples synchronously fetches data from 3 indicators
*/
const client = new TradingView.Client();
const chart = new client.Session.Chart();
chart.setMarket('BINANCE:DOTUSDT');
function getIndicData(indicator) {
return new Promise((res) => {
const STD = new chart.Study(indicator);
console.log(`Getting "${indicator.description}"...`);
STD.onUpdate(() => {
res(STD.periods);
console.log(`"${indicator.description}" done !`);
});
});
}
(async () => {
console.log('Getting all indicators...');
const indicData = await Promise.all([
await TradingView.getIndicator('PUB;3lEKXjKWycY5fFZRYYujEy8fxzRRUyF3'),
await TradingView.getIndicator('PUB;5nawr3gCESvSHQfOhrLPqQqT4zM23w3X'),
await TradingView.getIndicator('PUB;vrOJcNRPULteowIsuP6iHn3GIxBJdXwT'),
].map(getIndicData));
console.log(indicData);
console.log('All done !');
client.end();
})();Expected behavior
can run normally
Screenshots
Full Test :
Environment:
- OS: MacOs
- Node version: v23.3.0
Additional context
run this file continuously about 3-5 times continuously will appear the above error.
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working
