This API returns the list of “leaders” and “laggers” for a stock index, this is to be understood as the list of companies with the most positive sentiment for the day (“leaders”) or the most positive negative sentiment for the day (“laggers”).

HTTP Request URL:

GET : idata/get_leaders_laggers/

Parameters:

  • nameid [String]
    • Mandatory parameter
    • Input index id : in_ {e.g. in_9}
    • See static data user guide for full list. For instance, in_9 corresponds to SP500.
  • (alternative) ticker [String]
    • As an alternative to nameid, ticker can be used (e.g. SP500), see static data user guide for full list.
  • count [number]
    • Number of companies to be included in leaders/laggers list.
    • Default is 10.
  • timezone [String]
    • By default, this API returns data for Europe/Berlin timezone. Users can choose from 3 timezones:

1/ America/New_York
2/ Asia/Singapore
3/ Europe/Berlin

  • last_update [number]
    • 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 server is newer than the last updated version reported by the client.

Examples:

  • Sample call with index id parameter (“in_”). Value 9 corresponds to SP500. 3 leaders and 3 laggers are retrieved (count=3)
    /idata/get_leaders_laggers?nameid=in_9&count=3
  • Sample call with ticker parameter
    /idata/get_leaders_laggers?ticker=SP500

Response:

  • 200 Response will have the JSON structure as below:
    { “last_update”: < value ‘0’ will return current data >, “data”: {

leaders” : [ {“nameid”: < >, “sentiment” :  < 1 to 10 sentiment score >, “ticker” : < >, name :}, …]

“laggers”[ { “nameid”: < >, “sentiment”:  < 1 to 10 sentiment score >, “ticker” : < >  “name” : }, … ] }

  • 400 {“error”:”Invalid params”}
  • 401 {“error”:”Invalid Auth key.”}
  • 500 {“error”:”Something went wrong. Please try again later.”}