Commit Graph

492 Commits

Author SHA1 Message Date
Geoff Taylor b363a3b0bb Added Keeper instructions and a keeper command. 2022-03-08 08:53:11 +00:00
Geoff Taylor 172b64796a Removed spurious warning - it's fine for a MarketLookup to not find what it's looking for and return None. 2022-03-04 18:47:38 +00:00
Geoff Taylor 24b5579574 Overrode market_buy() and market_sell() in NullMarketOperations so they didn't do anything but didn't error either. 2022-03-04 17:22:54 +00:00
Geoff Taylor 4094e4a9e5 Fixed problem spot health calculations. 2022-03-04 15:21:58 +00:00
Geoff Taylor ee9a1b53e4 Fixed incorrect stringifying of Settle instruction. 2022-03-04 12:32:06 +00:00
Geoff Taylor 53d68eb2a3 Added build_perp_cancel_all_side_instructions() to cancel orders with a specific side. 2022-03-04 10:11:29 +00:00
Geoff Taylor ba996d9c94 Improved creation of non-existant spot openorders. 2022-03-04 09:45:32 +00:00
Geoff Taylor 89e45e936e Now use fully_qualified_symbol for markets in most places, so Serum and Spot markets can be differentiated. 2022-03-03 18:36:46 +00:00
Geoff Taylor f1ea12e30f Can now withdraw to any wallet, not just current wallet. 2022-03-03 15:41:55 +00:00
Geoff Taylor a1be4a68db send-sols and send-token now accept --wallet-target as a parameter, calculating what should be transferred to leave the desired amount in the wallet. (send-sols takes the cost of the transaction into account so the amount left is accurate.) 2022-03-03 14:25:40 +00:00
Geoff Taylor 49c4353eb2 Added --account-target and --wallet-target to deposit and withdraw commands.
* Can now specify desired wallet or account balance and have the deposit or withdraw action make it so (if it can).
* Updated send-token to use same Associated Token Account creation approach as withdraw, instead of requiring an intermediate transaction - much slicker now.
2022-03-02 18:52:45 +00:00
Geoff Taylor bbc52ebead Added is_empty as property of CombinableInstructions. 2022-03-02 18:46:33 +00:00
Geoff Taylor a12b238217 Added endpoint_url as a member of CompoundRPCCaller because some libraries like the SPL token library raise exceptions if it's not there. 2022-03-02 18:45:43 +00:00
Geoff Taylor ac379d5ad9 Fix for another Windows datetime problem.
* Made a more thorough check of use of datetimes throughout codebase, replaced some instances.
* Added some tests to make sure comparisons don't raise exceptions.
2022-03-02 11:23:43 +00:00
Geoff Taylor 9d94cf5fdc Removed unused imports. 2022-03-01 12:26:58 +00:00
Geoff Taylor d6a57f3859 Added subscribe() method to all AddressableAccounts. 2022-03-01 12:22:50 +00:00
Geoff Taylor 0627fce0a5 Enabled TIF build_perp function now v3.4 has been deployed. 2022-03-01 07:39:02 +00:00
Geoff Taylor b9700d50bf Fixed bug in transaction waiting in send-sols command. 2022-02-28 18:25:32 +00:00
Geoff Taylor 11a9fba065 Refactored instructions to have a more consistent naming pattern:
* build_serum_***
* build_spot_***
* build_perp_***
* build_mango_***
2022-02-28 12:10:13 +00:00
Geoff Taylor c0c0acfb49 Ensured consistent abstract methods/properties decorators on abstract classes. 2022-02-27 17:52:59 +00:00
Geoff Taylor 0841490076 Fixed datetime/timezone problem that caused `OSError: [Errno 22] Invalid argument` on Windows. 2022-02-26 19:09:47 +00:00
Geoff Taylor 2ded91d581 Added emoji marker to show expiration status of order in string output. 2022-02-25 13:12:24 +00:00
Geoff Taylor 5bd2a9d0e1 Simplified Order, with with_update() and from_values() methods instead of litany of other mechanisms. 2022-02-25 11:46:43 +00:00
Geoff Taylor b60b2c8894 Can now iterate over bids and asks including expired. 2022-02-25 10:50:29 +00:00
Geoff Taylor eef007758d Expanded porcelain functions, cleaned up old usage. 2022-02-24 19:40:05 +00:00
Geoff Taylor eb3d2465ef Moved Operations classes into their relevant market type file. 2022-02-24 17:04:40 +00:00
Geoff Taylor 1f2470c5ff Simplified creating market operations and instructions. Removed TradeExecutors and put that functionality in MarketOperations. 2022-02-24 16:44:43 +00:00
Geoff Taylor e5c7669071 Fixed problem with address sort order when cranking. 2022-02-24 11:28:04 +00:00
Geoff Taylor b7fff26552 Improved some instruction reporting. 2022-02-24 11:27:02 +00:00
Geoff Taylor 891b7eab3e Merge branch 'og/tif'
* New place perp instcution builder is here as build_place_perp_order_instructions_2(), ready to be moved to build_place_perp_order_instructions() when updated Mango program is deployed.
2022-02-23 18:14:17 +00:00
Geoff Taylor 4e2af51836 Refactored uses of instanceof() to determine market type. 2022-02-23 17:21:03 +00:00
Geoff Taylor 5faa7eb119 Fixed TransactionScout bug where transaction wasn't Mango. 2022-02-23 16:11:52 +00:00
Geoff Taylor 28ef214212 Added deposit() and withdraw() directly on Account.
This involved some separation of interfaces for building instructions - something that may need to be expanded in the future.
2022-02-23 15:12:14 +00:00
Geoff Taylor ee5c6ba23a Added on_orderbook_change() to LoadedMarket. 2022-02-23 12:16:26 +00:00
Geoff Taylor 0aa6d1409f Added on_event() and on_fill() to concrete LoadedMarkets. 2022-02-23 10:48:25 +00:00
Geoff Taylor 001e549484 Removed unused DryRunMarket. 2022-02-22 14:25:53 +00:00
Geoff Taylor 1aa5484745 Fixed semgrep false positive. 2022-02-22 14:00:31 +00:00
Geoff Taylor 4c88136160 Merge branch 'transaction-monitoring' 2022-02-22 12:51:57 +00:00
Geoff Taylor 906b419fc6 OrderBook can now provide expired orders, if requested. 2022-02-22 12:06:20 +00:00
Geoff Taylor c3f7ad60f6 Fixed timezone comparisons for time-in-force checks. 2022-02-21 21:00:08 +00:00
Geoff Taylor 3302f5088c Added time-in-force as parameter to ToleranceOrderReconciler. 2022-02-21 20:45:33 +00:00
Geoff Taylor f2c84f001a Updated PerpOrderBookSide to handle new leaf node format with time_in_force. 2022-02-21 20:08:14 +00:00
Geoff Taylor cf5e91682b Implementation of Time In Force for perp orders. 2022-02-21 19:38:05 +00:00
Geoff Taylor 5063f14a16 Removed stale calculator cruft now that pandas is the main mechanism. 2022-02-21 12:28:23 +00:00
Geoff Taylor 8eb308d9be Removed some stale dataframe valuation code, implemented CSV output for dataframe. 2022-02-21 11:15:48 +00:00
Geoff Taylor 4a7c2456bc Improved account calculations and tests. 2022-02-18 19:40:57 +00:00
Geoff Taylor 1c4dba1445 Removed unnecessary declaration. 2022-02-17 16:44:28 +00:00
Geoff Taylor 97b023b39c Merge branch 'main' of https://github.com/blockworks-foundation/mango-explorer 2022-02-17 16:11:04 +00:00
Geoff Taylor 17d2f8f8b4 Made sure commands using Context used it in a with statement. 2022-02-17 14:54:38 +00:00
Geoff Taylor ba0c69c86d Implemented mango.WebSocketTransactionMonitor.wait_for_all(). 2022-02-16 20:04:09 +00:00