5.6 – Samples Calls

We are listing down the most commonly used API calls below, for your quick reference and convenience.

Identifying Companies Id

To get the corresponding company id for a ticker by Company Name, please use the below API.
https://feed.finsents.com/search_company?query=microsoft

Get a list of companies

Alternatively, you may use the below API to get a list of all the active companies and their corresponding company is.
https://feed.finsents.com/idata/get_data?type=company_list

Get Articles

Once you have the company id handy, you may use the following API with combinations of parameters of your choice to fetch sentiments and articles.

  • a. https://feed.finsents.com/idata/get_articles?class_nameid=c_1389&timezone=America/New_York&start_date=2019-03-12&end_date=2019-03-01 ( for a specific date range ).

  • b. https://feed.finsents.com/idata/get_articles?class_nameid=c_35&timezone=America/New_York&offset=15 ( for last 15 days data)

  • c. https://feed.finsents.com/idata/get_articles?class_nameid=c_1389&timezone=America/New_York&start_date=2019-03-12&end_date=2019-03-01&count=100 (whereas count = maximum number of records to be returned )

Please note that the default number of records returned by the API will be 50. Please use the ‘count’ parameter if you need to fetch more number of records.

  • d. https://feed.finsents.com/idata/get_sentiment_history?nameid=c_1389&start_date=2019-04-03&end_date=2019-01-01&timezone=Asia/Singapore

Get Sentiment History

Instead of using InfoTrie “c_” ids, you may use tickers as below. Other parameters ( start_date, end_date, timezone, ndays, count, etc..) remain the same.

https://feed.finsents.com/idata/get_sentiment_history?company=AAPL:US
https://feed.finsents.com/idata/get_sentiment_history?index=SP500
https://feed.finsents.com/idata/get_sentiment_history?crypto=BTC
https://feed.finsents.com/idata/get_sentiment_history?commodity=GOLD
https://feed.finsents.com/idata/get_sentiment_history?forex=EUR/USD