View on GitHub

analyticsapi-engines-python-sdk

fds.analyticsapi.engines.QuantCalculationsApi

All URIs are relative to https://api.factset.com

Method HTTP request Description
cancel_calculation_by_id DELETE /analytics/engines/quant/v3/calculations/{id} Cancel Quant calculation by id
get_all_calculations GET /analytics/engines/quant/v3/calculations Get all calculations
get_calculation_parameters GET /analytics/engines/quant/v3/calculations/{id} Get Quant Engine calculation parameters by id
get_calculation_status_by_id GET /analytics/engines/quant/v3/calculations/{id}/status Get Quant Engine calculation status by id
get_calculation_unit_info_by_id GET /analytics/engines/quant/v3/calculations/{id}/units/{unitId}/info Get Quant Engine calculation metadata information by id
get_calculation_unit_result_by_id GET /analytics/engines/quant/v3/calculations/{id}/units/{unitId}/result Get Quant Engine calculation result by id
post_and_calculate POST /analytics/engines/quant/v3/calculations Create and Run Quant Engine calculation
put_and_calculate PUT /analytics/engines/quant/v3/calculations/{id} Create or update Quant Engine calculation and run it.

cancel_calculation_by_id

cancel_calculation_by_id(id)

Cancel Quant calculation by id

This is the endpoint to cancel a previously submitted calculation.

Example

The client must configure the authentication and authorization parameters

in accordance with the API server security policy.

Examples for each auth method are provided below, use the example that

satisfies your auth use case.

Configure HTTP basic authorization: Basic

configuration = fds.analyticsapi.engines.Configuration( username = ‘YOUR_USERNAME’, password = ‘YOUR_PASSWORD’ )

Configure Bearer authorization: Bearer

configuration = fds.analyticsapi.engines.Configuration( access_token = ‘YOUR_BEARER_TOKEN’ )

Enter a context with an instance of the API client

with fds.analyticsapi.engines.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = quant_calculations_api.QuantCalculationsApi(api_client) id = “id_example” # str | from url, provided from the location header in the Create and Run Quant calculation endpoint

# example passing only required values which don't have defaults set
try:
    # Cancel Quant calculation by id
    api_instance.cancel_calculation_by_id(id)
except fds.analyticsapi.engines.ApiException as e:
    print("Exception when calling QuantCalculationsApi->cancel_calculation_by_id: %s\n" % e) ```

Parameters

Name Type Description Notes
id str from url, provided from the location header in the Create and Run Quant calculation endpoint  

Return type

Authorization

Basic, Bearer

HTTP request headers

HTTP response details

| Status code | Description | Response headers | |————-|————-|——————| 204 | Expected response, calculation was canceled successfully. | * X-DataDirect-Request-Key - FactSet's request key header.
* X-FactSet-Api-Request-Key - Key to uniquely identify an Analytics API request. Only available after successful authentication.
* X-FactSet-Api-RateLimit-Limit - Number of allowed requests for the time window.
* X-FactSet-Api-RateLimit-Remaining - Number of requests left for the time window.
* X-FactSet-Api-RateLimit-Reset - Number of seconds remaining till rate limit resets.
| 400 | Invalid identifier provided. | * X-DataDirect-Request-Key - FactSet's request key header.
* X-FactSet-Api-Request-Key - Key to uniquely identify an Analytics API request. Only available after successful authentication.
* X-FactSet-Api-RateLimit-Limit - Number of allowed requests for the time window.
* X-FactSet-Api-RateLimit-Remaining - Number of requests left for the time window.
* X-FactSet-Api-RateLimit-Reset - Number of seconds remaining till rate limit resets.
| 404 | There was no request for the calculation identifier provided, or the request was already canceled for the provided identifier. | * X-DataDirect-Request-Key - FactSet's request key header.
* X-FactSet-Api-Request-Key - Key to uniquely identify an Analytics API request. Only available after successful authentication.
* X-FactSet-Api-RateLimit-Limit - Number of allowed requests for the time window.
* X-FactSet-Api-RateLimit-Remaining - Number of requests left for the time window.
* X-FactSet-Api-RateLimit-Reset - Number of seconds remaining till rate limit resets.
| 401 | Missing or invalid authentication. | * X-DataDirect-Request-Key - FactSet's request key header.
* X-FactSet-Api-Request-Key - Key to uniquely identify an Analytics API request. Only available after successful authentication.
| 403 | User is forbidden with current credentials | * X-DataDirect-Request-Key - FactSet's request key header.
* X-FactSet-Api-Request-Key - Key to uniquely identify an Analytics API request. Only available after successful authentication.
* X-FactSet-Api-RateLimit-Limit - Number of allowed requests for the time window.
* X-FactSet-Api-RateLimit-Remaining - Number of requests left for the time window.
* X-FactSet-Api-RateLimit-Reset - Number of seconds remaining till rate limit resets.
| 500 | Server error. Log the X-DataDirect-Request-Key header to assist in troubleshooting. | * X-DataDirect-Request-Key - FactSet's request key header.
* X-FactSet-Api-Request-Key - Key to uniquely identify an Analytics API request. Only available after successful authentication.
| 503 | Request timed out. Retry the request in sometime. | * X-DataDirect-Request-Key - FactSet's request key header.
* X-FactSet-Api-Request-Key - Key to uniquely identify an Analytics API request. Only available after successful authentication.
|

[Back to top] [Back to API list] [Back to Model list] [Back to README]

get_all_calculations

CalculationsSummaryRoot get_all_calculations()

Get all calculations

This endpoints returns all calculation requests.

Example

The client must configure the authentication and authorization parameters

in accordance with the API server security policy.

Examples for each auth method are provided below, use the example that

satisfies your auth use case.

Configure HTTP basic authorization: Basic

configuration = fds.analyticsapi.engines.Configuration( username = ‘YOUR_USERNAME’, password = ‘YOUR_PASSWORD’ )

Configure Bearer authorization: Bearer

configuration = fds.analyticsapi.engines.Configuration( access_token = ‘YOUR_BEARER_TOKEN’ )

Enter a context with an instance of the API client

with fds.analyticsapi.engines.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = quant_calculations_api.QuantCalculationsApi(api_client) page_number = 1 # int | (optional) if omitted the server will use the default value of 1

# example passing only required values which don't have defaults set
# and optional values
try:
    # Get all calculations
    api_response = api_instance.get_all_calculations(page_number=page_number)
    pprint(api_response)
except fds.analyticsapi.engines.ApiException as e:
    print("Exception when calling QuantCalculationsApi->get_all_calculations: %s\n" % e) ```

Parameters

Name Type Description Notes
page_number int   [optional] if omitted the server will use the default value of 1

Return type

Authorization

Basic, Bearer

HTTP request headers

HTTP response details

| Status code | Description | Response headers | |————-|————-|——————| 200 | List of calculation requests. | * X-DataDirect-Request-Key - FactSet's request key header.
* X-FactSet-Api-Request-Key - Key to uniquely identify an Analytics API request. Only available after successful authentication.
* X-FactSet-Api-RateLimit-Limit - Number of allowed requests for the time window.
* X-FactSet-Api-RateLimit-Remaining - Number of requests left for the time window.
* X-FactSet-Api-RateLimit-Reset - Number of seconds remaining till rate limit resets.
| 400 | Invalid page number. | * X-DataDirect-Request-Key - FactSet's request key header.
* X-FactSet-Api-Request-Key - Key to uniquely identify an Analytics API request. Only available after successful authentication.
* X-FactSet-Api-RateLimit-Limit - Number of allowed requests for the time window.
* X-FactSet-Api-RateLimit-Remaining - Number of requests left for the time window.
* X-FactSet-Api-RateLimit-Reset - Number of seconds remaining till rate limit resets.
| 404 | No calculation found. | * X-DataDirect-Request-Key - FactSet's request key header.
* X-FactSet-Api-Request-Key - Key to uniquely identify an Analytics API request. Only available after successful authentication.
* X-FactSet-Api-RateLimit-Limit - Number of allowed requests for the time window.
* X-FactSet-Api-RateLimit-Remaining - Number of requests left for the time window.
* X-FactSet-Api-RateLimit-Reset - Number of seconds remaining till rate limit resets.
| 401 | Missing or invalid authentication. | * X-DataDirect-Request-Key - FactSet's request key header.
* X-FactSet-Api-Request-Key - Key to uniquely identify an Analytics API request. Only available after successful authentication.
| 403 | User is forbidden with current credentials. | * X-DataDirect-Request-Key - FactSet's request key header.
* X-FactSet-Api-Request-Key - Key to uniquely identify an Analytics API request. Only available after successful authentication.
* X-FactSet-Api-RateLimit-Limit - Number of allowed requests for the time window.
* X-FactSet-Api-RateLimit-Remaining - Number of requests left for the time window.
* X-FactSet-Api-RateLimit-Reset - Number of seconds remaining till rate limit resets.
| 406 | Unsupported Accept header. Header needs to be set to application/json. | * X-DataDirect-Request-Key - FactSet's request key header.
* X-FactSet-Api-Request-Key - Key to uniquely identify an Analytics API request. Only available after successful authentication.
* X-FactSet-Api-RateLimit-Limit - Number of allowed requests for the time window.
* X-FactSet-Api-RateLimit-Remaining - Number of requests left for the time window.
* X-FactSet-Api-RateLimit-Reset - Number of seconds remaining till rate limit resets.
| 429 | Rate limit reached. Wait till the time specified in Retry-After header value to make further requests. | * X-DataDirect-Request-Key - FactSet's request key header.
* X-FactSet-Api-Request-Key - Key to uniquely identify an Analytics API request. Only available after successful authentication.
* Retry-After - Time to wait in seconds before making a new request as the rate limit has reached.
| 500 | Server error. Log the X-DataDirect-Request-Key header to assist in troubleshooting. | * X-DataDirect-Request-Key - FactSet's request key header.
* X-FactSet-Api-Request-Key - Key to uniquely identify an Analytics API request. Only available after successful authentication.
| 503 | Request timed out. Retry the request in sometime. | * X-DataDirect-Request-Key - FactSet's request key header.
* X-FactSet-Api-Request-Key - Key to uniquely identify an Analytics API request. Only available after successful authentication.
|

[Back to top] [Back to API list] [Back to Model list] [Back to README]

get_calculation_parameters

QuantCalculationParametersRoot get_calculation_parameters(id)

Get Quant Engine calculation parameters by id

This is the endpoint that returns the calculation parameters passed for a calculation.

Example

The client must configure the authentication and authorization parameters

in accordance with the API server security policy.

Examples for each auth method are provided below, use the example that

satisfies your auth use case.

Configure HTTP basic authorization: Basic

configuration = fds.analyticsapi.engines.Configuration( username = ‘YOUR_USERNAME’, password = ‘YOUR_PASSWORD’ )

Configure Bearer authorization: Bearer

configuration = fds.analyticsapi.engines.Configuration( access_token = ‘YOUR_BEARER_TOKEN’ )

Enter a context with an instance of the API client

with fds.analyticsapi.engines.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = quant_calculations_api.QuantCalculationsApi(api_client) id = “id_example” # str | from url, provided from the location header in the Create and Run Quant Engine calculation endpoint

# example passing only required values which don't have defaults set
try:
    # Get Quant Engine calculation parameters by id
    api_response = api_instance.get_calculation_parameters(id)
    pprint(api_response)
except fds.analyticsapi.engines.ApiException as e:
    print("Exception when calling QuantCalculationsApi->get_calculation_parameters: %s\n" % e) ```

Parameters

Name Type Description Notes
id str from url, provided from the location header in the Create and Run Quant Engine calculation endpoint  

Return type

Authorization

Basic, Bearer

HTTP request headers

HTTP response details

| Status code | Description | Response headers | |————-|————-|——————| 200 | Expected response, returns the Quant Engine calculation parameters. | * Content-Encoding - Standard HTTP header. Header value based on Accept-Encoding Request header.
* Content-Type - Standard HTTP header.
* Transfer-Encoding - Standard HTTP header. Header value will be set to Chunked if Accept-Encoding header is specified.
* X-DataDirect-Request-Key - FactSet's request key header.
* X-FactSet-Api-Request-Key - Key to uniquely identify an Analytics API request. Only available after successful authentication.
* X-FactSet-Api-RateLimit-Limit - Number of allowed requests for the time window.
* X-FactSet-Api-RateLimit-Remaining - Number of requests left for the time window.
* X-FactSet-Api-RateLimit-Reset - Number of seconds remaining till rate limit resets.
| 400 | Invalid identifier provided. | * X-DataDirect-Request-Key - FactSet's request key header.
* X-FactSet-Api-Request-Key - Key to uniquely identify an Analytics API request. Only available after successful authentication.
* X-FactSet-Api-RateLimit-Limit - Number of allowed requests for the time window.
* X-FactSet-Api-RateLimit-Remaining - Number of requests left for the time window.
* X-FactSet-Api-RateLimit-Reset - Number of seconds remaining till rate limit resets.
| 404 | Calculation id not found | * X-DataDirect-Request-Key - FactSet's request key header.
* X-FactSet-Api-Request-Key - Key to uniquely identify an Analytics API request. Only available after successful authentication.
* X-FactSet-Api-RateLimit-Limit - Number of allowed requests for the time window.
* X-FactSet-Api-RateLimit-Remaining - Number of requests left for the time window.
* X-FactSet-Api-RateLimit-Reset - Number of seconds remaining till rate limit resets.
| 401 | Missing or invalid authentication. | * X-DataDirect-Request-Key - FactSet's request key header.
* X-FactSet-Api-Request-Key - Key to uniquely identify an Analytics API request. Only available after successful authentication.
| 403 | User is forbidden with current credentials | * X-DataDirect-Request-Key - FactSet's request key header.
* X-FactSet-Api-Request-Key - Key to uniquely identify an Analytics API request. Only available after successful authentication.
* X-FactSet-Api-RateLimit-Limit - Number of allowed requests for the time window.
* X-FactSet-Api-RateLimit-Remaining - Number of requests left for the time window.
* X-FactSet-Api-RateLimit-Reset - Number of seconds remaining till rate limit resets.
| 500 | Server error. Log the X-DataDirect-Request-Key header to assist in troubleshooting | * X-DataDirect-Request-Key - FactSet's request key header.
* X-FactSet-Api-Request-Key - Key to uniquely identify an Analytics API request. Only available after successful authentication.
| 503 | Request timed out. Retry the request in sometime. | * X-DataDirect-Request-Key - FactSet's request key header.
* X-FactSet-Api-Request-Key - Key to uniquely identify an Analytics API request. Only available after successful authentication.
|

[Back to top] [Back to API list] [Back to Model list] [Back to README]

get_calculation_status_by_id

CalculationStatusRoot get_calculation_status_by_id(id)

Get Quant Engine calculation status by id

This is the endpoint to check on the progress of a previously requested calculation. If the calculation has finished computing, the location header will point to the result url. Otherwise, the calculation is still running and the X-FactSet-Api-PickUp-Progress header will contain a progress percentage.

Example

The client must configure the authentication and authorization parameters

in accordance with the API server security policy.

Examples for each auth method are provided below, use the example that

satisfies your auth use case.

Configure HTTP basic authorization: Basic

configuration = fds.analyticsapi.engines.Configuration( username = ‘YOUR_USERNAME’, password = ‘YOUR_PASSWORD’ )

Configure Bearer authorization: Bearer

configuration = fds.analyticsapi.engines.Configuration( access_token = ‘YOUR_BEARER_TOKEN’ )

Enter a context with an instance of the API client

with fds.analyticsapi.engines.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = quant_calculations_api.QuantCalculationsApi(api_client) id = “id_example” # str | from url, provided from the location header in the Create and Run Quant Engine calculation endpoint

# example passing only required values which don't have defaults set
try:
    # Get Quant Engine calculation status by id
    api_response = api_instance.get_calculation_status_by_id(id)
    pprint(api_response)
except fds.analyticsapi.engines.ApiException as e:
    print("Exception when calling QuantCalculationsApi->get_calculation_status_by_id: %s\n" % e) ```

Parameters

Name Type Description Notes
id str from url, provided from the location header in the Create and Run Quant Engine calculation endpoint  

Return type

Authorization

Basic, Bearer

HTTP request headers

HTTP response details

| Status code | Description | Response headers | |————-|————-|——————| 200 | Expected response once calculation is completed. | * Content-Encoding - Standard HTTP header. Header value based on Accept-Encoding Request header.
* Content-Type - Standard HTTP header.
* Transfer-Encoding - Standard HTTP header. Header value will be set to Chunked if Accept-Encoding header is specified.
* X-DataDirect-Request-Key - FactSet's request key header.
* X-FactSet-Api-Request-Key - Key to uniquely identify an Analytics API request. Only available after successful authentication.
* X-FactSet-Api-RateLimit-Limit - Number of allowed requests for the time window.
* X-FactSet-Api-RateLimit-Remaining - Number of requests left for the time window.
* X-FactSet-Api-RateLimit-Reset - Number of seconds remaining till rate limit resets.
| 202 | Expected response returned if the calculation is not yet completed, should contain X-FactSet-Api-PickUp-Progress header. | * X-FactSet-Api-PickUp-Progress - FactSet's progress header.
* Cache-Control - Standard HTTP header. Header will specify max-age in seconds. Polling can be adjusted based on the max-age value.
* X-DataDirect-Request-Key - FactSet's request key header.
* X-FactSet-Api-Request-Key - Key to uniquely identify an Analytics API request. Only available after successful authentication.
* X-FactSet-Api-RateLimit-Limit - Number of allowed requests for the time window.
* X-FactSet-Api-RateLimit-Remaining - Number of requests left for the time window.
* X-FactSet-Api-RateLimit-Reset - Number of seconds remaining till rate limit resets.
| 400 | Invalid identifier provided. | * X-DataDirect-Request-Key - FactSet's request key header.
* X-FactSet-Api-Request-Key - Key to uniquely identify an Analytics API request. Only available after successful authentication.
* X-FactSet-Api-RateLimit-Limit - Number of allowed requests for the time window.
* X-FactSet-Api-RateLimit-Remaining - Number of requests left for the time window.
* X-FactSet-Api-RateLimit-Reset - Number of seconds remaining till rate limit resets.
| 404 | Calculation was already returned, provided id was not a requested calculation, or the calculation was cancelled | * X-DataDirect-Request-Key - FactSet's request key header.
* X-FactSet-Api-Request-Key - Key to uniquely identify an Analytics API request. Only available after successful authentication.
* X-FactSet-Api-RateLimit-Limit - Number of allowed requests for the time window.
* X-FactSet-Api-RateLimit-Remaining - Number of requests left for the time window.
* X-FactSet-Api-RateLimit-Reset - Number of seconds remaining till rate limit resets.
| 401 | Missing or invalid authentication. | * X-DataDirect-Request-Key - FactSet's request key header.
* X-FactSet-Api-Request-Key - Key to uniquely identify an Analytics API request. Only available after successful authentication.
| 403 | User is forbidden with current credentials | * X-DataDirect-Request-Key - FactSet's request key header.
* X-FactSet-Api-Request-Key - Key to uniquely identify an Analytics API request. Only available after successful authentication.
* X-FactSet-Api-RateLimit-Limit - Number of allowed requests for the time window.
* X-FactSet-Api-RateLimit-Remaining - Number of requests left for the time window.
* X-FactSet-Api-RateLimit-Reset - Number of seconds remaining till rate limit resets.
| 500 | Server error. Log the X-DataDirect-Request-Key header to assist in troubleshooting | * X-DataDirect-Request-Key - FactSet's request key header.
* X-FactSet-Api-Request-Key - Key to uniquely identify an Analytics API request. Only available after successful authentication.
| 503 | Request timed out. Retry the request in sometime. | * X-DataDirect-Request-Key - FactSet's request key header.
* X-FactSet-Api-Request-Key - Key to uniquely identify an Analytics API request. Only available after successful authentication.
|

[Back to top] [Back to API list] [Back to Model list] [Back to README]

get_calculation_unit_info_by_id

file_type get_calculation_unit_info_by_id(id, unit_id)

Get Quant Engine calculation metadata information by id

This is the endpoint to get the metadata information of a previously requested calculation.

Example

The client must configure the authentication and authorization parameters

in accordance with the API server security policy.

Examples for each auth method are provided below, use the example that

satisfies your auth use case.

Configure HTTP basic authorization: Basic

configuration = fds.analyticsapi.engines.Configuration( username = ‘YOUR_USERNAME’, password = ‘YOUR_PASSWORD’ )

Configure Bearer authorization: Bearer

configuration = fds.analyticsapi.engines.Configuration( access_token = ‘YOUR_BEARER_TOKEN’ )

Enter a context with an instance of the API client

with fds.analyticsapi.engines.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = quant_calculations_api.QuantCalculationsApi(api_client) id = “id_example” # str | from url, provided from the location header in the Get Quant calculation status by id endpoint unit_id = “unitId_example” # str | from url, provided from the location header in the Get Quant calculation status by id endpoint

# example passing only required values which don't have defaults set
try:
    # Get Quant Engine calculation metadata information by id
    api_response = api_instance.get_calculation_unit_info_by_id(id, unit_id)
    pprint(api_response)
except fds.analyticsapi.engines.ApiException as e:
    print("Exception when calling QuantCalculationsApi->get_calculation_unit_info_by_id: %s\n" % e) ```

Parameters

Name Type Description Notes
id str from url, provided from the location header in the Get Quant calculation status by id endpoint  
unit_id str from url, provided from the location header in the Get Quant calculation status by id endpoint  

Return type

Authorization

Basic, Bearer

HTTP request headers

HTTP response details

| Status code | Description | Response headers | |————-|————-|——————| 200 | Expected response once calculation is completed. | * Content-Encoding - Standard HTTP header. Header value based on Accept-Encoding Request header.
* Content-Type - Standard HTTP header.
* Transfer-Encoding - Standard HTTP header. Header value will be set to Chunked if Accept-Encoding header is specified.
* X-DataDirect-Request-Key - FactSet's request key header.
* X-FactSet-Api-Request-Key - Key to uniquely identify an Analytics API request. Only available after successful authentication.
* X-FactSet-Api-RateLimit-Limit - Number of allowed requests for the time window.
* X-FactSet-Api-RateLimit-Remaining - Number of requests left for the time window.
* X-FactSet-Api-RateLimit-Reset - Number of seconds remaining till rate limit resets.
| 400 | Invalid identifier provided. | * X-DataDirect-Request-Key - FactSet's request key header.
* X-FactSet-Api-Request-Key - Key to uniquely identify an Analytics API request. Only available after successful authentication.
* X-FactSet-Api-RateLimit-Limit - Number of allowed requests for the time window.
* X-FactSet-Api-RateLimit-Remaining - Number of requests left for the time window.
* X-FactSet-Api-RateLimit-Reset - Number of seconds remaining till rate limit resets.
| 404 | Calculation was already returned, provided id was not a requested calculation, or the calculation was cancelled | * X-DataDirect-Request-Key - FactSet's request key header.
* X-FactSet-Api-Request-Key - Key to uniquely identify an Analytics API request. Only available after successful authentication.
* X-FactSet-Api-RateLimit-Limit - Number of allowed requests for the time window.
* X-FactSet-Api-RateLimit-Remaining - Number of requests left for the time window.
* X-FactSet-Api-RateLimit-Reset - Number of seconds remaining till rate limit resets.
| 401 | Missing or invalid authentication. | * X-DataDirect-Request-Key - FactSet's request key header.
* X-FactSet-Api-Request-Key - Key to uniquely identify an Analytics API request. Only available after successful authentication.
| 403 | User is forbidden with current credentials | * X-DataDirect-Request-Key - FactSet's request key header.
* X-FactSet-Api-Request-Key - Key to uniquely identify an Analytics API request. Only available after successful authentication.
* X-FactSet-Api-RateLimit-Limit - Number of allowed requests for the time window.
* X-FactSet-Api-RateLimit-Remaining - Number of requests left for the time window.
* X-FactSet-Api-RateLimit-Reset - Number of seconds remaining till rate limit resets.
| 500 | Server error. Log the X-DataDirect-Request-Key header to assist in troubleshooting | * X-DataDirect-Request-Key - FactSet's request key header.
* X-FactSet-Api-Request-Key - Key to uniquely identify an Analytics API request. Only available after successful authentication.
| 503 | Request timed out. Retry the request in sometime. | * X-DataDirect-Request-Key - FactSet's request key header.
* X-FactSet-Api-Request-Key - Key to uniquely identify an Analytics API request. Only available after successful authentication.
|

[Back to top] [Back to API list] [Back to Model list] [Back to README]

get_calculation_unit_result_by_id

file_type get_calculation_unit_result_by_id(id, unit_id)

Get Quant Engine calculation result by id

This is the endpoint to get the result of a previously requested calculation. If the calculation has finished computing, the body of the response will contain the requested document in JSON.

Example

The client must configure the authentication and authorization parameters

in accordance with the API server security policy.

Examples for each auth method are provided below, use the example that

satisfies your auth use case.

Configure HTTP basic authorization: Basic

configuration = fds.analyticsapi.engines.Configuration( username = ‘YOUR_USERNAME’, password = ‘YOUR_PASSWORD’ )

Configure Bearer authorization: Bearer

configuration = fds.analyticsapi.engines.Configuration( access_token = ‘YOUR_BEARER_TOKEN’ )

Enter a context with an instance of the API client

with fds.analyticsapi.engines.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = quant_calculations_api.QuantCalculationsApi(api_client) id = “id_example” # str | from url, provided from the location header in the Get Quant Engine calculation status by id endpoint unit_id = “unitId_example” # str | from url, provided from the location header in the Get Quant Engine calculation status by id endpoint

# example passing only required values which don't have defaults set
try:
    # Get Quant Engine calculation result by id
    api_response = api_instance.get_calculation_unit_result_by_id(id, unit_id)
    pprint(api_response)
except fds.analyticsapi.engines.ApiException as e:
    print("Exception when calling QuantCalculationsApi->get_calculation_unit_result_by_id: %s\n" % e) ```

Parameters

Name Type Description Notes
id str from url, provided from the location header in the Get Quant Engine calculation status by id endpoint  
unit_id str from url, provided from the location header in the Get Quant Engine calculation status by id endpoint  

Return type

Authorization

Basic, Bearer

HTTP request headers

HTTP response details

| Status code | Description | Response headers | |————-|————-|——————| 200 | Expected response once calculation is completed, returns JSON in the format specified in the Calculation parameters. | * Content-Encoding - Standard HTTP header. Header value based on Accept-Encoding Request header.
* Content-Type - Standard HTTP header.
* Transfer-Encoding - Standard HTTP header. Header value will be set to Chunked if Accept-Encoding header is specified.
* X-DataDirect-Request-Key - FactSet's request key header.
* X-FactSet-Api-Request-Key - Key to uniquely identify an Analytics API request. Only available after successful authentication.
* X-FactSet-Api-RateLimit-Limit - Number of allowed requests for the time window.
* X-FactSet-Api-RateLimit-Remaining - Number of requests left for the time window.
* X-FactSet-Api-RateLimit-Reset - Number of seconds remaining till rate limit resets.
| 400 | Invalid identifier provided. | * X-DataDirect-Request-Key - FactSet's request key header.
* X-FactSet-Api-Request-Key - Key to uniquely identify an Analytics API request. Only available after successful authentication.
* X-FactSet-Api-RateLimit-Limit - Number of allowed requests for the time window.
* X-FactSet-Api-RateLimit-Remaining - Number of requests left for the time window.
* X-FactSet-Api-RateLimit-Reset - Number of seconds remaining till rate limit resets.
| 404 | Calculation was already returned, provided id was not a requested calculation, or the calculation was cancelled | * X-DataDirect-Request-Key - FactSet's request key header.
* X-FactSet-Api-Request-Key - Key to uniquely identify an Analytics API request. Only available after successful authentication.
* X-FactSet-Api-RateLimit-Limit - Number of allowed requests for the time window.
* X-FactSet-Api-RateLimit-Remaining - Number of requests left for the time window.
* X-FactSet-Api-RateLimit-Reset - Number of seconds remaining till rate limit resets.
| 401 | Missing or invalid authentication. | * X-DataDirect-Request-Key - FactSet's request key header.
* X-FactSet-Api-Request-Key - Key to uniquely identify an Analytics API request. Only available after successful authentication.
| 403 | User is forbidden with current credentials | * X-DataDirect-Request-Key - FactSet's request key header.
* X-FactSet-Api-Request-Key - Key to uniquely identify an Analytics API request. Only available after successful authentication.
* X-FactSet-Api-RateLimit-Limit - Number of allowed requests for the time window.
* X-FactSet-Api-RateLimit-Remaining - Number of requests left for the time window.
* X-FactSet-Api-RateLimit-Reset - Number of seconds remaining till rate limit resets.
| 500 | Server error. Log the X-DataDirect-Request-Key header to assist in troubleshooting | * X-DataDirect-Request-Key - FactSet's request key header.
* X-FactSet-Api-Request-Key - Key to uniquely identify an Analytics API request. Only available after successful authentication.
| 503 | Request timed out. Retry the request in sometime. | * X-DataDirect-Request-Key - FactSet's request key header.
* X-FactSet-Api-Request-Key - Key to uniquely identify an Analytics API request. Only available after successful authentication.
|

[Back to top] [Back to API list] [Back to Model list] [Back to README]

post_and_calculate

CalculationStatusRoot post_and_calculate()

Create and Run Quant Engine calculation

This endpoint runs the Quant Engine calculation specified in the POST body parameters. It can take one or more calculation units as input.

Example

The client must configure the authentication and authorization parameters

in accordance with the API server security policy.

Examples for each auth method are provided below, use the example that

satisfies your auth use case.

Configure HTTP basic authorization: Basic

configuration = fds.analyticsapi.engines.Configuration( username = ‘YOUR_USERNAME’, password = ‘YOUR_PASSWORD’ )

Configure Bearer authorization: Bearer

configuration = fds.analyticsapi.engines.Configuration( access_token = ‘YOUR_BEARER_TOKEN’ )

Enter a context with an instance of the API client

with fds.analyticsapi.engines.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = quant_calculations_api.QuantCalculationsApi(api_client) cache_control = “Cache-Control_example” # str | Standard HTTP header. Accepts no-store, max-age, max-stale. (optional) quant_calculation_parameters_root = QuantCalculationParametersRoot( data={ “key”: QuantCalculationParameters( universe= universe_type=”Equity”, identifiers=[ “identifiers_example”, ], , dates= dates=[], , formulas=[ , ], job_description=”job_description_example”, ), }, meta=QuantCalculationMeta( allow_array_data=True, contentorganization=”SimplifiedRow”, stach_content_organization=”SimplifiedRow”, contenttype=”Json”, format=”JsonStach”, ), ) # QuantCalculationParametersRoot | (optional)

# example passing only required values which don't have defaults set
# and optional values
try:
    # Create and Run Quant Engine calculation
    api_response = api_instance.post_and_calculate(cache_control=cache_control, quant_calculation_parameters_root=quant_calculation_parameters_root)
    pprint(api_response)
except fds.analyticsapi.engines.ApiException as e:
    print("Exception when calling QuantCalculationsApi->post_and_calculate: %s\n" % e) ```

Parameters

Name Type Description Notes
cache_control str Standard HTTP header. Accepts no-store, max-age, max-stale. [optional]
quant_calculation_parameters_root QuantCalculationParametersRoot   [optional]

Return type

Authorization

Basic, Bearer

HTTP request headers

HTTP response details

| Status code | Description | Response headers | |————-|————-|——————| 202 | Expected response, contains the poll URL in the Location header. | * Location - URL to poll for the resulting calculation
* X-DataDirect-Request-Key - FactSet's request key header.
* X-FactSet-Api-Request-Key - Key to uniquely identify an Analytics API request. Only available after successful authentication.
* X-FactSet-Api-RateLimit-Limit - Number of allowed requests for the time window.
* X-FactSet-Api-RateLimit-Remaining - Number of requests left for the time window.
* X-FactSet-Api-RateLimit-Reset - Number of seconds remaining till rate limit resets.
| 201 | Expected response if the calculation has one unit and is completed in a short span, returns JSON in the format specified in the Calculation parameters. | * X-DataDirect-Request-Key - FactSet's request key header.
* X-FactSet-Api-Request-Key - Key to uniquely identify an Analytics API request. Only available after successful authentication.
* X-FactSet-Api-RateLimit-Limit - Number of allowed requests for the time window.
* X-FactSet-Api-RateLimit-Remaining - Number of requests left for the time window.
* X-FactSet-Api-RateLimit-Reset - Number of seconds remaining till rate limit resets.
| 200 | Expected response if the calculation has one unit and is completed with an error. | * X-DataDirect-Request-Key - FactSet's request key header.
* X-FactSet-Api-Request-Key - Key to uniquely identify an Analytics API request. Only available after successful authentication.
* X-FactSet-Api-RateLimit-Limit - Number of allowed requests for the time window.
* X-FactSet-Api-RateLimit-Remaining - Number of requests left for the time window.
* X-FactSet-Api-RateLimit-Reset - Number of seconds remaining till rate limit resets.
| 400 | Invalid calculation parameters. | * X-DataDirect-Request-Key - FactSet's request key header.
* X-FactSet-Api-Request-Key - Key to uniquely identify an Analytics API request. Only available after successful authentication.
* X-FactSet-Api-RateLimit-Limit - Number of allowed requests for the time window.
* X-FactSet-Api-RateLimit-Remaining - Number of requests left for the time window.
* X-FactSet-Api-RateLimit-Reset - Number of seconds remaining till rate limit resets.
| 404 | One or more calculation settings were unavailable. | * X-DataDirect-Request-Key - FactSet's request key header.
* X-FactSet-Api-Request-Key - Key to uniquely identify an Analytics API request. Only available after successful authentication.
* X-FactSet-Api-RateLimit-Limit - Number of allowed requests for the time window.
* X-FactSet-Api-RateLimit-Remaining - Number of requests left for the time window.
* X-FactSet-Api-RateLimit-Reset - Number of seconds remaining till rate limit resets.
| 413 | Request body too large | * X-DataDirect-Request-Key - FactSet's request key header.
* X-FactSet-Api-Request-Key - Key to uniquely identify an Analytics API request. Only available after successful authentication.
* X-FactSet-Api-RateLimit-Limit - Number of allowed requests for the time window.
* X-FactSet-Api-RateLimit-Remaining - Number of requests left for the time window.
* X-FactSet-Api-RateLimit-Reset - Number of seconds remaining till rate limit resets.
| 401 | Missing or invalid authentication. | * X-DataDirect-Request-Key - FactSet's request key header.
* X-FactSet-Api-Request-Key - Key to uniquely identify an Analytics API request. Only available after successful authentication.
| 403 | User is forbidden with current credentials | * X-DataDirect-Request-Key - FactSet's request key header.
* X-FactSet-Api-Request-Key - Key to uniquely identify an Analytics API request. Only available after successful authentication.
* X-FactSet-Api-RateLimit-Limit - Number of allowed requests for the time window.
* X-FactSet-Api-RateLimit-Remaining - Number of requests left for the time window.
* X-FactSet-Api-RateLimit-Reset - Number of seconds remaining till rate limit resets.
| 415 | Missing/Invalid Content-Type header. Header needs to be set to application/json. | * X-DataDirect-Request-Key - FactSet's request key header.
* X-FactSet-Api-Request-Key - Key to uniquely identify an Analytics API request. Only available after successful authentication.
* X-FactSet-Api-RateLimit-Limit - Number of allowed requests for the time window.
* X-FactSet-Api-RateLimit-Remaining - Number of requests left for the time window.
* X-FactSet-Api-RateLimit-Reset - Number of seconds remaining till rate limit resets.
| 429 | Rate limit reached. Cancel older requests using Cancel Calculation endpoint or wait for older requests to finish/expire. | * X-DataDirect-Request-Key - FactSet's request key header.
* X-FactSet-Api-Request-Key - Key to uniquely identify an Analytics API request. Only available after successful authentication.
* X-FactSet-Api-RateLimit-Limit - Number of allowed requests for the time window.
* X-FactSet-Api-RateLimit-Remaining - Number of requests left for the time window.
* X-FactSet-Api-RateLimit-Reset - Number of seconds remaining till rate limit resets.
* Retry-After - Time to wait in seconds before making a new request as the rate limit has reached.
| 500 | Server error. Log the X-DataDirect-Request-Key header to assist in troubleshooting. | * X-DataDirect-Request-Key - FactSet's request key header.
* X-FactSet-Api-Request-Key - Key to uniquely identify an Analytics API request. Only available after successful authentication.
| 503 | Request timed out. Retry the request in sometime. | * X-DataDirect-Request-Key - FactSet's request key header.
* X-FactSet-Api-Request-Key - Key to uniquely identify an Analytics API request. Only available after successful authentication.
|

[Back to top] [Back to API list] [Back to Model list] [Back to README]

put_and_calculate

CalculationStatusRoot put_and_calculate(id)

Create or update Quant Engine calculation and run it.

This endpoint updates and runs the Quant Engine calculation specified in the PUT body parameters. This also allows creating new Quant Engine calculations with custom ids. It can take one or more calculation units as input.

Example

The client must configure the authentication and authorization parameters

in accordance with the API server security policy.

Examples for each auth method are provided below, use the example that

satisfies your auth use case.

Configure HTTP basic authorization: Basic

configuration = fds.analyticsapi.engines.Configuration( username = ‘YOUR_USERNAME’, password = ‘YOUR_PASSWORD’ )

Configure Bearer authorization: Bearer

configuration = fds.analyticsapi.engines.Configuration( access_token = ‘YOUR_BEARER_TOKEN’ )

Enter a context with an instance of the API client

with fds.analyticsapi.engines.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = quant_calculations_api.QuantCalculationsApi(api_client) id = “id_example” # str | from url, provided from the location header in the Create and Run Quant Engine calculation endpoint cache_control = “Cache-Control_example” # str | Standard HTTP header. Accepts no-store, max-age, max-stale. (optional) quant_calculation_parameters_root = QuantCalculationParametersRoot( data={ “key”: QuantCalculationParameters( universe= universe_type=”Equity”, identifiers=[ “identifiers_example”, ], , dates= dates=[], , formulas=[ , ], job_description=”job_description_example”, ), }, meta=QuantCalculationMeta( allow_array_data=True, contentorganization=”SimplifiedRow”, stach_content_organization=”SimplifiedRow”, contenttype=”Json”, format=”JsonStach”, ), ) # QuantCalculationParametersRoot | Calculation Parameters (optional)

# example passing only required values which don't have defaults set
try:
    # Create or update Quant Engine calculation and run it.
    api_response = api_instance.put_and_calculate(id)
    pprint(api_response)
except fds.analyticsapi.engines.ApiException as e:
    print("Exception when calling QuantCalculationsApi->put_and_calculate: %s\n" % e)

# example passing only required values which don't have defaults set
# and optional values
try:
    # Create or update Quant Engine calculation and run it.
    api_response = api_instance.put_and_calculate(id, cache_control=cache_control, quant_calculation_parameters_root=quant_calculation_parameters_root)
    pprint(api_response)
except fds.analyticsapi.engines.ApiException as e:
    print("Exception when calling QuantCalculationsApi->put_and_calculate: %s\n" % e) ```

Parameters

Name Type Description Notes
id str from url, provided from the location header in the Create and Run Quant Engine calculation endpoint  
cache_control str Standard HTTP header. Accepts no-store, max-age, max-stale. [optional]
quant_calculation_parameters_root QuantCalculationParametersRoot Calculation Parameters [optional]

Return type

Authorization

Basic, Bearer

HTTP request headers

HTTP response details

| Status code | Description | Response headers | |————-|————-|——————| 202 | Expected response, contains the poll URL in the Location header. | * Location - URL to poll for the resulting calculation
* X-DataDirect-Request-Key - FactSet's request key header.
* X-FactSet-Api-Request-Key - Key to uniquely identify an Analytics API request. Only available after successful authentication.
* X-FactSet-Api-RateLimit-Limit - Number of allowed requests for the time window.
* X-FactSet-Api-RateLimit-Remaining - Number of requests left for the time window.
* X-FactSet-Api-RateLimit-Reset - Number of seconds remaining till rate limit resets.
| 200 | Expected response if the calculation has one unit and is completed with an error. | * X-DataDirect-Request-Key - FactSet's request key header.
* X-FactSet-Api-Request-Key - Key to uniquely identify an Analytics API request. Only available after successful authentication.
* X-FactSet-Api-RateLimit-Limit - Number of allowed requests for the time window.
* X-FactSet-Api-RateLimit-Remaining - Number of requests left for the time window.
* X-FactSet-Api-RateLimit-Reset - Number of seconds remaining till rate limit resets.
| 201 | Expected response if the calculation has one unit and is completed in a short span, returns JSON in the format specified in the Calculation parameters. | * X-DataDirect-Request-Key - FactSet's request key header.
* X-FactSet-Api-Request-Key - Key to uniquely identify an Analytics API request. Only available after successful authentication.
* X-FactSet-Api-RateLimit-Limit - Number of allowed requests for the time window.
* X-FactSet-Api-RateLimit-Remaining - Number of requests left for the time window.
* X-FactSet-Api-RateLimit-Reset - Number of seconds remaining till rate limit resets.
| 400 | Invalid Calculation Parameters. | * X-DataDirect-Request-Key - FactSet's request key header.
* X-FactSet-Api-Request-Key - Key to uniquely identify an Analytics API request. Only available after successful authentication.
* X-FactSet-Api-RateLimit-Limit - Number of allowed requests for the time window.
* X-FactSet-Api-RateLimit-Remaining - Number of requests left for the time window.
* X-FactSet-Api-RateLimit-Reset - Number of seconds remaining till rate limit resets.
| 404 | One or more calculation settings were unavailable. | * X-DataDirect-Request-Key - FactSet's request key header.
* X-FactSet-Api-Request-Key - Key to uniquely identify an Analytics API request. Only available after successful authentication.
* X-FactSet-Api-RateLimit-Limit - Number of allowed requests for the time window.
* X-FactSet-Api-RateLimit-Remaining - Number of requests left for the time window.
* X-FactSet-Api-RateLimit-Reset - Number of seconds remaining till rate limit resets.
| 409 | Duplicate calculation exists with same parameters. | * X-DataDirect-Request-Key - FactSet's request key header.
* X-FactSet-Api-Request-Key - Key to uniquely identify an Analytics API request. Only available after successful authentication.
* X-FactSet-Api-RateLimit-Limit - Number of allowed requests for the time window.
* X-FactSet-Api-RateLimit-Remaining - Number of requests left for the time window.
* X-FactSet-Api-RateLimit-Reset - Number of seconds remaining till rate limit resets.
| 413 | Request body too large | * X-DataDirect-Request-Key - FactSet's request key header.
* X-FactSet-Api-Request-Key - Key to uniquely identify an Analytics API request. Only available after successful authentication.
* X-FactSet-Api-RateLimit-Limit - Number of allowed requests for the time window.
* X-FactSet-Api-RateLimit-Remaining - Number of requests left for the time window.
* X-FactSet-Api-RateLimit-Reset - Number of seconds remaining till rate limit resets.
| 401 | Missing or invalid authentication. | * X-DataDirect-Request-Key - FactSet's request key header.
* X-FactSet-Api-Request-Key - Key to uniquely identify an Analytics API request. Only available after successful authentication.
| 403 | User is forbidden with current credentials | * X-DataDirect-Request-Key - FactSet's request key header.
* X-FactSet-Api-Request-Key - Key to uniquely identify an Analytics API request. Only available after successful authentication.
* X-FactSet-Api-RateLimit-Limit - Number of allowed requests for the time window.
* X-FactSet-Api-RateLimit-Remaining - Number of requests left for the time window.
* X-FactSet-Api-RateLimit-Reset - Number of seconds remaining till rate limit resets.
| 415 | Missing/Invalid Content-Type header. Header needs to be set to application/json. | * X-DataDirect-Request-Key - FactSet's request key header.
* X-FactSet-Api-Request-Key - Key to uniquely identify an Analytics API request. Only available after successful authentication.
* X-FactSet-Api-RateLimit-Limit - Number of allowed requests for the time window.
* X-FactSet-Api-RateLimit-Remaining - Number of requests left for the time window.
* X-FactSet-Api-RateLimit-Reset - Number of seconds remaining till rate limit resets.
| 429 | Rate limit reached. Cancel older requests using Cancel Calculation endpoint or wait for older requests to finish/expire. | * X-DataDirect-Request-Key - FactSet's request key header.
* X-FactSet-Api-Request-Key - Key to uniquely identify an Analytics API request. Only available after successful authentication.
* X-FactSet-Api-RateLimit-Limit - Number of allowed requests for the time window.
* X-FactSet-Api-RateLimit-Remaining - Number of requests left for the time window.
* X-FactSet-Api-RateLimit-Reset - Number of seconds remaining till rate limit resets.
* Retry-After - Time to wait in seconds before making a new request as the rate limit has reached.
| 500 | Server error. Log the X-DataDirect-Request-Key header to assist in troubleshooting. | * X-DataDirect-Request-Key - FactSet's request key header.
* X-FactSet-Api-Request-Key - Key to uniquely identify an Analytics API request. Only available after successful authentication.
| 503 | Request timed out. Retry the request in sometime. | * X-DataDirect-Request-Key - FactSet's request key header.
* X-FactSet-Api-Request-Key - Key to uniquely identify an Analytics API request. Only available after successful authentication.
|

[Back to top] [Back to API list] [Back to Model list] [Back to README]