Geoff Taylor
a4d3f4785c
Added Valuation to tie together Account valuation information in a single object.
2022-03-15 19:16:26 +00:00
Geoff Taylor
bdae059767
Slot checking is now disabled by default (after discussion with Max).
2022-03-15 11:25:07 +00:00
Geoff Taylor
b5916fcb50
Added Account.build_redeem_pnl_instructions_for_market() to build redeem instructions.
...
* Simpler access is through Account.redeem_pnl_for_perp_market() and Account.redeem_all_perp_pnl()
* Added redeem-pnl command to allow redemption via command line and to show how to exercise these methods.
2022-03-14 17:47:30 +00:00
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
0da58bc8bc
Exposed OutputFormatter and to_json as public.
2022-03-09 09:26:01 +00:00
Geoff Taylor
b363a3b0bb
Added Keeper instructions and a keeper command.
2022-03-08 08:53:11 +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
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
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
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
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
001e549484
Removed unused DryRunMarket.
2022-02-22 14:25:53 +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
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
51a5dd9c2e
Introduction of websocket for transaction monitoring and Disposable Context.
2022-02-16 16:07:37 +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
9fdccca3a3
Added reflink support in placing perp orders and with new commands register-referrer-id and set-referrer.
2022-02-09 18:31:29 +00:00
Geoff Taylor
e372fb932c
Added PerpEventQueue.events_for_account() and PerpEventQueue.fills_for_account(), UnseenAccountFillEventTracker and tests.
2022-01-31 15:44:46 +00:00
Geoff Taylor
7c574f1ebc
Extracted logging setup code to its own function so it can be reused by external programs.
2022-01-29 15:28:00 +00:00
Ondra Chaloupka
4c0ce606ab
Adding an option to use different rpc http and ws addresses for one cluster url
2022-01-21 06:40:00 +01:00
Geoff Taylor
f1b14acdcf
Added instructions and commands for account delegation.
2022-01-18 17:51:11 +00:00
Geoff Taylor
3ef9295c31
Added CANCEL_ALL_PERPS instruction and a transaction reporter.
2022-01-14 17:18:31 +00:00
Geoff Taylor
bd35dc7fb4
Export TransactionAlreadyProcessedException and StaleSlotException.
2022-01-11 14:43:14 +00:00
Geoff Taylor
d8ffa03491
Refactored to use mango.output() consistently instead of print().
2022-01-11 14:36:08 +00:00
Geoff Taylor
6352844ed1
Improved perp cranking and added public key sorting tests.
2022-01-11 12:24:15 +00:00
Geoff Taylor
d8e61625cf
Preliminary use of DataFrame calculations on Accounts.
2022-01-06 16:34:18 +00:00
Geoff Taylor
d4c6b4bf2c
HTTPErrors now cause a provider switch. Updated CompoundException to work with any Exception, not just a ClientException.
2021-12-15 16:36:11 +00:00
Geoff Taylor
e0efa927e3
Added CompoundClientException to provide more detail when all providers fail.
2021-12-15 12:24:23 +00:00
Geoff Taylor
1f32899f32
Experimental ability to take multiple cluster URLs and fail over from one to the next on slot errors.
2021-12-05 16:38:49 +00:00
Geoff Taylor
1f865285c1
Trying a new approach to tackle stale data coming back from the RPC server.
2021-12-04 13:56:16 +00:00
Geoff Taylor
47ade1f21a
Added extra debug logging to marketmaker pulses.
2021-12-03 17:04:44 +00:00
Geoff Taylor
cbedb3d84c
Simpler, clearer approach to connection error handling.
2021-12-01 16:14:30 +00:00
Geoff Taylor
57a1d2e0e6
Start of work on downloading trades to CSV.
2021-11-26 13:29:21 +00:00
Geoff Taylor
d2a9946918
Added some experimental JSON output for feedback.
2021-11-19 17:36:25 +00:00
Geoff Taylor
4b517bd614
Trying to improve visibility of version information.
2021-11-16 18:01:44 +00:00
Geoff Taylor
5f7bd3c04c
Added interest rate calculations. Moved TokenInfo to TokenBank.
2021-11-13 19:23:11 +00:00
Geoff Taylor
d15e953ae7
Refactor of code to work with mypy --strict
2021-11-09 13:23:36 +00:00
Geoff Taylor
e69e60b3ed
Refactored MarketOperations and MarketInstructionBuilder.
2021-11-08 12:43:11 +00:00
Geoff Taylor
01e121ad49
Refactored SpotMarketInfo and PerpMarketInfo.
2021-11-08 11:54:50 +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
4a24f3df55
Some fixes for health calculations WIP.
2021-11-04 15:36:14 +00:00
Geoff Taylor
a41a63da14
Fixes to allow a perp market with no spot market.
2021-11-01 18:41:31 +00:00