Code Monkey home page Code Monkey logo

bitreserve-python-sdk's Introduction

Bitreserve Python SDK

Welcome to the Bitreserve SDK for Python developers. Using this library, developers can more easily get started using the Bitreserve API.

Getting Started

To begin, visit the Bitreserve website and create an account. With a username and password in hand, you can begin building apps against the Bitreserve API immediately.

Authentication

Bitreserve utilizes OAuth2 for authentication. Right now, Bitreserve requires passing a username and password via the API to obtain a User Authentication Token (UAT). The python SDK eliminates much of the need to worry about such details though. Here is an example of how to authenticate using the Python SDK:

from bitreserve import Bitreserve
api = Bitreserve()
api.auth( <username>, <password> )
me = api.get_me()

In the future, Bitreserve will support additional means of authentication that do not require the direct use of a username and password hard coded in software or config files.

Example: Sending a Transaction

Below is an example of how one would send 1 BTC to someone using Bitreserve:

card_id = 'adc869d8-xxxx-xxxx-xxxx-72718f0a2be0'
from bitreserve import Bitreserve
api = Bitreserve()
api.auth( <username>, <password> )
promise = api.prepare_txn( card_id, '[email protected]', 1, 'BTC' )
api.execute_txn( card_id, '[email protected]', 1, 'BTC', promise )

A couple of notes about the sample above:

  • A card ID is required to identify from which store of value you will be sending value from.

  • One may specify sending any amount in any denomination. If an exchange is implied, Bitreserve will handle the exchange for you automatically.

  • When sending money via Bitreserve, you can specify a recipient in the form of a bitcoin address, an email address, or a Bitreserve member name.

  • Obtaining a "promise" is helpful when a transaction involves an exchange of value from one form or another. This promise secures a quote for the transaction which Bitreserve will honor for 30 seconds. Obtaining a promise is not required.

For a complete reference to the Bitreserve API, including examples in Python, please consult the Bitreserve API documentation.

Resources

About Bitreserve

Bitreserve makes using digital money fast, easy and free.

Bitreserve shields its members from bitcoin volatility by enabling them to hold bitcoin as stable, real-world currency. Bitreserve keeps your value safe while letting you spend it as bitcoin and send it to anyone in the world instantly and for free.

Transfer your bitcoin to U.S. dollars, euros, pounds, yen and yuan with no delays โ€” we offer instant, low-cost currency conversions. And we maintain a full reserve of real-world currencies and publish a real-time, verifiable proof of solvency, so you always know your value is safe.

License

This software is licensed under the MIT License.

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.