API Documentation
The Index One API is organized around REST. Our API has resource-oriented URLs, returns JSON-encoded responses, and uses standard HTTP response codes and authentication.
At present, our public API documentation only covers authentication and data retrieval. In future releases, we will make public endpoints for index creation, manipulation, and management.
URLs
The base URL for the live API is https://api.indexone.io/
Authentication
Our API has two authentication methods; OAuth 2.0, and API Key.
The required authentication depends on the API endpoint as well as access rights of the requested resource. The authentication level is defined for each endpoint individually in our documentation.
Authentication tokens are passed in the request header under "Authorization". Authentication tokens expire after 30 minutes, and can be re-issued and refreshed through the API.
API Keys are passed in the request header under "x-api-key". You can access and rotate your API keys by contacting our support team.
Generate Token
Generate a new authentication token in order to call authenticated endpoints.
/signin
Sample Request
{ "username": "demo@indexone.io", "password": "demoPassword123!" }
Sample Response
{ "id_token": "eydW.....QiOjE2", "refresh_token": "eyJj.....iOygw", "expires_in": 3600 }
Response Attributes
key | type | description |
---|---|---|
id_token | string | An ID token used to authenticate requests |
expires_in | number | The amount of time until the token expires (in seconds) |
Refresh Token
Refresh your authentication token using a refresh token.
/refresh_token
Sample Request
{ "refresh_token": "eydW.....QiOjE2" }
Sample Response
{ "id_token": "eydW.....QiOjE2", "expires_in": 3600 }
Response Attributes
key | type | description |
---|---|---|
id_token | string | An ID token used to authenticate requests |
expires_in | number | The amount of time until the token expires (in seconds) |
Index Values
Return index values for the specified index. This endpoint supports different time ranges and increments specified in the Query String Parameters.
/index/{index_id}/values
Authentication:
Sample Response
[ { "time": "2020-01-01 00:00:00", "value": 1000 }, { "time": "2020-01-02 00:00:00", "value": 1010 }, { "time": "2020-01-03 00:00:00", "value": 1020 } ]
Path Parameters
parameter | required | description |
---|---|---|
index_id | Required | ID of the index you are retrieving. |
Query String Parameters
parameter | required | description |
---|---|---|
duration | Optional | Duration of index values to retrieve from the current time. Supports the following periods: s(seconds), m(minutes), h(hours), d(days), mo(months) itd(inception-to-date), ytd(year-to-date), qtd(quarter-to-date). Valid values are e.g. 7d, 1y, itd, etc. |
increment | Optional | Time increments between index values returned. Supports: h(hour), d(day), w(week), mo(month). Valid values are e.g. 1d, 4w, etc. |
limit | Optional | Maximum number of values to return. |
Response Attributes
key | type | description |
---|---|---|
expires_in | number | The amount of time until the token expires (in seconds) |
Index Constituents
Return the current constituents for the given index.
Constituents are by default keyed by their FIGI Composite, which can be changed using the category parameter.
/index/{index_id}/weighting
Authentication:
Sample Response
{ "BBG000B9XRY4": 0.5, "BBG000BPH459": 0.25, "BBG001S5PQL7": 0.25 }
Path Parameters
parameter | required | description |
---|---|---|
index_id | Required | ID of the index you are retrieving. |
Query String Parameters
parameter | required | description |
---|---|---|
category | Optional | Specify an attribute to categorize and return index constituents by. |