Commit Graph

13 Commits

Author SHA1 Message Date
Geoff Taylor c3ac807fce Moved oracles to their own packages. 2021-06-11 16:51:41 +01:00
Geoff Taylor b47bd6f6f3 Added Serum oracle. 2021-06-11 12:43:47 +01:00
Geoff Taylor 83d1702691 Added code to fetch prices from the Pyth Network. 2021-06-10 21:28:29 +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 a637f79feb Fixed problem switching context from 3-token group to 5-token group. 2021-06-08 16:27:04 +01:00
Geoff Taylor 032c91c66e Fixed bug in group-settle, where market metadata was provided instead of a spot market. 2021-06-08 15:12:43 +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 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 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 d92a28f635 LiquidationProcessor now records timestamp of last price and margin accounts updates.
* Will log warning if margin accounts are over 5 minutes out of date
* Will log error if margin accounts are over 10 minutes out of date
2021-06-07 20:35:26 +01:00
Geoff Taylor c0d7621e53 Added show-group and show-margin-account commands.
* Improved string output
* Strongly typed Group TokenValues, e.g. total deposits/borrows, indexes.
2021-06-07 19:38:43 +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