Inspired by this wrapper written by 'oipminer'
Python 2:
pip install https://github.com/s4w3d0ff/python-poloniex/archive/v0.4.5.zip
Python 3:
pip3 install https://github.com/s4w3d0ff/python-poloniex/archive/v0.4.5.zip
See the wiki or help(poloniex)
for more.
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'))
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 WAMP applications using the websocket push API can be found here.