Skip to main content

Poloniex API wrapper for Python 2.7 and 3

Project description

pythonlicence releaserelease build
mastermaster build devdev build
Inspired by this wrapper written by 'oipminer'

I (s4w3d0ff) am not affiliated with, nor paid by Poloniex. I have been an active trader there since 2014 and love python. I found the linked python wrapper on the poloniex support page to be incomplete and buggy so I decided to write this wrapper and create this git repository. If you wish to contribute to this repository please read CONTRIBUTING.md. All and any help is appreciated.

pip install poloniexapi

Usage:

See the wiki or help(poloniex) for more.

Basic Public Setup (no api Key/Secret):

from poloniex import Poloniex
polo = Poloniex()

Ticker

print(polo('returnTicker')['BTC_ETH'])
# or
print(polo.returnTicker()['BTC_ETH'])

Public trade history:

print(polo.marketTradeHist('BTC_ETH'))

Basic Private Setup (Api key/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 ETH!" % balance['ETH'])
# or
balance = polo('returnBalances')
print("I have %s BTC!" % balance['BTC'])

Private trade history:

print(polo.returnTradeHistory('BTC_ETH'))

Examples of how to use websocket push API can be found here.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

poloniexapi-0.5.2.tar.gz (12.5 kB view hashes)

Uploaded Source

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page