bitbank-client
bitbank-client is a python client (sync/async) library for bitbank api
Installation
$ pip install bitbank-client
Usage
#
# sync
#
from bitbank_client.sync import Client
client = Client(public_key='your api key', private_key='your api secret')
response = client.get_ticker(pair='btc_jpy')
print(response.status_code, response.json())
#
# async
#
import grequests
from bitbank_client.async import Async
client = Async(public_key='your api key', private_key='your api secret')
reqs = [client.get_ticker(pair='btc_jpy'), client.get_depth(pair='btc_jpy'), ...]
response = grequests.map(reqs)
for r in response:
print(r.status_code, r.json())
client.get_ticker(pair='btc_jpy') # GET /{pair}/ticker
client.get_depth(pair='btc_jpy') # GET /{pair}/depth
client.get_transactions(pair='btc_jpy') # GET /{pair}/transactions
client.get_transactions(pair='btc_jpy', yyyymmdd='20180509') # GET /{pair}/transactions/{YYYYMMDD}
client.get_candlestick(pair='btc_jpy', candle_type='1day', yyyymmdd='2018') # GET /{pair}/candlestick/{candle-type}/{YYYY}
client.get_candlestick(pair='btc_jpy', candle_type='1hour', yyyymmdd='20180510') # GET /{pair}/candlestick/{candle-type}/{YYYY}
client.get_assets() # GET /user/assets
client.get_order(pair='btc_jpy', order_id=1) # GET /user/spot/order
client.order(pair='btc_jpy', amount=1, price=1, side='buy', type='limit') # POST /user/spot/order
client.cancel_order(pair='btc_jpy', order_id=1) # POST /user/spot/cancel_order
client.cancel_orders(pair='btc_jpy', order_ids=[1,2]) # POST /user/spot/cancel_orders
client.orders_info(pair='btc_jpy', order_ids=[1,2]) # POST /user/spot/orders_info
client.get_active_orders(pair='btc_jpy') # GET /user/spot/active_orders
client.get_trade_history(pair='btc_jpy') # GET /user/spot/trade_history
client.get_withdrawal_account(asset='btc') # GET /user/withdrawal_account
client.request_withdrawal(asset='btc', uuid=1, amount=1) # POST /user/request_withdrawal
client.request_withdrawal(asset='btc', uuid=1, amount=1, otp_token='xxx') # POST /user/request_withdrawal
client.request_withdrawal(asset='btc', uuid=1, amount=1, sms_token='xxx') # POST /user/request_withdrawal
Contributing
Fork it
Create your feature branch (git checkout -b my-new-feature)
Commit your changes (git commit -am 'Add some feature')
Push to the branch (git push origin my-new-feature)
Create new Pull Request
Metadata
Release files for bitbank-client 0.1.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| bitbank-client-0.1.1.tar.gz | 3.1 kB | Without provenance | Details for bitbank-client-0.1.1.tar.gz |
Release files / bitbank-client-0.1.1.tar.gz
| Download URL | bitbank-client-0.1.1.tar.gz |
|---|---|
| Size | 3.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
4e0b18ac457b13cb047c2194b5e138784152c4538b940dc8f23fa3b6bf3bbc17
|
|
BLAKE2b-256 checksum How to use checksums |
f21ff7f73a61bbfeb85335242efa2f49f4ca195574465828779d7ab78da9d23d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/1.13.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/3.7.3
|
Security for bitbank-client 0.1.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.