<p>Try...</p>

<p>balance = api.get_balances()
print balance</p>

CC BY-SA 3.0
2017-10-24T17:07:10.980Z
2017-10-24T17:07:10.980Z
chris
<p>I'm completely new to python (and programming), and I know this question will sound very dumb to most of you people. I'm experimenting on getting datas from the cryptocurrencies exchenge bittrex and put it into variables into my script for further calculations. I'm trying to make this <a href="https://github.com/ericsomdahl/python-bittrex" rel="nofollow noreferrer">unofficial repository</a> working to fetch datas from their api. While I have no problems with the public datas (fetching with curl), I can't get this piece of python to work, and thus I can't fetch balances nor any other private datas. </p>

<p>In order to install it I made the following:</p>

<pre><code>wget https://github.com/ericsomdahl/python-bittrex/archive/master.zip
unzip master.zip
cd python-bittrex-master
python setup.py install
</code></pre>

<p>The following files were created:</p>

<pre><code>ls -la /usr/local/lib/python2.7/dist-packages/bittrex/
total 48
drwxr-sr-x 2 root staff  4096 Sep 30 15:04 .
drwxrwsr-x 3 root staff  4096 Sep 30 15:04 ..
-rw-rw-r-- 1 root staff 15357 Sep 12 18:34 bittrex.py
-rw-r--r-- 1 root staff 17302 Sep 30 15:04 bittrex.pyc
-rw-rw-r-- 1 root staff     0 Sep 12 18:34 __init__.py
-rw-r--r-- 1 root staff   145 Sep 30 15:04 __init__.pyc
</code></pre>

<p>Then I created this test files, but they are both producing no output:</p>

<pre><code>cat get_balances.py 
#!/usr/bin/env python 
from bittrex.bittrex import Bittrex
api = Bittrex('fXXXXXXXXXXXXXXXXXXXXXXXXXd', '1XXXXXXXXXXXXXXXXXXXXXXXXX0')
api.get_balances() 
</code></pre>

<p>and</p>

<pre><code>cat get_markets.py 
#!/usr/bin/env python 
from bittrex.bittrex import Bittrex    
api = Bittrex('fXXXXXXXXXXXXXXXXXXXXXXXXXd', '1XXXXXXXXXXXXXXXXXXXXXXXXX0')    
api.get_markets()
</code></pre>

<p>Before I did <code>python setup.py install</code> the output was: <code>ImportError: cannot import name Bittrex</code></p>

<p>I tried to troubleshoot it running with <code>python -v</code> in front but it did produce 500 lines of output that I didn't manage to understand, I'd share it of course if someone asks for it.</p>

<p>While I'm writing I'm sure I'm missing something very trivial, sorry if it's a dumb question, but documentation is lacking any principle, it's very few and it assumes that who is integrating this code is a developer; and I'm not.</p>

<p>Following suggestions from another forum I did:</p>

<pre><code>root@my:/home/me/test/python-bittrex-master# pip install bittrex
Downloading/unpacking bittrex
  Downloading bittrex-0.1.4.tar.gz
  Running setup.py (path:/tmp/pip_build_root/bittrex/setup.py) egg_info for package bittrex

Downloading/unpacking requests==2.7.0 (from bittrex)
  Downloading requests-2.7.0-py2.py3-none-any.whl (470kB): 470kB downloaded
Installing collected packages: bittrex, requests
  Running setup.py install for bittrex

  Found existing installation: requests 2.2.1
    Not uninstalling requests at /usr/lib/python2.7/dist-packages, owned by OS
Successfully installed bittrex requests
Cleaning up...


python get_balances.py 
/usr/local/lib/python2.7/dist-packages/requests/packages/urllib3/util/ssl_.py:90: InsecurePlatformWarning: A true SSLContext object is not available. This prevents urllib3 from configuring SSL appropriately and may cause certain SSL connections to fail. For more information, see https://urllib3.readthedocs.org/en/latest/security.html#insecureplatformwarning.
  InsecurePlatformWarning
</code></pre>

<p>So there is a warning, but still no output.</p>

<p>If you try the code I pasted as is, it should return "invalid api", while it throws no output on my system. How to troubleshoot this?</p>

<exchanges><bittrex>
Can't use Bittrex Exchange python-bittrex api call: no output
Marco
# Can't use Bittrex Exchange python-bittrex api call: no output

(Asked by: username_0 on 2017-10-14)

I'm completely new to python (and programming), and I know this question will sound very dumb to most of you people. I'm experimenting on getting datas from the cryptocurrencies exchenge bittrex and put it into variables into my script for further calculations. I'm trying to make this [unofficial repository](https://github.com/ericsomdahl/python-bittrex) working to fetch datas from their api. While I have no problems with the public datas (fetching with curl), I can't get this piece of python to work, and thus I can't fetch balances nor any other private datas.

In order to install it I made the following:

```
wget https://github.com/ericsomdahl/python-bittrex/archive/master.zip
unzip master.zip
cd python-bittrex-master
python setup.py install

```

The following files were created:

```
ls -la /usr/local/lib/python2.7/dist-packages/bittrex/
total 48
drwxr-sr-x 2 root staff  4096 Sep 30 15:04 .
drwxrwsr-x 3 root staff  4096 Sep 30 15:04 ..
-rw-rw-r-- 1 root staff 15357 Sep 12 18:34 bittrex.py
-rw-r--r-- 1 root staff 17302 Sep 30 15:04 bittrex.pyc
-rw-rw-r-- 1 root staff     0 Sep 12 18:34 __init__.py
-rw-r--r-- 1 root staff   145 Sep 30 15:04 __init__.pyc

```

Then I created this test files, but they are both producing no output:

```
cat get_balances.py 
#!/usr/bin/env python 
from bittrex.bittrex import Bittrex
api = Bittrex('fXXXXXXXXXXXXXXXXXXXXXXXXXd', '1XXXXXXXXXXXXXXXXXXXXXXXXX0')
api.get_balances() 

```

and

```
cat get_markets.py 
#!/usr/bin/env python 
from bittrex.bittrex import Bittrex    
api = Bittrex('fXXXXXXXXXXXXXXXXXXXXXXXXXd', '1XXXXXXXXXXXXXXXXXXXXXXXXX0')    
api.get_markets()

```

Before I did `python setup.py install` the output was: `ImportError: cannot import name Bittrex`

I tried to troubleshoot it running with `python -v` in front but it did produce 500 lines of output that I didn't manage to understand, I'd share it of course if someone asks for it.

While I'm writing I'm sure I'm missing something very trivial, sorry if it's a dumb question, but documentation is lacking any principle, it's very few and it assumes that who is integrating this code is a developer; and I'm not.

Following suggestions from another forum I did:

```
root@my:/home/me/test/python-bittrex-master# pip install bittrex
Downloading/unpacking bittrex
  Downloading bittrex-0.1.4.tar.gz
  Running setup.py (path:/tmp/pip_build_root/bittrex/setup.py) egg_info for package bittrex

Downloading/unpacking requests==2.7.0 (from bittrex)
  Downloading requests-2.7.0-py2.py3-none-any.whl (470kB): 470kB downloaded
Installing collected packages: bittrex, requests
  Running setup.py install for bittrex

  Found existing installation: requests 2.2.1
    Not uninstalling requests at /usr/lib/python2.7/dist-packages, owned by OS
Successfully installed bittrex requests
Cleaning up...

python get_balances.py 
/usr/local/lib/python2.7/dist-packages/requests/packages/urllib3/util/ssl_.py:90: InsecurePlatformWarning: A true SSLContext object is not available. This prevents urllib3 from configuring SSL appropriately and may cause certain SSL connections to fail. For more information, see https://urllib3.readthedocs.org/en/latest/security.html#insecureplatformwarning.
  InsecurePlatformWarning

```

So there is a warning, but still no output.

If you try the code I pasted as is, it should return "invalid api", while it throws no output on my system. How to troubleshoot this?

**Tags:** exchanges, bittrex


---

## 1 answers

### Answer by username_1 on 2017-10-24. Score: 0

Try...

balance = api.get\_balances()
print balance


---

