Treemap sentiment data

The Get Treemap API provides sentiment data for various aggregates all at once. This is useful when displaying in specific visualisation such as “treemaps”.

The most common usage is to get details for Index > Sectors > Industries > Sub_industries > Companies.

HTTP Request URL:

GET: idata/get_treemap/

Parameters:

  • index <ID>  :
    • Index string values, for instance specify index=in_9 to retrieve treemap data for SP500 (index #9).
    • Please refer to static data user guide for more details.
  • (alternative) exchange [string]
    • values: name OR name_id for the exchange.
    • Values for supported exchanges can be retrieved using the get_data method.
  • (alternative) companies [String]

Values: company_id’s in csv format.

  • 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.
  • view_all [boolean]
    •  [not supported]. values : 0 and 1
    • default: 0. If set to 1, then the return data will contain all companies which includes companies with zero buzz score and sentiment score.
  • count [number]

Return one batch of result by default. Parameter “count” can return several batches of result in reverse time order.

Examples:

To retrieve treemap data for SP500, specify:

idata/get_treemap?index=in_9

Response:

  • 200 Response will have following default structure:

{“last_update” < value ‘0’ will return current data >”data”:[“timestamp”: < Unix Timestamp >, “treemap”: [‘”volume” < average volume for sector >, “sentiment”: < 0 to 10 average sentiment score for sector >, “name”: < sector name>, “name_id”: < sector internal id (with “s_” prefix) >, “buzz”: < average buzz for sector >

“children”:[{“volume” < average volume for industry>, “sentiment”: < 0 to 10 average sentiment score for industry>, “name”: < industry name>, “name_id”: < industry internal id (with “i_” prefix) >, “buzz”: < average buzz for industry>

“children”:[{“volume” < average volume for sub-industry>, “sentiment”: < 0 to 10 average sentiment score for sub-industry>, “name”: < sub-industry name>, “name_id”: < sub-industry internal id (with “si_” prefix) >, “buzz”: < average buzz for industry>

“children”:[{“volume” < average volume for company>, “sentiment”: < 0 to 10 average sentiment score for company>, “ticker” < ticker for company >”raw_sentiment”: < 0 to 10 average sentiment score for company identical to “sentiment”>,“name”: < company name>, “name_id”: < company internal id (with “c_” prefix) >, “buzz”: < average buzz for company> },

{ … < additional data for other companies > …}]}, { … < additional data for other sub-industries> …}]}, { … < additional data for other industries> …}]}, { … < additional data for other sectors> …}]}

  • 400 {“error”:”Invalid param.”}
  • 401 {“error”:”Invalid API token.”}
  • 500 {“error”:”Something went wrong. Please try again later.”}

News analytics | Alternative data

Check our blog on http://infotrie.com/blog/

Want to access our data? Try our API on api.infotrie.com or access our FinSentS platform.