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
912b7f574a
Updated Quickstart to match V2 (solana-keygen instead of create-wallet).
2021-06-28 11:22:03 +01:00
Geoff Taylor
d9b40e105a
Updated Quickstart to use solana-keygen. Deleted create-wallet.
2021-06-28 11:20:10 +01:00
Geoff Taylor
e16ac9cdc2
Added proper group-name lookup when fetching groups.
2021-06-28 09:48:16 +01:00
Geoff Taylor
888994424d
Improved reporting of TokenValue and BalanceSheet, in line with V2 changes.
2021-06-26 18:24:07 +01:00
Geoff Taylor
bbd8cc487e
Added a --fetch-prices option to show-margin-account.
2021-06-26 18:11:16 +01:00
Geoff Taylor
115ccf1db3
Made version command handle no .version file case.
2021-06-25 18:04:55 +01:00
Geoff Taylor
7c992b2b07
Added a 'version' command.
2021-06-25 18:02:33 +01:00
Geoff Taylor
42181c10d5
Shifted error handling in SimpleMarketMaker.
2021-06-25 17:58:27 +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
b8dc12a3e6
Separated out token and market lookups.
2021-06-25 11:10:41 +01:00
Geoff Taylor
cd46c1c98b
First cut at a lot of V3 code.
2021-06-25 10:33:40 +01:00
Geoff Taylor
b0207dd19a
Added --worthwhile-threshold parameter to liquidator.
2021-06-24 16:36:11 +01:00
Geoff Taylor
852abdff00
Made all send_transaction() calls consistent in use of preflight commitment.
2021-06-24 11:59:57 +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
206a95e39a
Added type annotation for token lookups.
2021-06-23 09:44:55 +01:00
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
d0937d09cc
Trying to fix duplicated notifications - think it's a captured variable problem.
2021-06-21 16:25:10 +01:00
Geoff Taylor
5fc7aa7868
Added better health management of LiquidationProcessor.
2021-06-21 11:06:26 +01:00
Geoff Taylor
5a234684b0
Fixed incorrect program names in exception handlers.
2021-06-20 19:34:59 +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
80ba1e0d4b
Moved to a more event-driven, observable-based liquidator.
2021-06-17 16:30: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
7078ef4722
Removed default context objects - now have static method on Context object: Context.default().
2021-06-17 11:18:35 +01:00
Geoff Taylor
c6594e51bd
Moved git status message argument to later in Dockerfile in the hope it helps cache layers that take a long time to build.
2021-06-16 21:03:48 +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
9dd505ee98
Updated docker image creation process.
...
* A version tag is now available in .version (it contains the headline of the last git checking)
* Solana command-line tools are now installed
* Removed nasty workaround for pyserum event queue, since Binder didn't like it.
2021-06-16 18:22:42 +01:00
Geoff Taylor
f63592878f
Added command notify-below-minimum-sol-balance to send a notification if a monitored account is running out of SOLs.
2021-06-16 16:06:47 +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
68d0941130
Updated tests for new default group.
2021-06-15 21:51:18 +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