Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

fds.sdk.QuotesAPIforDigitalPortals

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

fds.sdk.QuotesAPIforDigitalPortals

Quotes API for Digital Portals client library for Python

  • 0.11.1
  • PyPI
  • Socket score

Maintainers
1

FactSet

Quotes API for Digital Portals client library for Python

PyPi Apache-2 license

The Quotes API combines endpoints for retrieving security end-of-day, delayed, and realtime prices with performance key figures and basic reference data on the security and market level.

The API supports over 20 different price types for each quote and comes with basic search endpoints based on security identifiers and instrument names. Market coverage is included in the Sample Use Cases section below.

The Digital Portal use case is focused on high-performance applications that are

  • serving millions of end-users,
  • accessible by client browsers via the internet,
  • supporting subscriptions for streamed updates out-of-the-box,
  • typically combining a wide variety of for Digital Portals-APIs into a highly use-case specific solution for customers,
  • integrated into complex infrastructures such as existing frontend frameworks, authentication services.

All APIs labelled for Digital Portals have been designed for direct use by client web applications and feature extreme low latency: The average response time across all endpoints is 30 ms whereas 99% of all requests are answered in close to under 300ms.

See the Time Series API for Digital Portals for direct access to price histories, and the News API for Digital Portals for searching and fetching related news.

This Python package is automatically generated by the OpenAPI Generator project:

  • API version: 2
  • Package version: 0.11.1
  • Build package: org.openapitools.codegen.languages.PythonClientCodegen

Requirements

  • Python >= 3.7

Installation

Poetry

poetry add fds.sdk.utils fds.sdk.QuotesAPIforDigitalPortals==0.11.1

pip

pip install fds.sdk.utils fds.sdk.QuotesAPIforDigitalPortals==0.11.1

Usage

  1. Generate authentication credentials.
  2. Setup Python environment.
    1. Install and activate python 3.7+. If you're using pyenv:

      pyenv install 3.9.7
      pyenv shell 3.9.7
      
    2. (optional) Install poetry.

  3. Install dependencies.
  4. Run the following:
from fds.sdk.utils.authentication import ConfidentialClient

import fds.sdk.QuotesAPIforDigitalPortals
from fds.sdk.QuotesAPIforDigitalPortals.api import basic_api
from fds.sdk.QuotesAPIforDigitalPortals.models import *
from dateutil.parser import parse as dateutil_parser
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.QuotesAPIforDigitalPortals.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.QuotesAPIforDigitalPortals.Configuration(
#     username='USERNAME-SERIAL',
#     password='API-KEY'
# )

# Enter a context with an instance of the API client
with fds.sdk.QuotesAPIforDigitalPortals.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = basic_api.BasicApi(api_client)
    # NOTE: The parameter variable defined below is just an example and may potentially contain non valid values. So please replace this with valid values.
    attributes = [
        "_attributes_example",
    ] # [str] | Limit the attributes returned in the response to the specified set. (optional)

    try:
        # List of asset classes.
        # example passing only required values which don't have defaults set
        # and optional values
        api_response = api_instance.get_basic_asset_class_list(attributes=attributes)

        pprint(api_response)
    except fds.sdk.QuotesAPIforDigitalPortals.ApiException as e:
        print("Exception when calling BasicApi->get_basic_asset_class_list: %s\n" % e)

    # # Get response, http status code and response headers
    # try:
    #     # List of asset classes.
    #     api_response, http_status_code, response_headers = api_instance.get_basic_asset_class_list_with_http_info(attributes=attributes)


    #     pprint(api_response)
    #     pprint(http_status_code)
    #     pprint(response_headers)
    # except fds.sdk.QuotesAPIforDigitalPortals.ApiException as e:
    #     print("Exception when calling BasicApi->get_basic_asset_class_list: %s\n" % e)

    # # Get response asynchronous
    # try:
    #     # List of asset classes.
    #     async_result = api_instance.get_basic_asset_class_list_async(attributes=attributes)
    #     api_response = async_result.get()


    #     pprint(api_response)
    # except fds.sdk.QuotesAPIforDigitalPortals.ApiException as e:
    #     print("Exception when calling BasicApi->get_basic_asset_class_list: %s\n" % e)

    # # Get response, http status code and response headers asynchronous
    # try:
    #     # List of asset classes.
    #     async_result = api_instance.get_basic_asset_class_list_with_http_info_async(attributes=attributes)
    #     api_response, http_status_code, response_headers = async_result.get()


    #     pprint(api_response)
    #     pprint(http_status_code)
    #     pprint(response_headers)
    # except fds.sdk.QuotesAPIforDigitalPortals.ApiException as e:
    #     print("Exception when calling BasicApi->get_basic_asset_class_list: %s\n" % e)

Using Pandas

To convert an API response to a Pandas DataFrame, it is necessary to transform it first to a dictionary.

import pandas as pd

response_dict = api_response.to_dict()['data']

simple_json_response = pd.DataFrame(response_dict)
nested_json_response = pd.json_normalize(response_dict)

Debugging

The SDK uses the standard library logging module.

Setting debug to True on an instance of the Configuration class sets the log-level of related packages to DEBUG and enables additional logging in Pythons HTTP Client.

Note: This prints out sensitive information (e.g. the full request and response). Use with care.

import logging
import fds.sdk.QuotesAPIforDigitalPortals

logging.basicConfig(level=logging.DEBUG)

configuration = fds.sdk.QuotesAPIforDigitalPortals.Configuration(...)
configuration.debug = True

Configure a Proxy

You can pass proxy settings to the Configuration class:

  • proxy: The URL of the proxy to use.
  • proxy_headers: a dictionary to pass additional headers to the proxy (e.g. Proxy-Authorization).
import fds.sdk.QuotesAPIforDigitalPortals

configuration = fds.sdk.QuotesAPIforDigitalPortals.Configuration(
    # ...
    proxy="http://secret:password@localhost:5050",
    proxy_headers={
        "Custom-Proxy-Header": "Custom-Proxy-Header-Value"
    }
)

Custom SSL Certificate

TLS/SSL certificate verification can be configured with the following Configuration parameters:

  • ssl_ca_cert: a path to the certificate to use for verification in PEM format.
  • verify_ssl: setting this to False disables the verification of certificates. Disabling the verification is not recommended, but it might be useful during local development or testing.
import fds.sdk.QuotesAPIforDigitalPortals

configuration = fds.sdk.QuotesAPIforDigitalPortals.Configuration(
    # ...
    ssl_ca_cert='/path/to/ca.pem'
)

Documentation for API Endpoints

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

ClassMethodHTTP requestDescription
BasicApiget_basic_asset_class_listGET /basic/assetClass/listList of asset classes.
BasicApiget_basic_benchmark_type_listGET /basic/benchmark/type/listList of benchmark types.
BasicApiget_basic_frequency_type_listGET /basic/frequency/type/listList of frequency types.
BasicApiget_basic_language_getGET /basic/language/getDetails for a language.
BasicApiget_basic_language_get_by_codeGET /basic/language/getByCodeDetails for a language identified by code.
BasicApiget_basic_language_listGET /basic/language/listList of languages.
BasicApiget_basic_market_getGET /basic/market/getDetails of a market.
BasicApiget_basic_market_group_listGET /basic/market/group/listList of market groups.
BasicApiget_basic_market_type_listGET /basic/market/type/listList of market types.
BasicApiget_basic_media_kind_listGET /basic/media/kind/listList of media kinds.
BasicApiget_basic_region_continent_getGET /basic/region/continent/getDetails for a continent.
BasicApiget_basic_region_continent_listGET /basic/region/continent/listList of continents.
BasicApiget_basic_region_country_getGET /basic/region/country/getDetails for a country.
BasicApiget_basic_region_country_get_by_codeGET /basic/region/country/getByCodeDetails for a country identified by code.
BasicApiget_basic_region_country_listGET /basic/region/country/listList of countries.
BasicApiget_basic_region_getGET /basic/region/getDetails for a region.
BasicApiget_basic_region_listGET /basic/region/listList of regions.
BasicApiget_basic_timezone_getGET /basic/timezone/getDetails of a timezone.
BasicApiget_basic_timezone_get_by_nameGET /basic/timezone/getByNameDetails of a timezone identified by name.
BasicApiget_basic_value_unit_alternative_listGET /basic/valueUnit/alternative/listList of alternative units.
BasicApiget_basic_value_unit_currency_fractional_getGET /basic/valueUnit/currency/fractional/getDetails of a fractional currency.
BasicApiget_basic_value_unit_currency_fractional_listGET /basic/valueUnit/currency/fractional/listList of fractional currencies.
BasicApiget_basic_value_unit_getGET /basic/valueUnit/getDetails of a value unit.
BasicApipost_basic_background_text_type_listPOST /basic/backgroundText/type/listList of background text types.
BasicApipost_basic_delivery_listPOST /basic/delivery/listList of deliveries.
BasicApipost_basic_market_listPOST /basic/market/listList of markets.
BasicApipost_basic_media_type_listPOST /basic/media/type/listList of Internet media types.
BasicApipost_basic_mic_operating_listPOST /basic/mic/operating/listList of operating market identifier codes (MIC).
BasicApipost_basic_timezone_listPOST /basic/timezone/listList of timezones.
BasicApipost_basic_value_unit_currency_listPOST /basic/valueUnit/currency/listList of currencies.
BasicApipost_basic_value_unit_currency_main_listPOST /basic/valueUnit/currency/main/listList of main currencies.
BasicApipost_basic_value_unit_listPOST /basic/valueUnit/listList of value units.
CategoryApiget_category_dataset_listGET /category/dataset/listList of entitled category datasets.
CategoryApiget_category_getGET /category/getDetails of a category.
CategoryApiget_category_instrument_listGET /category/instrument/listList of instruments where a specific dataset has assigned a given category.
CategoryApiget_category_level_getGET /category/level/getDetails of a category level.
CategoryApiget_category_listGET /category/listList of categories.
CategoryApiget_category_list_by_levelGET /category/listByLevelList of categories assigned to a category level.
CategoryApiget_category_list_by_systemGET /category/listBySystemList of categories assigned to a category system.
CategoryApiget_category_path_getGET /category/path/getPath from the first level to the level of a specific category.
CategoryApiget_category_system_getGET /category/system/getDetails of an entitled category system.
CategoryApiget_category_system_listGET /category/system/listList of entitled category systems.
CategoryApiget_category_system_type_listGET /category/system/type/listList of category system types.
InstrumentApiget_instrument_background_text_list_by_instrumentGET /instrument/backgroundText/listByInstrumentBackground texts of an instrument.
InstrumentApiget_instrument_compliance_property_list_by_instrumentGET /instrument/complianceProperty/listByInstrumentCompliance properties of an instrument.
InstrumentApiget_instrument_composite_getGET /instrument/composite/getComposite instrument and its components.
InstrumentApiget_instrument_coupon_day_count_convention_type_listGET /instrument/coupon/dayCountConvention/type/listList of day count convention types.
InstrumentApiget_instrument_coupon_interest_rate_type_listGET /instrument/coupon/interestRate/type/listList of interest rate types.
InstrumentApiget_instrument_coupon_key_data_getGET /instrument/coupon/keyData/getInterest rate details for selected periods of an interest-bearing instrument.
InstrumentApiget_instrument_coupon_listGET /instrument/coupon/listList of coupons for an interest-bearing instrument.
InstrumentApiget_instrument_cross_reference_get_by_isinGET /instrument/crossReference/getByISINTranslate ISIN to instrument.
InstrumentApiget_instrument_cross_reference_get_by_wknGET /instrument/crossReference/getByWKNTranslate WKN to instrument.
InstrumentApiget_instrument_cross_reference_history_get_by_isinGET /instrument/crossReference/history/getByISINISIN to instrument translation history.
InstrumentApiget_instrument_cross_reference_history_get_by_wknGET /instrument/crossReference/history/getByWKNWKN to instrument translation history.
InstrumentApiget_instrument_exchange_rate_getGET /instrument/exchangeRate/getRetrieve an exchange rate instrument identifier.
InstrumentApiget_instrument_exchange_rate_get_by_iso_codeGET /instrument/exchangeRate/getByISOCodeRetrieve an exchange rate instrument identifier.
InstrumentApiget_instrument_getGET /instrument/getBasic data for an instrument.
InstrumentApiget_instrument_get_by_notationGET /instrument/getByNotationBasic data for an instrument.
InstrumentApiget_instrument_legal_entity_background_text_list_by_instrumentGET /instrument/legalEntity/backgroundText/listByInstrumentRole-specific background texts of legal entities related to an instrument.
InstrumentApiget_instrument_legal_entity_compliance_property_list_by_instrumentGET /instrument/legalEntity/complianceProperty/listByInstrumentRole-specific compliance properties of legal entities related to an instrument.
InstrumentApiget_instrument_mifid_getGET /instrument/mifid/getMiFID II data for a financial instrument.
InstrumentApiget_instrument_search_basicGET /instrument/search/basicBasic search for instruments.
InstrumentApipost_instrument_background_text_type_listPOST /instrument/backgroundText/type/listList of background text types for instruments.
InstrumentApipost_instrument_benchmark_listPOST /instrument/benchmark/listList of benchmarks of a financial instrument.
InstrumentApipost_instrument_category_listPOST /instrument/category/listList of categories assigned to a specific instrument the application is entitled to see.
InstrumentApipost_instrument_compliance_property_listPOST /instrument/complianceProperty/listList of compliance properties for instruments.
InstrumentApipost_instrument_cross_reference_list_by_isinPOST /instrument/crossReference/listByISINTranslate a list of ISINs to instruments.
InstrumentApipost_instrument_cross_reference_list_by_wknPOST /instrument/crossReference/listByWKNTranslate a list of WKNs to instruments.
InstrumentApipost_instrument_notation_listPOST /instrument/notation/listList of active, entitled notations for a set of instruments.
InstrumentApipost_instrument_rating_grade_listPOST /instrument/rating/grade/listList of rating grades for a list of instruments.
NotationApiget_notation_cross_reference_fact_set_identifier_getGET /notation/crossReference/factSetIdentifier/getRetrieve FactSet identifiers for a given notation.
NotationApiget_notation_cross_reference_get_by_fact_set_market_symbolGET /notation/crossReference/getByFactSetMarketSymbolTranslate a FactSet market symbol to a notation.
NotationApiget_notation_getGET /notation/getBasic data for a notation.
NotationApiget_notation_key_figures_month_1_getGET /notation/keyFigures/month/1/getEnd-of-day (EOD) key figures for the time range of one month.
NotationApiget_notation_key_figures_month_1_listGET /notation/keyFigures/month/1/listEnd-of-day (EOD) key figures for the time range of one month, for a list of notations.
NotationApiget_notation_key_figures_month_3_getGET /notation/keyFigures/month/3/getEnd-of-day (EOD) key figures for the time range of three months.
NotationApiget_notation_key_figures_month_3_listGET /notation/keyFigures/month/3/listEnd-of-day (EOD) key figures for the time range of three months, for a list of notations.
NotationApiget_notation_key_figures_month_6_getGET /notation/keyFigures/month/6/getEnd-of-day (EOD) key figures for the time range of six months.
NotationApiget_notation_key_figures_month_6_listGET /notation/keyFigures/month/6/listEnd-of-day (EOD) key figures for the time range of six months, for a list of notations.
NotationApiget_notation_key_figures_trading_day_average_getGET /notation/keyFigures/tradingDay/average/getAverage end-of-day (EOD) key figures for different trading days periods.
NotationApiget_notation_key_figures_week_1_getGET /notation/keyFigures/week/1/getEnd-of-day (EOD) key figures for the time range of one week.
NotationApiget_notation_key_figures_week_1_listGET /notation/keyFigures/week/1/listEnd-of-day (EOD) key figures for the time range of one week, for a list of notations.
NotationApiget_notation_key_figures_year_10_getGET /notation/keyFigures/year/10/getEnd-of-day (EOD) key figures for the time range of ten years.
NotationApiget_notation_key_figures_year_10_listGET /notation/keyFigures/year/10/listEnd-of-day (EOD) key figures for the time range of ten years, for a list of notations.
NotationApiget_notation_key_figures_year_1_getGET /notation/keyFigures/year/1/getEnd-of-day (EOD) key figures for the time range of one year.
NotationApiget_notation_key_figures_year_1_listGET /notation/keyFigures/year/1/listEnd-of-day (EOD) key figures for the time range of one year, for a list of notations.
NotationApiget_notation_key_figures_year_3_getGET /notation/keyFigures/year/3/getEnd-of-day (EOD) key figures for the time range of three years.
NotationApiget_notation_key_figures_year_3_listGET /notation/keyFigures/year/3/listEnd-of-day (EOD) key figures for the time range of three years, for a list of notations.
NotationApiget_notation_key_figures_year_5_getGET /notation/keyFigures/year/5/getEnd-of-day (EOD) key figures for the time range of five years.
NotationApiget_notation_key_figures_year_5_listGET /notation/keyFigures/year/5/listEnd-of-day (EOD) key figures for the time range of five years, for a list of notations.
NotationApiget_notation_key_figures_year_7_getGET /notation/keyFigures/year/7/getEnd-of-day (EOD) key figures for the time range of seven years.
NotationApiget_notation_key_figures_year_7_listGET /notation/keyFigures/year/7/listEnd-of-day (EOD) key figures for the time range of seven years, for a list of notations.
NotationApiget_notation_key_figures_year_to_date_getGET /notation/keyFigures/yearToDate/getEnd-of-day (EOD) key figures for the time range year-to-date (YTD)..
NotationApiget_notation_key_figures_year_to_date_listGET /notation/keyFigures/yearToDate/listEnd-of-day (EOD) key figures for the time range year-to-date (YTD), for a list of notations..
NotationApiget_notation_listGET /notation/listBasic data for a list of notations.
NotationApiget_notation_search_basicGET /notation/search/basicBasic search for notations.
NotationApiget_notation_search_by_text_ranked_by_volumeGET /notation/searchByTextRankedByVolumeBasic search for notations.
NotationApiget_notation_status_getGET /notation/status/getIntraday trading status of a notation.
NotationApipost_notation_category_listPOST /notation/category/listList of categories assigned to a specific notation the application is entitled to see.
NotationApipost_notation_cross_reference_fact_set_identifier_list_by_fact_set_identifierPOST /notation/crossReference/factSetIdentifier/listByFactSetIdentifierRetrieve a list of notations for a given FactSet identifier.
NotationApipost_notation_cross_reference_fact_set_identifier_list_by_instrumentPOST /notation/crossReference/factSetIdentifier/listByInstrumentRetrieve a list of FactSet identifiers for a given instrument.
NotationApipost_notation_cross_reference_list_by_instrumentPOST /notation/crossReference/listByInstrumentList of entitled notations.
NotationApipost_notation_cross_reference_list_by_isinPOST /notation/crossReference/listByISINList of entitled notations.
NotationApipost_notation_cross_reference_list_by_symbolPOST /notation/crossReference/listBySymbolList of entitled notations.
NotationApipost_notation_market_listPOST /notation/market/listList of markets with entitled notations.
NotationApipost_notation_search_by_textPOST /notation/searchByTextText-based search for notations.
PricesApiget_prices_bid_ask_getGET /prices/bidAsk/getMost recent bid and ask prices (best bid / offer) for a notation.
PricesApiget_prices_bid_ask_listGET /prices/bidAsk/listMost recent bid and ask prices (best bid / offer) for a list of notations.
PricesApiget_prices_getGET /prices/getOverview of trading on the most recent trading day, including the latest price, for a notation.
PricesApiget_prices_listGET /prices/listOverview of trading on the most recent trading day, including the latest price, for a list of notations.
PricesApiget_prices_orderbook_aggregated_getGET /prices/orderbook/aggregated/getOrderbook aggregated by price.
PricesApiget_prices_orderbook_full_getGET /prices/orderbook/full/getFull orderbook
PricesApiget_prices_trading_schedule_event_type_listGET /prices/tradingSchedule/event/type/listTrading schedule event types.
PricesApipost_prices_trading_schedule_event_listPOST /prices/tradingSchedule/event/listSequence of market-related events.

Documentation For Models

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.QuotesAPIforDigitalPortals.apis and fds.sdk.QuotesAPIforDigitalPortals.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.QuotesAPIforDigitalPortals.api.default_api import DefaultApi
  • from fds.sdk.QuotesAPIforDigitalPortals.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.QuotesAPIforDigitalPortals
from fds.sdk.QuotesAPIforDigitalPortals.apis import *
from fds.sdk.QuotesAPIforDigitalPortals.models import *

Contributing

Please refer to the contributing guide.

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.

Keywords

FAQs


Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc