Commit Graph

31 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 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 d6a57f3859 Added subscribe() method to all AddressableAccounts. 2022-03-01 12:22:50 +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 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 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 1d4e24ea38 ModelState now tracks current orders on the orderbook directly, rather than using OpenOrders. 2021-09-02 13:11:35 +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