Skip to main content
Donate to the Python Software Foundation or Purchase a PyCharm License to Benefit the PSF! Donate Now

BTrade API client

Project description

btrade_api_client

Bit Trade API Client library

This document describes the available API calls, for more information on the API vist the API Documentation.

Installation

pip3 install btrade-api-client

Usage

Create client instance

from btrade_api_client.client import ApiClient
client = ApiClient(api_key, api_secret)

Bankaccount

Get customer registered bank accounts

bankaccounts  = client.bankaccounts()

See API Documentation for response.

Get Wallets

Get customer registered wallets

wallets  = client.wallets()

See API Documentation for response.

Get Orders

Get all orders

orders  = client.orders()

See API Documentation for response.

Get Order

Get single order details

order  = client.order(12345)

See API Documentation for response.

Get Quote

To get a quote from the API use the quote method as below.

quote  = client.quote(src="aud", dst="btc", dst_volume=1, src_volume=None)

See API Documentation for response.

Accept Quote

To accept a quote use the token from the quote, and one of the following scenarios :

To an existing wallet :

order = c.accept(quote['token'], wallet_id=12345)

To a new wallet with the given address :

order = c.accept(quote['token'], wallet_address=3abcdf12345)

To an existing bank account, this is only valid when the dst currency is a fiat currency:

order = c.accept(quote['token'], bank_account=12345)

See API Documentation for response.

Get Transactions

Get all customer transactions for the given currency

transactions  = client.transactions("aud")

See API Documentation for response.

Get Balance

Get current balance for the given currency

balance  = client.balance("aud")

See API Documentation for response.

Get Ticker

Get current indicative rates

tickers  = client.ticker()

See API Documentation for response.

Credits

This library is based on https://github.com/guardian/httpie-hmac-auth/

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Filename, size & hash SHA256 hash help File type Python version Upload date
btrade_api_client-0.2.7-py3-none-any.whl (5.9 kB) Copy SHA256 hash SHA256 Wheel py3
btrade_api_client-0.2.7.tar.gz (4.3 kB) Copy SHA256 hash SHA256 Source None

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN SignalFx SignalFx Supporter DigiCert DigiCert EV certificate StatusPage StatusPage Status page