Skip to main content
Glama

TradeCanvas is the open-source chart library for trading apps (tradecanvas.dev), under the MIT licence. Candlesticks to Renko, 134 indicators, 76 drawing tools, live feeds and orders on the chart, on Canvas 2D or WebGL, with no third-party dependencies. Use the full ChartWidget, or build your own interface on the headless Chart, in TypeScript, React, Vue or Svelte.

It is a charting engine you own: MIT-licensed, installed from npm and served with your app, fed by your own data, shown under your own brand. No logo on the chart, nothing to apply for, no platform between you and your users. Coming from TradingView's charting library or Lightweight Charts? Keep your datafeed: moving from TradingView.

Highlights

  • 18 chart types, 134 indicators, 76 drawing tools, indicators on indicators, alerts on lines, undo and redo.

  • Trading on the chart: positions with live P&L, orders and stops you drag, a paper broker or your own.

  • Live data from Binance, Bybit, Coinbase, Kraken and Upbit, or your own feed in about twenty lines.

  • Fast: a million bars panned at 60 fps with WebGL; a live tick in about a microsecond; ten minutes of 30,000 trades a second on a million bars with no memory growth (soak).

  • A workspace: grids of charts, layouts, bar replay, backtesting.

  • Fourteen more charts for the pages around the chart: depth, equity curve, waterfall, heatmap and sector map, bars, donut, scatter, histogram, calendar, correlation matrix, gauge, sparkline, and a backtest dashboard.

  • Yours to shape: themes, five looks, 133 switches, plugins; 30 languages; phones and apps.

Related MCP server: navigation-agent-mcp

Quick start

npm install @tradecanvas/chart
import { ChartWidget } from '@tradecanvas/chart/widget'
import { BinanceAdapter } from '@tradecanvas/chart'

new ChartWidget(document.getElementById('chart')!, {
  symbol: 'BTCUSDT',
  timeframe: '5m',
  theme: 'dark',
  adapter: new BinanceAdapter(), // live data, no API key
  trading: true,
})

The headless Chart takes your own bars (chart.setData(bars)) and leaves the interface to you. A source of your own is a DataFeed of two methods (getBars, subscribeBars), given as feed wherever an adapter goes; one feed serves any number of charts. For React, Vue and Svelte, @tradecanvas/react, /vue and /svelte wrap it in a component with the same props.

AI coding tools

The agent skill in skills/tradecanvas teaches coding agents the API, with examples that CI type-checks. In Claude Code:

/plugin marketplace add bonguynvan/tradecanvas
/plugin install tradecanvas@tradecanvas

Other agents (Cursor, Codex, Copilot and more): npx skills add bonguynvan/tradecanvas. Or ask any agent to set it all up, the package, the skill and the MCP server, asking you the scope first:

Install TradeCanvas for me by reading https://tradecanvas.dev/llms.txt

Without a skill, llms.txt and llms-full.txt give an assistant the docs in one file. Changing TradeCanvas itself with an agent? AGENTS.md holds the repo's rules.

The MCP server @tradecanvas/mcp looks up indicators, drawing tools, options, feature switches and style keys in the library's own catalog, and checks an options object before it is used (set it up in other clients):

claude mcp add tradecanvas -- npx -y @tradecanvas/mcp

On Windows outside WSL: claude mcp add tradecanvas -- cmd /c npx -y @tradecanvas/mcp. In Git Bash, which runs the ! commands of Claude Code on Windows, write //c: Git Bash turns /c into a path.

Moving an app from TradingView's charting library or Lightweight Charts? The same server maps their options, featuresets, overrides, studies, drawings and methods (migration_plan, migration_lookup, convert_widget_options), and feedFromJsApi keeps the datafeed as it is (Moving from TradingView).

Measured, not claimed: on 24 tasks an agent with the skill finished every run (48 of 48, and 47 of 48 without it), in 10 turns against 15 and 169k tokens against 221k, and went reading the compiled code in 1 run of 48 against 6 (the run, on 2.1.1; the tasks and what they turned up are in evals).

Start from a template

Three small Vite + TypeScript projects to clone and run in a minute, each a GitHub template with a live page:

  • Crypto terminal: the widget on live Binance data, with a watchlist. Live · template

  • Stock chart: NYSE hours, daily bars from a CSV, or your own server through udfFeed. Live · template

  • Workspace: four charts in a 2×2 grid, the crosshair, interval and time linked, the layout saved. Live · template

Documentation

Getting started · From TradingView · API · Indicators · Drawing tools · Realtime · Trading · Styling · Frameworks · Plugins · Phones and apps · Performance

The docs are in English, Tiếng Việt, 简体中文, 日本語, 한국어 and Español. Measurements, limits and how it is tested are on the system audit.

More

  • Packages: @tradecanvas/chart (the chart and the widget), react · vue · svelte, and analytics for backtests, and mcp for coding agents.

  • Previews: every pull request and commit on main is on pkg.pr.new, installable before a release.

  • Browsers: Chrome 80+, Edge 80+, Firefox 80+, Safari 14+.

  • Licence: MIT, one licence for everyone, a personal project or a company's product: no logo to show, nothing to apply for.

  • For businesses: the For businesses page answers an IT review. business@tradecanvas.dev

  • Related: bo-grid, a fast Svelte data grid for the table half of a trading desk.

  • Contributing: questions in Discussions, bugs in the issues, and CONTRIBUTING.md for pull requests. Security issues: SECURITY.md.

  • Sponsor: TradeCanvas is free and built in the open; GitHub Sponsors keeps it going.

MIT

Available Tools

12 tools
convert_widget_optionsConvert TradingView widget optionsA
Read-onlyIdempotent

Turns the options object of TradingView's widget (new TradingView.widget({...}): its options, disabled_features / enabled_features and overrides) into ChartWidget options, or Lightweight Charts' createChart options into Chart options. Returns the options, the calls to make once the chart exists, what has no place (each with what to do), and what validate_options finds in the result. Write functions and other code as strings; they are carried as they are.

Inputs: options (required), source.

custom_indicatorWrite an indicator of your ownA
Read-onlyIdempotent

How to write and register an indicator of your own (an IndicatorPlugin, usually a class extending IndicatorBase): the descriptor (plots and their kinds, markers among them; inputs and labelled choices; scale, levels, category, defaultStyle by theme), calculate, the incremental update and when revisesBefore is needed, render, registering it before a saved layout is read (ChartWidget plugins), and what the legend, the axis, the CSV export and the settings take from the descriptor. Markdown with TypeScript that is type-checked against the published packages.

Inputs: no named parameters.

get_indicatorGet an indicatorA
Read-onlyIdempotent

One built-in indicator in full: its default params (what addIndicator takes), its inputs, its lines (the keys getIndicatorOutput returns per bar, which are often not the indicator id: RSI's line is value), its levels, and code that adds it and reads it. Takes the id, the short name or the full name.

Inputs: id (required).

list_drawing_toolsList drawing toolsA
Read-onlyIdempotent

Lists the built-in drawing tools: the type that chart.addDrawing and chart.setDrawingTool take, the number of points (anchors) each needs, how the pointer draws it, and the options it offers. Search by words of the type or name ("fib", "channel").

Inputs: query.

list_finance_chartsList the finance chartsA
Read-onlyIdempotent

Lists the charts of @tradecanvas/chart that are not the trading chart: bars, donut, scatter, histogram, calendar, correlation matrix, heatmap and sector map, depth, equity curve, waterfall, gauge, sparkline, and a backtest dashboard. Each with its class name and what it is for; list_options with that name gives its options. Search by words of the name or the purpose.

Inputs: query.

list_indicatorsList built-in indicatorsA
Read-onlyIdempotent

Lists the built-in indicators with their ids, names and where they draw (overlay: on the price pane; panel: in a pane of their own). Search by words of the id or name ("moving average", "bollinger"). Use the id with chart.addIndicator(id, params); get_indicator has the params and line keys.

Inputs: query, placement.

list_optionsList the options of an entry pointA
Read-onlyIdempotent

Lists the options that new ChartWidget(el, options), new Chart(el, options), new ChartWidgetGrid(el, options) or a finance chart (new BarChart(el, options)…) take: each name, its TypeScript type, its doc, and the values it allows where it allows only some. Search by words of the name or doc.

Inputs: target (required), query.

list_style_keysList chart style keysA
Read-onlyIdempotent

Lists the style keys of the chart's look and the kind of value each takes (color, boolean, lineStyle: 'solid' | 'dashed' | 'dotted', width: pixels up to 20). They go in Chart's overrides option or chart.applyOverrides({...}). Narrow by a prefix such as 'grid.' or 'series.candlestick.'.

Inputs: prefix.

list_widget_featuresList ChartWidget feature switchesA
Read-onlyIdempotent

Lists the names ChartWidget's features option takes (every switch is on unless set false). A name without a dot turns a whole capability off ('alerts', 'hotkeys'); a dotted name, one place ('toolbar.screenshot', 'menu.chart.settings'). Narrow by a prefix.

Inputs: prefix.

migration_lookupLook up a TradingView nameA
Read-onlyIdempotent

What a name of TradingView's charting library (Advanced Charts, Trading Platform) or Lightweight Charts becomes in TradeCanvas: a widget option, featureset, override key, study, drawing shape, widget or chart method, datafeed or broker member, or a resolution. Gives the TradeCanvas option, feature switch, style key, indicator id (with its defaults and line keys), drawing type (with its anchors) or call, and says plainly when there is no equivalent and what to do instead. Look up one name with 'name', or search the table with 'query'.

Inputs: kind, name, query, source.

migration_planPlan a move from TradingViewA
Read-onlyIdempotent

How to move an app from TradingView's Advanced Charts / Trading Platform (the charting library) or from Lightweight Charts to TradeCanvas: the steps in order, what to search the app's code for and which tool maps what each search finds, and what to check at the end. Call it first.

Inputs: source.

validate_optionsCheck an options objectA
Read-onlyIdempotent

Checks an options object before it goes to new ChartWidget, new Chart, new ChartWidgetGrid or a finance chart (by its class name): unknown option names (with the one likely meant, and where an option of another entry point belongs), values outside the allowed ones, numbers given as strings, intervals, feature switch names, style override keys and values, and languages, nested options included. Write functions and adapters as strings; they pass.

Inputs: target (required), options (required).

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    A3.9/5.0

    Scored across 12 tools

    Disambiguation4/5

    Most tools occupy clearly separated slots: list/get pairs for indicators, a dedicated tool for drawing tools, and distinct migration and validation tools. The only friction is among list_options, list_widget_features, and list_style_keys, which all enumerate parts of the config surface; descriptions do explain the split (constructor options vs. feature switches vs. override keys), and validate_options catches misplacement afterward.

    Naming Consistency4/5

    All names are snake_case and the dominant pattern is verb_noun (list_*, get_*, validate_options, convert_widget_options). The deviations are migration_plan and migration_lookup (noun-first) plus custom_indicator, which carries no verb at all, but each is still readable and thematically grouped.

    Tool Count5/5

    Twelve tools is well inside the sweet spot for a library-reference server of this breadth. Each tool maps to a distinct documentation need (discovery, detail, conversion, validation, migration) and none look redundant or padded.

    Completeness4/5

    The surface covers config discovery, indicator and drawing inventories, custom indicators, validation, and a full TradingView/Lightweight Charts migration path, which is unusually thorough. Gaps remain: there is no tool exposing the Chart/ChartWidget runtime API surface (methods, events, datafeed/broker setup) for greenfield builds, and validation only covers options objects, not addIndicator params or addDrawing options.

    Maintenance

    ActivityActive
    ResponsivenessOutdated data

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      A
      quality
      D
      maintenance
      A read-only MCP server that provides LLMs with introspection data and documentation for the Freqtrade codebase. It enables AI tools to access class signatures, method details, and configuration schemas to assist in writing more reliable trading strategies.
      13
      18
      GPL 3.0
    • F
      license
      Not graded
      quality
      D
      maintenance
      A minimal MCP server providing a normalized API for code navigation and repository inspection through tools like symbol searching and call tracing. It enables AI agents to perform structured analysis of codebases by mapping endpoints, inspecting file trees, and tracing symbol relationships.
      3
      -
    • A
      license
      A
      quality
      D
      maintenance
      A type-safe MCP server that enables AI agents to control TradingView Desktop via Chrome DevTools Protocol, allowing chart state reading, symbol/timeframe changes, and OHLCV data fetching.
      11
      1
      MIT
    • A
      license
      A
      quality
      D
      maintenance
      MCP server that indexes your codebase's public API at startup and serves it via compact tool responses, saving tokens vs reading source files.
      5
      88 PyPI
      21
      MIT