diff --git a/README.md b/README.md index 3ce3b0a..020e635 100644 --- a/README.md +++ b/README.md @@ -2,7 +2,7 @@ This repo contains an official python library that is used to connect to the both the Bitfinex api and the Honey Frameworks data-server. The library communicates with these servers using both websocket connection and a REST interface. ## `bfxapi.LiveWebsocket` -The websocket exposes a collection of events that are triggered when certain data is received. Here is a full list of available events: +The websocket exposes a collection of events that are triggered when certain data is received. When subscribing to an event you are able to pass either a standard function or an asyncio co-routine Here is a full list of available events: - `all`: listen for all messages coming through - `connected:` called when a connection is made @@ -90,3 +90,7 @@ then = now - (1000 * 60 * 60 * 24 * 2) # 2 days ago ws.run(then, now) ``` + + +## Please see examples folder +There you will be able to find working scripts that submit orders, establish a connect and run backtests. diff --git a/bfxapi/examples/run_backtest.py b/bfxapi/examples/run_backtest.py index 02319a1..7f9883e 100644 --- a/bfxapi/examples/run_backtest.py +++ b/bfxapi/examples/run_backtest.py @@ -4,6 +4,13 @@ sys.path.append('../') from bfxapi.websockets.DataServerWebsocket import DataServerWebsocket +''' +This script requires you to run an instance of the bfx-hf-data-server on +port 8899. For more info on how to setup the data-server please visit: +https://github.com/bitfinexcom/bfx-hf-data-server +''' + + ws = DataServerWebsocket( symbol='tBTCUSD', host='ws://localhost:8899'