Introduction

Welcome to the BuyCoins Python library documentation page.

The BuyCoins Python library allows interactions with the BuyCoins API from applications written in Python.

Installation

Begin by installing the package from the PyPi repository:

$ pip install buycoins-python

Next, create an auth_key variable in a .env file:

auth_key=public key:private key

If you haven't gotten your public and private key, refer to this page.

Test your installation from a python console:

$ python
>>> from buycoins import Wallet
>>> Wallet().get_balances()

If any of the above commands fails, appropriate error messages are displayed.

Errors

A 401 error is returned when an invalid auth_key value is set:

{
    "status": "error",
    "name": "ClientError",
    "code": 401,
    "message": "invalid credentials"
}

What can I do with the library?

The core features of the package are:

  1. Buying & Selling supported cryptocurrencies (Bitcoin, Ethereum, Litecoin) using the P2P class.

  2. Generating deposit bank accounts to top up your NGNT account using the NGNT class.

  3. Sending supported currencies to external addresses and generating addresses to receive supported currencies using the Wallet class.

  4. Verifying webhook events using the Webhook class.

API

The BuyCoins API is hosted on BuyCoin's Developer Portal.

Last updated