/cryptopia-api-python3

Python 3 wrapper for cryptopia API which kicks ass and chews bubblegum

Primary LanguagePythonGNU General Public License v3.0GPL-3.0

Cryptopia python API by CC Tech

The Bot Guy (thebotguy@protonmail.com)

Fork by Michelgard (contact@blog-de-michel.fr) Python3

Overview

This wrapper provides a friendly way to call Cryptopia API from a Python 3.5.3 script. Requires requests 2.8.4 By Michelgard

Usage

Just import it and use it.

from cryptopia_api import Api

#later...
api_wrapper = Api(MY_PUBLIC_KEY, MY_SECRET_KEY)

#call a request to the api, like balance in BTC...
balance, error = api_wrapper.get_balance('BTC')
if error is not None:
    #handle error
    print 'ERROR: %s' % error
else:
    #ok
    print 'Request successfull. Balance in BTC = %f' % balance

Check cryptopia API docs for the parameters of each call: a more detailed wiki will be added here soon!