Simple to use wrappers for the Bitfinex web socket api
Project description
btfx-trader
Simple to use wrappers for Bitfinex’s web socket api
Free software: GNU General Public License v3
Documentation: https://btfx-trader.readthedocs.io.
Features
Access to cryptocurrency data with an API similar to queue.Queue
Simple trading API that responds to account data
Installation
To install btfx-trader, run this command in your terminal:
pip install btfx-trader
Usage
To use public data:
from btfx_trader import PublicData
q = PublicData(types=['tickers'], symbols=['BTCUSD'])
q.connect()
while True:
data = q.get('tickers', 'BTCUSD')
To make an order:
from btfx_trader import Trader
trader = Trader('YOUR_BITFINEX_KEY', 'YOUR_BITFINEX_SECRET')
trader.connect()
# Order 0.01 BTC at $10000 per bitcoin
order_id = trader.order('BTCUSD', 10000, dollar_amount=100)
To cancel an order:
# for a single order
trader.cancel(order_id)
# for multiple orders
trader.cancel_all(older_than=10)
Credits
This package was created with Cookiecutter and the audreyr/cookiecutter-pypackage project template.
History
0.1.0 (2018-05-25)
First release on PyPI.
0.1.1 (2018-05-27)
Fixed rendering of readme on pypi.
0.1.2 (2018-05-27)
Added codecov to docs.
0.1.3 (2018-05-28)
Updated codecov config to only run with travis-ci builds.
0.1.4 (2018-06-04)
Updated README
0.1.5 (2018-06-04)
Fix rendering of docs
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
Built Distribution
Hashes for btfx_trader-0.1.5-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 94c7e737dac04d45bdf1e5569ef1e5acc92f382d601e12b3d832bc34cdd94fed |
|
MD5 | 3faa81a99b29e422bb89b58d8754f62b |
|
BLAKE2b-256 | 1f6a5816b048c374eea846498a6fcc2f91266cbc056b0c25b92dd26ab2c87500 |