NEW: Live arbitrage across 10+ prediction markets.Arbitrage →
← Index
APIOct 7, 2026

Prediction Market TradingView Charts (2026): Polymarket and Kalshi

Prediction Market TradingView Charts (2026): Polymarket and Kalshi

The Short Answer

TradingView has no Polymarket or Kalshi contract symbols, so charting a prediction market there means feeding TradingView's charting library your own data. In our check of TradingView's symbol search on 8 October 2026, both names returned company listings and crypto pairs, not markets. The usual route is TradingView's Advanced Charts library, which TradingView offers free with its logo to companies building public web projects, plus a datafeed that answers getBars with historical candles and subscribeBars with live trades. Polymarket and Kalshi candles fit that datafeed at 12 resolutions, from one second to one day.

Key Takeaways

  • TradingView's symbol search lists Polymarket and Kalshi as pre-IPO companies, not as markets you can chart.
  • Advanced Charts is free with the TradingView logo, but only for companies' public web projects. Lightweight Charts is open source and fine for personal projects.
  • A datafeed serves historical bars through getBars and live updates through subscribeBars, with bar times in milliseconds.
  • fetchOHLCV has a matching resolution for 12 Advanced Charts resolutions, from 1S to 1D, at up to 5,000 candles per call.
  • Keep the history API key on your server, and give the browser its own read-only key for the trades stream.

Does TradingView have Polymarket or Kalshi data?

Not as markets. When we searched TradingView's symbols on 8 October 2026, Polymarket and Kalshi came back as pre-IPO company pages with private share classes, alongside crypto pairs and perpetual contracts on third-party exchanges that borrow the names. None of the results was a prediction market contract, such as an election or a Fed decision market.

TradingView's community library does carry scripts named after Polymarket and Kalshi. The ones we read compute signals from the chart's own crypto prices, for example a probability estimate from time to expiry and volatility, rather than loading either venue's prices. TradingView's embeddable widgets show data TradingView carries, so they cannot display a contract it does not list.

How do you put a prediction market on a TradingView chart?

With one of TradingView's charting libraries and your own data. TradingView describes Advanced Charts as "a free, standalone solution that you can host on your own servers" and feed with your own data. It comes free with the TradingView logo under a proprietary license. As of October 2026, TradingView provides it only to companies for public web projects and applications, not for personal use, hobbies, studies or testing. For personal projects, TradingView points to Lightweight Charts, which is open source under the Apache 2.0 license.

Advanced Charts reads data through its Datafeed API. TradingView lists six required methods, onReady, searchSymbols, resolveSymbol, getBars, subscribeBars and unsubscribeBars, and a bar is a time in milliseconds plus open, high, low, close and an optional volume.

Predictefy's TradingView charts guide, at docs.predictefy.com/guides/tradingview-charts, fills that contract for Polymarket and Kalshi. getBars loads candles from fetchOHLCV, and subscribeBars updates the forming bar from the trades stream, which runs natively for both venues. To let users pick any market from the chart, back searchSymbols with a market search.

Which TradingView resolutions work with prediction market candles?

The guide maps twelve Advanced Charts resolutions onto matching server resolutions:

Advanced ChartsfetchOHLCVHow the candles are built
1S, 5S, 10S, 30S1s, 5s, 10s, 30sFrom trades, for Polymarket and Kalshi
1, 60, 1D1m, 1h, 1dStored
5, 15, 30, 240, 3605m, 15m, 30m, 4h, 6hAggregated server-side from stored candles

One call returns up to 5,000 candles, so page longer ranges with start and end. Lightweight Charts can draw the same candles too, but it expects time in seconds, so divide each timestamp by 1,000 there.

How do you load Polymarket and Kalshi candles for getBars?

On your server, call fetchOHLCV with the outcome, the mapped resolution and the window Advanced Charts asks for. This uses the TypeScript SDK, @predictefy/sdk:

import { Predictefy } from '@predictefy/sdk';

const client = new Predictefy({ apiKey: process.env.PREDICTEFY_API_KEY });

// Advanced Charts resolution names, mapped to fetchOHLCV resolutions
const SERVER_RESOLUTION = {
  '1S': '1s', '5S': '5s', '10S': '10s', '30S': '30s',
  '1': '1m', '5': '5m', '15': '15m', '30': '30m',
  '60': '1h', '240': '4h', '360': '6h', '1D': '1d',
} as const;

type ChartResolution = keyof typeof SERVER_RESOLUTION;

export async function loadBars(
  venue: 'polymarket' | 'kalshi',
  outcomeId: string,
  resolution: ChartResolution,
  from: number, // periodParams.from, in seconds
  to: number, // periodParams.to, in seconds
  countBack: number,
) {
  const params = {
    outcomeId,
    resolution: SERVER_RESOLUTION[resolution],
    start: from * 1000,
    end: to * 1000,
    limit: Math.max(1, Math.min(countBack, 5000)),
  };

  const candles = venue === 'kalshi'
    ? await client.kalshi.fetchOHLCV(params)
    : await client.polymarket.fetchOHLCV(params);

  return candles
    .map((c) => ({ time: c.timestamp, open: c.open, high: c.high, low: c.low, close: c.close, volume: c.volume ?? 0 }))
    .sort((a, b) => a.time - b.time);
}

Advanced Charts sends from and to in seconds and countBack as the number of bars it wants, so the function converts to milliseconds and caps the limit at 5,000. Candle timestamps are already in milliseconds, which is what a bar expects. outcomeId is the catalog outcomeId from a market read, or the venue's native id: the CLOB token ID on Polymarket and the market ticker on Kalshi. Serve loadBars from a route on your own server and have the browser's getBars call it, so the key never reaches the page.

Each candle also says where it came from. source, sourceType, quality and isTrueCandle separate true venue candles from derived ones, which matters more in a backtest than on a chart. How deep each venue's history runs is covered in Polymarket historical data and Kalshi historical data.

How do you update the live bar on a TradingView chart?

Subscribe to the trades channel and fold each trade into the forming bar. The guide uses three transitions: start a bar from the first trade, extend the current bar, or roll into a new bar whose open is the previous close. Trade sizes add up to the bar's volume:

export type Bar = { time: number; open: number; high: number; low: number; close: number; volume: number };
type Fill = { timestamp: number; price: number; shares: number };

export function applyTrade(bar: Bar | undefined, trade: Fill, bucketMs: number): Bar | undefined {
  const start = Math.floor(trade.timestamp / bucketMs) * bucketMs;
  const { price, shares } = trade;

  if (!bar) return { time: start, open: price, high: price, low: price, close: price, volume: shares };
  if (start === bar.time) {
    return { ...bar, high: Math.max(bar.high, price), low: Math.min(bar.low, price), close: price, volume: bar.volume + shares };
  }
  if (start > bar.time) {
    const open = bar.close;
    return { time: start, open, high: Math.max(open, price), low: Math.min(open, price), close: price, volume: shares };
  }
  return undefined; // a late trade for an older bar: skip it
}

export function streamBars(
  streamUrl: string,
  readKey: string,
  venue: 'polymarket' | 'kalshi',
  marketId: string,
  bucketMs: number,
  onBar: (bar: Bar) => void,
): WebSocket {
  const socket = new WebSocket(streamUrl);
  let bar: Bar | undefined;

  socket.addEventListener('open', () => {
    socket.send(JSON.stringify({ op: 'auth', apiKey: readKey }));
    socket.send(JSON.stringify({ op: 'subscribe', channel: 'trades', venue, marketId }));
  });

  socket.addEventListener('message', (event) => {
    const frame = JSON.parse(String(event.data)) as { type?: string; venue?: string; marketId?: string; data?: Fill };
    if (frame.type !== 'trade' || frame.venue !== venue || frame.marketId !== marketId || !frame.data) return;
    const next = applyTrade(bar, frame.data, bucketMs);
    if (next) {
      bar = next;
      onBar({ ...next });
    }
  });

  return socket;
}

streamUrl is the WebSocket origin shown in your dashboard, on the /v1/stream path. Because the browser sees readKey, make it a separate key with only the read scope, never the server's history key. The auth frame must come first and arrive within 10 seconds, and the key never goes in the URL. marketId takes the same native id as above, and bucketMs is the bar length, such as 60,000 for one-minute bars. Pass each bar to the onRealtimeCallback that Advanced Charts hands to subscribeBars.

The same subscription carries every trade's price, size, side and time, so a trade tape beside the chart needs no extra connection. Streaming setup in general is covered in how to stream live prediction market prices.

What does a prediction market chart cost to run?

The charting side costs nothing extra if you qualify for Advanced Charts or use Lightweight Charts. On the data side, the Predictefy API's Free plan includes 25,000 credits a month and 2 live streams, and each candle request costs 5 credits. Every getBars call becomes one history request, so cache candles on your server and only fetch the bars a chart has not seen. The Builder plan raises that to 20 streams with 12 months of history, and the same fetchOHLCV call works across 15+ venues, not just Polymarket and Kalshi.

Frequently Asked Questions

Can you chart Polymarket on TradingView?

Not from TradingView's own data. Its symbol search lists Polymarket as a pre-IPO company rather than its markets. To chart a market's price, load candles from an API into TradingView's Advanced Charts or Lightweight Charts library.

Does TradingView have Kalshi markets?

No. In our check of TradingView's symbol search on 8 October 2026, Kalshi appeared as a pre-IPO company with private share classes, plus third-party perpetual contracts using the name, but none of its event contracts.

Is TradingView's Advanced Charts library free?

TradingView offers it free with the TradingView logo under a proprietary license, but only to companies for public web projects and applications, not for personal use, hobbies, studies or testing. Lightweight Charts is open source under Apache 2.0 for personal projects.

What data does a TradingView datafeed need?

Bars with a time in milliseconds, open, high, low, close and an optional volume. getBars returns historical bars for a requested range, and subscribeBars pushes updates to the forming bar as trades arrive.

Which chart resolutions work with Polymarket and Kalshi candles?

Twelve Advanced Charts resolutions have a match: 1S, 5S, 10S, 30S, 1, 5, 15, 30, 60, 240, 360 and 1D, which map to fetchOHLCV's 1s through 1d. One call returns up to 5,000 candles.

Where should the API key go in a TradingView integration?

Keep the history key on your server and proxy candle requests through your own route. For live bars in the browser, use a separate key with only the read scope, send it in the first WebSocket frame, and never put it in the URL.