bitbutter-python

Welcome to Chainbridge

For source code visit the repository on GitHub.

Usage

Table of Contents

Partner Routes

First create a partner client

import os
from bitbutter.client import Client

partner_api_key = os.environ['BITBUTTER_API_KEY']
partner_secret = os.environ['BITBUTTER_SECRET']
base_uri = os.environ['BITBUTTER_BASE_URI']
partner_id = os.environ['BITBUTTER_PARTNER_ID']
partnership_id = os.environ['BITBUTTER_PARTNERSHIP_ID']

partner_client = Client(partner_api_key, partner_secret, base_uri, partner_id=partner_id, partnership_id=partnership_id)

Create user

partner_client.create_user()

Delete user

partner_client.delete_user(user_id)

Get all users

partner_client.get_all_users()

User Routes

First create a user client

import os
from bitbutter.client import Client

user_api_key = os.environ['BITBUTTER_API_KEY']
user_secret = os.environ['BITBUTTER_SECRET']
base_uri = os.environ['BITBUTTER_BASE_URI']
user_id = os.environ['BITBUTTER_USER_ID']

user_client = Client(user_api_key, user_secret, base_uri, user_id=user_id)

Get user balance

Get user ledger

Connect exchange

payload = {
    'credentials': {
        'api_key': user_api_key,
        'secret': user_secret
    },
    'exchange_id': exchange_id
}

user_client.connect_exchange(payload)

Get all exchanges

user_client.get_all_exchanges()

Get user connected exchanges

user_client.get_user_connected_exchanges()

Get connected exchange balances

Get connected exchange ledger

Get connected exchange trades

Get connected exchange transfers

Sync connected exchange

Disconnect exchange

Get all assets

Connect address

Get user connected addresses

Get connected address balances

Get connected address ledger

Sync connected address

Disconnect address