{"library":"pinets","title":"PineTS","description":"PineTS is an open-source transpiler and runtime that executes Pine Script (TradingView's indicator language) in Node.js, browsers, and other JavaScript runtimes. Version 0.9.13 is the latest stable release, with active development and biweekly releases. Key differentiators include 1:1 syntax compatibility with Pine Script v5, support for multiple data providers (Binance, CSV, custom), and full TypeScript types. Unlike alternatives (e.g., pine-js), PineTS is a full runtime with a built-in transpiler and provider abstraction, enabling off-platform execution of indicators and strategies for backtesting, alerts, and ML pipelines.","language":"javascript","status":"active","last_verified":"Fri May 01","install":{"commands":["npm install pinets"],"cli":null},"imports":["import { PineTS } from 'pinets'","import { Provider } from 'pinets'","import PineTS from 'pinets'","import { DataProvider } from 'pinets'","import { PineScriptError } from 'pinets'"],"auth":{"required":false,"env_vars":[]},"quickstart":{"code":"import { PineTS, Provider } from 'pinets';\n\nconst pineTS = new PineTS(Provider.Binance, 'BTCUSDT', '1h', 100);\n\nasync function main() {\n  const { plots } = await pineTS.run(`\n    //@version=5\n    indicator(\"EMA Cross\")\n    plot(ta.ema(close, 9), \"Fast\", color.blue)\n    plot(ta.ema(close, 21), \"Slow\", color.red)\n  `);\n\n  console.log('Fast EMA:', plots['Fast'].data.slice(0, 5));\n  console.log('Slow EMA:', plots['Slow'].data.slice(0, 5));\n}\n\nmain().catch(console.error);","lang":"typescript","description":"Initializes PineTS with Binance BTCUSDT 1h data and runs a simple EMA cross Pine Script, logging the first 5 values of each plot.","tag":null,"tag_description":null,"last_tested":null,"results":[]},"compatibility":null}