Skip to main content

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.

Source Distribution

btrade_api_client-0.2.7.tar.gz (4.3 kB view hashes)

Uploaded Source

Built Distribution

btrade_api_client-0.2.7-py3-none-any.whl (5.9 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page