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
const TradingView = require('@mathieuc/tradingview');
server = 'prodata';
var authToken;
var session;
var signature;
var sessionHash;
var privateChannel;
session: 'xxx';
signature: 'xxx';
sessionHash: 'xxx';
privateChannel: 'xxx';
authToken: 'xxx';
const client = new TradingView.Client({
server: server,
authToken: authToken,
signature: signature,
session: session,
sessionHash: sessionHash,
privateChannel: privateChannel
});
const chart = new client.Session.Chart();
const exchange = process.argv[2];
const symbol = process.argv[3];
const timeframe = process.argv[4];
const range = 100000;
const ticker = exchange + ':' + symbol;
chart.setTimezone('UTC');
chart.setMarket(ticker, {
timeframe: timeframe,
range: range
});
chart.onSymbolLoaded(() => {
console.log(chart.infos.name, 'loaded !');
});
(async () => {
chart.onUpdate(() => {
console.log('OK', chart.periods);
client.end();
});
})();
e.g., node script.js BATS SPY 15
Despite the 'Premium' account of TradingView allowing for the download of 20000 historical bars, my login credentials (authToken, session, sessionHash etc) allow for only 10000 bars from the prodata server. I get 10000 bars even without logging-in so long as use the prodata server.
How can I get 20000 bars as I normally do if I manually export data from within the TradingView desktop app using my Premium account?
The text was updated successfully, but these errors were encountered:
e.g.,
node script.js BATS SPY 15
Despite the 'Premium' account of TradingView allowing for the download of 20000 historical bars, my login credentials (authToken, session, sessionHash etc) allow for only 10000 bars from the
prodata
server. I get 10000 bars even without logging-in so long as use theprodata
server.How can I get 20000 bars as I normally do if I manually export data from within the TradingView desktop app using my Premium account?
The text was updated successfully, but these errors were encountered: