Davide Casale
080ec40395
Add sub-package bfxapi.websocket._event_emitter (with bfx_event_emitter.py).
2023-06-18 16:46:12 +02:00
Davide Casale
1d911a250c
Rename bfxapi.websocket.client to _client and bfxapi.websocket.handlers to _handlers (according to PEP8).
2023-06-18 01:02:59 +02:00
Davide Casale
fc84389564
Remove support for BfxWebSocketClient's instance variable events_for_subscription.
2023-06-18 00:54:56 +02:00
Davide Casale
d9733e8d38
Change visibility of decorators require_websocket_connection and require_websocket_authentication (and hardcode HEARTBEAT).
2023-06-17 22:24:27 +02:00
Davide Casale
b12fedb7a3
Replace use of asyncio.locks.Event with asyncio.locks.Condition in bfx_websocket_bucket.py.
2023-06-17 22:20:31 +02:00
Davide Casale
cc5f9f5b0e
Remove type hinting for decorators _require_websocket_connection and _require_websocket_authentication.
2023-06-12 16:17:45 +02:00
Davide Casale
d63c2c63c3
Rename RestAuthenticatedEndpoints to RestAuthEndpoints (and bfxapi.rest.endpoints.rest_authenticated_endpoints to rest_auth_endpoints).
2023-06-12 15:58:17 +02:00
Davide Casale
708fdc87c7
Add new event liquidation_feed_update to PublicChannelsHandler (and improve overall type hinting).
2023-06-12 15:37:05 +02:00
Davide Casale
7059846843
Remove support for datetime type and improve typing in several files.
2023-05-26 18:48:27 +02:00
Davide Casale
bc0f83d408
Improve JSONEncoder class in bfxapi.utils.json_encoder.
2023-05-26 18:02:41 +02:00
Davide Casale
dbc61ab275
Add type hints and type checks in bfxapi.websocket.client.bfx_websocket_inputs.
2023-05-25 20:42:55 +02:00
Davide Casale
c8290f144b
Upgrade to Mypy 1.3.0 (old: 0.991). Fix compatibility problems with Mypy. Add type hints to bfxapi.websocket.handlers.
2023-05-19 22:13:15 +02:00
Davide Casale
57680abd06
Rename bfxapi.websocket.handlers.authenticated_events_handler to auth_events_handler (AuthenticatedEventsHandler -> AuthEventsHandler).
2023-05-19 15:43:35 +02:00
Davide Casale
59a0dca66e
Improve and rewrite bfxapi.websocket.subscriptions.
2023-05-19 15:37:03 +02:00
Davide Casale
03a03c6107
Delete HandlerNotFound exception (from bfxapi.websocket.exceptions).
2023-04-20 15:49:46 +02:00
Davide Casale
63ab433710
Apply refactoring to some relative import directives.
2023-04-20 15:38:10 +02:00
Davide Casale
d7ce5630ef
Rewrite bfxapi.tests according to latest changes.
2023-04-20 03:49:54 +02:00
Davide Casale
0f9fa1bf6a
Merge bfxapi.rest.types and bfxapi.websocket.types in bfxapi.tests sub-package.
2023-04-20 03:44:13 +02:00
Davide Casale
4edbf5d44c
Change event trade_executed to trade_execution (and update references).
2023-04-20 01:43:44 +02:00
Davide Casale
1f9d1b719e
Fix bug in bfxapi.websocket.subscriptions.
2023-04-20 01:41:08 +02:00
Davide Casale
d80b8b8721
Rename BfxWebsocketClient, BfxWebsocketBucket and BfxWebsocketInputs to BfxWebSocketClient, BfxWebSocketBucket and BfxWebSocketInputs.
2023-04-20 01:36:09 +02:00
Davide Casale
99783c1a5a
Allow wss_timeout=None to disable timeout on reconnection.
2023-04-20 01:26:25 +02:00
Davide Casale
92d6630013
Remove oc_multi-notification event from AuthenticatedEventsHandler (bfxapi.websocket.handlers.authenticated_events_handler).
2023-04-20 01:06:54 +02:00
Davide Casale
7231c48465
Improve log messages on reconnection in BfxWebsocketClient (bfxapi.websocket.client.bfx_websocket_client).
2023-04-20 01:04:43 +02:00
Davide Casale
7f788dd239
Improve reconnections by not emitting againg once events.
2023-04-19 18:05:27 +02:00
Davide Casale
3de6eee337
Rename AuthenticatedChannelsHandler to AuthenticatedEventsHandler (and bfxapi.websocket.handlers.authenticated_channels_handler to authenticated_events_handler).
2023-04-19 04:29:26 +02:00
Davide Casale
3d9e7c7b25
Remove BfxWebsocketClient::once. Replace all occurrences with BfxWebsocketClient::on. Add BfxWebsocketClient::ONCE_EVENTS class variable.
2023-04-19 04:20:53 +02:00
Davide Casale
3441d2af2f
Emit on_disconnection event on connection close in BfxWebsocketClient.
2023-04-19 03:53:33 +02:00
Davide Casale
986aa525d7
Change wss_timeout type from int to float.
2023-04-19 03:29:45 +02:00
Davide Casale
e15b52eabd
Fix bug in BfxWebsocketClient::close (bfxapi.websocket.client.bfx_websocket_client).
2023-04-16 21:16:18 +02:00
Davide Casale
6d868a8287
Fix bug about wss_timeout by changing reconnection logic (in BfxWebsocketClient and BfxWebsocketBucket).
2023-04-16 21:01:36 +02:00
Davide Casale
734375ec9f
Add and implement wss_timeout in BfxWebsocketClient (and Client).
2023-04-16 20:04:46 +02:00
Davide Casale
34f583cfff
Add bfxapi/version.py to contain the package version.
2023-03-22 21:26:09 +01:00
Davide Casale
41fd46dec7
Align code with new Bitfinex API documentation improvements.
2023-03-14 20:58:56 +01:00
Davide Casale
464d942fb0
Replace BfxWebsocketClient::on_open_events with BfxWebsocketBucket::on_open_event field.
2023-03-14 19:16:12 +01:00
Davide Casale
249f19fe41
Add ZeroConnectionsError in bfxapi.websocket.exceptions. Add log if connections = 0 in BfxWebsocketClient::start. Add raise ZeroConnectionError in BfxWebsocketClient::subscribe if connections equals 0.
2023-03-14 19:03:05 +01:00
Davide Casale
0ee8a8ab29
Edit .pylintrc with new rules.
2023-03-08 16:50:16 +01:00
Davide Casale
894391256d
Rewrite long strings using \ instead of + (concatenation).
2023-03-08 16:30:52 +01:00
Davide Casale
88e6c79532
Add #pylint: disable=duplicate-code comment in serializers.py and types.py (both rest and websocket).
2023-03-07 18:14:50 +01:00
Davide Casale
9e1b336a67
Move _Delay local class in global scope (bfxapi.websocket.client.bfx_websocket_client).
...
Apply pylint's linting rules to bfxapi/rest/__init__.py, bfxapi/rest/enums.py, bfxapi/rest/exceptions.py, bfxapi/rest/serializers.py and bfxapi/rest/types.py."
Apply pylint's linting rules to bfxapi/rest/endpoints/__init__.py, bfxapi/rest/endpoints/bfx_rest_interface.py and bfxapi/rest/endpoints/rest_public_endpoints.py.
2023-03-07 17:08:37 +01:00
Davide Casale
9e566bbc5a
Switch from max-line-length=130 to more standard max-line-length=120 in .pylintrc.
2023-03-07 15:28:02 +01:00
Davide Casale
af25f25d3b
Apply pylint's linting rules to bfxapi/tests/*.py.
2023-03-06 19:06:32 +01:00
Davide Casale
5c707d7929
Apply pylint's linting rules to bfxapi/websocket/client/*.py.
2023-03-06 18:46:04 +01:00
Davide Casale
7e627dd239
Apply pylint's linting rules to bfxapi/websocket/handlers/*.py.
2023-03-06 17:53:54 +01:00
Davide Casale
a7f5aa684a
Apply pylint's linting rules to bfxapi/websocket/__init__.py, bfxapi/websocket/enums.py, bfxapi/websocket/exceptions.py, bfxapi/websocket/serializers.py and bfxapi/websocket/subscriptions.py.
2023-03-06 17:28:56 +01:00
Davide Casale
7288d05939
Apply pylint's linting rules to bfxapi/utils/*.py.
2023-03-06 17:22:00 +01:00
Davide Casale
a4c1418113
Install and configure pylint. Add pylint to dev-requirements.txt. Start rewriting code to follow pylint's linting rules.
2023-03-06 16:43:08 +01:00
Davide Casale
b3e1e27331
Add and implement FileLogger in bfxapi.utils.logger.
2023-03-03 21:12:34 +01:00
itsdeka
b06476e0d4
nonce must be str
2023-03-03 15:53:06 +01:00
Davide Casale
6f61b983a5
Rewrite, edit and organize examples/websocket demos.
2023-02-20 18:22:57 +01:00