Geoff Taylor
ba56bdd9f5
Improved event queue handling. Now split incoming events into processed and unprocessed, and changed 'seen' handling to use sequence_number.
2021-08-01 17:47:45 +01:00
Geoff Taylor
2a03f60c3b
Fixed incorrect comment.
2021-07-30 22:41:39 +01:00
Geoff Taylor
d3b0c48528
Marketmaker now automatically creates required Spot OpenOrders if it doesn't exist.
2021-07-30 15:41:47 +01:00
Geoff Taylor
45343e4470
Spot place order now auto-creates OpenOrders in same transaction, and updates loaded Account instance.
2021-07-30 09:35:05 +01:00
Geoff Taylor
b75c59599f
Removed debug statements.
2021-07-29 16:22:27 +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
eb244a2167
Renamed PerpMarket to PerpMarketDetails, and PerpsMarket to PerpMarket to be consistent with SerumMarket and SpotMarket. Improved market stub handling.
2021-07-23 14:18:26 +01:00
Geoff Taylor
c953ec07fc
Added Perp cranking code, plus program. Expanded watch-address, added complementary show-address command.
2021-07-22 15:18:37 +01:00
Geoff Taylor
c11aececd9
Fixed Serum cranking to be more complete.
2021-07-21 14:31:04 +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
5a4022b236
Wrapping SOL now creates a proper Associated Token Account if no Wrapped SOL accounts are available.
2021-07-16 18:59:19 +01:00
Geoff Taylor
3ca1d7b706
Updated to new ids.json. Added deposit instruction+command.
2021-07-16 13:32:30 +01:00
Geoff Taylor
7db8326a7c
More realistic market-maker is now available.
2021-07-15 21:03:22 +01:00
Geoff Taylor
caf4947a5e
Removed extraneous print statements.
2021-07-13 20:27:35 +01:00
Geoff Taylor
19e4d948d3
Updates to allow some market making on Serum.
2021-07-13 20:01:32 +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
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