Skip to content

Commit 6a4f8ff

Browse files
authored
Release 4.0.0 stable (#347)
2 parents 9ecdca8 + b4c7f77 commit 6a4f8ff

12 files changed

Lines changed: 57 additions & 40 deletions

File tree

‎README.md‎

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616

1717
### One request, real data
1818

19-
> **V4 release candidate is available on npm under `next`.** Install with `npm install @mathieuc/tradingview@next`. The default `latest` tag is still v3 and does not export `getCandles`.
19+
> **V4 is the default npm release.** Install with `npm install @mathieuc/tradingview` to use `getCandles` and the new data API.
2020
2121
```js
2222
import { getCandles } from '@mathieuc/tradingview/data';
@@ -33,10 +33,10 @@ Prefer to start without code? The setup paths below work too.
3333

3434
### Interactive quick-start
3535

36-
The interactive launcher is included starting with **4.0.0-rc.1**:
36+
The interactive launcher is included in V4:
3737

3838
```bash
39-
npx @mathieuc/tradingview@next
39+
npx @mathieuc/tradingview
4040
```
4141

4242
Run it from your project directory with Node.js 20+. Choose a path:
@@ -45,7 +45,7 @@ Run it from your project directory with Node.js 20+. Choose a path:
4545
2. **Claude Code CLI** — starts your installed `claude` CLI here with a ready-to-use project prompt.
4646
3. **Codex CLI** — starts your installed `codex` CLI here with the same prompt.
4747
4. **Another local coding agent** — prints the prompt to paste into your agent.
48-
5. **Install the library only** — runs `npm install @mathieuc/tradingview@next` here, without generating files or starting an agent.
48+
5. **Install the library only** — runs `npm install @mathieuc/tradingview` here, without generating files or starting an agent.
4949

5050
Claude Code and Codex must already be installed and authenticated. Their normal permission prompts remain enabled. If launch fails, the prompt is printed for manual use. If no browser is available, the hosted link remains visible.
5151

@@ -59,11 +59,11 @@ node bin/tradingview.mjs
5959
### Install manually
6060

6161
```bash
62-
npm install @mathieuc/tradingview@next
63-
# Or: bun add @mathieuc/tradingview@next
62+
npm install @mathieuc/tradingview
63+
# Or: bun add @mathieuc/tradingview
6464
```
6565

66-
`next` installs the V4 release candidate; the default `latest` tag still installs V3. Do not mix the V4 imports with a V3 installation.
66+
V4 is installed by default. V3 remains available with `@mathieuc/tradingview@3`; read the migration guide before upgrading existing V3 projects.
6767

6868
The V4 package is ESM with TypeScript declarations. CommonJS projects can `require()` it on Node 20.19+ or 22.12+, or use `await import()`.
6969

‎docs/README.es.md‎

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616

1717
### Una consulta, datos reales
1818

19-
> **La versión candidata V4 está disponible en npm bajo la etiqueta `next`.** Instálala con `npm install @mathieuc/tradingview@next`. La etiqueta predeterminada `latest` sigue en V3 y no exporta `getCandles`.
19+
> **V4 es la versión predeterminada en npm.** Instálala con `npm install @mathieuc/tradingview` para usar `getCandles` y la nueva API de datos.
2020
2121
```js
2222
import { getCandles } from '@mathieuc/tradingview/data';
@@ -33,10 +33,10 @@ console.log(candles.at(-1)); // { time, open, high, low, close, volume }
3333

3434
### Inicio rápido interactivo
3535

36-
El asistente interactivo está incluido a partir de **4.0.0-rc.1**:
36+
El asistente interactivo está incluido en la V4:
3737

3838
```bash
39-
npx @mathieuc/tradingview@next
39+
npx @mathieuc/tradingview
4040
```
4141

4242
Ejecútalo desde el directorio de tu proyecto con Node.js 20+. Elige una opción:
@@ -45,7 +45,7 @@ Ejecútalo desde el directorio de tu proyecto con Node.js 20+. Elige una opción
4545
2. **Claude Code CLI** — inicia tu CLI `claude` instalado en este directorio con un prompt de proyecto listo para usar.
4646
3. **Codex CLI** — inicia tu CLI `codex` instalado en este directorio con el mismo prompt.
4747
4. **Otro agente de programación local** — muestra el prompt para pegarlo en tu agente.
48-
5. **Instalar solo la biblioteca** — ejecuta `npm install @mathieuc/tradingview@next` aquí, sin generar archivos ni iniciar un agente.
48+
5. **Instalar solo la biblioteca** — ejecuta `npm install @mathieuc/tradingview` aquí, sin generar archivos ni iniciar un agente.
4949

5050
Claude Code y Codex deben estar instalados y autenticados. Sus solicitudes de permiso habituales siguen activadas. Si el inicio falla, se muestra el prompt para usarlo manualmente. Si no hay navegador disponible, el enlace alojado sigue visible.
5151

@@ -59,11 +59,11 @@ node bin/tradingview.mjs
5959
### Instalación manual
6060

6161
```bash
62-
npm install @mathieuc/tradingview@next
63-
# O: bun add @mathieuc/tradingview@next
62+
npm install @mathieuc/tradingview
63+
# O: bun add @mathieuc/tradingview
6464
```
6565

66-
`next` instala la versión candidata V4; la etiqueta predeterminada `latest` todavía instala V3. No mezcles imports de V4 con una instalación de V3.
66+
V4 se instala por defecto. V3 sigue disponible con `@mathieuc/tradingview@3`; consulta la guía de migración antes de actualizar un proyecto V3.
6767

6868
El paquete V4 es ESM con declaraciones TypeScript. Los proyectos CommonJS pueden usar `require()` en Node 20.19+ o 22.12+, o `await import()`.
6969

‎docs/README.fr.md‎

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616

1717
### Une requête, de vraies données
1818

19-
> **La release candidate V4 est disponible sur npm sous le tag `next`.** Installez-la avec `npm install @mathieuc/tradingview@next`. Le tag par défaut `latest` reste sur la V3 et n’exporte pas `getCandles`.
19+
> **La V4 est la version npm par défaut.** Installez-la avec `npm install @mathieuc/tradingview` pour utiliser `getCandles` et la nouvelle API de données.
2020
2121
```js
2222
import { getCandles } from '@mathieuc/tradingview/data';
@@ -33,10 +33,10 @@ Vous préférez commencer sans coder ? Les parcours ci-dessous le permettent aus
3333

3434
### Quick-start interactif
3535

36-
Le lanceur interactif est inclus à partir de **4.0.0-rc.1** :
36+
Le lanceur interactif est inclus dans la V4 :
3737

3838
```bash
39-
npx @mathieuc/tradingview@next
39+
npx @mathieuc/tradingview
4040
```
4141

4242
Lancez-le depuis le dossier de votre projet avec Node.js 20+. Choisissez un parcours :
@@ -45,7 +45,7 @@ Lancez-le depuis le dossier de votre projet avec Node.js 20+. Choisissez un parc
4545
2. **Claude Code CLI** — démarre votre CLI `claude` installé dans ce dossier, avec un prompt de projet prêt à l’emploi.
4646
3. **Codex CLI** — démarre votre CLI `codex` installé dans ce dossier, avec le même prompt.
4747
4. **Un autre coding-agent local** — affiche le prompt à coller dans votre agent.
48-
5. **Installer seulement la librairie** — exécute `npm install @mathieuc/tradingview@next` dans ce dossier, sans générer de fichiers ni démarrer d’agent.
48+
5. **Installer seulement la librairie** — exécute `npm install @mathieuc/tradingview` dans ce dossier, sans générer de fichiers ni démarrer d’agent.
4949

5050
Claude Code et Codex doivent déjà être installés et authentifiés. Leurs demandes d’autorisation habituelles restent actives. Si le lancement échoue, le prompt est affiché pour une utilisation manuelle. Si aucun navigateur n’est disponible, le lien hébergé reste visible.
5151

@@ -59,11 +59,11 @@ node bin/tradingview.mjs
5959
### Installation manuelle
6060

6161
```bash
62-
npm install @mathieuc/tradingview@next
63-
# Ou : bun add @mathieuc/tradingview@next
62+
npm install @mathieuc/tradingview
63+
# Ou : bun add @mathieuc/tradingview
6464
```
6565

66-
`next` installe la release candidate V4 ; le tag par défaut `latest` installe encore la V3. Ne mélangez pas les imports V4 avec une installation V3.
66+
La V4 est installée par défaut. La V3 reste disponible avec `@mathieuc/tradingview@3` ; consultez le guide de migration avant de mettre à jour un projet V3.
6767

6868
Le paquet V4 est ESM avec des déclarations TypeScript. Les projets CommonJS peuvent utiliser `require()` avec Node 20.19+ ou 22.12+, ou `await import()`.
6969

‎docs/README.pt.md‎

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616

1717
### Uma consulta, dados reais
1818

19-
> **A release candidate V4 está disponível no npm com a tag `next`.** Instale com `npm install @mathieuc/tradingview@next`. A tag padrão `latest` continua na V3 e não exporta `getCandles`.
19+
> **A V4 é a versão padrão no npm.** Instale com `npm install @mathieuc/tradingview` para usar `getCandles` e a nova API de dados.
2020
2121
```js
2222
import { getCandles } from '@mathieuc/tradingview/data';
@@ -33,10 +33,10 @@ Prefere começar sem código? Os caminhos abaixo também funcionam.
3333

3434
### Início rápido interativo
3535

36-
O assistente interativo está incluído a partir da **4.0.0-rc.1**:
36+
O assistente interativo está incluído na V4:
3737

3838
```bash
39-
npx @mathieuc/tradingview@next
39+
npx @mathieuc/tradingview
4040
```
4141

4242
Execute no diretório do seu projeto com Node.js 20+. Escolha um caminho:
@@ -45,7 +45,7 @@ Execute no diretório do seu projeto com Node.js 20+. Escolha um caminho:
4545
2. **Claude Code CLI** — inicia seu CLI `claude` instalado neste diretório com um prompt de projeto pronto para usar.
4646
3. **Codex CLI** — inicia seu CLI `codex` instalado neste diretório com o mesmo prompt.
4747
4. **Outro agente de programação local** — exibe o prompt para colar no seu agente.
48-
5. **Instalar apenas a biblioteca** — executa `npm install @mathieuc/tradingview@next` aqui, sem gerar arquivos nem iniciar um agente.
48+
5. **Instalar apenas a biblioteca** — executa `npm install @mathieuc/tradingview` aqui, sem gerar arquivos nem iniciar um agente.
4949

5050
Claude Code e Codex devem estar instalados e autenticados. As solicitações normais de permissão continuam ativas. Se a inicialização falhar, o prompt será exibido para uso manual. Se não houver navegador disponível, o link hospedado continuará visível.
5151

@@ -59,11 +59,11 @@ node bin/tradingview.mjs
5959
### Instalação manual
6060

6161
```bash
62-
npm install @mathieuc/tradingview@next
63-
# Ou: bun add @mathieuc/tradingview@next
62+
npm install @mathieuc/tradingview
63+
# Ou: bun add @mathieuc/tradingview
6464
```
6565

66-
`next` instala a release candidate V4; a tag padrão `latest` ainda instala a V3. Não misture imports da V4 com uma instalação da V3.
66+
A V4 é instalada por padrão. A V3 continua disponível com `@mathieuc/tradingview@3`; consulte o guia de migração antes de atualizar um projeto V3.
6767

6868
O pacote V4 é ESM com declarações TypeScript. Projetos CommonJS podem usar `require()` no Node 20.19+ ou 22.12+, ou `await import()`.
6969

‎docs/data-api.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
[README](../README.md) · [Low-level API](low-level-api.md) · [Migrating from v3](migration-v4.md) · [Examples](../examples)
44

5-
**V4 beta is currently available from this repository only; the latest npm release is still v3.** Build this checkout before running the examples below.
5+
**V4 is the default npm release.** Install `@mathieuc/tradingview` before running the examples below.
66

77
The data API is the simplest way to use this library, in any application. Each function opens what it needs, waits for complete data, and releases every websocket session (and the connection it opened) before returning, including on errors, timeouts and cancellation.
88

‎docs/release-4.0.0.md‎

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
# 4.0.0
2+
3+
Release channel: `latest`. This is the stable V4 release; V3 remains available by installing `@mathieuc/tradingview@3` explicitly.
4+
5+
## Highlights
6+
7+
- Make the V4 TypeScript/ESM data API the default installation: candles, quotes, indicators, screeners, watchlists and low-level sessions.
8+
- Include an interactive `npx @mathieuc/tradingview` quick-start with hosted and local-agent paths, plus library-only installation.
9+
- Point the quick-start, agent prompt, and English/French/Spanish/Portuguese guides at the stable package instead of `next`.
10+
11+
## Migration
12+
13+
V4 is a breaking rewrite with no V3 compatibility layer. Existing V3 projects should follow [the migration guide](migration-v4.md) and [the coverage matrix](v4-coverage.md). The npm `next` tag remains on 4.0.0-rc.2; install `@mathieuc/tradingview` for the stable version.
14+
15+
## Verification
16+
17+
The final release gate is `npm ci`, `npm run check`, `npm run test:bun`, a packed-tarball smoke test, and a fresh public-registry installation under Node and Bun. CI covers Node 20/22/24 and Bun. The published tarball and `latest` dist-tag must be checked against the locally packed release.

‎llms.txt‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
# https://www.npmjs.com/package/@mathieuc/tradingview
44

55
Independent community library for TradingView market data. Not an official TradingView API.
6-
Version 4 release candidate: TypeScript, ESM, Node >= 20 or Bun. Breaking rewrite of v3 (no compatibility layer). Install the prerelease with npm install @mathieuc/tradingview@next; the default latest tag remains v3.
6+
Version 4 is the default npm release: TypeScript, ESM, Node >= 20 or Bun. Breaking rewrite of v3 (no compatibility layer). Install with npm install @mathieuc/tradingview. Existing V3 projects should consult docs/migration-v4.md before upgrading.
77

88
Simple data API (import from '@mathieuc/tradingview/data' or the root entry):
99
- getCandles({ symbol, timeframe?, count?, from?, to?, chartType?, ... }) -> Candle[] oldest first, time in Unix seconds.
@@ -22,5 +22,5 @@ Low-level API: TradingViewClient, client.createChart() (ChartSession: setMarket,
2222

2323
Pine studies need a TradingView account (session cookies). Built-in studies and candles/quotes work anonymously, with history limits.
2424
Docs: docs/data-api.md, docs/low-level-api.md, docs/migration-v4.md, docs/v4-coverage.md, docs/v4-reliability.md, docs/protocol-contributing.md. Examples: examples/.
25-
The next release adds an interactive setup CLI: npx @mathieuc/tradingview@next (not present in RC.0). It opens Molted Studio, launches a local coding agent with a prompt, prints that prompt, or installs the library. It is not a market-data query CLI. No MCP server, backtesting engine or hosted trading API is shipped.
25+
The interactive setup CLI is available with npx @mathieuc/tradingview. It opens Molted Studio, launches a local coding agent with a prompt, prints that prompt, or installs the library. It is not a market-data query CLI. No MCP server, backtesting engine or hosted trading API is shipped.
2626
Questions and bugs: https://github.com/Mathieu2301/TradingView-API/issues/new/choose

‎package-lock.json‎

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎package.json‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@mathieuc/tradingview",
3-
"version": "4.0.0-rc.2",
3+
"version": "4.0.0",
44
"description": "TradingView market data for JavaScript and TypeScript: candles, quotes, indicators and strategies, with a simple data API and full low-level access.",
55
"type": "module",
66
"main": "./dist/index.js",

‎scripts/smoke.mjs‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ try {
3434
const help = run('node', [launcher, '--help'], dir);
3535
if (!help.includes('Autonomous agent (recommended)')) throw new Error('CLI help missing');
3636
const prompt = run('node', [launcher, '--choice', '4'], dir);
37-
if (!prompt.includes('@mathieuc/tradingview@next')) throw new Error('CLI prompt missing');
37+
if (!prompt.includes('@mathieuc/tradingview')) throw new Error('CLI prompt missing');
3838
const noTty = spawnSync('node', [launcher], { cwd: dir, encoding: 'utf8' });
3939
if (noTty.status !== 1 || !noTty.stderr.includes('--choice')) throw new Error('CLI non-TTY guard failed');
4040
const bin = join(dir, 'node_modules', '.bin', 'tradingview');
@@ -57,7 +57,7 @@ writeFileSync(process.env.TV_CAPTURE, JSON.stringify({ args: process.argv.slice(
5757
});
5858
if (child.status !== 0) throw new Error(`CLI choice ${choice} failed: ${child.stderr}`);
5959
const received = JSON.parse(readFileSync(captured, 'utf8'));
60-
const expected = choice === '5' ? ['install', '@mathieuc/tradingview@next'] : [AGENT_PROMPT];
60+
const expected = choice === '5' ? ['install', '@mathieuc/tradingview'] : [AGENT_PROMPT];
6161
if (received.cwd !== dir || JSON.stringify(received.args) !== JSON.stringify(expected)) throw new Error(`CLI choice ${choice} altered argv or cwd`);
6262
}
6363
console.log('quick-start packed CLI ok');

0 commit comments

Comments
 (0)