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
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file btrade_api_client-0.2.7.tar.gz
.
File metadata
- Download URL: btrade_api_client-0.2.7.tar.gz
- Upload date:
- Size: 4.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.20.1 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/3.7.2
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 |
b0cd656bb4c50349eb60dfcb7bb28c4231875d3e63fab2bd4b2bff1e8c0fbc2e
|
|
MD5 |
f035c6b19fe594ef2e9d361493a6a35c
|
|
BLAKE2b-256 |
8cbb7538e2d1de26d29b4af91071b8952fbe74ad29a122e11262503b848b30cd
|
File details
Details for the file btrade_api_client-0.2.7-py3-none-any.whl
.
File metadata
- Download URL: btrade_api_client-0.2.7-py3-none-any.whl
- Upload date:
- Size: 5.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.20.1 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/3.7.2
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 |
9a92a325f0207f720549370498fd33a81dfce8b7f2ee5ceab72e1728b67e86dc
|
|
MD5 |
029ee27c7d4f945f76b4771bae4ff2c9
|
|
BLAKE2b-256 |
271727564964d08059a6fed4eed3139de7bfc7c1465dae701c3dbc7cc300c049
|