Geoff Taylor
9e5b54b6bd
Shift representation of max input amount.
2021-06-23 09:14:04 +01:00
Geoff Taylor
3d3577023c
Continue liquidating accounts that are liquidatable even if they're above maint_coll_ratio.
2021-06-22 20:36:31 +01:00
Geoff Taylor
72a64a322e
Updated failed liquidation message to include liquidator name.
2021-06-22 10:25:06 +01:00
Geoff Taylor
f7bd67308e
Improved AccountInfo.load_multiple and made better use of it fetching updated prices.
2021-06-22 09:43:31 +01:00
Geoff Taylor
5fc7aa7868
Added better health management of LiquidationProcessor.
2021-06-21 11:06:26 +01:00
Geoff Taylor
858cee248b
Now uses ReportingAccountLiquidator even when using NullAccountLiquidator.
2021-06-19 19:55:23 +01:00
Geoff Taylor
fab659c244
Improved access to market lookup data.
...
* Abstracted MarketLookup from SpotMarketLookup, because not all markets need be 'spot'.
* Made MarketLookup accessible from Context.
2021-06-18 13:50:33 +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
7078ef4722
Removed default context objects - now have static method on Context object: Context.default().
2021-06-17 11:18:35 +01:00
Geoff Taylor
198054ad09
Changed message that appears on liquidation filtering.
2021-06-16 20:54:11 +01:00
Geoff Taylor
31a476cbb1
Fixed some lint problems.
2021-06-16 20:50:25 +01:00
Geoff Taylor
90d6c54552
Fixed problem switching cluster on command line using just cluster name.
2021-06-16 20:38:00 +01:00
Geoff Taylor
d0595b8673
Updated SimpleMarketMaker based on suggestions from Brian.
...
* Cleans up existing orders on startup, in case recovering from a previous crash.
* Can now leave existing orders in place (instead of cancelling and creating fresh) if price and size are within tolerance.
2021-06-16 12:06:12 +01:00
Geoff Taylor
81f386f114
Introduced a SimpleMarketMaker.
2021-06-15 23:30:11 +01:00
Geoff Taylor
c4c92f2851
Changed default group name from BTC_ETH_USDT to BTC_ETH_SOL_SRM_USDC.
2021-06-15 17:32:26 +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
ceaae48ddf
Moved Pyth Network oracle code to V2 now that they're providing prices there.
2021-06-15 11:57:28 +01:00
Geoff Taylor
23aed252d4
Fixed problem where margin account balances had index applied twice.
2021-06-13 22:54:21 +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
a491d1d851
Added to_streaming_observable() method to OracleProviders. Added polling observable to Pyth and Serum providers, and websocket observable to FTX provider.
2021-06-13 16:01:36 +01:00
Geoff Taylor
6b4ea5925d
Added FTX price oracle.
2021-06-12 14:21:07 +01:00
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