mirror of
https://github.com/aljazceru/bitfinex-api-py.git
synced 2025-12-19 06:44:22 +01:00
Install and configure pylint. Add pylint to dev-requirements.txt. Start rewriting code to follow pylint's linting rules.
This commit is contained in:
@@ -1,33 +1,35 @@
|
||||
from typing import List, Optional
|
||||
|
||||
from .rest import BfxRestInterface
|
||||
from .websocket import BfxWebsocketClient
|
||||
from .urls import REST_HOST, WSS_HOST
|
||||
|
||||
from typing import List, Optional
|
||||
|
||||
class Client(object):
|
||||
class Client:
|
||||
def __init__(
|
||||
self,
|
||||
REST_HOST: str = REST_HOST,
|
||||
WSS_HOST: str = WSS_HOST,
|
||||
API_KEY: Optional[str] = None,
|
||||
API_SECRET: Optional[str] = None,
|
||||
filter: Optional[List[str]] = None,
|
||||
api_key: Optional[str] = None,
|
||||
api_secret: Optional[str] = None,
|
||||
filters: Optional[List[str]] = None,
|
||||
*,
|
||||
rest_host: str = REST_HOST,
|
||||
wss_host: str = WSS_HOST,
|
||||
log_filename: Optional[str] = None,
|
||||
log_level: str = "INFO"
|
||||
):
|
||||
credentials = None
|
||||
|
||||
if API_KEY and API_SECRET:
|
||||
credentials = { "API_KEY": API_KEY, "API_SECRET": API_SECRET, "filter": filter }
|
||||
if api_key and api_secret:
|
||||
credentials = { "API_KEY": api_key, "API_SECRET": api_secret, "filters": filters }
|
||||
|
||||
self.rest = BfxRestInterface(
|
||||
host=REST_HOST,
|
||||
host=rest_host,
|
||||
credentials=credentials
|
||||
)
|
||||
|
||||
self.wss = BfxWebsocketClient(
|
||||
host=WSS_HOST,
|
||||
host=wss_host,
|
||||
credentials=credentials,
|
||||
log_filename=log_filename,
|
||||
log_filename=log_filename,
|
||||
log_level=log_level
|
||||
)
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user