Commit Graph

39 Commits

Author SHA1 Message Date
Geoff Taylor 9bb064b5eb Added timestamp to Order (only available in perp orders). Expanded OrderBook's handling of TIF/expiration. 2022-03-10 14:54:52 +00:00
Geoff Taylor 43ebf757b0 Placing an order no longer overrides a client ID if one has been specified. 2022-03-09 18:59:51 +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 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 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 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 4e2af51836 Refactored uses of instanceof() to determine market type. 2022-02-23 17:21:03 +00:00
Geoff Taylor 0aa6d1409f Added on_event() and on_fill() to concrete LoadedMarkets. 2022-02-23 10:48:25 +00:00
Geoff Taylor 5c3b0befa9 Switched from autopep8 to black for code formatting. Reformatted all files. Updated dependencies. 2022-02-09 19:31:50 +00:00
Geoff Taylor 3df3179b4c Fixed bug in deriving spot openorders address. 2022-02-02 12:13:57 +00:00
Geoff Taylor a6605b59c3 Spot OpenOrders now created using a PDA (change in Mango v3.3) 2022-01-20 12:22:59 +00:00
Geoff Taylor 6352844ed1 Improved perp cranking and added public key sorting tests. 2022-01-11 12:24:15 +00:00
Geoff Taylor 62b0332439 Removed Unicode monospaced-font rendering of class names because VSCode has started being annoying about it all. (Boo...) 2021-12-13 12:06:42 +00:00
Geoff Taylor d15e953ae7 Refactor of code to work with mypy --strict 2021-11-09 13:23:36 +00:00
Geoff Taylor 199c39130d Moved to having Instrument as a basis for Token, to allow for perp markets with no underlying SPL token. 2021-11-08 11:39:09 +00:00
Geoff Taylor 56599a1037 Added OrderBook instead of passing around bids and asks. Added it to ModelState too, and cleaned up usage. 2021-10-26 18:45:04 +01:00
Geoff Taylor f4af4960d7 Added new OrderChain elements. Removed Serum oracle and added Market oracle (which includes Serum oracle functionality plus more). Expanded chain documentation and added oracle documentation. 2021-09-06 17:07:26 +01:00
Geoff Taylor ad86430638 Fixed bug in Serum lot size conversions. 2021-08-26 18:23:09 +01:00
Geoff Taylor 261848f325 Big renaming of Context properties to make them more consistent and appropriate. 2021-08-26 10:31:02 +01:00
Geoff Taylor 3419c89033 Moved marketmaker to an 'orderchain' model. 2021-08-22 19:48:20 +01:00
Geoff Taylor 191d3e644c Anything imported from pyserum should now be imported as a PySerumXYZ to avoid confusion with Mango Explorer classes. 2021-08-21 18:24:53 +01:00
Geoff Taylor ec37c14d03 Added ensure-account and ensure-open-orders commands. 2021-08-19 11:00:39 +01:00
Geoff Taylor f596d571f6 Big change - now uses our own 'Client' which handles some situations better from our point of view:
* Being able to specify commitment on the Client instead of every call.
* Better error handling (more exception details, and specific rate limiting exceptions)
* More obvious return values, instead of always having to dereference "result".
2021-08-07 15:07:19 +01:00
Geoff Taylor 0bcf5cfc5a Improved market output. 2021-08-03 09:13:56 +01:00
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 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 d22a09f208 Added market 'stubs' to allow for delayed loading of markets. 2021-07-23 11:42:22 +01:00
Geoff Taylor 8fe48de527 Moved functionality into *Market objects. 2021-07-23 10:20:44 +01:00
Geoff Taylor 9f99ecf650 Updated SimpleMarketMaker so it could run well against pure Serum markets. 2021-07-14 14:03:51 +01:00
Geoff Taylor 19e4d948d3 Updates to allow some market making on Serum. 2021-07-13 20:01:32 +01:00
Geoff Taylor 3e4ba1052c Initial work on placing/cancelling spot market orders. 2021-06-30 14:08: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 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 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 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