5.2 – get_sentiment_history

The get_sentiment_history API returns sentiment history for any date range and any asset or topic.

Request

MethodURL
GETidata/get_sentiment_history/

Parameters

Params Values
nameidString“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_dateDateThe start date In format YYYY-MM-DD Default is “today”  
end_dateDateIn format YYYY-MM-DD Default is 90 days from start date  
ndaysNumberDefault is 90 days from date
last_updateNumbervalues: 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.  
timezoneStringBy default timezone  is Europe/Berlin. The possible values are:
America/New_York
• Asia/Singapore
• Europe/Berlin
companyStringAs 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.
indexStringAs 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.
cryptoStringAs 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.
commodityStringAs 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.
forexStringAs 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 .