For source code visit the repository on GitHub.
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)
partner_client.create_user()
partner_client.delete_user(user_id)
partner_client.get_all_users()
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)
payload = {
'credentials': {
'api_key': user_api_key,
'secret': user_secret
},
'exchange_id': exchange_id
}
user_client.connect_exchange(payload)
user_client.get_all_exchanges()
user_client.get_user_connected_exchanges()