A package for read operations for the comdirect API
Project description
Comdirect API
This is an unofficial python wrapper for the comdirect API for private consumers (April 2020).
This package currently only supports read operations, which include:
- Read balances and transactions
- Read depot information
- Read and download Documents
- Read and update orders
- Export and import the session
Install
Install the package using pip
pip install comdirect-api-simple
Usage
Initialize the client:
from comdirect_api.comdirect_client import ComdirectClient
client_id = '<your_client_id>'
client_secret = '<your_client_secret>'
client = ComdirectClient(client_id, client_secret)
Login with your credentials like so:
user = 'your_zugangsnummer'
password = 'your_pin'
client.fetch_tan(user, password)
After confirming the login on your photoTAN app you can activate your session.
client.activate_session()
You can refresh your token with:
client.refresh_token()
The the client is now ready for use, for example:
balances = client.get_all_balances()
print(balances['values'])
It is also possible to send a GET request to a self defined endpoint, for example:
client.get('reports/participants/user/v1/allbalances', productType='ACCOUNT')
List all the complete order-book and filter for OPEN orders:
data = client.get_all_orders(depotId, order_status='OPEN')
print(data)
You can change an OPEN order as follows:
orderId='XXYYYAA...'
order = client.get_order(orderId)
order['triggerLimit']['value'] = '16.6'
[challenge_id, challenge]=client.set_order_change_validation(orderId, order)
orderChanged=client.set_order_change(orderId,data, challenge_id)
To export the session you can use
client.activate_session()
...
client.session_export()
To import it in another instance call:
client = ComdirectClient('client_id', 'client_secret','session.pkl')
More information about the official API can be found at https://developer.comdirect.de
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for comdirect-api-simple-0.0.13.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | d064b94143c28c8d1e6cb996f2b0a44bea73bc44bb1beece1700f06689211ec3 |
|
MD5 | 21b9b17bc12bc2bb7455454916b4c54f |
|
BLAKE2b-256 | 4519d9650a082c6c803f5f9c31bfa0bde13fd87ced19e451f26194dc40b00f4e |
Hashes for comdirect_api_simple-0.0.13-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 022ea66add4806c23119e9fff581fdc5481a9a7f021356c09ae9343c2312c435 |
|
MD5 | d5174335a60e09466aaa4650c55bb2a3 |
|
BLAKE2b-256 | 43153f5d15cb44ab09529c3ae41c78a5842c27f1045bc48587b5814fcaa1161c |