The get_sentiment_history API returns sentiment history for any date range and any asset or topic.
Request
Method | URL |
GET | idata/get_sentiment_history/ |
Parameters
Params | Values | |
nameid | String | “nameid” will be concat of class type and id. eg: x_<id> where x is: • c : company (in case of company, the result would be single company data) • in : index • pl : place • cm : <commodity> eg: cm_51 • top : topic Multiple nameid’s can be specified in csv format |
start_date | Date | The start date In format YYYY-MM-DD Default is “today” |
end_date | Date | In format YYYY-MM-DD Default is 90 days from start date |
ndays | Number | Default is 90 days from date |
last_update | Number | values: 0 means, there is no valid last updated data In case of any non-zero value, the response will have valid “data” only if the current data at the server is newer than the last updated version reported by the client. |
timezone | String | By default timezone is Europe/Berlin. The possible values are: • America/New_York • Asia/Singapore • Europe/Berlin |
company | String | As an alternative to the InfoTrie internal code (and the nameid parameter), the company ticker can be specified (e.g. AAPL:US). We follow Bloomberg’s naming convention. |
index | String | As an alternative to the InfoTrie internal code (and the nameid parameter), the index code can be specified (e.g. SP500). See the list of supported indexes for more information here. |
crypto | String | As an alternative to the InfoTrie internal code (and the nameid parameter), a code for the crypto currency can be specified (e.g. BTC). See the list of supported indexes for more information here. |
commodity | String | As an alternative to the InfoTrie internal code (and the nameid parameter), a code for the commodity can be specified (e.g. GOLD). See the list of supported indexes for more information here. |
forex | String | As an alternative to the InfoTrie internal code (and the nameid parameter), a code for the currenct pair can be specified (e.g. EUR/USD). See the list of supported indexes for more information here. |
Response
Status 200
{
"last_update" : <integer timestamp> //value ‘0’ will return current data
"data" : [
{
"name" : <company name>
"ticker" : <company ticker>
"start_date" : <YYYY/MM/DD>
"end_date" : <YYYY/MM/DD>
"sentiment": [
{
"high" : <score in range 0 – 10>
"low" : <score in range 0 – 10>
"sentiment" : <score in range 0 – 10>
"buzz" : <score in range 0 – 10>
"date": <DD/MM/YYYY>
},
{...}
]
},
{
"name" : <company name>
"ticker : <company ticker>
…
}
]
}
// where sentiment data is in ascending date format. The first element is the max date (start date). The last element is the min date (end date) sentiment = “0” means no data was found for the date .