Skip to main content

Easy Coinbase API for simple payment acceptance

Project description

N|Solid

Python

This library was created to simplify the creation and receipt of payments from the Coinbase api, provided on the official website, in the Python programming language.

Features

  • Checking token validity
  • Creating a bill for payment
  • Information about the bill

Installation

Python version 3.2 or higher must be installed

pip install CoinbaseAPI

Using

To get your Api key, you need to register in Coinbase Commecre and get your key by following this link

Quick example of account creation and payment verification

Every 5 seconds the code will check the payment:

from CoinbaseAPI import CoinbaseAPI
from time import sleep

api_key = "YOUR_API_KEY"
api = CoinbaseAPI(api_key)

payment = api.create_charge("Test title", "Test description", 5.00, "USD")
print(payment.url)

while True:
    if payment.is_paid():
        print("Payment is paid!")
        break

    sleep(5)

License

GNU General Public License (GPL)

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

CoinbaseAPI-1.1.tar.gz (2.8 kB view hashes)

Uploaded Source

Built Distribution

CoinbaseAPI-1.1-py3-none-any.whl (3.1 kB view hashes)

Uploaded Python 3

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