Geoff Taylor
80ba1e0d4b
Moved to a more event-driven, observable-based liquidator.
2021-06-17 16:30:40 +01:00
Geoff Taylor
aac32ba716
Wallet can now be loaded from environment.
...
* Centralised configuration of Wallet from command-line
* Added loading Wallet from environment variables
* Improved command-line handling of many commands
2021-06-17 12:06:39 +01:00
Geoff Taylor
7078ef4722
Removed default context objects - now have static method on Context object: Context.default().
2021-06-17 11:18:35 +01:00
Geoff Taylor
16cb68ad4c
Fixed bug in balancing wallet.
...
* Mixed use of 'symbol' in different contexts.
2021-06-08 14:38:28 +01:00
Geoff Taylor
5e59d8a7e3
Moved library code to .py files instead of notebooks.
...
* This is a big change that touched most files in the project.
* Library code is now an actual package, in /mango.
* Pure .py files used for shared code - easier to edit/debug, and should ease move to installable package later.
* Removed many notebooks. The remaining notebooks are useful 'display'/'show' notebooks for investigating Mango objects.
* More tests! The test story is now much improved, but more unit tests are still needed.
* There's now a Makefile for project operations.
2021-06-07 15:10:18 +01:00
Geoff Taylor
e3b0d65705
Extended use of Lookups - serum buys and sells no longer need a Group.
2021-06-01 19:16:59 +01:00
Geoff Taylor
cbd42d24ae
Context can now decide to look up the group ID given a group name, instead of using the wrong default.
2021-06-01 14:08:54 +01:00
Geoff Taylor
ba25e289af
Better retry functionality with backoff pauses.
2021-05-28 17:16:53 +01:00
Geoff Taylor
b6a595bb21
Updated to handle Groups with 5 tokens as well as Groups with 3 tokens.
2021-05-27 17:07:02 +01:00
Geoff Taylor
5c6abd0733
Added CsvFileNotificationTarget.
...
* Updated notifications to allow notifying on succeeded or failed (or both!) PartialLiquidate transactions.
* Added more information to LiquidationEvent to allow that to flow through to notifications.
2021-05-21 20:02:54 +01:00
Geoff Taylor
8b8afe1a0b
Refactored PollingLiquidator into ReportingAccountLiquidator and LiquidationProcessor
...
* ReportingAccountLiquidator wraps an AccountLiquidator but provides before-and-after logging and reporting.
* Sped up fetch_token_prices() by reducing it to one network fetch
* Centralised loading of ripe mangoes by creating MarginAccount.load_all_ripe()
* Clearer, more consistent use of Observables
* Added RxPy Backpressure library
* Improved container building to allow for different tags
2021-05-21 14:28:42 +01:00
Geoff Taylor
106973c027
Removed intermediate lambda to see if it was the source of duplicate Discord notifications.
2021-05-19 11:37:44 +01:00
Geoff Taylor
ce2d0d7438
Added a NotificationHandler to bridge log events to notifications.
2021-05-18 18:08:38 +01:00
Geoff Taylor
b80e60be37
EventSource now properly inherits from Subject.
2021-05-17 21:17:01 +01:00
Geoff Taylor
f2cad71bc2
Fixed Method Resolution Order problem in Events.
2021-05-17 20:54:39 +01:00
Geoff Taylor
5707992fcb
Can now send notifications, for example to Discord or Telegram.
2021-05-17 20:43:16 +01:00
Geoff Taylor
0d9635ba45
PollingLiquidator optimisation - now loops and updates ripe 🥭 accounts.
2021-05-12 10:52:26 +01:00
Geoff Taylor
a40b962965
Fixed dereference of group basket tokens.
2021-05-11 20:32:20 +01:00
Geoff Taylor
4cfc87d420
Split BasketTokenMetadata up. Improved linting.
...
* Split BasketTokenMetadata into BasketToken and Token.
* Improved linting and mypy so it worked across files.
2021-05-11 19:24:02 +01:00
Geoff Taylor
78fbb05970
Renamed SimpleLiquidator to PollingLiquidator.
2021-05-10 14:48:19 +01:00
Geoff Taylor
db91e1d9d8
Added a 'create-wallet' command, made other commands more consistent.
2021-05-07 10:47:01 +01:00
Geoff Taylor
013a8ce715
Added Pyston to docker image and commands.
...
All commands now use Pyston instead of Python as the Python interpreter. It seems a bit faster.
2021-05-06 19:06:47 +01:00
Geoff Taylor
fab0d909c2
Added 'dry run' option to commands that perform transactions.
2021-05-06 15:27:25 +01:00
Geoff Taylor
3db09e922c
Added wallet balancing. Big changes throughout to support this.
2021-05-06 14:21:40 +01:00
Geoff Taylor
9ae606b1c6
Commands now output the AccountScout report to show errors and warnings.
2021-04-29 16:33:04 +01:00
Geoff Taylor
feda91156b
Fixed problem where OpenOrders could show the wrong program ID in some circumstances.
2021-04-29 12:11:28 +01:00
Geoff Taylor
c5734a0624
Moved development commands to 'scripts', so 'bin' is for actual commands.
...
* Added log level as parameter to commands.
2021-04-29 10:53:01 +01:00
Geoff Taylor
f8738770f5
Expanded liquidation process and steps.
2021-04-28 18:36:48 +01:00
Geoff Taylor
4f6890fe1c
Added argument parsing to liquidator command.
2021-04-27 10:53:43 +01:00
Geoff Taylor
acf2ff5da6
Renamed Classes.ipynb to BaseModel.ipynb. Adjusted all imports of it.
2021-04-27 09:41:22 +01:00
Geoff Taylor
482f759b11
Added start of a runnable 'liquidator' command.
2021-04-26 17:09:35 +01:00