百科.dev
全部条目在线工具AI 编程趋势榜开源项目技术资讯提交条目
登录
< 返回工具列表
T

tipranks-api-v2

> 编程语言
开源

tipranks.com API,可访问价格目标、新闻情绪和热门股票。

100 stars0 点赞2 次浏览
访问官网GitHub

工具介绍

tipranks.com API,可访问价格目标、新闻情绪和热门股票。

Tipranks.com API

For any company (e.g. Tesla) the API returns

  • price targets calculated from analyst estimates: mean, median, highest, lowest, number of estimates
  • news sentiment data (bullish vs bearish) based on published articles in the last week

It also returns trending stocks.

Examples

Tesla Price Targets

json
{
  "symbol": "TSLA",
  "priceTargets": {
    "mean": 297.3333333333333,
    "median": 300,
    "highest": 500,
    "lowest": 54,
    "numberOfEstimates": 21
  }
}

Tesla News Sentiment

json
{
  "symbol": "TSLA",
  "sentiment": {
    "bullishPercent": 0.4062,
    "bearishPercent": 0.5938
  },
  "buzz": {
    "articlesInLastWeek": 143,
    "weeklyAverage": 147.25,
    "buzz": 0.9711
  },
  "sectorAverageBullishPercent": 0.6204,
  "sectorAverageNewsScore": 0.52,
  "companyNewsScore": 0.3969
}

Trending Stocks

…

Setup

  • Install Node.js (which includes npm) if you haven't already. On Mac in the command line type brew install node. More information here: nodejs.org
  • Set up a new Node.js project. In the command line type
    • mkdir my-new-project && cd my-new-project to create a new folder
    • npm init to scaffold the Node.js project
    • touch index.js to create the file index.js
    • npm install tipranks-api-v2 to install the library to access the API
    • Copy/paste the example code below inside the index.js file
javascript
const tipranksApi = require('tipranks-api-v2');
tipranksApi.getPriceTargets('MU').then(result => console.log(result));
tipranksApi.getNewsSentimentData('MU').then(result => console.log(result));
tipranksApi.getTrendingStocks().then(trending => console.log(trending));
  • node index.js to run the code inside the index.js file
  • Done! Now you should see the price targets and the news sentiment for the ticker MU

Documentation

The API supports the following commands:

  • .getPriceTargets(ticker)
    • ticker is a string representing the company ticker, e.g. TSLA.
    • This method returns the mean price target, median target, highest target, lowest target, and the number of analyst estimates. See below for an example.

Note: The price calculator (e.g. mean price) only considers analyst price estimates given in the last 3 months. The API intentionally excludes estimates given more than three months ago as analysts seem to review/update their estimates in a quarterly interval. The result: under "Analyst ratings" on the website the "average price" for MU was 46.5 and the script displayed 46.77 for "mean" price.

  • .getNewsSentimentData(ticker)

    • ticker is a string representing the company ticker, e.g. TSLA.
    • This method returns the bullish and bearish sentiment in percent, the number of articles published last week, sector average bullish percent, sector average news score, and the company's news score. See example below.
  • .getTrendingStocks()

    • Returns an array of trending stocks listed on tipranks.com/trending-stocks

Examples

Get Price Targets: getPriceTargets

index.js File

  • Copy the code below into the index.js file
  • node index.js to run the code
javascript
const tipranksApi = require('tipranks-api-v2');

tipranksApi.getPriceTargets('TSLA').then(result => console.log(result));

Output

json
{
  "symbol": "TSLA",
  "priceTargets": {
    "mean": 297.3333333333333,
    "median": 300,
    "highest": 500,
    "lowest": 54,
    "numberOfEstimates": 21
  }
}

Get News Sentiment: getNewsSentimentData

index.js File

  • Copy the code below into the index.js file
  • node index.js to run the code
javascript
const tipranksApi = require('tipranks-api-v2');

tipranksApi.getNewsSentimentData('TSLA').then(result => console.log(result));

Output

json
{
  "symbol": "TSLA",
  "sentiment": {
    "bullishPercent": 0.4062,
    "bearishPercent": 0.5938
  },
  "buzz": {
    "articlesInLastWeek": 143,
    "weeklyAverage": 147.25,
    "buzz": 0.9711
  },
  "sectorAverageBullishPercent": 0.6204,
  "sectorAverageNewsScore": 0.52,
  "companyNewsScore": 0.3969
}

Issues· 4 开放

查看全部 Issues在 GitHub 打开

暂无开放 Issues,或尚未同步最近议题。

> 标签

JavaScriptanalyst-estimatesapifinance-apinews-sentiment

暂无评论,来聊聊你的看法吧

> 工具信息

发布日期2026年8月1日
最后更新2026年9月18日
分类编程语言
定价开源

> 相关工具

T
TypeScript
JavaScript 的超集,为前端与全栈提供静态类型
P
Python
通用编程语言,广泛用于 Web、数据与 AI
G
Go
Google 推出的简洁高效系统语言