Commit Graph

132 Commits

Author SHA1 Message Date
Davide Casale
d5ace49555 Add implementation for submit_order, update_order and cancel_order endpoint handlers in BfxRestInterface.py. 2022-12-22 17:08:15 +01:00
Davide Casale
79ae0b48e0 Fix bug in _Requests's _GET and _POST methods. Add submit_order to handle POST auth/w/order/submit endpoint. Add OrderType enumeration in bfxapi/rest/enums.py. 2022-12-21 18:27:54 +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
7d16c4e4b8 Merge pull request #6 from Davi0kProgramsThings/fix/refactoring
Split BfxRestInterface methods in t_ and f_ handlers.
2022-12-16 18:45:11 +01:00
Davide Casale
ea3eefd32c Apply refactoring with new standards in examples/websockets/*.py demos. 2022-12-16 18:42:59 +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
Davide Casale
0e4cbd40a6 Fix other mypy errors and warnings. 2022-12-16 16:03:28 +01:00
Davide Casale
2595b8a760 Fix mypy errors and warnings in bfxapi/labeler.py script. 2022-12-15 19:21:19 +01:00
Davide Casale
24b105378a Add hierarchy logic to custom exceptions. 2022-12-15 19:14:00 +01:00
Davide Casale
c9f86d6d03 Add labeler.py to root package (bfxapi). Remove List aliases in bfxapi/rest/typings.py. Update BfxRestInterface.py to use new standards. 2022-12-15 19:07:55 +01:00
Davide Casale
851184bf75 Add authentication logic to _Requests class in BfxRestInterface.py. Add _RestAuthenticatedEndpoints class. Add InvalidAuthenticationCredentials in bfxapi/rest/exceptions.py. 2022-12-14 18:56:03 +01:00
Davide Casale
07241b1ba8 Add _Requests and _RestPublicEndpoints classes in bfxapi/rest/BfxRestInterface.py. 2022-12-14 18:17:29 +01:00
Davide Casale
ec821a0752 Split BfxRestInterface methods in t_ and f_ handlers. 2022-12-14 18:05:45 +01:00
Davide Casale
862ba6d481 Add support for GET conf/pub:{Action}:{Object}:{Detail} endpoint. Add bfxapi/rest/enums.py script. Add Configs enumeration in enums.py. 2022-12-12 17:14:58 +01:00
Davide Casale
32d698285e Add new endpoints in BfxRestInterfaces.py (with serializers and typings). 2022-12-12 17:06:33 +01:00
Davide Casale
376ac37273 Fix small bug in BfxRestInterface.py file. 2022-12-12 15:23:43 +01:00
Davide Casale
6a368d139d Add support for GET liquidations/hist endpoint. 2022-12-09 16:23:51 +01:00
Davide Casale
cd5ef42118 Add support for new various endpoints. Add ResourceNotFound error in bfxapi/rest/exceptions.py. Fix bug in BfxRestInterface.__GET method. 2022-12-09 16:16:15 +01:00
Davide Casale
e0785f9f4a Add support for GET book/{Symbol}/{Precision} endpoint. 2022-12-08 17:35:39 +01:00
Davide Casale
1df0a565c8 Merge pull request #5 from Davi0kProgramsThings/feature/examples
Add examples/websocket/order_book.py and raw_order_book.py demos.
2022-12-05 18:27:16 +01:00
Davide Casale
8c9d52c186 Rename class members in order_book.py and raw_order_book.py. 2022-12-02 18:57:21 +01:00
Davide Casale
52d007c05d Add examples/websocket/order_book.py and raw_order_book.py demos. 2022-12-02 18:54:46 +01:00
Davide Casale
6e470dc925 Fix type hinting bug in rest section. 2022-12-01 17:53:57 +01:00
Davide Casale
ea6044a5eb Add support for new rest public endpoints (in BfxRestInterface.py, serializers.py and typings.py). 2022-12-01 17:48:50 +01:00
Davide Casale
8e8719e3d7 Add bfxapi.rest subpackage to setup.py. 2022-11-30 18:25:50 +01:00
Davide Casale
4cfeab8a79 Add barebone files for rest section. 2022-11-30 18:25:15 +01:00
Davide Casale
48f1745f10 Add MAXIMUM_BUCKETS_AMOUNT constant to BfxWebsocketClient class. 2022-11-30 17:55:10 +01:00
Davide Casale
509223ae9b Add order_multiple_operations input in _BfxWebsocketInputs. 2022-11-30 17:34:13 +01:00
Davide Casale
e71d4b6e26 Add new websocket authenticated inputs in _BfxWebsocketInputs class. Add new type hinting inside bfxapi/websocket/typings.py. 2022-11-30 17:24:51 +01:00
Davide Casale
d9ecbaa9f0 Change exception formatting inside error .add_listener in BfxWebsocketClient. 2022-11-29 18:05:20 +01:00
Davide Casale
bfd05cf7c7 Add traceback import and implementation. 2022-11-29 17:53:39 +01:00
Davide Casale
e262c81f97 Change default log_level value (from 'INFO' to 'ERROR'). Implement error event into AsyncIOEventEmitter. Add error logging. 2022-11-29 17:17:17 +01:00
Davide Casale
b308bbacbd Add Flags enumeration to enums.py. Rename new_order and new_position to order_new and position_new to mantain consistency. Add _BfxWebsocketInputs class with order_new, order_update and order_cancel inputs. 2022-11-29 15:26:02 +01:00
Davide Casale
fa073823ce Add .run method in BfxWebsocketClient class. 2022-11-28 17:08:27 +01:00
Davide Casale
4bb62a942f Allow users to use .on and .once as non-decorators methods. 2022-11-28 16:58:09 +01:00
Davide Casale
9e8bea905a Rename .chanIds field in _BfxWebsocketBucket to .subscriptions. 2022-11-28 16:50:07 +01:00
Davide Casale
a5083c36cf Add type hinting using typings.py in bfxapi/websocket/serializers.py. 2022-11-24 17:48:41 +01:00
Davide Casale
3a09ba2e90 Add filter parameter to BfxWebsocketClient's __init__.py. Rewrite .notify coroutine adding new feature. Add Notifications channel handlers in handlers.py. Add Notification serializer in serializers.py. 2022-11-24 17:31:47 +01:00
Davide Casale
6f1befbcf0 Rewrite and apply some refactoring to AuthenticatedChannelsHandler in handlers.py. 2022-11-24 16:24:31 +01:00
Davide Casale
c8d8586841 Add bfxapi/websocket/enums.py file. Rewrite bfxapi.websocket's __init__.py. Rename HEARTBEAT constant to _HEARTBEAT to make it internal. 2022-11-23 16:56:13 +01:00
Davide Casale
4933ae6d9a Add new_order (coroutine) websocket authenticated input. Fix bug in BfxWebsocketClient.__require_websocket_authentication decorator. 2022-11-23 16:45:33 +01:00
Davide Casale
45a9565cf4 Fix bug regarding closing websocket connection with .close coroutine method. 2022-11-23 16:28:05 +01:00
Davide Casale
16bbe19634 Add bfx.api subpackage to setup.py. 2022-11-22 19:10:43 +01:00
Davide Casale
729a3ce8a3 Add examples/websocket/ticker.py demo. 2022-11-22 19:01:57 +01:00
Davide Casale
acbed0bc57 Fix small bug from merge conflicts resolving. 2022-11-22 18:58:36 +01:00
Davide Casale
256841099b Merge pull request #2 from Davi0kProgramsThings/add-logging-system
Add bfxapi/utils subpackage. Add bfxapi/utils/logger.py. Implement logger with log_level in BfxWebsocketClient.py.
2022-11-22 18:50:04 +01:00
Davide Casale
29abf2d7ea Merge branch 'master' into add-logging-system 2022-11-22 18:49:55 +01:00
itsdeka
958134b0f4 Add bfxapi/utils subpackage. Add bfxapi/utils/logger.py. Implement logger with log_level in BfxWebsocketClient.py. 2022-11-22 17:40:26 +00:00
Davide Casale
a9902648b7 Merge pull request #4 from Davi0kProgramsThings/feature/asyncio
Add BfxWebsocketBucket class in bfxapi/websocket/BfxWebsocketClient.py. Implement running multiple websocket client concurrently using asyncio to allow more than 25 connections to public channels. Rewrite BfxWebsocketClient to handle only websocket authenticated channels.
2022-11-22 18:17:09 +01:00