Skip to main content

DegiroAsync

PyPI Downloads

Documentation

Check out the online documentation.

Introduction

This project aims to provide an unofficial API for Degiro platform that works asynchronously.

Precautions

This software is not an official Degiro product, nor is it backed by a company. It is made available to the users community, as a community effort to enable automation of Degiro trading platform.

A word on stability

Until this project's version reaches 1.0, the API should be considered unstable and may break even with minor versions increments.

Additionally, keep in mind that Degiro does not provide an official API for its platform, that means there is no commitment their API should be stable: it can change at any time and break this library. Potentially incurring losses depending on how you use that library.

Reminder from the License

THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

The license under which this software is made available can be found in the LICENSE file in this repository.

It is the responsability of the user of this library to ensure its product is running and passing adequate tests before running it in production.

Install

User installation

# Create a virtualenv or equivalent, depending on your tool of choice
python3 -m virtualenv venv
. venv/bin/activate
# Install from PyPI
python3 -m pip install degiroasync

Developer installation

# Clone this repository
git clone https://github.com/OhMajesticLama/degiroasync

# Create a virtualenv or equivalent, depending on your tool of choice
python3 -m virtualenv venv
. venv/bin/activate

# Install with dev dependencies
python3 -m pip install -e .[dev]

# To setup the project's git hooks:
git config --local core.hooksPath hooks

Run Tests

Even if you don't intend to develop for degiroasync, it is recommended to run tests, before using the library and regularly, to catch a broken environment or a change in Degiro API as early as possible and reduce the risk of a failure in your production environment.

Running integration tests will require environment set-up. As Degiro does not provide a test environment, those tests will be run directly on an actual account.

This comes with limitations and concerns:

  • Placing and cancelling order integration test will not be implemented to avoid ending up placing unwanted orders in the event automation fails to remove them.
  • You must be particularly careful to minimize risk to leak your credentials. e.g. write a helper script that will ask to input your password to run integration tests and run the tests to avoid leaking your credentials in global environment. Access to your script folder must be restricted, as well as write rights to any file that is imported - that includes this module and all its dependencies. We recommend installing it in a Virtual Environment or a container and restrict access to it.

The following environment variables must be set:

DEGIROASYNC_INTEGRATION  # must be set to 1 for integration tests to run
DEGIRO_USERNAME  # Your Degiro username
DEGIRO_PASSWORD  # Your Degiro password
DEGIRO_TOTP_SECRET  # Only if the account requires 2FA for login
# Unittests only
DEGIROASYNC_INTEGRATION=0 pytest tests/ --color yes
# Integration tests & Unittests
DEGIROASYNC_INTEGRATION=1 pytest tests/ --color yes

Tests coverage

For example, leverage coverage module:

pytest --cov

Please note that the coverage will or will not include integration tests if DEGIROASYNC_INTEGRATION environment variable is set to 1 or not set.

Other Python Degiro Libraries

Check-out those other Python Degiro libraries - non-exhaustive list - to assess which best fits your needs:

Release files for degiroasync 1.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for degiroasync 1.1.0
File Size Uploaded
degiroasync-1.1.0.tar.gz 57.6 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for degiroasync 1.1.0
File Interpreter ABI Platform
degiroasync-1.1.0-py3-none-any.whl Python 3 none any Details

Total release size:107.3 kB

Release files / degiroasync-1.1.0.tar.gz

Download URL degiroasync-1.1.0.tar.gz
Size 57.6 kB
Tags Source
SHA-256 checksum
How to use checksums
98b35560594b411d39a9ddcfd10d546013d410ecfb84a992ce11c3710713d628
BLAKE2b-256 checksum
How to use checksums
2da7315526fad94c01b0fb1b15fc27d62f732a719610d9b26bf335e3e4ee5515
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.14.5

Release files / degiroasync-1.1.0-py3-none-any.whl

Download URL degiroasync-1.1.0-py3-none-any.whl
Size 49.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
7b7f4651d18b83863e0df49a23b8a182028f21e91f0abccc3958e499340d5bb9
BLAKE2b-256 checksum
How to use checksums
3f5646e750c3b79c5bc49c73f86e309e8330f67e311722b1eca12d75e5d15ee1
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.14.5

Release history Release notifications | RSS feed

This release

1.1.0 This release

2 release files

1.0.0

2 release files

0.22.0

2 release files

0.21.0

2 release files

0.20.0

2 release files

0.19.0

2 release files

0.16.0

2 release files

0.15.2

2 release files

0.15.1

2 release files

0.14.1

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page