@t2000/sdk 0.17.27 → 0.17.28
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +5 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -70,6 +70,10 @@ await agent.investEarn({ asset: 'SUI' });
|
|
|
70
70
|
// Stop earning (withdraw from lending, keep in portfolio)
|
|
71
71
|
await agent.investUnearn({ asset: 'SUI' });
|
|
72
72
|
|
|
73
|
+
// Rebalance earning positions to better-rate protocols
|
|
74
|
+
await agent.investRebalance(); // execute
|
|
75
|
+
await agent.investRebalance({ dryRun: true }); // preview only
|
|
76
|
+
|
|
73
77
|
// Sell position (auto-withdraws if earning first)
|
|
74
78
|
await agent.investSell({ asset: 'SUI', usdAmount: 'all' });
|
|
75
79
|
|
|
@@ -197,6 +201,7 @@ const agent = T2000.fromPrivateKey('suiprivkey1q...');
|
|
|
197
201
|
| `agent.investSell({ asset, usdAmount \| 'all', maxSlippage? })` | Sell crypto back to USDC (auto-withdraws if earning) | `InvestResult` |
|
|
198
202
|
| `agent.investEarn({ asset })` | Deposit invested asset into best-rate lending for yield | `InvestEarnResult` |
|
|
199
203
|
| `agent.investUnearn({ asset })` | Withdraw from lending, keep in portfolio | `InvestUnearnResult` |
|
|
204
|
+
| `agent.investRebalance({ dryRun?, minYieldDiff? })` | Move earning positions to better-rate protocols | `InvestRebalanceResult` |
|
|
200
205
|
| `agent.getPortfolio()` | Investment positions + P&L (grouped by strategy) | `PortfolioResult` |
|
|
201
206
|
|
|
202
207
|
### Strategy Methods
|