getSectors API

The getSectors API provides returns using weighted alpha on sectors covering multiple periods, including 1-day, 1-month, 3-month, 6-month, 9-month, 12-month and year-to-date.

Pricing is based on the number of monthly queries and fields requested. We offer four packages: Small, Medium, Large, Enterprise. Contact us for additional details.


API Documentation

INPUTS:

sector (optional)
The symbol of the sector. Multiple sectors separated by a comma may be used. (list)
Example: -MEDR

sectorPeriod (required)
The period used to calculate the weighted alpha return by the sector, includes: 1-day ("1DA"), 1-month ("1MO"), 3-month ("3MO"), 6-month ("6MO"), 9-month ("9MO"), 12-month ("12MO") and year-to-date ("YTD"). (enum)
Valid values: 1DA, 1MO, 3MO, 6MO, 9MO, 12MO, YTD
Default: 1DA
Example: 1DA

dailyData (optional)
Whether to include daily data: Open, High, Low, Close, Previous Close, 52-week high and 52-week low (boolean)
Default: 0
Example: 0

components (optional)
Whether to include components of the sector. (boolean)
Default: 0
Example: 0

sortDir (optional)
Sorting method that should be applied. (string)
Example: ASC


OUTPUTS:

symbol (always returned)
The symbol of the sector. (string)
sector (always returned)
The name of the sector. (string)
weightAlpha (always returned)
The weighted alpha of the sector. (double)
lastTrade (always returned)
The last traded price of the sector. (double)
change (always returned)
The change in last traded price of the sector. (double)
percentChange (always returned)
The percent change in the last traded price of the sector. (double)
stocks (always returned)
The number of stocks the sector is comprised of. (integer)
open (as requested)
The opening price for the sector for the current day. (double)
high (as requested)
The high price for the sector for the current day. (double)
low (as requested)
The low price for the sector for the current day. (double)
close (as requested)
The closing price for the sector for the current day. (double)
previousClose (as requested)
The closing price for the sector for the previous day. (double)
fiftyTwoWeekHigh (as requested)
The highest price for the sector over the previous 52-weeks (double)
fiftyTwoWeekLow (as requested)
The lowest price for the sector over the previous 52-weeks (double)
components (as requested)
The symbol for a component of the sector. (enum)
componentSymbol (as requested)
The symbol for a component of the sector. (enum)
componentName (as requested)
The name of a component of the sector. (enum)
timestamp (always returned)
The timestamp for the data. (dateTime)

STATUS CODE RESPONSES:

200 OK Success
400 Bad Request The request was invalid, please see the message for more information.
500 Internal Server Error Something is not working correctly, please contact support.