Commit Graph

26 Commits

Author SHA1 Message Date
Geoff Taylor d15e953ae7 Refactor of code to work with mypy --strict 2021-11-09 13:23:36 +00:00
Geoff Taylor c2615218e3 Made more marketmaker Elements work with order 'levels' and take multiple values for different levels. 2021-10-24 16:09:07 +01:00
Geoff Taylor c17d04152b FixedPositionSizeElement can now take multiple fixed position sizes and properly apply them. 2021-10-23 13:44:30 +01:00
Geoff Taylor ca1c114371 Updated AfterAccumulatedDepthElement to take depth and adjustment parameters. 2021-10-22 15:31:31 +01:00
Geoff Taylor 7f300f6ee0 Added more debug information for MinimumChargeElement. 2021-10-21 19:57:01 +01:00
Geoff Taylor 5200add28f Added BiasQuoteElement as possible marketmaker chain element. 2021-10-15 14:21:54 +01:00
Geoff Taylor b46d6bd0d2 Added QuoteSingleSideElement for marketmaker. 2021-10-14 09:42:09 +01:00
Geoff Taylor defbfd8c89 Cleaned up OrderChain Element construction. 2021-10-08 19:55:38 +01:00
Geoff Taylor 19f6a79d52 Added ability of ratios and minimumcharge elements to work with bid+ask instead of mid price. 2021-10-05 20:43:56 +01:00
Geoff Taylor 26aabd23e9 Simplified and improved marketmaker hedging. 2021-10-02 12:28:16 +01:00
Geoff Taylor 66e137e726 Fixed bug where PreventPostOnlyCrossingBookElement wouldn't change orders if there wasn't both a top bid and a top ask. 2021-09-29 18:03:25 +01:00
Geoff Taylor 71ecc5faef Fixed minimumcharge to correctly handle bids/asks that cross the mid-price. Re-ordered default chain so that minimumcharge is enforced before biasing. 2021-09-22 17:30:29 +01:00
Geoff Taylor 920ac364af Fixed incorrect error message in argument exception. 2021-09-06 18:21:38 +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 652296856b Added some logging to head elements of orderchain. 2021-09-02 13:30:53 +01:00
Geoff Taylor 39c591fc6f Made order chain more configurable, added MarketmakingOrderChain to docs. 2021-09-02 12:01:41 +01:00
Geoff Taylor 86f7933bcb Fixed problem calculating the proper tick under/over the top orderbook prices. 2021-09-01 18:33:38 +01:00
Geoff Taylor b57ef58d63 Added a RoundToLotSizeElement element to marketmaker chain. 2021-08-31 12:36:23 +01:00
Geoff Taylor 8bf6384076 Added CollateralCalculator to calculate collateral in different market types. 2021-08-31 00:30:22 +01:00
Geoff Taylor b89a072cdd Moved not_quoting to model_state (where external components and orderchain elements can both access it). Added a state bag to model_state too. 2021-08-26 09:19:51 +01:00
dd 958dd87d1c fixed bug in preventpostonlycrossingbookelement.py where bid was being compared against best bid. Now compares against best ask 2021-08-25 16:41:28 -04:00
Geoff Taylor 8c8ebdc7ae Merge branch 'v3' of https://github.com/blockworks-foundation/mango-explorer into v3 2021-08-25 17:09:03 +01:00
dd 05d78ea0b0 top_ask and top_bid now return None if book is empty. 2021-08-25 10:20:53 -04:00
Geoff Taylor fc1957d9b2 Added bias tests. 2021-08-23 17:35:09 +01:00
Geoff Taylor a8dd489601 Added a nicer log mess when biasing marketmaker orders. 2021-08-23 15:55:10 +01:00
Geoff Taylor 3419c89033 Moved marketmaker to an 'orderchain' model. 2021-08-22 19:48:20 +01:00