Commit Graph

20 Commits

Author SHA1 Message Date
Geoff Taylor bcd56301c9 Brought changes to structs and instructions across for new group/code v3.4. 2021-07-13 12:43:50 +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 6a15c81fa3 New approach to transactions allowing them to be split up.
* CombinableTransactions now separated out.
* CombinableTransactions are now size-aware when being executed, and will automatically split into batches for execution if they are too big.
* New MarketInstructionBuilder approach - each market type can now have its own way of building instructions for common operations.
2021-07-12 17:18:56 +01:00
Geoff Taylor faf514cde1 Brought up to date for new Group structures. New websocket approach. 2021-07-12 10:57:05 +01:00
Geoff Taylor 9e706c1d91 (Temporarily?) removed Settle from Spot order placement because it stopped working. 2021-07-01 22:10:52 +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 8860263346 Fixed problem placing spot orders. 2021-06-30 16:16:02 +01:00
Geoff Taylor b5c8f69ae1 Fixed Withdraw command. 2021-06-30 15:06:10 +01:00
Geoff Taylor 3e4ba1052c Initial work on placing/cancelling spot market orders. 2021-06-30 14:08:37 +01:00
Geoff Taylor 857d033572 Added compound instruction builder for placing Serum orders, cranking and settling all in one go. 2021-06-25 17:52:22 +01:00
Geoff Taylor e61a3806ba Removed all InstructionBuilders. Instead we'll use simpler functions that return an array of instructions (allowing for compound instructions etc.) 2021-06-25 17:21:53 +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 f4e034a943 Added 'processed' commitment to client calls where it was missing. 2021-06-23 11:36:35 +01:00
Geoff Taylor 9e5b54b6bd Shift representation of max input amount. 2021-06-23 09:14:04 +01:00
Geoff Taylor 36446c2567 Fixed problem passing empty OpenOrders accounts in instructions. 2021-06-13 22:02:02 +01:00
Geoff Taylor 5bbac07d0c Updated LiquidationProcessor to take referrer_rebate_accrued into account.
* Added referrer_rebate_accrued to assets in calculations.
* Added some unit tests on liquidation calculations.
2021-06-13 20:34:17 +01:00
Geoff Taylor 8e470ad94e Now applies serum fee discount address to Serum orders, if an SRM token account is available. 2021-06-09 15:20:13 +01:00
Geoff Taylor 4294fbebe7 Fixed problem using Wrapped SOL with Serum.
* Fixes problems with liquidator re-balancing.
* Fixes problems with group-balance-wallet, group-settle, serum-buy and serum-sell commands.
* Greatly increases the speed of buying and selling on Serum - the IOC order is now placed, cranked and settled in one transaction.
* Associated token accounts and OpenOrders accounts are automatically created as-needed.
2021-06-09 00:47:15 +01:00
Geoff Taylor e3e44a14ef Added documentation on Wrapped SOL, how to wrap/unwrap. Cleaned up those commands, centralised some Instructions. 2021-06-08 14:05:00 +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