tradingview-ta-node
v2.0.0
Published
Unofficial TradingView technical analysis API wrapper for Node.js
Maintainers
Readme
tradingview-ta-node
Unofficial TradingView technical analysis API wrapper for Node.js.
Installation
Install the package via npm:
npm install tradingview-ta-nodeUsage
Require the package in your Node.js project:
const { TAHandler, Interval, getMultipleAnalysis } = require('tradingview-ta-node');Examples
Example 1: Analysis for a Stock (America/NASDAQ: AAPL)
const { TAHandler, Interval } = require('tradingview-ta-node');
(async () => {
try {
const handler = new TAHandler({
screener: "america",
exchange: "NASDAQ",
symbol: "AAPL",
interval: Interval.INTERVAL_1_DAY,
timeout: 5000
});
const analysis = await handler.getAnalysis();
console.log("Analysis for AAPL (America/NASDAQ):", analysis);
} catch (error) {
console.error("Error:", error);
}
})();Example 2: Analysis for a Stock (Turkey/BIST: BIMAS)
const { TAHandler, Interval } = require('tradingview-ta-node');
(async () => {
try {
const handler = new TAHandler({
screener: "turkey",
exchange: "BIST",
symbol: "BIMAS",
interval: Interval.INTERVAL_1_DAY,
timeout: 5000
});
const analysis = await handler.getAnalysis();
console.log("Analysis for BIMAS (Turkey/BIST):", analysis);
} catch (error) {
console.error("Error:", error);
}
})();Example 3: Analysis for a Cryptocurrency (Crypto/BINANCE: BTCUSDT)
const { TAHandler, Interval } = require('tradingview-ta-node');
(async () => {
try {
const handler = new TAHandler({
screener: "crypto",
exchange: "BINANCE",
symbol: "BTCUSDT",
interval: Interval.INTERVAL_1_DAY,
timeout: 5000
});
const analysis = await handler.getAnalysis();
console.log("Analysis for BTCUSDT (Crypto/Binance):", analysis);
} catch (error) {
console.error("Error:", error);
}
})();Contributing
Contributions are welcome! Feel free to submit issues and pull requests.
License
This project is licensed under the MIT License.
