Usage: pinets [options] [command]
CLI for running Pine Script indicators via PineTS
Options:
-v, --version Show version number
-h, --help Display help
Commands:
run [options] [file] Execute a Pine Script indicator
help [command] Display help for a specific command
Execute a Pine Script indicator against market data.
Usage: pinets run [options] [file]
Arguments:
file Path to indicator file (.pine or any text file)
You must provide one of --symbol or --data.
Symbol to query from the Binance exchange.
pinets run rsi.pine --symbol BTCUSDT
pinets run rsi.pine -s ETHUSDT.P # Perpetual futuresSupported formats:
- Spot:
BTCUSDT,ETHUSDT,SOLUSDT - Perpetual futures:
BTCUSDT.P,ETHUSDT.P(append.P)
Timeframe for candle data. Only used with --symbol.
Default: 60 (1 hour)
| Value | Description |
|---|---|
1 |
1 minute |
3 |
3 minutes |
5 |
5 minutes |
15 |
15 minutes |
30 |
30 minutes |
60 |
1 hour |
120 |
2 hours |
240 |
4 hours |
1D or D |
1 day |
1W or W |
1 week |
1M or M |
1 month |
pinets run rsi.pine -s BTCUSDT -t 1D # Daily candles
pinets run rsi.pine -s BTCUSDT -t 15 # 15-minute candlesPath to a JSON file containing candle data. Use this instead of --symbol for custom or offline data.
pinets run rsi.pine --data ./my_candles.jsonSee Data Sources for the expected JSON format.
Write output to a file instead of stdout.
pinets run rsi.pine -s BTCUSDT -o results.jsonWhen writing to a file, parent directories are created automatically if they don't exist.
Choose the output format.
Default: default
| Format | Contents |
|---|---|
default |
Indicator metadata + plot data |
full |
Everything in default + raw result + market data |
pinets run rsi.pine -s BTCUSDT -f fullSee Output Formats for detailed examples.
Force pretty-printed (indented) JSON output.
Default behavior (when --pretty is not specified):
- stdout to a terminal: pretty-printed
- stdout piped to another command: compact (single line)
--outputto a file: compact
pinets run rsi.pine -s BTCUSDT --pretty # Always pretty
pinets run rsi.pine -s BTCUSDT | jq '.' # Auto-compact (piped)Filter out null, false, and empty values from plot data arrays. Useful for signal-based indicators where most candles don't have values.
# Without --clean: Buy/Sell plots have 500 entries (mostly false)
pinets run signals.pine -s BTCUSDT
# With --clean: Only actual signals are included
pinets run signals.pine -s BTCUSDT --cleanWhen to use:
- Indicators with
plotshape,plotchar, orplotarrowthat only trigger occasionally - Reducing output size when most values are false/null
- Extracting only meaningful signals
Select specific plots to include in the output. Takes a comma-separated list of plot names (must match the titles from your Pine Script).
# Get only the Fast and Slow moving averages
pinets run ma_cross.pine -s BTCUSDT --plots "Fast MA,Slow MA"
# Get only the Buy signals
pinets run signals.pine -s BTCUSDT --plots "Buy"
# Combine with --clean to get only true signals
pinets run signals.pine -s BTCUSDT --plots "Buy,Sell" --cleanWhen to use:
- Your indicator has many plots but you only need specific ones
- Building pipelines that process individual plots separately
- Reducing output size and processing time
Number of candles to include in the output.
Default: 500
pinets run rsi.pine -s BTCUSDT -n 100 # Output 100 candlesExtra candles fetched before the output window to give indicators time to initialize. These candles are processed but not included in the output.
Default: 0
# Fetch 700 candles, output the last 500
pinets run ema200.pine -s BTCUSDT -n 500 -w 200When to use warmup:
- Indicators with long lookback periods (e.g., SMA 200, EMA 200)
- When you need accurate values from the very first output candle
- When the indicator uses
ta.rsi(),ta.macd(), or similar functions that need history
Show the transpiled JavaScript code that PineTS generates from the Pine Script input. Useful for debugging indicator issues.
pinets run my_indicator.pine -s BTCUSDT --debugThe transpiled code is printed to stderr so it doesn't interfere with the JSON output.
Suppress all informational messages (progress, data source info, etc.). Only the JSON output and errors are shown.
pinets run rsi.pine -s BTCUSDT -qEssential when piping output to other tools:
pinets run rsi.pine -s BTCUSDT -q | jq '.plots.RSI.data[-1].value'Show the pinets-cli version.
pinets --versionShow help. Can be used at any level:
pinets --help # General help
pinets run --help # Help for the run command| Code | Meaning |
|---|---|
0 |
Success |
1 |
Error (file not found, invalid options, execution failure, etc.) |