tipranks.com API,可访问价格目标、新闻情绪和热门股票。
For any company (e.g. Tesla) the API returns
It also returns trending stocks.
{
"symbol": "TSLA",
"priceTargets": {
"mean": 297.3333333333333,
"median": 300,
"highest": 500,
"lowest": 54,
"numberOfEstimates": 21
}
}{
"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
}…npm) if you haven't already. On Mac in the command line type brew install node. More information here: nodejs.orgmkdir my-new-project && cd my-new-project to create a new foldernpm init to scaffold the Node.js projecttouch index.js to create the file index.jsnpm install tipranks-api-v2 to install the library to access the APIindex.js fileconst 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 fileMUThe API supports the following commands:
.getPriceTargets(ticker)ticker is a string representing the company ticker, e.g. TSLA.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..getTrendingStocks()
getPriceTargetsindex.js filenode index.js to run the codeconst tipranksApi = require('tipranks-api-v2');
tipranksApi.getPriceTargets('TSLA').then(result => console.log(result));{
"symbol": "TSLA",
"priceTargets": {
"mean": 297.3333333333333,
"median": 300,
"highest": 500,
"lowest": 54,
"numberOfEstimates": 21
}
}getNewsSentimentDataindex.js filenode index.js to run the codeconst tipranksApi = require('tipranks-api-v2');
tipranksApi.getNewsSentimentData('TSLA').then(result => console.log(result));{
"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,或尚未同步最近议题。