SPGMICIQ


NameSPGMICIQ JSON
Version 2.0.0 PyPI version JSON
download
home_pageNone
SummarySPGMICIQ is an API Client for the S&P Capital IQ API
upload_time2024-08-12 07:09:23
maintainerNone
docs_urlNone
authorSPGMICIQ
requires_python<4.0.0,>=3.9.0
licenseNone
keywords spgi s&p capitaliq api s&p global ciqapi s&p market intelligence sdk financials marketdata
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # SPGMI CIQ Python Library

The Python Software Development Kit (SDK) makes REST API integration into your Python environment easier, allowing less technical and experienced Python users to start utilizing REST APIs sooner.

S&P Capital API clients can now access these SDKs to integrate end-of-day and time-series Financial and Market data such as Income Sheet, Balance Sheets, pricing, and dividend information data points from the S&P Capital IQ API into their Python workflows.

 The SDK seamlessly integrates with pandas DataFrames, providing a Jupyter-friendly environment and a simpler, optimized data analysis experience.

## Features

Integrate high-quality data with your systems, portals, and business applications, including:
1. Analysts looking to receive income statement, balance sheet, and cash flow values for backtesting models.
2. Basic automation of desktop/Excel-based modeling when the Excel template reaches its limit.
3. Time-series pricing and market data values as well as dividend information.

## Benefits
1. Output generated in a reusable/extendible object such as a DataFrame, facilitating easy data processing and analysis.
2. Ease of authentication, request, and response handling.
3. Ability to use proxy objects for enhanced network communication.


## Installation

Thank you for your interest in our library on PYPI. Please be aware that the version of the library available here is a placeholder/dummy version intended for demonstration purposes only.

To obtain an actual version of the Python SDK library for installation or further support, please visit the [S&P Global Support Center](https://www.support.marketplace.spglobal.com/en/delivery-resources#sec6). Note that login credentials must be created on the support center to access the content.

Our team will be happy to assist you and provide guidance based on your needs.

## Setting up the library
Using the below code, you can make the necessary imports and set up the required instances to use the Python library.

```sh
from IPython.core.display_functions import display
from spgmi_api_sdk.authentication.services import SDKAuthenticateServices
from spgmi_api_sdk.financials.services import SDKFinancialServices
from spgmi_api_sdk.marketdata.services import SDKMarketDataServices

#Required Instances
auth = SDKAuthenticateServices()
fs= SDKFinancialServices()
mds = SDKMarketDataServices()
```
## Authentication Service
These functions provide a seamless authentication process to securely access API services. Included are the methods for obtaining and refreshing access tokens while ensuring all API requests are properly authorized.

### get_token()
```sh
username = "--username--"    #Replace with actual username
password = "--password--"    #Replace with actual password
token_response = auth.get_token(username, password)
bearer_token = token_response.get("access_token")
```
### get_refresh_token()
```sh
refresh_token_response=auth.get_refresh_token("--refresh_token--")
refresh_bearer_token = refresh_token_response.get("access_token")
```
## Fetching Financial Data
Our financial data service provides a number of functionalities enabling you to retrieve point-in-time and historical financial data including income statements, balance sheets, cash flow statements, and other financial metrics essential for comprehensive financial analysis. 

Use the following functions from the SDKFinancialServices class.

Note: All SDKFinancialServices functions will accept a maximum of 10 identifiers.

### 1. get_income_statement_pit
Fetches income statement data for a given point in time.
```sh
response = fs.get_income_statement_pit(token=bearer_token, identifiers=["I_US5949181045","2588173","EG1320"],properties={"asOfDate": "12/31/2020", "currencyId": "USD","currencyConversionModeId": "HISTORICAL"})
display(response)
```

### 2. get_income_statement_historical
Fetches historical income statement data.
```sh
response = fs.get_income_statement_historical(token=bearer_token, identifiers=["GV012141","MSFT:NasdaqGS"], properties={"periodType":"IQ_FQ-4"})
display(response)
```

### 3. get_balance_sheet_pit
Fetches balance sheet data for a given point in time.
```sh
response = fs.get_balance_sheet_pit(token=bearer_token, identifiers=["RX309198","MMM:"], properties={"asOfDate": "12/31/2020", "currencyId": "USD","currencyConversionModeId": "HISTORICAL"})
display(response)
```
### 4. get_balance_sheet_historical
Fetches historical balance sheet data.
```sh
response = fs.get_balance_sheet_historical(token=bearer_token, identifiers=["I_US5949181045","2588173"], properties={"periodType":"IQ_FQ-2"})
display(response)
```

### 5. get_cash_flow_pit
Fetches cash flow data for a given point in time.
```sh
response = fs.get_cash_flow_pit(token=bearer_token, identifiers=["2588173","EG1320"], properties={"asOfDate": "12/31/2020", "currencyId": "USD","currencyConversionModeId": "HISTORICAL"})
display(response)
```

### 6. get_cash_flow_historical
Fetches historical cash flow data.
```sh
response = fs.get_cash_flow_historical(token=bearer_token, identifiers=["MSFT:NasdaqGS","DB649496569"], properties={"asOfDate": "12/31/2020", "currencyId": "USD","currencyConversionModeId": "HISTORICAL"})
display(response)
```

### 7. get_financials_pit
Fetches financial data (income statement, balance sheet, cash flow) for a given point in time based on specified mnemonics. This function will accept a maximum of 10 mnemonics.
```sh
response = fs.get_financials_pit(token=bearer_token, identifiers=["I_US5949181045","2588173","EG1320","CSP_594918104","IQT2630413","GV012141","MSFT:NasdaqGS","DB649496569","RX309198"], mnemonics=["IQ_CASH_INVEST_NAME_AP"], properties={"asOfDate": "12/31/2020", "currencyId": "USD","currencyConversionModeId": "HISTORICAL"})
display(response)
```
### 8. get_financials_historical
Fetches historical financial data based on specified mnemonics. This function will accept a maximum of 10 mnemonics.
```sh
response = fs.get_financials_historical(token=bearer_token, identifiers=["I_US5949181045","2588173","EG1320","CSP_594918104","IQT2630413","GV012141","MSFT:NasdaqGS","DB649496569","RX309198"], mnemonics=["IQ_CASH_INVEST_NAME_AP"], properties={"asOfDate": "12/31/2020", "currencyId": "USD","currencyConversionModeId": "HISTORICAL"})
display(response)
```

## Fetching MarketData
Our market data service provides several functionalities enabling you to access end-of-day and time-series market data, including stock prices, trading volumes, dividend information, and other market-related information crucial for analysis and decision-making.

Use the following functions from the SDKMarketDataServices class.

Note: All SDKMarketDataServices functions will accept a maximum of 10 identifiers.

### 1. get_pricing_info_pit
Fetches pricing information for a given point in time.
```sh
response = mds.get_pricing_info_pit(token=bearer_token, identifiers=["I_US5949181045","2588173","EG1320","CSP_594918104","IQT2630413"], properties={}) 
display(response)
```

### 2. get_pricing_info_time_series
Fetches historical pricing information over a specified time period. 
```sh
response = mds.get_pricing_info_time_series(token=bearer_token, identifiers=["CSP_594918104","IQT2630413","GV012141","MSFT:NasdaqGS","DB649496569","RX309198","MMM:"], properties={}) 
display(response)
```

### 3. get_dividend_info_pit
Fetches dividend information for a given point in time. 
```sh
response = mds.get_dividend_info_pit(token=bearer_token, identifiers=["CSP_594918104","IQT2630413","GV012141","MSFT:NasdaqGS"], properties={}) 
display(response)
```

### 4. get_dividend_info_time_series
Fetches historical dividend information over a specified time period 
```sh
response = mds.get_dividend_info_time_series(token=bearer_token, identifiers=["GV012141","MSFT:NasdaqGS","DB649496569","RX309198","MMM:"], properties={}) 
display(response)
```

### 5. get_market_info_pit
Fetches market information for a given point in time. 
```sh
response = mds.get_market_info_pit(token=bearer_token, identifiers=["IQT2630413","GV012141","MSFT:NasdaqGS","DB649496569","RX309198"], properties={}) 
display(response)
```
### 6. get_market_info_time_series
Fetches historical market information over a specified time period.
```sh 
response = mds.get_market_info_time_series(token=bearer_token, identifiers=["AAPL:"], properties={}) 
display(response)
```

## Additional Resources
For more information on our Python SDK, please visit the [S&P Global Support Center](https://www.support.marketplace.spglobal.com/en/delivery-resources#sec6). This resource requires you to create login credentials.

On the support center, you can download the Python SDK and obtain additional resources, including a detailed CIQ Python SDK User Guide, to support your use of this offering.



            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "SPGMICIQ",
    "maintainer": null,
    "docs_url": null,
    "requires_python": "<4.0.0,>=3.9.0",
    "maintainer_email": null,
    "keywords": "SPGI, S&P CapitalIQ API, S&P Global, CIQAPI, S&P Market Intelligence, SDK, Financials, MarketData",
    "author": "SPGMICIQ",
    "author_email": "gds_python_sdk_support@spglobal.com",
    "download_url": "https://files.pythonhosted.org/packages/14/09/4379a991be30068891fbe99b1ad2a30dad2868e446fda22271f72750c839/spgmiciq-2.0.0.tar.gz",
    "platform": null,
    "description": "# SPGMI CIQ Python Library\n\nThe Python Software Development Kit (SDK) makes REST API integration into your Python environment easier, allowing less technical and experienced Python users to start utilizing REST APIs sooner.\n\nS&P Capital API clients can now access these SDKs to integrate end-of-day and time-series Financial and Market data such as Income Sheet, Balance Sheets, pricing, and dividend information data points from the S&P Capital IQ API into their Python workflows.\n\n The SDK seamlessly integrates with pandas DataFrames, providing a Jupyter-friendly environment and a simpler, optimized data analysis experience.\n\n## Features\n\nIntegrate high-quality data with your systems, portals, and business applications, including:\n1. Analysts looking to receive income statement, balance sheet, and cash flow values for backtesting models.\n2. Basic automation of desktop/Excel-based modeling when the Excel template reaches its limit.\n3. Time-series pricing and market data values as well as dividend information.\n\n## Benefits\n1. Output generated in a reusable/extendible object such as a DataFrame, facilitating easy data processing and analysis.\n2. Ease of authentication, request, and response handling.\n3. Ability to use proxy objects for enhanced network communication.\n\n\n## Installation\n\nThank you for your interest in our library on PYPI. Please be aware that the version of the library available here is a placeholder/dummy version intended for demonstration purposes only.\n\nTo obtain an actual version of the Python SDK library for installation or further support, please visit the [S&P Global Support Center](https://www.support.marketplace.spglobal.com/en/delivery-resources#sec6). Note that login credentials must be created on the support center to access the content.\n\nOur team will be happy to assist you and provide guidance based on your needs.\n\n## Setting up the library\nUsing the below code, you can make the necessary imports and set up the required instances to use the Python library.\n\n```sh\nfrom IPython.core.display_functions import display\nfrom spgmi_api_sdk.authentication.services import SDKAuthenticateServices\nfrom spgmi_api_sdk.financials.services import SDKFinancialServices\nfrom spgmi_api_sdk.marketdata.services import SDKMarketDataServices\n\n#Required Instances\nauth = SDKAuthenticateServices()\nfs= SDKFinancialServices()\nmds = SDKMarketDataServices()\n```\n## Authentication Service\nThese functions provide a seamless authentication process to securely access API services. Included are the methods for obtaining and refreshing access tokens while ensuring all API requests are properly authorized.\n\n### get_token()\n```sh\nusername = \"--username--\"    #Replace with actual username\npassword = \"--password--\"    #Replace with actual password\ntoken_response = auth.get_token(username, password)\nbearer_token = token_response.get(\"access_token\")\n```\n### get_refresh_token()\n```sh\nrefresh_token_response=auth.get_refresh_token(\"--refresh_token--\")\nrefresh_bearer_token = refresh_token_response.get(\"access_token\")\n```\n## Fetching Financial Data\nOur financial data service provides a number of functionalities enabling you to retrieve point-in-time and historical financial data including income statements, balance sheets, cash flow statements, and other financial metrics essential for comprehensive financial analysis. \n\nUse the following functions from the SDKFinancialServices class.\n\nNote: All SDKFinancialServices functions will accept a maximum of 10 identifiers.\n\n### 1. get_income_statement_pit\nFetches income statement data for a given point in time.\n```sh\nresponse = fs.get_income_statement_pit(token=bearer_token, identifiers=[\"I_US5949181045\",\"2588173\",\"EG1320\"],properties={\"asOfDate\": \"12/31/2020\", \"currencyId\": \"USD\",\"currencyConversionModeId\": \"HISTORICAL\"})\ndisplay(response)\n```\n\n### 2. get_income_statement_historical\nFetches historical income statement data.\n```sh\nresponse = fs.get_income_statement_historical(token=bearer_token, identifiers=[\"GV012141\",\"MSFT:NasdaqGS\"], properties={\"periodType\":\"IQ_FQ-4\"})\ndisplay(response)\n```\n\n### 3. get_balance_sheet_pit\nFetches balance sheet data for a given point in time.\n```sh\nresponse = fs.get_balance_sheet_pit(token=bearer_token, identifiers=[\"RX309198\",\"MMM:\"], properties={\"asOfDate\": \"12/31/2020\", \"currencyId\": \"USD\",\"currencyConversionModeId\": \"HISTORICAL\"})\ndisplay(response)\n```\n### 4. get_balance_sheet_historical\nFetches historical balance sheet data.\n```sh\nresponse = fs.get_balance_sheet_historical(token=bearer_token, identifiers=[\"I_US5949181045\",\"2588173\"], properties={\"periodType\":\"IQ_FQ-2\"})\ndisplay(response)\n```\n\n### 5. get_cash_flow_pit\nFetches cash flow data for a given point in time.\n```sh\nresponse = fs.get_cash_flow_pit(token=bearer_token, identifiers=[\"2588173\",\"EG1320\"], properties={\"asOfDate\": \"12/31/2020\", \"currencyId\": \"USD\",\"currencyConversionModeId\": \"HISTORICAL\"})\ndisplay(response)\n```\n\n### 6. get_cash_flow_historical\nFetches historical cash flow data.\n```sh\nresponse = fs.get_cash_flow_historical(token=bearer_token, identifiers=[\"MSFT:NasdaqGS\",\"DB649496569\"], properties={\"asOfDate\": \"12/31/2020\", \"currencyId\": \"USD\",\"currencyConversionModeId\": \"HISTORICAL\"})\ndisplay(response)\n```\n\n### 7. get_financials_pit\nFetches financial data (income statement, balance sheet, cash flow) for a given point in time based on specified mnemonics. This function will accept a maximum of 10 mnemonics.\n```sh\nresponse = fs.get_financials_pit(token=bearer_token, identifiers=[\"I_US5949181045\",\"2588173\",\"EG1320\",\"CSP_594918104\",\"IQT2630413\",\"GV012141\",\"MSFT:NasdaqGS\",\"DB649496569\",\"RX309198\"], mnemonics=[\"IQ_CASH_INVEST_NAME_AP\"], properties={\"asOfDate\": \"12/31/2020\", \"currencyId\": \"USD\",\"currencyConversionModeId\": \"HISTORICAL\"})\ndisplay(response)\n```\n### 8. get_financials_historical\nFetches historical financial data based on specified mnemonics. This function will accept a maximum of 10 mnemonics.\n```sh\nresponse = fs.get_financials_historical(token=bearer_token, identifiers=[\"I_US5949181045\",\"2588173\",\"EG1320\",\"CSP_594918104\",\"IQT2630413\",\"GV012141\",\"MSFT:NasdaqGS\",\"DB649496569\",\"RX309198\"], mnemonics=[\"IQ_CASH_INVEST_NAME_AP\"], properties={\"asOfDate\": \"12/31/2020\", \"currencyId\": \"USD\",\"currencyConversionModeId\": \"HISTORICAL\"})\ndisplay(response)\n```\n\n## Fetching MarketData\nOur market data service provides several functionalities enabling you to access end-of-day and time-series market data, including stock prices, trading volumes, dividend information, and other market-related information crucial for analysis and decision-making.\n\nUse the following functions from the SDKMarketDataServices class.\n\nNote: All SDKMarketDataServices functions will accept a maximum of 10 identifiers.\n\n### 1. get_pricing_info_pit\nFetches pricing information for a given point in time.\n```sh\nresponse = mds.get_pricing_info_pit(token=bearer_token, identifiers=[\"I_US5949181045\",\"2588173\",\"EG1320\",\"CSP_594918104\",\"IQT2630413\"], properties={}) \ndisplay(response)\n```\n\n### 2. get_pricing_info_time_series\nFetches historical pricing information over a specified time period. \n```sh\nresponse = mds.get_pricing_info_time_series(token=bearer_token, identifiers=[\"CSP_594918104\",\"IQT2630413\",\"GV012141\",\"MSFT:NasdaqGS\",\"DB649496569\",\"RX309198\",\"MMM:\"], properties={}) \ndisplay(response)\n```\n\n### 3. get_dividend_info_pit\nFetches dividend information for a given point in time. \n```sh\nresponse = mds.get_dividend_info_pit(token=bearer_token, identifiers=[\"CSP_594918104\",\"IQT2630413\",\"GV012141\",\"MSFT:NasdaqGS\"], properties={}) \ndisplay(response)\n```\n\n### 4. get_dividend_info_time_series\nFetches historical dividend information over a specified time period \n```sh\nresponse = mds.get_dividend_info_time_series(token=bearer_token, identifiers=[\"GV012141\",\"MSFT:NasdaqGS\",\"DB649496569\",\"RX309198\",\"MMM:\"], properties={}) \ndisplay(response)\n```\n\n### 5. get_market_info_pit\nFetches market information for a given point in time. \n```sh\nresponse = mds.get_market_info_pit(token=bearer_token, identifiers=[\"IQT2630413\",\"GV012141\",\"MSFT:NasdaqGS\",\"DB649496569\",\"RX309198\"], properties={}) \ndisplay(response)\n```\n### 6. get_market_info_time_series\nFetches historical market information over a specified time period.\n```sh \nresponse = mds.get_market_info_time_series(token=bearer_token, identifiers=[\"AAPL:\"], properties={}) \ndisplay(response)\n```\n\n## Additional Resources\nFor more information on our Python SDK, please visit the [S&P Global Support Center](https://www.support.marketplace.spglobal.com/en/delivery-resources#sec6). This resource requires you to create login credentials.\n\nOn the support center, you can download the Python SDK and obtain additional resources, including a detailed CIQ Python SDK User Guide, to support your use of this offering.\n\n\n",
    "bugtrack_url": null,
    "license": null,
    "summary": "SPGMICIQ is an API Client for the S&P Capital IQ API",
    "version": "2.0.0",
    "project_urls": null,
    "split_keywords": [
        "spgi",
        " s&p capitaliq api",
        " s&p global",
        " ciqapi",
        " s&p market intelligence",
        " sdk",
        " financials",
        " marketdata"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "423fce6590dffb307c3722e954bcf1da5b6f1c76980d91a96eaaf170438ff94b",
                "md5": "e03fdccf8ee2664341866d5d320256e2",
                "sha256": "f079dc2ea7d15482edaba0f7252fb5c53d915a93198e8cc698d19fbd4c74b424"
            },
            "downloads": -1,
            "filename": "spgmiciq-2.0.0-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "e03fdccf8ee2664341866d5d320256e2",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": "<4.0.0,>=3.9.0",
            "size": 3614,
            "upload_time": "2024-08-12T07:09:21",
            "upload_time_iso_8601": "2024-08-12T07:09:21.859114Z",
            "url": "https://files.pythonhosted.org/packages/42/3f/ce6590dffb307c3722e954bcf1da5b6f1c76980d91a96eaaf170438ff94b/spgmiciq-2.0.0-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "14094379a991be30068891fbe99b1ad2a30dad2868e446fda22271f72750c839",
                "md5": "bd399bb4c8bc25971457688cb5ae951c",
                "sha256": "4dc009379b03139e7e3c000bac79aa340afe8cda0bdb96070371627fbb7e62d7"
            },
            "downloads": -1,
            "filename": "spgmiciq-2.0.0.tar.gz",
            "has_sig": false,
            "md5_digest": "bd399bb4c8bc25971457688cb5ae951c",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": "<4.0.0,>=3.9.0",
            "size": 3806,
            "upload_time": "2024-08-12T07:09:23",
            "upload_time_iso_8601": "2024-08-12T07:09:23.871656Z",
            "url": "https://files.pythonhosted.org/packages/14/09/4379a991be30068891fbe99b1ad2a30dad2868e446fda22271f72750c839/spgmiciq-2.0.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-08-12 07:09:23",
    "github": false,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "lcname": "spgmiciq"
}
        
Elapsed time: 0.27143s