FAQ

Frequently asked questions about pynescript install, Pine version support, TradingView parity, CLI vs library, LSP, Pro API, licensing, and ecosystem boundaries.

This page

FAQ

Abstract

Short answers to questions that recur when adopting PYNE as a consumer. Where behavior is evolving, answers point at status docs rather than overclaiming parity.

Conceptual model

Questions group into: install & package shape, language coverage, evaluation fidelity, tooling surfaces, and product boundaries (AXIS / HOOX / workers).

Interface surface

No dedicated FAQ API — pointers only.

Internals (repo paths)

Answers cite:

  • pyproject.toml — version, extras, license
  • src/pynescript/__main__.py — CLI reality
  • src/pynescript/runtime/host.pyRuntime.run
  • docs/missing_features.md / reference status pages — coverage
  • backend/app.py — HTTP contract

Invariants & edge cases

  • Prefer reading code + status docs over README marketing tables when they disagree; mark drift with issues.
  • Trademark disclaimer lives on the product index once — not repeated here in full.

Questions

What is PYNE vs pynescript vs pyne?

  • PYNE — product documentation brand for the open evaluate stack (grammar → AST → runtime → LSP → Pro API → workers).
  • hoox-pynePyPI distribution name (live, 0.3.14+). Install with pip install hoox-pyne. Do not install plain pyne/PyNE from PyPI without the hoox- prefix (unrelated) or the upstream pynescript package (elbakramer).
  • pynescriptimport package (import pynescript, including pynescript.runtime).
  • pyne / pyne-lsp — preferred console scripts; pynescript / pynescript-lsp remain aliases.

What Python versions are supported?

requires-python = ">=3.10". Classifiers list 3.10–3.13. CI exercises that matrix; pin to 3.10+ for production.

How do I install just the parser?

pip install hoox-pyne

No extra required for parse / unparse / lint / basic literal_eval.

How do I install the LSP?

pip install "hoox-pyne[lsp]"

Run pyne-lsp (alias pynescript-lsp) — not a Click subcommand of pyne.

Why is pynescript lsp missing?

The registered entry point is the separate script pynescript-lsp. Some docs historically mentioned a lsp subcommand; trust pyproject.toml [project.scripts] and __main__.py for ground truth.

Which Pine versions are supported?

v6 is the recommended surface (declare //@version=6); v5 remains fully supported. See implementation status, missing features, and pine v6 surface.

Does PYNE support the once keyword?

Yes, as of hoox-pyne 0.4.4 (TradingView® August 2026). once [cond] runs its block the first time the condition is true on a closed bar. It is not an expression — you cannot assign its result. See Expressions & statements.

Is this affiliated with TradingView?

No. Independent open-source toolchain. Pine Script™ and TradingView® are trademarks of TradingView, Inc.

Will my TradingView strategy produce identical PnL?

Not guaranteed. Broker emulator rules, fill models, request.* data, and some builtins differ. Use PYNE for offline analysis, CI, and self-hosted evaluate; validate critical strategies numerically (numerical validation).

Can I format Pine like Black?

parse-and-unparse / LSP format normalize via the AST unparser. There is no rich style config comparable to Black’s profile system.

Does the CLI evaluate strategies?

pyne run script.pine --bars 50 compiles and executes on synthetic OHLCV. It is not Runtime.run (no real bars, no mode/libraries/timeout_seconds/inputs). For real OHLCV use:

  • from pynescript.runtime import Runtime — library default mode is interpret
  • POST /run — schema default mode is auto
  • examples/execute_script.py as a didactic sample (not the production host)

See modes.

How do I lint in CI?

pynescript lint --fail-on errors path/to/script.pine

Loop files yourself; the CLI is single-file / stdin.

What lint rules exist?

Syntax (E001), version (W001W002), deprecated patterns (W101–), style/naming (C001C004). See src/pynescript/ast/linter.py and the library API guide.

How do I get market data?

pynescript data AAPL --provider yahoo
pip install "hoox-pyne[data]"  # for ccxt

Or providers in Python via pynescript.util.data.get_provider.

What is the Pro API free tier?

POST /run and POST /run/batch are exposed as free evaluate endpoints (still your CPU if self-hosted). Default body mode is auto (prefer warm compile; fall back to interpret). Bar/script/rate/concurrency caps are off unless you set FREE_TIER_LIMITS=1. Responses include alerts[] when scripts call alert() / true alertcondition() (interpret path). Optional L2 webhooks: body webhook_url or env ALERT_WEBHOOK_URL. Preview/backtest routes are Pro-tier with API keys.

How do interpret and compile compare?

Use the dual-host harness (repo root):

python scripts/compare_interp_compile.py --bars 1000 --limit 50

See Interpret ↔ compile parity. Prefer mode=auto in production; force interpret when you need alerts, input.* overrides, or full request.*.

What file extension should I use?

Prefer .pyne for HOOX / PYNE stack sources. .pine / .pinev5 / .pinev6 remain supported by the VS Code extension and parsers.

How complete is real-world script runtime?

PYNE aims for practical fidelity on first-party fixtures and unit tests. It does not claim 100% TradingView® platform parity (chart host, proprietary data, every edge-case builtin). See Compatibility and implementation status. Third-party script corpora are not shipped in this repository.

How do I self-host the API?

Install backend requirements, set API_KEY_STORE / ALLOWED_ORIGINS / optional ADMIN_TOKEN, run python -m backend.app or make run. See configuration and Pro API usage.

What is AXIS?

Optional charting PWA that can call the evaluate contract and render series. Docs: AXIS. PYNE evaluates without AXIS.

What is HOOX?

Optional edge trading mesh (trade-worker, etc.). Docs: HOOX. Strategy events from PYNE can feed HOOX; not required for parsing/eval.

Alerts: alert() / alertcondition() firings export on Pro API and pyne-worker /run. Optional HTTP webhooks via webhook_url or ALERT_WEBHOOK_URL (last-bar by default). See Alerts.

What is PyneTS vs pyne-worker vs pyne-agent-worker?

  • PyneTS (@hoox-sh/pynets) — TypeScript / Bun library + CLI. parse / unparse / Runtime.run. Not a Worker. Python is the oracle.
  • pyne-worker — Python Cloudflare Worker. Production POST /run. Vendors pynescript.runtime.
  • pyne-agent-worker — NL authoring (POST /v1/chat). Standalone chat; optional generate → /run validate.

The name pine-worker is a leftover TypeScript experiment (hoox-sh/pine-worker). It is not colocated here and is not a product docs target.

See the ecosystem map and modes.

What is the default mode?

It depends on the surface — this is the usual footgun:

SurfaceDefault
pynescript.runtime.Runtime.run(..., mode=None)PYNE_RUNTIME_MODE else interpret
POST /run (body omits mode)auto
pyne runcompile-only (not Runtime.run, no --mode)

See modes.

Is there Runtime.evaluate?

No. The host API is Runtime.run. Python CLI pyne run is compile-only smoke and is not Runtime.run. PyneTS pynets run does call Runtime.run.

What license is pynescript?

AGPL-3.0-or-later per pyproject.toml. Network use of modified versions requires offering corresponding source (AGPL §13). Proprietary embedding usually needs a commercial license; consult your counsel.

Can I use this commercially?

AGPL permits commercial use under its terms, but distribution or network service of modified versions requires source availability. Hosted Pro API terms (if any) are separate from the library license.

Why is parse slow on huge files?

ANTLR parse + AST build scale with file size and nesting. Deep expression nests also stress recursion (limit temporarily raised to ≥5000). Split libraries when possible.

Round-trip changed my spacing — is that a bug?

Usually no. Unparser emits a normalized style. File a bug if semantics change (identifiers, call structure, annotations lost).

Where is the builtin list for autocomplete?

Generated metadata used by the LSP (scripts/generate_builtin_metadata.py). Do not hand-edit encrypted release blobs.

How do I report a grammar bug?

Minimal .pine repro + expected TV behavior + PYNE version. Prefer failing pytest if contributing.

Is Jupyter supported?

Yes — from pynescript.ext.jupyter import load_ipython_extension. The %%pinescript cell magic lints, parses, and unparses; it is not a bar-loop Runtime. You can also call parse / literal_eval / Runtime.run directly in notebooks.

Can I transform scripts programmatically?

Yes — NodeVisitor / NodeTransformer on the AST, then unparse. See library API.

Worked examples

“Is my install healthy?”

python -c "from pynescript.ast import parse, unparse; print(unparse(parse('//@version=6\nindicator(\"t\")\nplot(close)\n')))"
pynescript lint - <<< $'//@version=6\nindicator("t")\nplot(close)\n'

“Does HTTP evaluate work?”

curl -s http://127.0.0.1:5002/ | python -m json.tool

“Is LSP importable?”

python -c "import pygls; from pynescript.langserver.server import PynescriptLanguageServer"

Failure modes

If an FAQ answer appears wrong against your checkout:

  1. Check package version (pynescript --version).
  2. Read the cited source file.
  3. Prefer __main__.py / pyproject.toml over secondary docs.
  4. Open an issue or PR against the MDX page.

See also