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
Davide Casale
2afcc76647
Fix bug regarding new typing with dataclasses.
2023-01-16 18:18:12 +01:00
Davide Casale
e185da4cc9
Rename bfxapi/websocket/typings.py to types.py. Replace TypedDicts with dataclasses (with _Type as base class). Update demos in examples/websocket to use new implementation.
2023-01-16 17:07:16 +01:00
Davide Casale
e64c25bf19
Implement bfxapi/notifications.py in websocket subpackage.
2023-01-12 18:36:23 +01:00
Davide Casale
ff58f049a7
Separate _BfxWebsocketInputs from bfxapi/websocket/BfxWebsocketClient.py to _BfxWebsocketInputs.py. Rename websocket authenticated inputs methods. Refactoring to maintain consistency across the library.
2023-01-12 18:10:00 +01:00
Davide Casale
454a7542ed
Add bfxapi/enums.py file. Split enumerations in bfxapi/rest/enums.py and bfxapi/websocket/enums.py. Rename enumeration classes to use singular name identifiers.
2022-12-22 18:42:55 +01:00
Davide Casale
6217f9040c
Rename bfxapi/utils/decimal.py to encoder.py. Add support for datetime JSON serialization. Update class reference in BfxWebsocketClient.py.
2022-12-20 18:40:41 +01:00
Davide Casale
87bb6dc5c7
Add generic error handling (UnknownGenericError in bfxapi/rest/exceptions.py). Add support for new endpoints in _RestAuthenticatedEndpoints class. Extend serializers.py and typings.py.
2022-12-20 17:48:38 +01:00
Davide Casale
0a53ab7f7e
Apply lots of refactoring to the websocket subpackage (fix every mypy error and warning). Add integers.py and decimal.py to bfxapi.utils package. Update requirements.txt and setup.py with new mypy dependencies.
2022-12-16 18:30:41 +01:00