A Python client for the Bitfinex API v1 and v2 + websockets for v2.
pip install async_bitfinex
from async_bitfinex import WssClient
async def my_handler(message):
"""Function that react to incoming messages"""
print(message)
my_client = WssClient()
my_client.subscribe_to_ticker(
symbol="BTCUSD",
callback=my_handler
)
The full documentation is available here: https://async_bitfinex.readthedocs.io/en/latest/
This code has been tested on
- Python 3.7.1 - 3.7.4
At the moment the library is only supported from 3.7 and above.
Contributions are welcome and i will do my best to merge PR quickly.
Here are some guidelines that makes everything easier for everybody:
- Fork it.
- Create a feature branch containing only your fix or feature.
- Preferably add/update tests. Features or fixes that don't have good tests won't be accepted before someone adds them (mostly...).
- Create a pull request.
Install the requirements:
pip install -r requirements.txt
This projects uses pytest, so to run all the tests use:
pytest -v
At the moment functionality related to websocket v2 is not properly tested.
- Add the remaining Websocket calls.
- Implement all API calls that Bitfinex make available (v1).
- This project is originally base of: https://github.com/scottjbarr/bitfinex
The MIT License (MIT)