bitvavo / python-bitvavo-api

Python wrapper for the Bitvavo API
https://pypi.org/project/python-bitvavo-api/
ISC License
38 stars 25 forks source link

Deposit and withdrawal history of coin #11

Closed roobinh closed 3 years ago

roobinh commented 3 years ago

Hello,

Defenitely liking the python bitvavo api so far!

I want to create a function that calculates the amount of profit I have made on a single coin. I would like to be able to request withdrawal and deposit history of a coin.

For instance: request:

bitvavo.depositHistory({'BTC'})

this can be done with withdrawal as well reponse:

[{'timestamp': 1617457001000, 'symbol': 'BTC', 'amount': '1000', 'fee': '0', 'status': 'completed'}
{'timestamp': 1617393192000, 'symbol': 'BTC', 'amount': '100', 'fee': '0', 'status': 'completed'}
{'timestamp': 1617320765000, 'symbol': 'BTC', 'amount': '300', 'fee': '0', 'status': 'completed'}
{'timestamp': 1617278381000, 'symbol': 'BTC', 'amount': '100', 'fee': '0', 'status': 'completed'}
{'timestamp': 1617209104000, 'symbol': 'BTC', 'amount': '300', 'fee': '0', 'status': 'completed'}
{'timestamp': 1617126127000, 'symbol': 'BTC', 'amount': '500', 'fee': '0', 'status': 'completed'}
{'timestamp': 1617037500000, 'symbol': 'BTC', 'amount': '1000', 'fee': '0', 'status': 'completed'}
{'timestamp': 1616905636000, 'symbol': 'BTC', 'amount': '100', 'fee': '0', 'status': 'completed'}
{'timestamp': 1616617933000, 'symbol': 'BTC', 'amount': '20', 'fee': '0', 'status': 'completed', }
{'timestamp': 1616536369000, 'symbol': 'BTC', 'amount': '100', 'fee': '0', 'status': 'completed'}]

I dont think this function exists, so i'm hoping this gets implemented into the api.

Thanks for your time.

joeri-vv commented 3 years ago

To get full parameter documentation, take a look at our generic documentation: https://docs.bitvavo.com/#tag/Account/paths/~1depositHistory/get . You can request all deposits for a certian currency by using the symbol parameter:

response = bitvavo.depositHistory({ symbol: 'BTC' })