TradingView API: Get technical rating
Returns TradingView's buy, sell and neutral technical indicator summary for a stock, cryptocurrency or currency pair. Not investment advice.
Unofficial. Not affiliated with or endorsed by TradingView.
Inputs
Values from the run on Oct 23, 2026, shown under Output.
- Asset, required
asset Stock, cryptocurrency, or currency pair name or symbol, such as Apple, Bitcoin, or EUR/USD.
Bitcoin
- Timeframe optional
timeframe Timeframe for the indicators, for example 4_hours.
4_hours
One of
1_hour,4_hours,1_day,1_week,1_month. Default1_day.
Input as JSON
{ "asset": "Bitcoin", "timeframe": "4_hours"}Output
{ "name": "Bitcoin", "price": 81661.84, "rsi_14": 44.83099332090769, "sma_20": 82431.26600000009, "sma_50": 82026.25399999997, "symbol": "BTCUSD", "sma_200": 83458.69945000003, "currency": "USD", "exchange": "BITSTAMP", "buy_count": 3, "timeframe": "4_hours", "macd_level": -176.05143201154715, "sell_count": 14, "full_symbol": "BITSTAMP:BTCUSD", "neutral_count": 9, "overall_signal": "Sell", "macd_signal_line": 10.781677057627725, "tradingview_link": "https://www.tradingview.com/symbols/BITSTAMP-BTCUSD/technicals/" , "oscillators_signal": "Neutral", "overall_rating_score": -0.35454545454545455, "moving_averages_signal": "Strong sell", "oscillators_rating_score": 0.09090909090909091, "moving_averages_rating_score": -0.8}Code
curl https://api.fous.com/v1/runs \ -H "Authorization: Bearer $FOUS_API_KEY" \ -H "Content-Type: application/json" \ -d '{"method":"tradingview.com/get_technical_rating","input":{"asset":"Bitcoin","timeframe":"4_hours"}}' # Save as fous.py, then run: python3 fous.pyimport json, os, timefrom urllib.error import HTTPErrorfrom urllib.request import Request, urlopenAPI = "https://api.fous.com/v1/runs" KEY = os.environ["FOUS_API_KEY"]HEADERS = { "Authorization": f"Bearer {KEY}", "Content-Type": "application/json" ,}def call(url, body=None): data = json.dumps(body).encode() if body else None request = Request(url, data, HEADERS) try: with urlopen(request, timeout=120) as r: return r.status, json.load(r) except HTTPError as error: message = json.load(error)["error"]["message"] raise RuntimeError(message) from errorstatus, run = call(API, { "method": "tradingview.com/get_technical_rating" , "input": { "asset": "Bitcoin", "timeframe": "4_hours" }})# 202: still going after 30 s. Ask again until it ends.while status == 202: time.sleep(2) status, run = call(f"{API}/{run['id']}")print(json.dumps(run["data"], indent=2))// Save as fous.mjs, then run: node fous.mjsconst api = "https://api.fous.com/v1/runs" ;const headers = { Authorization: `Bearer ${process.env.FOUS_API_KEY}`, "Content-Type": "application/json" ,};let response = await fetch(api, { method: "POST", headers, body: JSON.stringify({ "method": "tradingview.com/get_technical_rating" , "input": { "asset": "Bitcoin", "timeframe": "4_hours" } }), signal: AbortSignal.timeout(120_000),});let run = await response.json();// 202: still going after 30 s. Ask again until it ends.while (response.status === 202) { await new Promise((done) => setTimeout(done, 2_000)); response = await fetch(`${api}/${run.id}`, { headers }); run = await response.json();}if (!response.ok) throw new Error(run.error.message);console.log(run.data);# Connect your agent to Fous once, over MCP (Streamable HTTP):# https://api.fous.com/mcp# Set FOUS_API_KEY first: create a key at https://app.fous.com/keys.# Claude Codeclaude mcp add \ --scope user \ --transport http fous https://api.fous.com/mcp \ --header "Authorization: Bearer ${FOUS_API_KEY:?Set FOUS_API_KEY to your Fous API key}"# Codexcodex mcp add fous \ --url https://api.fous.com/mcp \ --bearer-token-env-var FOUS_API_KEY# Cursor, VS Code, Windsurf, Cline and morenpx -y add-mcp https://api.fous.com/mcp -g -n fous \ --header "Authorization: Bearer ${FOUS_API_KEY:?Set FOUS_API_KEY to your Fous API key}"# Then ask your agent:# "Use Fous to run tradingview.com/get_technical_rating# with {"asset":"Bitcoin","timeframe":"4_hours"}"Over HTTP, the answer’s data holds the output. A run still going after 30 seconds answers 202 with its id: ask GET /v1/runs/{id} until it ends.
Schema
Input schema
{ "type": "object", "required": [ "asset" ], "properties": { "asset": { "type": "string", "examples": [ "Apple" ], "description": "Stock, cryptocurrency, or currency pair name or symbol, such as Apple, Bitcoin, or EUR/USD." }, "timeframe": { "enum": [ "1_hour", "4_hours", "1_day", "1_week", "1_month" ], "type": "string", "default": "1_day", "examples": [ "4_hours" ], "description": "Timeframe for the indicators, for example 4_hours." } }}Output schema
{ "type": "object", "required": [ "name", "symbol", "exchange", "price", "currency", "timeframe", "overall_signal", "moving_averages_signal", "oscillators_signal", "buy_count", "neutral_count", "sell_count", "rsi_14", "macd_level", "macd_signal_line", "sma_20", "sma_50", "sma_200", "tradingview_link", "overall_rating_score", "moving_averages_rating_score", "oscillators_rating_score", "full_symbol" ], "properties": { "name": { "type": "string", "description": "Asset name." }, "price": { "type": [ "number", "null" ], "description": "Latest price for the selected timeframe." }, "rsi_14": { "type": [ "number", "null" ], "description": "Relative strength index (14)." }, "sma_20": { "type": [ "number", "null" ], "description": "20-period simple moving average." }, "sma_50": { "type": [ "number", "null" ], "description": "50-period simple moving average." }, "symbol": { "type": "string", "description": "Trading symbol." }, "sma_200": { "type": [ "number", "null" ], "description": "200-period simple moving average." }, "currency": { "type": [ "string", "null" ], "description": "Currency of the price." }, "exchange": { "type": "string", "description": "Listing venue." }, "buy_count": { "type": "integer", "description": "Number of buy indicators." }, "timeframe": { "type": "string", "description": "Selected analysis timeframe." }, "macd_level": { "type": [ "number", "null" ], "description": "MACD level (12, 26)." }, "sell_count": { "type": "integer", "description": "Number of sell indicators." }, "full_symbol": { "type": "string", "description": "TradingView exchange-prefixed symbol.", "x-fous-developer": true }, "neutral_count": { "type": "integer", "description": "Number of neutral indicators." }, "overall_signal": { "type": "string", "description": "Summary signal." }, "macd_signal_line": { "type": [ "number", "null" ], "description": "MACD signal line." }, "tradingview_link": { "type": "string", "description": "TradingView technicals page." }, "oscillators_signal": { "type": [ "string", "null" ], "description": "Oscillators signal." }, "overall_rating_score": { "type": [ "number", "null" ], "description": "Raw summary score (-1 to 1).", "x-fous-developer": true }, "moving_averages_signal": { "type": [ "string", "null" ], "description": "Moving averages signal." }, "oscillators_rating_score": { "type": [ "number", "null" ], "description": "Raw oscillators score (-1 to 1).", "x-fous-developer": true }, "moving_averages_rating_score": { "type": [ "number", "null" ], "description": "Raw moving averages score (-1 to 1).", "x-fous-developer": true } }}- Price
- 1 credit per completed run (1¢ with pay as you go); failed runs are free.
- Method
tradingview.com/get_technical_rating- Returns
- overall, moving averages and oscillators signals, indicator counts, RSI, MACD, SMAs, price and TradingView link
Use it from your agent
Give your agent this line. It reads SKILL.md, gets a Fous API key and connects the Fous MCP server. Its run then takes the method tradingview.com/get_technical_rating with the inputs above.
Ask your agent
- What's the buy or sell signal for Tesla on the daily chart right now?
- Give me the technical rating for Bitcoin over the 4 hour timeframe, including RSI and MACD.
- Is the EUR/USD pair showing a neutral or bullish technical summary on the weekly chart?
- Check the moving average and oscillator signals for Nvidia stock on a 1 hour timeframe on TradingView.
- Summarize the indicator counts and overall rating for Ethereum on the monthly timeframe.
See more
All TradingView methodsFinds publicly listed stocks in a country, filtered by sector, US-dollar market cap band and minimum dividend yield, in the requested order. Quotes may be delayed.
tradingview.com/screen_stocksLooks up a stock, fund, index, or cryptocurrency by name or ticker and returns its latest displayed price and key statistics. Unavailable figures are null; quotes may be delayed.
finance.yahoo.com/get_quoteGets the current quoted price and key figures for a stock, fund, index, or cryptocurrency on Google Finance, by name or ticker. Prices may be delayed, and figures Google does not show are null.
google.com/get_quoteReturns Yahoo Finance daily, weekly or monthly price history and total adjusted-close return for a stock, fund, index or cryptocurrency.
finance.yahoo.com/get_price_historyGet a delayed US-listed stock snapshot from its ticker or company name. Analyst labels summarize Finviz's 1-5 mean score; dividend yield uses the estimated dividend when available. Missing metrics return null.
finviz.com/get_stock_snapshotReturns seven key economic indicators for a country from its public Trading Economics overview: GDP growth rate, inflation rate, interest rate, unemployment rate, government debt to GDP, currency and stock market. Indicators absent from the overview are null; the US dollar index is not reported as a USD exchange rate.
tradingeconomics.com/get_country_overviewShows analyst recommendations, price targets, earnings estimates and recent rating changes for a public company on Yahoo Finance.
finance.yahoo.com/get_analyst_ratingsGets decades of yearly commodity or stock-index price history from Macrotrends: yearly average, open, high, low, close, annual change and inflation-adjusted value for gold, silver, crude oil, natural gas, copper, Dow Jones, S&P 500 and Nasdaq. The current year may be incomplete.
macrotrends.net/get_long_term_price_history