Separate _require_websocket_connection decorator from BfxWebsocketClient class. Add _require_websocket_authentication decorator. Implement .notify method in bfxapi/websocket/BfxWebsocketClient.py.

This commit is contained in:
Davide Casale
2022-11-17 18:54:43 +01:00
parent 971e4759fa
commit 7314578dd7
3 changed files with 41 additions and 16 deletions

View File

@@ -18,6 +18,13 @@ class ConnectionNotOpen(BfxWebsocketException):
pass
class WebsocketAuthenticationRequired(BfxWebsocketException):
"""
This error indicates an attempt to access a protected resource without logging in first.
"""
pass
class InvalidAuthenticationCredentials(BfxWebsocketException):
"""
This error indicates that the user has provided incorrect credentials (API-KEY and API-SECRET) for authentication.