Geoff Taylor
e171b57445
Initial work on show-funding-rates.
2021-11-15 20:39:29 +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
43be1fa192
Can now use a separate commitment for fetching the recent blockhash.
2021-09-16 15:36:52 +01:00
Geoff Taylor
9f74952444
Added --encoding parameter.
2021-09-15 19:27:07 +01:00
Geoff Taylor
4310cc7e2a
Brought V2 changes to get_multiple_accounts() across to V3.
2021-09-13 12:17:19 +01:00
Geoff Taylor
70a038ffd9
Added a --blockhash-cache-duration parameter.
2021-09-07 21:44:48 +01:00
Geoff Taylor
e6eaeaeed1
Now use a monotonic time (in milliseconds, with collision avoidance) for client IDs to help with some other systems.
2021-09-07 19:07:22 +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
bf7dc95a9d
Merging V3 branch into main.
2021-08-30 15:42:11 +01:00
Geoff Taylor
03f385043b
Backported BetterClient from V3 and prefer its return values to the regular Client's.
2021-08-26 15:48:25 +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
d151e0ce8f
Updated to latest devnet ids.json. Fixed some context configuration problems.
2021-08-25 17:06:00 +01:00
Geoff Taylor
8a83c73ea8
Now run websocket connections each in their own websocket rather than using a shared one. (Shared websocket is still an option though.)
2021-08-21 16:03:13 +01:00
Geoff Taylor
5a76874466
Updated for new group.
2021-08-19 22:23:19 +01:00
Geoff Taylor
a96b67e729
Improved transaction exception reporting.
2021-08-19 09:46:54 +01:00
Geoff Taylor
255d3a70df
Added a mint command for devnet use.
2021-08-13 21:34:17 +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
e890490557
Backported custom Client from V3 to make sure 'processed' commitment is used consistently, even by code that isn't ours.
2021-08-07 15:10:06 +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
1b87591ae7
Improved context handling of skip_preflight.
2021-08-03 09:14:22 +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
8fe48de527
Moved functionality into *Market objects.
2021-07-23 10:20:44 +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
e16ac9cdc2
Added proper group-name lookup when fetching groups.
2021-06-28 09:48:16 +01:00
Geoff Taylor
888994424d
Improved reporting of TokenValue and BalanceSheet, in line with V2 changes.
2021-06-26 18:24:07 +01:00
Geoff Taylor
bbd8cc487e
Added a --fetch-prices option to show-margin-account.
2021-06-26 18:11:16 +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
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
852abdff00
Made all send_transaction() calls consistent in use of preflight commitment.
2021-06-24 11:59:57 +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
aac32ba716
Wallet can now be loaded from environment.
...
* Centralised configuration of Wallet from command-line
* Added loading Wallet from environment variables
* Improved command-line handling of many commands
2021-06-17 12:06:39 +01:00
Geoff Taylor
7078ef4722
Removed default context objects - now have static method on Context object: Context.default().
2021-06-17 11:18:35 +01:00
Geoff Taylor
90d6c54552
Fixed problem switching cluster on command line using just cluster name.
2021-06-16 20:38:00 +01:00
Geoff Taylor
c4c92f2851
Changed default group name from BTC_ETH_USDT to BTC_ETH_SOL_SRM_USDC.
2021-06-15 17:32:26 +01:00
Geoff Taylor
83d1702691
Added code to fetch prices from the Pyth Network.
2021-06-10 21:28:29 +01:00
Geoff Taylor
4294fbebe7
Fixed problem using Wrapped SOL with Serum.
...
* Fixes problems with liquidator re-balancing.
* Fixes problems with group-balance-wallet, group-settle, serum-buy and serum-sell commands.
* Greatly increases the speed of buying and selling on Serum - the IOC order is now placed, cranked and settled in one transaction.
* Associated token accounts and OpenOrders accounts are automatically created as-needed.
2021-06-09 00:47:15 +01:00
Geoff Taylor
a637f79feb
Fixed problem switching context from 3-token group to 5-token group.
2021-06-08 16:27:04 +01:00
Geoff Taylor
e3e44a14ef
Added documentation on Wrapped SOL, how to wrap/unwrap. Cleaned up those commands, centralised some Instructions.
2021-06-08 14:05:00 +01:00
Geoff Taylor
c0d7621e53
Added show-group and show-margin-account commands.
...
* Improved string output
* Strongly typed Group TokenValues, e.g. total deposits/borrows, indexes.
2021-06-07 19:38:43 +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