Giter VIP home page Giter VIP logo

poloniex's Introduction

poloniex

Poloniex python API client for humans

image

Code coverage

Description

Poloniex API client for humans

Installation

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

$ pip install poloniex

Usage Examples

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

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

Public APIs

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

Private APIs

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.

Traceback (most recent call last):
  File "C:/Users/name/.PyCharmCE2018.2/config/scratches/scratch.py", line 10, in <module>
    balances = polo.returnBalances()
  File "C:\Users\name\AppData\Roaming\Python\Python27\site-packages\poloniex\poloniex.py", line 183, in returnBalances
    return self._private('returnBalances')
  File "C:\Users\name\AppData\Roaming\Python\Python27\site-packages\poloniex\poloniex.py", 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

Donations

BTC 13NpLwXgEP8d9NpDUHptY6BypFRNXHL3tr

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.