Adds BfxApi with seed_candles function

This commit is contained in:
Jacob Plaster
2018-11-20 14:21:40 +00:00
parent 5554d11454
commit c37a79998c
4 changed files with 74 additions and 7 deletions

View File

@@ -1,7 +1,13 @@
import asyncio
from .websockets.BfxWebsocket import BfxWebsocket
from .rest.BfxRest import BfxRest
class Client:
def __init__(self, API_KEY=None, API_SECRET=None,
host='wss://test.bitfinex.com/ws/2', *args, **kwargs):
self.ws = BfxWebsocket(API_KEY=API_KEY, API_SECRET=API_SECRET, host=host, *args, **kwargs)
self.rest = None # Eventually will be the rest interface
def __init__(self, API_KEY=None, API_SECRET=None, rest_host='https://api.bitfinex.com/v2',
ws_host='wss://api.bitfinex.com/ws/2', loop=None, logLevel='INFO', *args, **kwargs):
self.loop = loop or asyncio.get_event_loop()
self.ws = BfxWebsocket(API_KEY=API_KEY, API_SECRET=API_SECRET, host=ws_host,
loop=self.loop, *args, **kwargs)
self.rest = BfxRest(API_KEY=API_KEY, API_SECRET=API_SECRET, host=rest_host,
loop=self.loop, *args, **kwargs)