Poloniex API wrapper for Python 2.7 & 3
Latest commit 985ef59 Jan 10, 2017 @s4w3d0ff committed on GitHub Merge pull request #42 from kdb424/master
Fixes adv orders and withdraw/deposits + more pep8
Failed to load latest commit information.
examples Update loanbot.py Oct 14, 2016
poloniex Merged upstream Jan 10, 2017
.gitignore ignore my cleanup.sh Jun 7, 2016
LICENSE Initial commit Oct 31, 2015
README.md Update README.md Oct 16, 2016
setup.py v0.2.2 bump Nov 6, 2016


An API wrapper for Poloniex.com written in Python

poloniex.py - Tested on Python 2.7.12 & 3.5.2

Inspired by this wrapper written by 'oipminer'


  • ApiKey and Secret are optional if used for just public commands.
  • Api Commands have been 'mapped' into methods within the Poloniex class for your convenience.
  • Raises ValueError if the command supplied does not exist or if the api keys are not defined
  • The poloniex.Poloniex() object has an optional 'timeout' attribute/arg that adjusts the number of seconds to wait for a response from polo (default = 3 sec)
  • Optional api 'coach' can restrict the amount of calls per sec, keeping your api calls (that aren't threaded) under the limit (6 calls per sec). Activate the coach using poloniex.Poloniex(coach=True) when creating the polo object or by defining polo._coaching = True.


Python 2:

pip install git+https://github.com/s4w3d0ff/python-poloniex.git

Python 3:

pip3 install git+https://github.com/s4w3d0ff/python-poloniex.git


Python 2:

pip uninstall poloniex

Python 3:

pip3 uninstall poloniex


Basic Public Setup (no ApiKey/Secret):

from poloniex import Poloniex
polo = Poloniex()
# or
Public trade history:

Basic Private Setup (ApiKey/Secret required):

import poloniex
polo = poloniex.Poloniex('your-Api-Key-Here-xxxx','yourSecretKeyHere123456789')
# or
polo.Key = 'your-Api-Key-Here-xxxx'
polo.Secret = 'yourSecretKeyHere123456789'
Get all your balances
balance = polo.returnBalances()
print("I have %s CGA!" % balance['CGA'])
# or
balance = polo('returnBalances')
print("I have %s BTC!" % balance['BTC'])

Extended Setup:

from poloniex import Poloniex
polo = Poloniex('your-Api-Key-Here-xxxx','yourSecretKeyHere123456789', extend=True)

Using extend=True will wrap most of the api commands with more 'meaningful' namespaces.


Examples of WAMP applications using the websocket push API can be found here.

You like?!

CGA: aZ1yHGx4nA64aWMDNQKXJrojso7gfQ1J5P
LTC: LakbntAYrwpVSnLWj1fCLttVzpiDXDa5JV
DOGE: DAQjkQNbhpUoQw7KHAGkDYZ3yySKi751dd