Commit Graph

48 Commits

Author SHA1 Message Date
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 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 eef007758d Expanded porcelain functions, cleaned up old usage. 2022-02-24 19:40:05 +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 0aa6d1409f Added on_event() and on_fill() to concrete LoadedMarkets. 2022-02-23 10:48:25 +00:00
Geoff Taylor 906b419fc6 OrderBook can now provide expired orders, if requested. 2022-02-22 12:06:20 +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
Ondra Chaloupka a398a1d9d9 Pyth Oracle changed the account info at mainnet by adding prefix 'Crypto.' to assets 2022-02-03 20:11:47 +01:00
Geoff Taylor 8ad9033948 Fixed Pyth oracle to use different (new?) symbol naming convention on devnet. 2022-01-19 12:09:59 +00:00
Geoff Taylor 3f4ec995f0 Group and Account slots now contain their own matching indices. 2021-11-09 21:08:06 +00:00
Geoff Taylor d15e953ae7 Refactor of code to work with mypy --strict 2021-11-09 13:23:36 +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 53207d1d98 FTX oracle no longer tries to interfere with PERP market names. 2021-09-06 19:26:45 +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 d7b36c355c Now uses a fresh ThreadPoolScheduler every time instead of one per Context. 2021-09-02 08:30:06 +01:00
Geoff Taylor 38ff5e2fcd Added context name to Pyth exceptions. 2021-08-31 15:09:58 +01:00
Geoff Taylor 9159d615c4 Updated dependencies and fixed subsequent issues. 2021-08-27 20:37:23 +01:00
Geoff Taylor e670611722 Fixed forcing to mainnet/devnet. 2021-08-26 18:03:42 +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 5a76874466 Updated for new group. 2021-08-19 22:23:19 +01:00
Geoff Taylor ec37c14d03 Added ensure-account and ensure-open-orders commands. 2021-08-19 11:00:39 +01:00
Geoff Taylor a96b67e729 Improved transaction exception reporting. 2021-08-19 09:46:54 +01:00
Geoff Taylor d5eaa385da Removed rx.core.typing for many classes - using the actual base classes now. 2021-08-17 12:39:55 +01:00
Geoff Taylor 9bd75dc8d2 Websocket now has a force_reconnect() method, plus subscribable disconnect event. 2021-08-09 13:24:33 +01:00
Geoff Taylor 9b6f33d7e6 Added --name parameter to programs and context to allow better reporting of errors. 2021-08-09 10:27:47 +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 2840f52fde Fixed stub oracle price now the server stub oracle has been updated. 2021-08-03 09:08:47 +01:00
Geoff Taylor b734eeb6cc Fixed linting problems in stub oracle. 2021-07-31 13:37:26 +01:00
Geoff Taylor efd24060a8 Added stub oracle code and cache loading. 2021-07-30 20:31:17 +01:00
Geoff Taylor 321dd2142a Fixed comment in Serum oracle. 2021-07-30 18:09:54 +01:00
Geoff Taylor d7f117175f Changed RX subscribe_on to observe_on. 2021-07-28 12:52:29 +01:00
Geoff Taylor c874b83221 Can now explicitly pick Pyth oracle on mainnet-beta or devnet. 2021-07-26 18:07:56 +01:00
Geoff Taylor 3b23f7e4e7 Added 'confidence' to oracles so marketmaker could access Pyth confidence intervals. 2021-07-26 13:42:03 +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 9960713d7d Fixed use of backslash in regular expressions. 2021-07-14 18:28:48 +01:00
Geoff Taylor ec051037d4 Fixed Serum oracle to work better with Serum prices when the code itself is not on mainnet. 2021-07-14 16:34:10 +01:00
Geoff Taylor 9ae3e8a327 Fixed oracles for perp market symbols. 2021-07-14 15:51:32 +01:00
Geoff Taylor 19e4d948d3 Updates to allow some market making on Serum. 2021-07-13 20:01:32 +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 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 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 ceaae48ddf Moved Pyth Network oracle code to V2 now that they're providing prices there. 2021-06-15 11:57:28 +01:00
Geoff Taylor a491d1d851 Added to_streaming_observable() method to OracleProviders. Added polling observable to Pyth and Serum providers, and websocket observable to FTX provider. 2021-06-13 16:01:36 +01:00
Geoff Taylor 6b4ea5925d Added FTX price oracle. 2021-06-12 14:21:07 +01:00
Geoff Taylor c3ac807fce Moved oracles to their own packages. 2021-06-11 16:51:41 +01:00