mirror of
https://github.com/aljazceru/bitfinex-api-py.git
synced 2025-12-18 22:34:21 +01:00
Adds more documentation
This commit is contained in:
@@ -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.
|
||||
|
||||
@@ -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'
|
||||
|
||||
Reference in New Issue
Block a user