Commit Graph

36 Commits

Author SHA1 Message Date
Geoff Taylor 88cb2fcdd4 Refactored Group and Account to remove requirement for Group to load all Root Banks. 2021-11-11 11:56:29 +00:00
Geoff Taylor 393ff6a899 Added unit tests for slot accessors in Group and Account. 2021-11-10 17:46:54 +00:00
Geoff Taylor 3f4ec995f0 Group and Account slots now contain their own matching indices. 2021-11-09 21:08:06 +00:00
Geoff Taylor 01cfae7fa4 Fixed problems with redeem-mango 2021-11-09 19:54:50 +00:00
Geoff Taylor d15e953ae7 Refactor of code to work with mypy --strict 2021-11-09 13:23:36 +00:00
Geoff Taylor 199c39130d Moved to having Instrument as a basis for Token, to allow for perp markets with no underlying SPL token. 2021-11-08 11:39:09 +00:00
Geoff Taylor 4a24f3df55 Some fixes for health calculations WIP. 2021-11-04 15:36:14 +00:00
Geoff Taylor 56599a1037 Added OrderBook instead of passing around bids and asks. Added it to ModelState too, and cleaned up usage. 2021-10-26 18:45:04 +01:00
Geoff Taylor 3ccca8bd01 Start of work on account calculations. 2021-10-04 18:27:07 +01:00
Geoff Taylor 26aabd23e9 Simplified and improved marketmaker hedging. 2021-10-02 12:28:16 +01:00
Geoff Taylor 2a424aa2d1 Added sweep command to sell all tokens in a market. 2021-09-02 18:51:43 +01:00
Geoff Taylor 8624afabdc Replaced command switch --account-index with --account-address because of inconsistent results when fetching multiple accounts - they could come back with different indices. 2021-09-02 17:19:17 +01:00
Geoff Taylor 8bf6384076 Added CollateralCalculator to calculate collateral in different market types. 2021-08-31 00:30:22 +01:00
Geoff Taylor 9159d615c4 Updated dependencies and fixed subsequent issues. 2021-08-27 20:37:23 +01:00
Geoff Taylor 261848f325 Big renaming of Context properties to make them more consistent and appropriate. 2021-08-26 10:31:02 +01:00
Geoff Taylor 97a5c41a39 Updated to latest group structures and IDs. 2021-08-17 19:42:11 +01:00
Geoff Taylor 3403555036 Added account name/info to output. 2021-08-13 12:15:17 +01:00
Geoff Taylor aa4406d68f Fixed account output/reporting. 2021-08-07 18:42:39 +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 613d964051 Perp Accounts accrue benefits in MNGO so improved handling of it. 2021-08-05 15:35:08 +01:00
Geoff Taylor 7033a080bf Better logging of failing instructions. 2021-08-04 17:50:38 +01:00
Geoff Taylor cc6f62c312 Expanded use of Group and Account baskets. 2021-08-04 13:08:34 +01:00
Geoff Taylor 88fa2181d2 Change Group to use a more basket-orientated approach instead of multiple properties requiring indexes. 2021-08-03 18:32:12 +01:00
Geoff Taylor c90ff010d3 Improved how accounts handle their basket of tokens. 2021-08-03 12:40:00 +01:00
Geoff Taylor ed3955cc1f Fixed some type hints. 2021-08-01 18:03:46 +01:00
Geoff Taylor ca3193e0b6 Added account indexing to commands that need it. 2021-07-31 14:43:39 +01:00
Geoff Taylor e721d6c8e8 Improved Group and Account output. Tied OpenOrders and PerpOpenOrders together with a PlacedOrdersContainer protocol. 2021-07-29 16:19:52 +01:00
Geoff Taylor 5b6d5f2291 Upgraded to new, better devnet group. 2021-07-29 12:38:34 +01:00
Geoff Taylor d22a09f208 Added market 'stubs' to allow for delayed loading of markets. 2021-07-23 11:42:22 +01:00
Geoff Taylor 94df52003b Changes for devnet group v3.8.
* Some struct/layout changes
* Big changes to OpenOrders handling in MarketMaker
* Serum and Spot settlement should now work as expected
2021-07-19 15:04:53 +01:00
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 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 3e4ba1052c Initial work on placing/cancelling spot market orders. 2021-06-30 14:08:37 +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