Skip to content
This repository has been archived by the owner on Jun 1, 2019. It is now read-only.

omarryhan/aiopaybear

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Logo

Software License Downloads Monthly Downloads Code style: black

Aiopaybear

Async client for savvy.io (FKA paybear.io)

Setup

$ pip install aiopaybear

Dependencies

  • aiohttp

Usage

Init:

from aiopaybear impory Aiopaybear

aiopaybear = Aiopaybear(
    token='your_savvyio_token',
    public_key='your_savvyio_public_key',
    callback_url='https://yourwebsite/savvy/callback'
)

Get list of enabled currencies:

>>> await aiopaybear.get_currencies()

Create new payment:

>>> await aiopaybear.create_payment('btc')

{
    "success": true,
    "data": {
        "invoice": "d1ddf6e3767030b08032cf2eae403600",
        "address": "0x2073eb3be1a41908e0353427da7f16412a01ae71"
    }
}

Get exchange rates of all supported currencies for a specific fiat currency:

>>> await aiopaybear.xrate_all('usd')

{
    "success": true,
    "data": {
        "ltc": {
            "poloniex": 340.986909455,
            "hitbtc": 340.568,
            "bittrex": 340.25,
            "bitfinex": 341.295,
            "mid": 340.77497736375
        },
        "eth": {
            "poloniex": 804.580989955,
            "hitbtc": 805.88,
            "bittrex": 803.47641155,
            "bitfinex": 805.125,
            "mid": 804.76560037625
        },
        ...
    }
}

Get exchange rate of a single crypto currency:

>>> await aiopaybear.xrate('usd', 'btc')

{
    "success": true,
    "data": {
        "poloniex": 301.71905,
        "bittrex": 302.05,
        "bitfinex": 301.53499,
        "mid": 301.76807
    }
}

Contact 📧

I currently work as a freelance software devloper. Like my work and got a gig for me?

Want to hire me fulltime? Send me an email @ omarryhan@gmail.com

Buy me a coffee ☕

Bitcoin: 3NmywNKr1Lzo8gyNXFUnzvboziACpEa31z

Ethereum: 0x1E1400C31Cd813685FE0f6D29E0F91c1Da4675aE

Bitcoin Cash: qqzn7rsav6hr3zqcp4829s48hvsvjat4zq7j42wkxd

Litecoin: MB5M3cE3jE4E8NwGCWoFjLvGqjDqPyyEJp

Paypal: https://paypal.me/omarryhan

About

Async paybear.io / savvy.io client

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages