Skip to content

TradingView Screener APITypeScript Library for Market Data

Query stocks, crypto, forex, bonds, and futures with 13,000+ fields

TradingView Screener API

Quick Example โ€‹

typescript
import { StockScreener, StockField } from 'tradingview-screener'

// Find undervalued dividend stocks
const screener = new StockScreener()
  .where(StockField.PRICE_TO_EARNINGS_RATIO_TTM.lt(15))
  .where(StockField.DIVIDEND_YIELD_FWD.gte(3))
  .where(StockField.MARKET_CAPITALIZATION.gte(1_000_000_000))
  .select(
    StockField.NAME,
    StockField.PRICE,
    StockField.PRICE_TO_EARNINGS_RATIO_TTM,
    StockField.DIVIDEND_YIELD_FWD
  )
  .sortBy(StockField.DIVIDEND_YIELD_FWD, false)
  .setRange(0, 50)

const results = await screener.get()
console.log(`Found ${results.totalCount} stocks`)
results.data.forEach(stock => console.log(stock))

Use Cases โ€‹

๐Ÿ“ˆ Value Investing

Find undervalued stocks using P/E ratios, P/B ratios, dividend yields, and fundamental metrics.

๐Ÿ“Š Technical Analysis

Screen by RSI, MACD, moving averages, volume, and other technical indicators across multiple timeframes.

๐Ÿ’ฐ Dividend Investing

Discover high-yield dividend stocks with consistent payout history and strong fundamentals.

๐Ÿš€ Growth Stocks

Identify high-growth companies using revenue growth, earnings momentum, and analyst recommendations.

โ‚ฟ Crypto Trading

Screen cryptocurrencies by market cap, volume, price changes, and technical indicators.

๐Ÿค– AI Integration

Use with Claude Desktop for natural language market queries and automated investment research.

Released under the MIT License.