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 api of queue.Queue
Simple api for trading that responds to account data
No boilerplate required to start trading
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: .. code-block:: python
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: .. code-block:: python
# 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.
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.0-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5a47f17aea8e277f29b9c222571bc4625c90ef6825496d58baa311c0f92bf64f |
|
MD5 | 504a09818ccffa029bd085b2ea824ced |
|
BLAKE2b-256 | 4b7079d4b20cc980a357a53c1ca93ad4a117572fd54c7f323aae0833abadb7be |