Commit Graph

243 Commits

Author SHA1 Message Date
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 8b21f4c025 Fixed formatting of token balance in group-balances command. 2021-05-25 17:17:41 +01:00
Geoff Taylor fefb160858 Removed unused import. 2021-05-24 14:54:06 +01:00
Geoff Taylor 30543975ee Renamed commands to better reflect purpose. Updated Quickstart.
* group-buy-token to serum-buy
* group-sell-token to serum-sell
* group-send-token to send-token
2021-05-24 10:40:33 +01:00
Geoff Taylor 3b82383f1b Fixed reference to group name in LiquidationEvent. 2021-05-21 20:40:40 +01:00
Geoff Taylor 1ba1a12310 Updated to new, shared ids.json. 2021-05-21 20:14:57 +01:00
Geoff Taylor fcfe32d321 Fixed bug in ShowAllAccounts, refactored it to use new function to get all margin accounts. 2021-05-21 20:14:21 +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 06b963e2cf Added Mailjet notification target. 2021-05-21 15:21:02 +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 6058468a99 Fixed incorrect logging.info() call in PollingLiquidator. 2021-05-21 14:25:02 +01:00
Geoff Taylor 85798a360b Changed Quickstart title to add 'Liquidator'. 2021-05-19 16:21:22 +01:00
Geoff Taylor 0b1bf7b9f9 Fixed some debug output. 2021-05-19 13:24:24 +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 f56c218fac Fixed triggering of LiquidationEvent. 2021-05-19 07:53:34 +01:00
Geoff Taylor ce2d0d7438 Added a NotificationHandler to bridge log events to notifications. 2021-05-18 18:08:38 +01:00
Geoff Taylor 06e8e67049 More depth in parsing transactions, plus better reporting on them. 2021-05-18 15:17:14 +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 540bb5b79d Cleaned up PrintingObserverSubscriber() calls. 2021-05-17 14:17:18 +01:00
Geoff Taylor 39fe1a4d24 Fixed incorrect parameter ordering in building TokenAccount. 2021-05-17 12:36:46 +01:00
Geoff Taylor ff804204a7 Added a common base class for addressable account objects. 2021-05-17 12:04:17 +01:00
Geoff Taylor e8668b60cf Fixed building of PartialLiquidate instruction. 2021-05-15 14:46:26 +01:00
Geoff Taylor 02e272e437 Expanded TransactionScout and added new command - report-transactions. 2021-05-15 14:17:42 +01:00
Geoff Taylor 5aa134b767 Fixed dictionary dereference in loading a TokenAccount. 2021-05-14 16:19:35 +01:00
Geoff Taylor c0070c2b94 Moved AccountInfo into BaseModel, moved 'fetch' methods to appropriate objects. 2021-05-14 15:51:29 +01:00
Geoff Taylor 5295121efe Added a transaction-scout command. 2021-05-14 12:32:39 +01:00
Geoff Taylor 7f980a8b2e Started adding some Observables code to help with common streaming and polling tasks. 2021-05-14 12:24:35 +01:00
Geoff Taylor f79315201d Added TransactionScout to show Mango transaction details. 2021-05-13 20:32:23 +01:00
Geoff Taylor 414a5f445b No longer submits a PartialLiquidate if there are zero tokens to fund the liquidation. 2021-05-13 12:29:23 +01:00
Geoff Taylor ad3f409404 Fixed bug in TradeExecutor - 'group' is an object member. 2021-05-13 08:15:51 +01:00
Geoff Taylor 45d1599286 Fixed type in description text. 2021-05-12 15:02:18 +01:00
Geoff Taylor 6d80b4e809 Updated Quickstart to reflect new log message. 2021-05-12 11:14:32 +01:00
Geoff Taylor 9b8ad18f10 Updated PollingLiquidator loop message to clarify looping. 2021-05-12 11:10:34 +01:00
Geoff Taylor fb308c6205 Updated README. 2021-05-12 10:59:59 +01:00
Geoff Taylor 0d9635ba45 PollingLiquidator optimisation - now loops and updates ripe 🥭 accounts. 2021-05-12 10:52:26 +01:00
Geoff Taylor b8e47792f8 Added a simple search script for dev code searches. 2021-05-12 09:14:10 +01:00
Geoff Taylor a40b962965 Fixed dereference of group basket tokens. 2021-05-11 20:32:20 +01:00
Geoff Taylor 9b97722394 Fixed regression in importing notebook code. 2021-05-11 20:17:49 +01:00
Geoff Taylor ef6b2b4da5 Fixed divisor bug in FloatAdapter. 2021-05-11 20:13:07 +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 f56ba03f3e Fixed bug in calling wallet balancer after a successful liquidation. 2021-05-10 18:56:35 +01:00
Geoff Taylor ff80a085da Clarified details of FloatAdapter (renamed from Float64Adapter) after information from Daffy on Discord. 2021-05-10 17:36:14 +01:00
Geoff Taylor 78fbb05970 Renamed SimpleLiquidator to PollingLiquidator. 2021-05-10 14:48:19 +01:00
Geoff Taylor 64b14600f7 Merged run-lint and run-mypy. Command is now just run-lint. 2021-05-10 14:46:37 +01:00
Geoff Taylor fb52fe3671 Tidied up reporting of balances before and after a liquidation. 2021-05-10 14:20:08 +01:00
Geoff Taylor b452887c28 Changed logging to use emoji for level and shorter datetime. Updated logs in Quickstart to reflect this. 2021-05-09 18:23:38 +01:00
Geoff Taylor b398990898 Added a Quickstart! A nice walkthrough of setting up a liquidator. 2021-05-08 16:01:30 +01:00