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
Hashes for btrade_api_client-0.2.6-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7cbb1a3801634e634149332b589b272358e5b1c0655997cbb249532dbe152e5e |
|
MD5 | b6c3f7a2ce25b30385e7ebd176695b70 |
|
BLAKE2b-256 | be7473f7fdb7f1e8cfe09322f5a4d9dd611a6ab1ae748013ad270c65bf8976c3 |