Metadata-Version: 2.1
Name: fds.sdk.FactSetPrices
Version: 0.9.1
Summary: FactSet Prices client library for Python
Home-page: https://github.com/FactSet/enterprise-sdk/tree/main/code/python/FactSetPrices/v1
Author: FactSet Research Systems
License: Apache-2.0
Keywords: FactSet,API,SDK
Platform: UNKNOWN
Requires-Python: >=3.6
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: urllib3 (>=1.25.3)
Requires-Dist: python-dateutil
Requires-Dist: fds.sdk.utils (>=0.10.0)

<img alt="FactSet" src="https://www.factset.com/hubfs/Assets/images/factset-logo.svg" height="56" width="290">

# FactSet Prices client library for Python

[![PyPi](https://img.shields.io/pypi/v/fds.sdk.FactSetPrices)](https://pypi.org/project/fds.sdk.FactSetPrices/)
[![Apache-2 license](https://img.shields.io/badge/license-Apache2-brightgreen.svg)](https://www.apache.org/licenses/LICENSE-2.0)

Gain access to comprehensive global coverage for Equities & Fixed Income. Perform quick analytics by controlling the date ranges, currencies, and rolling periods, or simply request Open, High, Low, and Close prices. Easily connect pricing data with other core company data or alternative content sets using FactSet's hub and spoke symbology. <p>Equity and Fund Security types include Common Stock, ADR, GDR, Preferred, Closed-ended Fund, Exchange Traded Fund, Unit, Open-ended Fund, Exchange Traded Fund UVI, Exchange Traded Fund NAV, Preferred Equity, Non-Voting Depositary Receipt/Certificate, Alien/Foreign, Structured Product, and Temporary Instruments. Reference over 180,000+ active and inactive securities.</p><p>Fixed Income Security Types include Corporate Bonds, Treasury and Agency bonds, Government Bonds, and Municipals.</p>


This Python package is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project:

- API version: 1.2.1
- Package version: 0.9.1
- Build package: org.openapitools.codegen.languages.PythonClientCodegen

## Requirements

* Python >= 3.6

## Installation

### Poetry

```python
poetry add fds.sdk.utils fds.sdk.FactSetPrices
```

### pip

```python
pip install fds.sdk.utils fds.sdk.FactSetPrices
```

## Usage

1. [Generate authentication credentials](../../../../README.md#authentication).
2. Setup Python environment.
   1. Install and activate python 3.6+. If you're using [pyenv](https://github.com/pyenv/pyenv):

      ```sh
      pyenv install 3.9.7
      pyenv shell 3.9.7
      ```

   2. (optional) [Install poetry](https://python-poetry.org/docs/#installation).
3. [Install dependencies](#installation).
4. Run the following:

```python

from fds.sdk.utils.authentication import ConfidentialClient
import fds.sdk.FactSetPrices
from fds.sdk.FactSetPrices.api import database_rollover_api
from fds.sdk.FactSetPrices.model.error_response import ErrorResponse
from fds.sdk.FactSetPrices.model.rollover_response import RolloverResponse
from pprint import pprint

# See configuration.py for a list of all supported configuration parameters.

# Examples for each supported authentication method are below,
# choose one that satisfies your use case.

# (Preferred) OAuth 2.0: FactSetOAuth2
# See https://github.com/FactSet/enterprise-sdk#oauth-20
# for information on how to create the app-config.json file
# See https://github.com/FactSet/enterprise-sdk-utils-python#authentication
# for more information on using the ConfidentialClient class
configuration = fds.sdk.FactSetPrices.Configuration(
    fds_oauth_client = ConfidentialClient('/path/to/app-config.json')
)

# Basic authentication: FactSetApiKey
# See https://github.com/FactSet/enterprise-sdk#api-key
# for information how to create an API key
# configuration = fds.sdk.FactSetPrices.Configuration(
#     username = 'USERNAME-SERIAL',
#     password = 'API-KEY'
# )

# Enter a context with an instance of the API client
with fds.sdk.FactSetPrices.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = database_rollover_api.DatabaseRolloverApi(api_client)
    
    try:
        # Gets the latest relative rollover date for the database.
        api_response = api_instance.get_database_rollover()
        pprint(api_response)
    except fds.sdk.FactSetPrices.ApiException as e:
        print("Exception when calling DatabaseRolloverApi->get_database_rollover: %s\n" % e)
```

## Documentation for API Endpoints

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

Class | Method | HTTP request | Description
------------ | ------------- | ------------- | -------------
*DatabaseRolloverApi* | [**get_database_rollover**](docs/DatabaseRolloverApi.md#get_database_rollover) | **GET** /factset-prices/v1/database-rollover | Gets the latest relative rollover date for the database.
*DatabaseRolloverApi* | [**get_database_rollover_for_list**](docs/DatabaseRolloverApi.md#get_database_rollover_for_list) | **POST** /factset-prices/v1/database-rollover | Gets the latest relative rollover date for the database.
*DividendsApi* | [**get_security_dividends**](docs/DividendsApi.md#get_security_dividends) | **GET** /factset-prices/v1/dividends | Gets dividend information for a given date range and list of securities
*DividendsApi* | [**get_security_dividends_for_list**](docs/DividendsApi.md#get_security_dividends_for_list) | **POST** /factset-prices/v1/dividends | Requests dividend information for a given date range and list of securities
*HighLowApi* | [**get_high_low**](docs/HighLowApi.md#get_high_low) | **GET** /factset-prices/v1/high-low | Gets the price high and price low of securities for a list of &#x60;ids&#x60; as of given date, period and frequency.
*HighLowApi* | [**get_high_low_for_list**](docs/HighLowApi.md#get_high_low_for_list) | **POST** /factset-prices/v1/high-low | Requests the price high and price low of securities for a list of &#x60;ids&#x60; as of given date, period and frequency.
*MarketValueApi* | [**get_market_value**](docs/MarketValueApi.md#get_market_value) | **GET** /factset-prices/v1/market-value | Gets the security level and company level market values for a list of &#x60;ids&#x60; as of given date range and frequency.
*MarketValueApi* | [**get_market_value_for_list**](docs/MarketValueApi.md#get_market_value_for_list) | **POST** /factset-prices/v1/market-value | Requests the market value for a list of &#x60;ids&#x60; as of given date range.
*PricesApi* | [**get_fixed_security_prices**](docs/PricesApi.md#get_fixed_security_prices) | **GET** /factset-prices/v1/fixed-income | Gets pricing for a list of Fixed Income securities
*PricesApi* | [**get_fixed_security_prices_for_list**](docs/PricesApi.md#get_fixed_security_prices_for_list) | **POST** /factset-prices/v1/fixed-income | Requests pricing for a list of Fixed Income securities for date range requested
*PricesApi* | [**get_security_prices**](docs/PricesApi.md#get_security_prices) | **GET** /factset-prices/v1/prices | Gets end-of-day Open, High, Low, Close for a list of securities.
*PricesApi* | [**get_security_prices_for_list**](docs/PricesApi.md#get_security_prices_for_list) | **POST** /factset-prices/v1/prices | Requests end-of-day Open, High, Low, Close for a large list of securities.
*ReferenceApi* | [**get_security_reference_for_list**](docs/ReferenceApi.md#get_security_reference_for_list) | **POST** /factset-prices/v1/references | Requests security reference details a list of securities
*ReferenceApi* | [**get_security_references**](docs/ReferenceApi.md#get_security_references) | **GET** /factset-prices/v1/references | Gets security reference details for a list of securities
*ReturnsApi* | [**get_returns_snapshot**](docs/ReturnsApi.md#get_returns_snapshot) | **GET** /factset-prices/v1/returns-snapshot | Returns the price performance of the security and annualized compound total returns.
*ReturnsApi* | [**get_returns_snapshot_for_list**](docs/ReturnsApi.md#get_returns_snapshot_for_list) | **POST** /factset-prices/v1/returns-snapshot | Returns the price performance of the security and annualized compound total returns.
*ReturnsApi* | [**get_security_returns**](docs/ReturnsApi.md#get_security_returns) | **GET** /factset-prices/v1/returns | Gets Returns for a list of &#x60;ids&#x60; as of given date range and rolling Period
*ReturnsApi* | [**get_security_returns_for_list**](docs/ReturnsApi.md#get_security_returns_for_list) | **POST** /factset-prices/v1/returns | Requests security returns for the given date range and rollingPeriod.
*SharesApi* | [**get_security_shares**](docs/SharesApi.md#get_security_shares) | **GET** /factset-prices/v1/shares | Gets shares for a list of &#x60;ids&#x60; as of given date range.
*SharesApi* | [**get_security_shares_for_list**](docs/SharesApi.md#get_security_shares_for_list) | **POST** /factset-prices/v1/shares | Requests shares for a list of &#x60;ids&#x60; as of given date range.
*SplitsApi* | [**get_security_splits**](docs/SplitsApi.md#get_security_splits) | **GET** /factset-prices/v1/splits | Gets full history of security Splits for a list of &#x60;ids&#x60;
*SplitsApi* | [**get_security_splits_for_list**](docs/SplitsApi.md#get_security_splits_for_list) | **POST** /factset-prices/v1/splits | Requests splits for a list of &#x60;ids&#x60;


## Documentation For Models

 - [Adjust](docs/Adjust.md)
 - [Batch](docs/Batch.md)
 - [BatchStatus](docs/BatchStatus.md)
 - [BatchStatusResponse](docs/BatchStatusResponse.md)
 - [Calendar](docs/Calendar.md)
 - [Dividend](docs/Dividend.md)
 - [DividendAdjust](docs/DividendAdjust.md)
 - [DividendAdjustSnapshot](docs/DividendAdjustSnapshot.md)
 - [DividendsRequest](docs/DividendsRequest.md)
 - [DividendsResponse](docs/DividendsResponse.md)
 - [ErrorResponse](docs/ErrorResponse.md)
 - [ErrorResponseSubErrors](docs/ErrorResponseSubErrors.md)
 - [FixedIds](docs/FixedIds.md)
 - [FixedIncomePrice](docs/FixedIncomePrice.md)
 - [Frequency](docs/Frequency.md)
 - [FrequencyFi](docs/FrequencyFi.md)
 - [HighLow](docs/HighLow.md)
 - [HighLowRequest](docs/HighLowRequest.md)
 - [HighLowResponse](docs/HighLowResponse.md)
 - [IdsBatchMax5000](docs/IdsBatchMax5000.md)
 - [IdsMax1000](docs/IdsMax1000.md)
 - [IdsMax2000](docs/IdsMax2000.md)
 - [MarketValue](docs/MarketValue.md)
 - [MarketValueRequest](docs/MarketValueRequest.md)
 - [MarketValueResponse](docs/MarketValueResponse.md)
 - [ModelReturn](docs/ModelReturn.md)
 - [Period](docs/Period.md)
 - [Price](docs/Price.md)
 - [PriceType](docs/PriceType.md)
 - [PricesFixedIncomeRequest](docs/PricesFixedIncomeRequest.md)
 - [PricesFixedIncomeResponse](docs/PricesFixedIncomeResponse.md)
 - [PricesRequest](docs/PricesRequest.md)
 - [PricesResponse](docs/PricesResponse.md)
 - [References](docs/References.md)
 - [ReferencesRequest](docs/ReferencesRequest.md)
 - [ReferencesResponse](docs/ReferencesResponse.md)
 - [ReturnsRequest](docs/ReturnsRequest.md)
 - [ReturnsResponse](docs/ReturnsResponse.md)
 - [ReturnsSnapshot](docs/ReturnsSnapshot.md)
 - [ReturnsSnapshotRequest](docs/ReturnsSnapshotRequest.md)
 - [ReturnsSnapshotResponse](docs/ReturnsSnapshotResponse.md)
 - [RollingPeriod](docs/RollingPeriod.md)
 - [Rollover](docs/Rollover.md)
 - [RolloverResponse](docs/RolloverResponse.md)
 - [Shares](docs/Shares.md)
 - [SharesRequest](docs/SharesRequest.md)
 - [SharesResponse](docs/SharesResponse.md)
 - [SplitAdjust](docs/SplitAdjust.md)
 - [Splits](docs/Splits.md)
 - [SplitsRequest](docs/SplitsRequest.md)
 - [SplitsResponse](docs/SplitsResponse.md)


## Documentation For Authorization


## FactSetApiKey

- **Type**: HTTP basic authentication


## FactSetOAuth2

- **Type**: OAuth
- **Flow**: application
- **Authorization URL**: 
- **Scopes**: N/A


## Notes for Large OpenAPI documents
If the OpenAPI document is large, imports in fds.sdk.FactSetPrices.apis and fds.sdk.FactSetPrices.models may fail with a
RecursionError indicating the maximum recursion limit has been exceeded. In that case, there are a couple of solutions:

Solution 1:
Use specific imports for apis and models like:
- `from fds.sdk.FactSetPrices.api.default_api import DefaultApi`
- `from fds.sdk.FactSetPrices.model.pet import Pet`

Solution 2:
Before importing the package, adjust the maximum recursion limit as shown below:
```
import sys
sys.setrecursionlimit(1500)
import fds.sdk.FactSetPrices
from fds.sdk.FactSetPrices.apis import *
from fds.sdk.FactSetPrices.models import *
```

## Contributing

Please refer to the [contributing guide](../../../../CONTRIBUTING.md).

## Copyright

Copyright 2022 FactSet Research Systems Inc

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

    http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.



