Python3 wrapper for Bittrex API v2 (currently in beta version)

in #bittrex7 years ago (edited)

Project repository


Bittrex API v2 wrapper for Python3. Inspired in platelminto's java wrapper. The API version is currently in beta (some endpoints may be fallen, see Testing section below).

Installation

Install bittrex_v2 by running:

git clone https://github.com/mondeja/bittrex_v2.git
cd bittrex_v2
python setup.py install

Example usage

- Public commands:
>>> from bittrex_v2 import Bittrex
>>> b = Bittrex()
>>> b.get_open_orders()
- Private commands:
>>> b = Bittrex(api_key="<your api key>",
...             api_secret="<your api secret>")
>>> b.get_open_orders('BTC-ETH')

Testing

Bittrex API v2 is currently in beta version, so that certain endpoints may be fallen. Execute tests.py for check all.

For test private commands methods you must provide key and secret in secrets.json file. For test get_order(<uuid>) method, you must provide a closed order uuid in CONFIGURATION SECTION (tests.py).


Development progress:

MethodDevelopedDocumentedTested
PUBLIC COMMANDS
get_market_summary
get_market_summaries
get_currencies
get_wallet_health
get_market_orderbook
get_ticks
PRIVATE COMMANDS
get_order
get_open_orders
get_order_history
get_balance
cancel
withdraw
place_order
get_withdrawal_history
get_deposit_history
get_pending_deposits
get_deposit_address
generate_deposit_address

Contribute

Support

If you are having issues, please let me know ([email protected]).

Sort:  

Good informative article fella.

This program looks well written, thank you.

will you help me to fix it. i got this error message with the installation.

$ python setup.py install
Traceback (most recent call last):
File "setup.py", line 16, in module
long_description = open('README.md','r').read(),
File "C:\Python36\lib\encodings\cp1252.py", line 23, in decode
return codecs.charmap_decode(input,self.errors,decoding_table)[0]
UnicodeDecodeError: 'charmap' codec can't decode byte 0x81 in position 2545: character maps to undefined

It's only for Python3, maybe you are trying to install it in Python2, use python3 setup.py install.

Thanks for posting. I am currently using a similar API for Bittrex. How long does your get_order_history function get past orders for? I found impossible to get any orders older than a month.