Skip to the content.

btcde.py

Python SDK modernization for bitcoin.de with explicit separation between read-only surfaces and trading/write risk.

CI Quality Gate Status Coverage PyPI version Python version License

Support via bunq

API Wrapper for Bitcoin.de Trading API

Requires: requests

Contributor checks

Before publishing pull request text, comments, commit messages, or docs, run the public artifact hygiene guard. It is available through pre-commit and runs in CI.

Install btcde.py

You can install the btcde module via pip

pip install btcde

How to Use

This is an example how you can use it in a python script

#! /usr/bin/env python
import btcde
# create a object for the connection settings
api_key = <YourAPIKey>
api_secret = <YourAPISecret>
# ssl_verify - Set to True or False to enable or disable SSL verification
conn = btcde.Connection(api_key, api_secret, ssl_verify=True)
orderbook = conn.showOrderbook('buy', 'btceur')
print(f'API Credits Left: {orderbook["credits"]}')
orders = orderbook['orders']
for order in orders:
    print(f'Order ID: {order["order_id"]} \tPrice: {order["price"]} EUR')

API Methods

For more Details on the API Methods, please read bitcoin.de API Documentation

All mandatory parameters have to be passed to a function, all optional are resolved via **args

Following Methodds are not yet implemented. If you like to get those implemented as well, please join the development project for version 4.1

Addresspool

addToAddressPool(currency, address, **args)

API Credits Cost: 2

removeFromAddressPool(currency, address)

API Credits Cost: 2

listAddressPool(currency)

API Credits Cost: 2

Orders

showOrderbook(OrderType, trading_pair, **args)

API Credits Cost: 2

showOrderDetails(trading_pair, order_id, **args)

API Credits Cost: 2

createOrder(OrderType, trading_pair, max_amount_currency_to_trade, price, **args)

API Credits Cost: 1

deleteOrder(order_id, trading_pair)

API Credits Cost: 2

showMyOrders(**args)

API Credits Cost: 2

showMyOrderDetails(trading_pair, order_id)

API Credits Cost: 2

Trades

executeTrade(order_id, OrderType, trading_pair, amount)

API Credits Cost: 1

showMyTrades(**args)

API Credits Cost: 3

showMyTradeDetails(trading_pair, trade_id)

API Credits Cost: 3

miscellaneous

markCoinsAsTransferred(trading_pair, trade_id, amount_currency_to_trade_after_fee)

API Credits Cost: 1

markTradeAsPaid(trading_pair, trade_id, volume_currency_to_pay_after_fee)

API Credits Cost: 1

markCoinsAsReceived(trading_pair, trade_id, amount_currency_to_trade_after_fee, rating)

API Credits Cost: 1

markTradeAsPaymentReceived(trading_pair, trade_id, volume_currency_to_pay_after_fee, rating, is_paid_from_correct_bank_account)

API Credits Cost: 1

addTradeRating(trading_pair, trade_id, rating)

API Credits Cost: 1

showAccountInfo()

API Credits Cost: 2

showOrderbookCompact(trading_pair)

API Credits Cost: 3

showPublicTradeHistory(trading_pair, **args)

API Credits Cost: 3

showRates(trading_pair)

API Credits Cost: 3

showAccountLedger(currency, **args)

API Credits Cost: 3

showPermissions()

API Credits Cost: 2

Deposit

requestDepositAddress

Not yet implemented!

showDeposit

Not yet implemented!

showDeposits

Not yet implemented!

Withdrawal

createWithdrawal

Not yet implemented!

deleteWithdrawal

Not yet implemented!

showWithdrawal

Not yet implemented!

showWithdrawalMinNetworkFee

Not yet implemented!

showWithdrawals

Not yet implemented!

Governance

Support

If this Python SDK is useful to you, you can support its ongoing maintenance via bunq. Support is voluntary and appreciated, but does not create any entitlement to support, features, consulting, an SLA, or invoice-based work.