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
Davide Casale
e3eb3d6a56
Merge pull request #1 from itsdeka/patch-1
...
Nonce generation must be the same of the previous version.
2023-02-20 15:23:05 +01:00
Davide Casale
ab66170cf3
Apply refactoring to root package bfxapi.
2023-02-17 18:38:07 +01:00
Davide Casale
d72fcf3981
Add better handling for info code 20051.
2023-02-17 17:21:57 +01:00
Davide Casale
fde27e933f
Add handling for <20051 : Stop/Restart Websocket Server (please reconnect)>.
2023-02-17 04:15:38 +01:00
Davide Casale
9eb2c73407
Fix small bug in examples/websocket/ticker.py demo.
2023-02-17 04:07:44 +01:00
Davide Casale
4d0fa49e22
Rewrite bfxapi/utils/logger.py with new ColoredLogger.
2023-02-17 04:01:47 +01:00
Davide Casale
e536515bbd
Fix bugs and rewrite code in bfxapi.websocket.client sub-package.
2023-02-17 02:58:53 +01:00
Davide Casale
b8a5bcb515
Fix bugs and rewrite regions of new reconnection system.
2023-02-16 20:12:02 +01:00
Davide Casale
fa9bdfc333
Rewrite reconnection system with numerous fixes.
2023-02-15 21:58:01 +01:00
Davide Casale
99f58ddb04
Add new packages to setup.py. Add new feature in .on and .once methods in bfxapi.websocket.client.bfx_websocket_client. Fix small typo in __init__.py.
2023-02-14 18:49:45 +01:00
Davide Casale
49517f9709
Small fix in package import statements.
2023-02-14 17:03:16 +01:00
Davide Casale
17c9502733
Apply fixes and refactoring to the bfxapi.handlers sub-package.
2023-02-14 16:29:50 +01:00
Davide Casale
f0f150cec2
Split websocket package in multiple sub-package. Split handlers.py in public_channels_handler.py and authenticated_channels_handler.py. Rename files attaining to new conventions.
2023-02-13 19:09:38 +01:00
Davide Casale
7dc043bbe5
Small fix in BfxWebsocketClient class.
2023-02-09 04:35:43 +01:00
Davide Casale
c588d9f20c
Rewrite bfxapi/rest/_Requests.py with type hinting. Add None values erasement in bfxapi/utils/JSONEncoder.py. Update code with new improvements.
2023-02-06 19:15:58 +01:00
Davide Casale
929ae62d2f
Fix bug in bfxapi.tests sub-package.
2023-02-06 16:16:11 +01:00
Davide Casale
06dc9e1c0a
Remove cid.py and integers.py from bfxapi.utils subpackage. Rename encoder.py file to JSONEncoder.py. Remove IntegerUnderflowError and IntegerOverflowflowError exceptions from bfxapi/exceptions.py.
2023-02-01 17:18:05 +01:00
Davide Casale
05784cc8ec
Add tests subpackage. Add TestRestSerializersAndTypes and TestWebsocketSerializersAndTypes unit tests. Fix consistency bugs between serializers and types.
2023-02-01 17:05:25 +01:00
Davide Casale
40a48184da
Fix bugs and differences in namings/types/fields between bfxapi.rest.types, bfxapi.rest.serializers and bfxapi.websocket.types, bfxapi.websocket.serializers.
2023-01-31 18:54:15 +01:00
Davide Casale
7b313ddcab
Merge TradeExecutionUpdate and TradeExecuted serializers and types in websocket subpackage.
2023-01-31 17:27:14 +01:00
Davide Casale
d767e5dcfe
Replace every snake case (uppercase) to snake case (lowercase) in serializers, types and notification.
2023-01-26 19:00:13 +01:00
Davide Casale
ed12bf473f
Rewrite and extend custom JSONEncoder in bfxapi/utils/encoder.py to automatically convert floats to strs. Change every Union[Decimal, str] type to Union[Decimal, float, str]. Fix type hinting bug in labeler.py.
2023-01-25 18:18:15 +01:00
Davide Casale
28c00d460b
Exclude subId field from every subscription dictionary.
2023-01-24 19:02:44 +01:00
Davide Casale
36725a183e
Move _BfxWebsocketBucket class in its own file bfxapi/websocket/_BfxWebsocketBucket.py.
2023-01-19 18:12:12 +01:00
Davide Casale
5fe4d83902
Move subscriptions type hinting from bfxapi/websocket/types.py to bfxapi/websocket/subscriptions.py.
2023-01-19 18:00:51 +01:00