Skip to main content

Python connector for PortfolioPersonals's Rest APIs.

Project description

Welcome to py_ppi_arg' Documentation

Overview

py_ppi_arg is a Python library that enables interaction with PortfolioPersonal REST APIs. It is designed to save developers hours of research and coding required to connect to PortfolioPersonal REST APIs.

Disclaimer

py_ppi_arg is not owned by Portfolio Personal, and the authors are not responsible for the use of this library.

Installation

To install py_ppi_arg, you can use the following command:

pip install py_ppi_arg

API Credentials

To use this library, you need to have the correct authentication credentials.

Dependencies

The library has the following dependency:

requests>=2.31.0
simplejson>=3.19.1
pyotp>=2.9.0
beautifulsoup4>=4.12.3
bs4>=0.0.2
certifi>=2024.7.4
charset-normalizer>=3.3.2
idna>=3.7
soupsieve>=2.5
urllib3>=2.2.2

Features

Available Methods

Initialization

Before using the library, you need to initialize it with a valid email and password.

REST

The library provides functions to make requests to the REST API and retrieve the corresponding responses.

Functions
  • get_tickers_list: Retrieves instruments quote list information filtered by instrument type, operation type and settlement.
  • search_tickers : Queries the API to search for a particular instrument based on the name.
  • get_technical_data_bonds: Retrieves the techical data for a bond.
  • get_historic_data: Retrieves the historic data for an item.
  • get_intraday_data: Retrieves the intraday data for an item.

All functions return a dictionary representing the JSON response.

Enumerations

The library also provides enumerations to help developers avoid errors and improve readability.

  • Currency : Identifies the available currencies in the app.
  • InstrumentTypes : Identifies the instrument types.
  • OperationType: Identifies the operation types.
  • Settlements : Identifies the different settlement dates.

Usage

Once the library has been installed, you can import and initialize it. The initialization sets the email and password. It then attempts to authenticate with the provided credentials. If the authentication fails, an ApiException is thrown.

from py_ppi_arg import PPI

app = PPI(email="sample@email.com", password="S4mp13.p4ssW0rd")

REST

# Get information about all the available bonds
app.get_tickers_list(
    instrument_type = app.instrument_types.PUBLIC_BOND,
    operation_type = app.operation_types.COMPRA,
    settlement = app.settlements.T2
)

# Get the technical data for a bond
app.get_technical_data_bonds(
        settlement=app.settlements.T2,
        item_id="804421"
        )

# Get the historic price data for an instrument
app.get_historic_data(item_id="261", settlement=app.settlements.T2)

# Get the information about for an instrument
app.search_tickers(short_ticker = "AL30")

For more information you can check this article.

Official API Documentation

There is no official API documentation for this library. The library was created by webscraping the app.

Acknowledgements

This library was created taking as an example the work of the Scrappers Argentinos and Inversiones y Algoritmos Telegram Groups in the pyCocos library.

@LucaGelmini and @patruccoluciano helped by giving feedback and suggestions for a better code. Special thanks to them.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

py_ppi_arg-0.2.0.tar.gz (10.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

py_ppi_arg-0.2.0-py3-none-any.whl (10.9 kB view details)

Uploaded Python 3

File details

Details for the file py_ppi_arg-0.2.0.tar.gz.

File metadata

  • Download URL: py_ppi_arg-0.2.0.tar.gz
  • Upload date:
  • Size: 10.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for py_ppi_arg-0.2.0.tar.gz
Algorithm Hash digest
SHA256 9b748d5f8888730d22dcefa977153957aa3c86e13922f3ee338283a228f27ac8
MD5 7811e005c6e04be1e0bd92a4c2366951
BLAKE2b-256 170dce4f6ba9f5bd07efab8ee88cbee4c0d5e18d649fe05617dc38cd57e7c644

See more details on using hashes here.

Provenance

The following attestation bundles were made for py_ppi_arg-0.2.0.tar.gz:

Publisher: publish.yml on MartinBasualdo0/pyPPI

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file py_ppi_arg-0.2.0-py3-none-any.whl.

File metadata

  • Download URL: py_ppi_arg-0.2.0-py3-none-any.whl
  • Upload date:
  • Size: 10.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for py_ppi_arg-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 12f236906f3ece48af2cbc8f24d5c5b17d4292b4c62966f5a16117088f65bcad
MD5 9aee2caf9bef1c6c5e8206c6e60b22c9
BLAKE2b-256 bebe4039cf7fcdf510365869737eb8641d6989f4cf1d4b300f2b50aba09a5b41

See more details on using hashes here.

Provenance

The following attestation bundles were made for py_ppi_arg-0.2.0-py3-none-any.whl:

Publisher: publish.yml on MartinBasualdo0/pyPPI

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page