Skip to main content

A simple package to interact with the Parqet API.

Project description


Parqet Logo Python Logo
parqet-python

An inoffical package to communicate with the Parqet API.

Key FeaturesHow To UseDownloadCreditsRelatedLicense

Key Features

The parqet-python package will use the Parqet API to gather information about public Portfolios. Available information includes:

  • Portfolio name
  • Portfolio value
  • Gain gross / net
  • Total invested
  • List of activities and holdings
  • and many more...

How To Use

Installation

Install the package via pip. This will also install the dependency loguru for logging purposes.

# Install the package
$ pip install parqet

Usage

Create a Portfolio object and get the name of the portfolio.

# Import the package
from parqet import portfolio

# Create a portfolio object
portfolio = Portfolio("YOUR_PORTFOLIO_ID")

# Extract the portfolio name and print it
print(portfolio.get_name())

Note Your portfolio has to be set to public to access it via the API.

Full list of functions
Function Name Description Return Type Example
get_name() Returns the name of the portfolio. str portfolio.get_name() returns "My Portfolio"
get_value() Returns the current value of the portfolio. float portfolio.get_value() returns 6000.0
get_total_gain_gross() Returns the total gross gain of the portfolio. float portfolio.get_total_gain_gross() returns 1000.0
get_total_invested() Returns the total amount invested in the portfolio. float portfolio.get_total_invested() returns 5000.0
get_total_gain_net() Returns the total net gain of the portfolio. float portfolio.get_total_gain_net() returns 800.0
get_total_return_gross() Returns the total gross return of the portfolio. float portfolio.get_total_return_gross() returns 20.0
get_total_return_net() Returns the total net return of the portfolio. float portfolio.get_total_return_net() returns 16.0
get_fees() Returns the total fees paid for the portfolio. float portfolio.get_fees() returns 50.0
get_created_at() Returns the date of the portfolio's creation. str portfolio.get_created_at() returns "2023-05-25T20:45:04.802Z"
get_holdings() Returns a list of holdings in the portfolio. list portfolio.get_holdings() returns [{...}]
get_activities() Returns a list of activities of the holdings in the portfolio. list portfolio.get_activities() returns [{...}]

Download

If you don't want to install the package via pip, you can instead download the latest release of the sourcecode.

Credits

This software uses Loguru for logging.

License

GPL


GitHub @JoghurtConnaisseur  · 

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

parqet-1.0.4.tar.gz (15.9 kB view hashes)

Uploaded Source

Built Distribution

parqet-1.0.4-py3-none-any.whl (16.1 kB view hashes)

Uploaded Python 3

Supported by

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