Add support for various new authenticated channels. Add new typings in bfxapi/websocket/typings.py. Add BfxWebsocketException in bfxapi/websocket/errors.py.

This commit is contained in:
Davide Casale
2022-11-11 18:54:38 +01:00
parent 2c70d299b3
commit a03a82d57a
5 changed files with 483 additions and 45 deletions

View File

@@ -1,11 +1,24 @@
class ConnectionNotOpen(Exception):
__all__ = [
"BfxWebsocketException",
"ConnectionNotOpen",
"InvalidAuthenticationCredentials"
]
class BfxWebsocketException(Exception):
"""
Base class for all exceptions defined in bfx/websocket/errors.py.
"""
pass
class ConnectionNotOpen(BfxWebsocketException):
"""
This error indicates an attempt to communicate via websocket before starting the connection with the servers.
"""
pass
class AuthenticationCredentialsError(Exception):
class InvalidAuthenticationCredentials(BfxWebsocketException):
"""
This error indicates that the user has provided incorrect credentials (API-KEY and API-SECRET) for authentication.
"""