Commit Graph

34 Commits

Author SHA1 Message Date
Geoff Taylor 8257902003 Removed use of pyston in commands. 2021-10-08 18:15:40 +01:00
Geoff Taylor 0600450f01 Better debug output of context and arguments. 2021-09-30 08:54:12 +01:00
Geoff Taylor 7c17f5cbc4 Added --log-suppress-timestamp parameter. Centralised much CLI argument handling. 2021-09-13 14:05:19 +01:00
Geoff Taylor bf7dc95a9d Merging V3 branch into main. 2021-08-30 15:42:11 +01:00
Geoff Taylor 03f385043b Backported BetterClient from V3 and prefer its return values to the regular Client's. 2021-08-26 15:48:25 +01:00
Geoff Taylor a2f9ee6db8 Better reporting when dry-run liquidating a single account. 2021-08-16 11:58:22 +01:00
Geoff Taylor 9b6f33d7e6 Added --name parameter to programs and context to allow better reporting of errors. 2021-08-09 10:27:47 +01:00
Geoff Taylor f596d571f6 Big change - now uses our own 'Client' which handles some situations better from our point of view:
* Being able to specify commitment on the Client instead of every call.
* Better error handling (more exception details, and specific rate limiting exceptions)
* More obvious return values, instead of always having to dereference "result".
2021-08-07 15:07:19 +01:00
Geoff Taylor 8fe48de527 Moved functionality into *Market objects. 2021-07-23 10:20:44 +01:00
Geoff Taylor 80886c106c All MarketOperations now properly use their equivalent MarketInstructionBuilder for building instructions. 2021-07-12 18:26:35 +01:00
Geoff Taylor bf675122ac Updated ids.json for new group. Updated Group with new structure.
* Extended mechanism for combining instructions.
* Fixed Account's calculations of deposits and borrows.
* Added net_assets to Account.
* Groups now maintain loaded RootBanks, not just PublicKeys of them.
* Fixed simple market-maker's calculation of position sizes.
2021-07-01 21:24:08 +01:00
Geoff Taylor 5b71ffbd18 Big Rename - removal of old Group and MarginAccount, deletion of a lot of code that is no longer relevant.
* Added some TODO comments where work needs to be done but pieces are currently missing.
2021-06-25 15:50:37 +01:00
Geoff Taylor cd46c1c98b First cut at a lot of V3 code. 2021-06-25 10:33: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 0fae7679f7 Separated out logic to determine liquidatability of margin account into a more testable setup. 2021-06-15 17:30:25 +01:00
Geoff Taylor 36446c2567 Fixed problem passing empty OpenOrders accounts in instructions. 2021-06-13 22:02:02 +01:00
Geoff Taylor 616d929e90 Removed context from Group, added name. Price lookups must now pass the context they want to use. 2021-06-08 08:17:37 +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 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 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 5707992fcb Can now send notifications, for example to Discord or Telegram. 2021-05-17 20:43:16 +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 f79315201d Added TransactionScout to show Mango transaction details. 2021-05-13 20:32:23 +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 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