peshay / btcde

A Python Module for Bitcoin.de Trading API
MIT License
38 stars 24 forks source link

unable to buy and sell something #48

Closed flynk-zz closed 3 years ago

flynk-zz commented 3 years ago

According to your example I tried to sell something with this codesnippet

import btcde
create a object for the connection settings
api_key = "my_key"
api_secret = "my_secret"
conn = btcde.Connection(api_key, api_secret)
orderbook = conn.showOrderbook('sell', 'btceur')
print('API Credits Left: ' + str(orderbook.get('credits')))
orders = orderbook.get('orders')

for order in orders:
    print('Order ID: ' + str(order.get('order_id')) + " Min_Amount: " + str(order.get('min_amount')) + '\tPrice: ' + str(order.get('price')) + ' EUR')

conn.executeTrade('NRRHV9','sell','btceur',0.0021)`

Unfortunally it doesn't work for me. I get this output.


WARNING:btcde:API Error Code: 5
WARNING:btcde:API Error Message: Invalid signature
WARNING:btcde:API Error URL: https://api.bitcoin.de/v2/trades/NRRHV9?order_id=NRRHV9&type=sell&trading_pair=btceur&amount=0.0021

Would be great if you could fix this?

simone1999 commented 3 years ago

have the same Problem.

simone1999 commented 3 years ago

hey, found the Problem: the scipi (pip) version is not up to date with this Repo. your error already got fixed in #44, but did not got pushed to scipy. The workaround till it is getting pushed is to install it directly from git and not from scipy. You can achife this with: pip install git+git://github.com/peshay/btcde

peshay commented 3 years ago

I close this since there is workaround in place and I am working on a release of version 4.0 this should also end up in official pypi repo.