Awesome Open Source
Awesome Open Source

poloniex ########

Poloniex python API client for humans

.. image:: :target:

.. image:: :target: :alt: Code coverage


Poloniex API_ client for humans


The package has been uploaded to PyPI_, so you can install it with pip:

.. code:: bash

$ pip install poloniex

Usage Examples

Documentation can be inspected by calling the python's help function with a Poloniex object as parameter:

.. code:: python

from poloniex import Poloniex polo = Poloniex() help(polo)

Public APIs """""""""""

.. code:: python

from poloniex import Poloniex polo = Poloniex() ticker = polo.returnTicker()['BTC_ETH'] print(ticker)

Private APIs """"""""""""

.. code:: python

from poloniex import Poloniex import os

api_key = os.environ.get('POLONIEX_API_KEY') api_secret = os.environ.get('POLONIEX_SECRET') polo = Poloniex(api_key, api_secret)

ticker = polo.returnTicker()['BTC_ETH'] print(ticker)

balances = polo.returnBalances() print(balances)

Used in

  • crypto_trader_: Trading automation on poloniex cyriptocoin exchange

Common Errors

If you are having a nonce error or an exception like this one below, you probably need to generate a new api key-secret pair.

.. code:: python

    Traceback (most recent call last):
      File "C:/Users/name/.PyCharmCE2018.2/config/scratches/", line 10, in <module>
        balances = polo.returnBalances()
      File "C:\Users\name\AppData\Roaming\Python\Python27\site-packages\poloniex\", line 183, in returnBalances
        return self._private('returnBalances')
      File "C:\Users\name\AppData\Roaming\Python\Python27\site-packages\poloniex\", line 50, in _fn
        raise PoloniexCommandException(respdata['error'])
    poloniex.exceptions.PoloniexCommandException: Nonce must be greater than 1532206573738226. You provided 1533067257748.

    Process finished with exit code 1



.. _PyPI: .. _Poloniex API: .. _crypto_trader:

Get A Weekly Email With Trending Projects For These Topics
No Spam. Unsubscribe easily at any time.
python (54,384
python3 (1,642
cryptocurrency (502
trading (228
trading-bot (115
api-wrapper (113
trading-api (30
poloniex (26