π Get real-time stocks from TradingView
TypeScript backtestingbacktesting-trading-strategiesbitcoinchartscryptocryptocurrencyethereumrealtime-stocksstocksstocks-apistocks-pricestradingtradingviewtradingview-apitradingview-indicatortradingview-replaytradingview-scraper
Position simple data API as high-level, not agent-only
Mathieu Colmone784104502e4
diff --git a/README.md b/README.mdindex bf4b558..c1e92ca 100644--- a/README.md+++ b/README.md@@ -1,6 +1,6 @@# TradingView-API-**Try it with a hosted agent:** [Build a market watcher on Molted Studio](https://molted.studio/dreams/market-watch-alerts) β no local setup.+**Explore it with a hosted agent:** [Discover what you can build on Molted Studio](https://molted.studio/dreams/market-watch-alerts) β no local setup.<a href="https://trendshift.io/repositories/26416?utm_source=repository-badge&utm_medium=badge&utm_campaign=badge-repository-26416" target="_blank" rel="noopener noreferrer"><img src="https://trendshift.io/api/badge/repositories/26416" alt="Mathieu2301/TradingView-API | #1 Repo Of The Day on Trendshift" width="250" height="55"/></a>@@ -17,11 +17,11 @@| If you want toβ¦ | Start here || --- | --- || Use the stable npm library today | [Install](#stable-library) and browse [examples](examples) |-| Let an AI agent build with you | [Agent guide](docs/agent-api.md) β works with Claude Code, Codex, OpenClaw and similar tools |+| Use simple market data without managing chart or widget sessions | [High-level API preview](docs/agent-api.md) β for any application, including agent-built ones || Avoid local setup | [Molted](https://molted.cloud/) hosts an agent workspace; ask it to work from this repository || Contribute or request something | [Open an issue](https://github.com/Mathieu2301/TradingView-API/issues/new/choose) |-Molted is optional. The library remains open source and usable locally. The new agent API below is **a development preview**, not yet included in the current npm release.+Molted is optional. The library remains open source and usable locally. The new high-level API below is **a development preview**, not yet included in the current npm release.## Stable library@@ -48,9 +48,9 @@ chart.setMarket('BINANCE:BTCUSDT', { timeframe: 'D' });The existing `Client`, chart and quote sessions, Pine indicators, replay features and [examples](examples) remain available during the migration.-## Agent-friendly API β development preview+## High-level API β development preview-The first TypeScript slice adds two simple patterns on top of the existing transport:+This first TypeScript slice offers simple data access without managing chart sessions, widgets or deep-history internals. It is useful in any application, whether you write it yourself or with an agent:```tsimport { fetchCandles, watchCandles } from '@mathieuc/tradingview/agent';@@ -80,7 +80,7 @@ npm cinpm run build:agent```-From that checkout, import `./agent.js` . The stable npm package does **not** have this subpath yet; it will be released after review and validation. See the [full agent API guide](docs/agent-api.md) for error handling, lifecycle and provider adapters.+From that checkout, import `./agent.js` . The stable npm package does **not** have this subpath yet; it will be released after review and validation. See the [high-level API guide](docs/agent-api.md) for error handling, lifecycle and provider adapters.## What is next?diff --git a/docs/agent-api.md b/docs/agent-api.mdindex 5e91e6b..56f8397 100644--- a/docs/agent-api.md+++ b/docs/agent-api.md@@ -1,8 +1,8 @@-# Agent API guide+# High-level API guide (development preview)[Repository](https://github.com/Mathieu2301/TradingView-API) Β· [npm package](https://www.npmjs.com/package/@mathieuc/tradingview) Β· [Open an issue](https://github.com/Mathieu2301/TradingView-API/issues/new/choose)-This is a **development preview**. Build it from source with `npm ci && npm run build:agent`; the current npm release does not include `@mathieuc/tradingview/agent` yet. The historic `require('@mathieuc/tradingview')` API is unchanged.+This is a **development preview** of a simpler data-access layer for any application, not an agent-only interface. It hides chart-session lifecycle and other low-level TradingView details. The temporary `/agent` subpath and `build:agent` script names predate the planned TypeScript/Bun redesign and do not define the final syntax. Build it from source with `npm ci && npm run build:agent`; the current npm release does not include `@mathieuc/tradingview/agent` yet. The historic `require('@mathieuc/tradingview')` API is unchanged.## One-shot@@ -50,6 +50,6 @@ try {## Providers-`MarketDataProvider` is a small adapter contract. `TradingViewProvider` is the first implementation. Applications can inject another provider into `fetchCandles(query, provider)` or `watchCandles(query, handlers, provider)` without changing their callers. The same interface makes isolated agent tests possible without network traffic.+`MarketDataProvider` is a small adapter contract. `TradingViewProvider` is the first implementation. Applications can inject another provider into `fetchCandles(query, provider)` or `watchCandles(query, handlers, provider)` without changing their callers. The same interface makes isolated tests possible without network traffic.Use only accounts and data sources for which you have the necessary permissions. Never paste session cookies or API keys into issues, source files, or agent instructions.