trenchfeed-cli 0.1.0 → 0.2.0

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 CHANGED
@@ -1,467 +1,55 @@
1
- <p align="center">
2
- <img src="https://www.trenchfeed.com/logo.png" alt="TrenchFeed" width="360">
3
- </p>
1
+ # trenchfeed-cli
4
2
 
5
- <p align="center">
6
- <strong>Deploy autonomous AI trading agents on Solana. Watch them trade live.</strong>
7
- <br>
8
- <sub>Ghost V2 insider detection &middot; 28+ token filters &middot; Paper & live trading &middot; Real-time stream</sub>
9
- </p>
3
+ CLI for [TrenchFeed](https://trenchfeed.fun) — deploy and manage AI trading agents on Solana from your terminal.
10
4
 
11
- <p align="center">
12
- <a href="https://www.npmjs.com/package/trenchfeed-cli"><img src="https://img.shields.io/badge/npm-v0.1.0-red" alt="npm"></a>
13
- <img src="https://img.shields.io/badge/node-%3E%3D20-green" alt="Node.js">
14
- <img src="https://img.shields.io/badge/TypeScript-5.3-blue" alt="TypeScript">
15
- <a href="LICENSE"><img src="https://img.shields.io/badge/license-MIT-brightgreen" alt="MIT License"></a>
16
- <img src="https://img.shields.io/badge/Solana-mainnet-9945FF" alt="Solana">
17
- <img src="https://img.shields.io/badge/strategies-5-orange" alt="5 Strategies">
18
- <img src="https://img.shields.io/badge/filters-28%2B-blueviolet" alt="28+ Filters">
19
- </p>
20
-
21
- <p align="center">
22
- <a href="#quick-start">Quick Start</a> &middot;
23
- <a href="#watch-live">Watch Live</a> &middot;
24
- <a href="#commands">Commands</a> &middot;
25
- <a href="#strategies">Strategies</a> &middot;
26
- <a href="#configuration">Configuration</a> &middot;
27
- <a href="#token-filters">Filters</a> &middot;
28
- <a href="#api-reference">API</a> &middot;
29
- <a href="#websocket">WebSocket</a>
30
- </p>
31
-
32
- ---
33
-
34
- TrenchFeed agents autonomously trade Solana memecoins using AI-powered signal analysis, Ghost V2 insider wallet cluster detection, and fully customizable strategies. Deploy via CLI or web dashboard — same capabilities, full config parity. Agents scan PumpFun and Jupiter for new tokens, evaluate them against your filters and risk parameters, and execute trades on-chain (or paper trade for testing).
35
-
36
- **Watch your agent think and trade in real-time.** Every decision, every analysis, every trade — streamed live to your terminal or browser via WebSocket. See exactly what your agent is doing, why it's buying or passing on tokens, and how your PnL changes tick by tick.
37
-
38
- ## Watch Live
39
-
40
- The killer feature. Stream your agent's live thought process, trades, and PnL directly in your terminal:
41
-
42
- ```bash
43
- trenchfeed stream
44
- ```
45
-
46
- ```
47
- [thought] Scanning PumpFun feed... 3 new tokens detected
48
- [thought] Evaluating $BONK2 — mcap $12K, 47 holders, Ghost score 78/100
49
- [thought] Passed all filters. Entry looks good at 0.000012 SOL
50
- [trade] BUY $BONK2 — 0.25 SOL @ 0.000012
51
- [pnl] open: +0.0420 SOL | closed: +0.1850 SOL | positions: 2
52
- [thought] $BONK2 up 34% — approaching take profit at 50%
53
- [trade] SELL $BONK2 — +0.0850 SOL (+34.0%)
54
- [pnl] open: +0.0000 SOL | closed: +0.2700 SOL | positions: 1
55
- ```
56
-
57
- You can also **chat with your agent** while it trades:
5
+ ## Install
58
6
 
59
7
  ```bash
60
- trenchfeed chat "What tokens are you watching right now?"
8
+ npm i -g trenchfeed-cli
61
9
  ```
62
10
 
63
- Or watch the full live stream in your browser at `trenchfeed.com/stream/<agentId>` — complete with voice narration, PnL charts, and position management.
64
-
65
11
  ## Quick Start
66
12
 
67
13
  ```bash
68
- npm install -g trenchfeed-cli
69
- trenchfeed setup
14
+ trenchfeed setup # Interactive agent setup wizard
15
+ trenchfeed start # Start trading
16
+ trenchfeed status # Check PnL and positions
17
+ trenchfeed stream # Live event stream
70
18
  ```
71
19
 
72
- <details>
73
- <summary>From source</summary>
74
-
75
- ```bash
76
- git clone https://github.com/AJSignals/trenchfeed-cli.git
77
- cd trenchfeed-cli
78
- npm install
79
- npm run dev -- setup
80
- ```
81
- </details>
82
-
83
- The setup wizard walks you through authentication, agent configuration (strategy, risk params, filters, Twitter, voice), and deploys your agent. Config is saved to `~/.trenchfeed/cli.json`.
84
-
85
20
  ## Commands
86
21
 
87
22
  | Command | Description |
88
23
  |---------|-------------|
89
- | `trenchfeed setup` | Interactive agent setup wizard — full config |
90
- | `trenchfeed status` | Agent status, PnL, open positions |
24
+ | `trenchfeed setup` | Interactive agent setup wizard |
25
+ | `trenchfeed login` | Reconnect with existing API key |
26
+ | `trenchfeed logout` | Clear stored credentials |
91
27
  | `trenchfeed start` | Start trading |
92
28
  | `trenchfeed stop` | Stop trading |
93
- | `trenchfeed pause` | Pause trading (keeps positions open) |
94
- | `trenchfeed resume` | Resume paused agent |
95
- | `trenchfeed emergency` | Emergency stop sells ALL positions immediately |
96
- | `trenchfeed config` | View full agent config |
97
- | `trenchfeed config --set key=value` | Update any config value live |
98
- | `trenchfeed wallet` | Show wallet address + SOL balance |
99
- | `trenchfeed wallet --withdraw <addr> --amount <sol>` | Withdraw SOL to address |
100
- | `trenchfeed trades` | Recent trade history |
101
- | `trenchfeed trades -n 50` | Show last 50 trades |
102
- | `trenchfeed stream` | Live WebSocket stream — thoughts, trades, PnL |
103
- | `trenchfeed chat "message"` | Chat with your agent |
104
- | `trenchfeed logout` | Clear stored credentials |
29
+ | `trenchfeed pause` | Pause trading |
30
+ | `trenchfeed resume` | Resume trading |
31
+ | `trenchfeed emergency` | Emergency stop + sell all |
32
+ | `trenchfeed status` | Show agent status + PnL |
33
+ | `trenchfeed config` | View/update agent config |
34
+ | `trenchfeed wallet` | Show wallet address + balance |
35
+ | `trenchfeed trades` | Show recent trade history |
36
+ | `trenchfeed stream` | Live stream agent events |
37
+ | `trenchfeed chat <msg>` | Send a message to your agent |
105
38
 
106
39
  ## Strategies
107
40
 
108
- | Strategy | Description |
109
- |----------|-------------|
110
- | **Ghost Filtered** | Scans with Ghost V2 insider wallet cluster analysis before every trade. Highest safety. |
111
- | **Momentum** | Buys tokens showing strong 5m/1h price momentum. |
112
- | **Volume Spike** | Catches volume-driven moves early. |
113
- | **New Pairs** | Snipes newly created PumpFun tokens. |
114
- | **Custom** | Define your own strategy with a natural language prompt — powered by Claude AI. |
41
+ - **ghost-filtered** Ghost V2 insider detection, highest safety (default)
42
+ - **sniper** — Fastest execution (~400ms), skips AI eval
43
+ - **spread-farmer** 10-45% bonding curve, tight exits
44
+ - **whale-follower** Copy detected whale wallets
45
+ - **full-degen** Aggressive, minimal filters
46
+ - **custom** Define your own strategy with natural language
115
47
 
116
- ## Configuration
48
+ ## Config
117
49
 
118
- The setup wizard covers every option. You can also update any field live:
50
+ Config is stored at `~/.trenchfeed/cli.json`. Update via:
119
51
 
120
52
  ```bash
121
- trenchfeed config --set maxPositionSol=1.0
122
- trenchfeed config --set stopLossPct=15
123
- trenchfeed config --set dryRun=false
124
- trenchfeed config --set requireMintRevoked=true
53
+ trenchfeed config --set maxPositionSol=1
54
+ trenchfeed config --set stopLossPct=25
125
55
  ```
126
-
127
- ### Identity
128
-
129
- | Key | Type | Default | Description |
130
- |-----|------|---------|-------------|
131
- | `name` | string | TrenchAgent | Agent display name |
132
- | `personality` | string | — | Agent personality prompt |
133
- | `strategy` | string | ghost-filtered | Trading strategy |
134
- | `customStrategyPrompt` | string | — | Custom strategy prompt (for `custom` strategy) |
135
-
136
- ### Risk Management
137
-
138
- | Key | Type | Default | Description |
139
- |-----|------|---------|-------------|
140
- | `maxPositionSol` | number | 0.5 | Max SOL per position |
141
- | `maxTradeSizeSol` | number | 1 | Max SOL per single trade |
142
- | `maxConcurrentPositions` | number | 3 | Max tokens to hold at once |
143
- | `stopLossPct` | number | 20 | Sell if down this % |
144
- | `takeProfitPct` | number | 50 | Sell if up this % |
145
- | `dailyLossLimitSol` | number | 2 | Stop trading after losing this SOL |
146
- | `dryRun` | boolean | true | `true` = paper trading, `false` = live SOL |
147
-
148
- ### Ghost V2 Insider Detection
149
-
150
- | Key | Type | Default | Description |
151
- |-----|------|---------|-------------|
152
- | `ghostEnabled` | boolean | true | Enable Ghost V2 insider wallet scanning |
153
- | `minGhostScore` | number | 60 | Min score to buy (0-100, higher = pickier) |
154
-
155
- ### Automation
156
-
157
- | Key | Type | Default | Description |
158
- |-----|------|---------|-------------|
159
- | `autoTrade` | boolean | true | Execute trades automatically |
160
- | `confirmAboveSol` | number | — | Require confirmation above this SOL amount |
161
- | `allowFollowers` | boolean | false | Allow copy-trading |
162
- | `followerFeePercent` | number | 1 | Fee charged to followers on profits |
163
-
164
- ## Token Filters
165
-
166
- Set any filter to control what tokens the agent will buy. Only tokens passing **all** set filters are eligible.
167
-
168
- ### Market & Liquidity
169
-
170
- | Key | Type | Description |
171
- |-----|------|-------------|
172
- | `minMarketCap` | number | Min market cap in USD |
173
- | `maxMarketCap` | number | Max market cap in USD |
174
- | `minLiquidity` | number | Min liquidity in SOL |
175
- | `maxLiquidity` | number | Max liquidity in SOL |
176
-
177
- ### Token Age & Holders
178
-
179
- | Key | Type | Description |
180
- |-----|------|-------------|
181
- | `tokenAgeMinSeconds` | number | Min token age in seconds |
182
- | `tokenAgeMaxSeconds` | number | Max token age in seconds |
183
- | `minHolders` | number | Min holder count |
184
- | `maxHolders` | number | Max holder count |
185
-
186
- ### Bonding Curve
187
-
188
- | Key | Type | Description |
189
- |-----|------|-------------|
190
- | `minBondingProgress` | number | Min progress (0-1, e.g. `0.8` = 80%) |
191
- | `maxBondingProgress` | number | Max progress (0-1) |
192
- | `onlyGraduated` | boolean | Only buy tokens that graduated to Raydium/PumpSwap |
193
- | `onlyBondingCurve` | boolean | Only buy tokens still on bonding curve |
194
-
195
- ### Transaction Activity
196
-
197
- | Key | Type | Description |
198
- |-----|------|-------------|
199
- | `minBuyCount` | number | Min buy transactions |
200
- | `maxBuyCount` | number | Max buy transactions |
201
- | `minSellCount` | number | Min sell transactions |
202
- | `maxSellCount` | number | Max sell transactions |
203
- | `minTxCount` | number | Min total transactions |
204
-
205
- ### Volume & Price Momentum
206
-
207
- | Key | Type | Description |
208
- |-----|------|-------------|
209
- | `minVolume24h` | number | Min 24h volume in USD |
210
- | `maxVolume24h` | number | Max 24h volume in USD |
211
- | `minPriceChange5m` | number | Min 5-minute price change % |
212
- | `maxPriceChange5m` | number | Max 5-minute price change % |
213
- | `minPriceChange1h` | number | Min 1-hour price change % |
214
- | `maxPriceChange1h` | number | Max 1-hour price change % |
215
-
216
- ### Anti-Rug Filters
217
-
218
- | Key | Type | Description |
219
- |-----|------|-------------|
220
- | `maxTopHolderPct` | number | Skip if top holders own above this % |
221
- | `maxDevHoldingsPct` | number | Skip if dev holds above this % |
222
- | `rejectDevBlacklisted` | boolean | Skip if dev wallet is blacklisted |
223
- | `maxFreshWalletPct` | number | Skip if fresh wallets above this % of buys |
224
- | `maxBundledBuysPct` | number | Skip if bundled/sniped buys above this % |
225
-
226
- ### DexScreener & Security
227
-
228
- | Key | Type | Description |
229
- |-----|------|-------------|
230
- | `requireDexPaid` | boolean | Only buy tokens with paid DexScreener listing |
231
- | `minDexBoosts` | number | Min DexScreener boosts |
232
- | `requireMintRevoked` | boolean | Only buy if mint authority is revoked |
233
- | `requireFreezeRevoked` | boolean | Only buy if freeze authority is revoked |
234
- | `blacklistedMints` | string[] | Token addresses to never buy |
235
-
236
- ### Twitter Auto-Posting
237
-
238
- | Key | Type | Description |
239
- |-----|------|-------------|
240
- | `twitter.enabled` | boolean | Enable Twitter posting |
241
- | `twitter.events.buy` | boolean | Tweet on buy |
242
- | `twitter.events.sell` | boolean | Tweet on sell |
243
- | `twitter.events.dailySummary` | boolean | Post daily summary |
244
- | `twitter.approvalRequired` | boolean | Require approval before posting |
245
- | `twitter.autoPost` | boolean | Auto-post without manual trigger |
246
- | `twitter.maxPostsPerDay` | number | Max tweets per day |
247
- | `twitter.activeHoursStart` | number | Posting start hour (0-23) |
248
- | `twitter.activeHoursEnd` | number | Posting end hour (0-24) |
249
- | `twitter.weekendPosting` | boolean | Post on weekends |
250
- | `twitter.dryRun` | boolean | Log tweets but don't post |
251
-
252
- ### Voice Narration
253
-
254
- | Key | Type | Description |
255
- |-----|------|-------------|
256
- | `voice.enabled` | boolean | Enable voice narration |
257
- | `voice.voice` | string | Voice ID (Ryan, Aiden, Cherry, Serena, Ethan, Jada, Kai) |
258
- | `voice.instruct` | string | Voice instruction/tone |
259
- | `voice.narrateAll` | boolean | Narrate all events (not just trades) |
260
-
261
- ---
262
-
263
- ## API Reference
264
-
265
- Build your own integrations against the TrenchFeed API.
266
-
267
- **Base URL**: `https://trenchfeed-production.up.railway.app`
268
-
269
- ### Authentication
270
-
271
- ```
272
- Authorization: Bearer <api-key>
273
- ```
274
-
275
- Get your API key via `trenchfeed setup` or `POST /api/cli/register`.
276
-
277
- ### Platform
278
-
279
- | Method | Path | Auth | Description |
280
- |--------|------|------|-------------|
281
- | `GET` | `/health` | No | Server health + stats |
282
- | `GET` | `/api/cli/config` | No | Platform config (burn gate info) |
283
- | `GET` | `/api/config` | No | Full platform config |
284
-
285
- ### CLI Auth
286
-
287
- | Method | Path | Auth | Description |
288
- |--------|------|------|-------------|
289
- | `POST` | `/api/cli/register` | Yes | Register + create agent + get API key |
290
- | `POST` | `/api/cli/token` | Yes | Generate new API key |
291
-
292
- <details>
293
- <summary>Register request body</summary>
294
-
295
- ```json
296
- {
297
- "config": {
298
- "name": "MyAgent",
299
- "strategy": "ghost-filtered",
300
- "maxPositionSol": 0.5,
301
- "stopLossPct": 20,
302
- "takeProfitPct": 50
303
- },
304
- "burnTxSignature": "5KtP..."
305
- }
306
- ```
307
- </details>
308
-
309
- ### Agent Management
310
-
311
- | Method | Path | Auth | Description |
312
- |--------|------|------|-------------|
313
- | `GET` | `/api/agents/me` | Yes | Get your agent |
314
- | `GET` | `/api/agents/:id` | Yes | Agent detail + positions |
315
- | `POST` | `/api/agents/:id/start` | Yes | Start trading |
316
- | `POST` | `/api/agents/:id/stop` | Yes | Stop trading |
317
- | `POST` | `/api/agents/:id/pause` | Yes | Pause trading |
318
- | `POST` | `/api/agents/:id/resume` | Yes | Resume trading |
319
- | `POST` | `/api/agents/:id/emergency` | Yes | Emergency stop + sell all |
320
- | `PATCH` | `/api/agents/:id/config` | Yes | Update config (any field) |
321
- | `DELETE` | `/api/agents/:id` | Yes | Delete agent |
322
-
323
- <details>
324
- <summary>Update config request body</summary>
325
-
326
- ```json
327
- {
328
- "maxPositionSol": 1.0,
329
- "stopLossPct": 15,
330
- "dryRun": false,
331
- "requireMintRevoked": true
332
- }
333
- ```
334
- </details>
335
-
336
- ### Wallet
337
-
338
- | Method | Path | Auth | Description |
339
- |--------|------|------|-------------|
340
- | `GET` | `/api/agents/:id/wallet` | Yes | Wallet address + balance |
341
- | `POST` | `/api/agents/:id/wallet/withdraw` | Yes | Withdraw SOL |
342
-
343
- <details>
344
- <summary>Withdraw request body</summary>
345
-
346
- ```json
347
- {
348
- "toAddress": "Abc123...",
349
- "amountSol": 0.5
350
- }
351
- ```
352
- </details>
353
-
354
- ### Trades & Public
355
-
356
- | Method | Path | Auth | Description |
357
- |--------|------|------|-------------|
358
- | `GET` | `/api/agents/:id/trades?limit=50` | No | Trade history |
359
- | `GET` | `/api/agents/public` | No | All public agents |
360
- | `GET` | `/api/agents/public/:id` | No | Public agent detail |
361
- | `GET` | `/api/leaderboard` | No | Agent leaderboard |
362
- | `GET` | `/api/agents/:id/stats` | No | Agent stats (PnL, win rate, ROI) |
363
-
364
- ### Tips
365
-
366
- | Method | Path | Auth | Description |
367
- |--------|------|------|-------------|
368
- | `POST` | `/api/agents/:id/tip` | Yes | Send tip to agent |
369
- | `GET` | `/api/agents/:id/tips` | No | Tip history |
370
- | `GET` | `/api/agents/:id/tips/leaderboard` | No | Tip leaderboard |
371
- | `GET` | `/api/agents/:id/tips/total` | No | Total tips received |
372
-
373
- ## WebSocket
374
-
375
- Connect to real-time agent event streams.
376
-
377
- ```
378
- wss://trenchfeed-production.up.railway.app/ws/agents/:agentId
379
- ```
380
-
381
- ### Events
382
-
383
- | Event | Fields | Description |
384
- |-------|--------|-------------|
385
- | `thought` | `text` | Agent's reasoning and analysis |
386
- | `trade` | `action`, `mint`, `symbol`, `amountSol`, `price` | Buy/sell executed |
387
- | `pnl_update` | `openPnlSol`, `closedPnlSol`, `positions[]` | Live PnL + positions |
388
- | `status_change` | `oldStatus`, `newStatus` | Agent status changed |
389
- | `error` | `message` | Error occurred |
390
- | `chat_response` | `text` | Response to chat message |
391
-
392
- ### Send Chat
393
-
394
- ```json
395
- { "type": "chat", "text": "What tokens are you watching?" }
396
- ```
397
-
398
- ### Terminal Feed
399
-
400
- ```
401
- wss://trenchfeed-production.up.railway.app/ws/terminal
402
- ```
403
-
404
- Live PumpFun token feed — new pairs, migrations, graduations, candle data.
405
-
406
- ---
407
-
408
- ## Architecture
409
-
410
- ```
411
- ┌─────────────────────────────────────────────────────────────────────┐
412
- │ TrenchFeed Platform │
413
- ├─────────────┬──────────────┬──────────────┬────────────────────────┤
414
- │ CLI Tool │ Web Dashboard │ REST API │ WebSocket │
415
- │ (this pkg) │ (trenchfeed.com) │ │ /ws/agents/:id │
416
- └──────┬──────┴──────┬───────┴──────┬───────┴────────┬───────────────┘
417
- │ │ │ │
418
- └─────────────┴──────┬───────┴────────────────┘
419
-
420
- ┌─────────────▼─────────────┐
421
- │ Agent Manager │
422
- │ create / start / stop │
423
- │ config hot-reload │
424
- └─────────────┬─────────────┘
425
-
426
- ┌──────────────────┼──────────────────┐
427
- │ │ │
428
- ┌────────▼────────┐ ┌──────▼──────┐ ┌────────▼────────┐
429
- │ Trading Engine │ │ Ghost V2 │ │ Token Scanner │
430
- │ tick loop (5s) │ │ insider │ │ PumpFun WS + │
431
- │ buy/sell/manage │ │ detection │ │ Jupiter API │
432
- └────────┬────────┘ └─────────────┘ └─────────────────┘
433
-
434
- ┌────┴─────┐
435
- │ Jupiter │ PumpFun SDK │ Raydium │ Meteora
436
- │ Ultra │ (bonding │ (graduated│ (DLMM)
437
- │ Swap │ curve) │ tokens) │
438
- └──────────┘
439
- ```
440
-
441
- ## Requirements
442
-
443
- - **Node.js** 20+
444
- - **$TRENCH token burn** required to deploy an agent
445
- - **Solana wallet** for authentication
446
- - **SOL** in agent wallet for live trading (paper trading requires no funds)
447
-
448
- ## Development
449
-
450
- ```bash
451
- git clone https://github.com/AJSignals/trenchfeed-cli.git
452
- cd trenchfeed-cli
453
- npm install
454
- npm run dev -- setup # Run CLI in dev mode
455
- npm run build # Compile TypeScript
456
- npm start -- status # Run compiled CLI
457
- ```
458
-
459
- ## License
460
-
461
- [MIT](LICENSE)
462
-
463
- ---
464
-
465
- <p align="center">
466
- <sub>Built by <a href="https://github.com/AJSignals">AJSignals</a> &middot; Powered by Claude AI &middot; Trading on Solana</sub>
467
- </p>
package/dist/api.d.ts CHANGED
@@ -1,77 +1,18 @@
1
1
  /**
2
2
  * CLI API Client — REST client for TrenchFeed backend
3
3
  */
4
- export interface PlatformConfig {
5
- burnRequired: boolean;
6
- burnMint: string | null;
7
- burnAmount: number;
8
- burnTokenSymbol: string;
9
- }
10
- export interface AgentSummary {
11
- id: string;
12
- userId: string;
13
- status: string;
14
- strategy: string;
15
- name: string;
16
- dryRun?: boolean;
17
- positions: number;
18
- openPnlSol: number;
19
- closedPnlSol: number;
20
- totalTrades: number;
21
- wallet: {
22
- publicKey: string;
23
- };
24
- createdAt: number;
25
- startedAt: number | null;
26
- }
27
- export interface AgentDetail {
28
- id: string;
29
- userId: string;
30
- status: string;
31
- config: Record<string, unknown>;
32
- openPnlSol: number;
33
- closedPnlSol: number;
34
- totalTrades: number;
35
- wallet: {
36
- publicKey: string;
37
- };
38
- positions: Array<{
39
- mint: string;
40
- symbol?: string;
41
- amountSol: number;
42
- entryPrice: number;
43
- currentPrice?: number;
44
- unrealizedPnl?: number;
45
- unrealizedPnlPct?: number;
46
- }>;
47
- createdAt: number;
48
- startedAt: number | null;
49
- stoppedAt: number | null;
50
- }
51
- export interface TradeRecord {
52
- id: number;
53
- action: string;
54
- mint: string;
55
- symbol: string | null;
56
- amountSol: number | null;
57
- price: number | null;
58
- pnlSol: number | null;
59
- pnlPct: number | null;
60
- reason: string | null;
61
- createdAt: number;
62
- }
63
- export interface WalletInfo {
64
- publicKey: string;
65
- balance: number;
66
- lamports: number;
67
- }
68
4
  export declare const api: {
69
5
  health: () => Promise<{
70
6
  status: string;
71
7
  agents: number;
72
8
  running: number;
73
9
  }>;
74
- getCliConfig: () => Promise<PlatformConfig>;
10
+ getCliConfig: () => Promise<{
11
+ burnRequired: boolean;
12
+ burnMint: string | null;
13
+ burnAmount: number;
14
+ burnTokenSymbol: string;
15
+ }>;
75
16
  register: (walletToken: string, body: {
76
17
  config?: Record<string, unknown>;
77
18
  burnTxSignature?: string;
@@ -82,8 +23,47 @@ export declare const api: {
82
23
  status: string;
83
24
  message: string;
84
25
  }>;
85
- getMyAgent: () => Promise<AgentSummary[]>;
86
- getAgent: (id: string) => Promise<AgentDetail>;
26
+ getMyAgent: () => Promise<{
27
+ id: string;
28
+ userId: string;
29
+ status: string;
30
+ strategy: string;
31
+ name: string;
32
+ positions: number;
33
+ openPnlSol: number;
34
+ closedPnlSol: number;
35
+ totalTrades: number;
36
+ wallet: {
37
+ publicKey: string;
38
+ };
39
+ createdAt: number;
40
+ startedAt: number | null;
41
+ dryRun?: boolean;
42
+ }[]>;
43
+ getAgent: (id: string) => Promise<{
44
+ id: string;
45
+ userId: string;
46
+ status: string;
47
+ config: Record<string, unknown>;
48
+ openPnlSol: number;
49
+ closedPnlSol: number;
50
+ totalTrades: number;
51
+ wallet: {
52
+ publicKey: string;
53
+ };
54
+ positions: Array<{
55
+ mint: string;
56
+ symbol?: string;
57
+ amountSol: number;
58
+ entryPrice: number;
59
+ currentPrice?: number;
60
+ unrealizedPnl?: number;
61
+ unrealizedPnlPct?: number;
62
+ }>;
63
+ createdAt: number;
64
+ startedAt: number | null;
65
+ stoppedAt: number | null;
66
+ }>;
87
67
  startAgent: (id: string) => Promise<{
88
68
  status: string;
89
69
  }>;
@@ -102,8 +82,23 @@ export declare const api: {
102
82
  updateConfig: (id: string, config: Record<string, unknown>) => Promise<{
103
83
  config: Record<string, unknown>;
104
84
  }>;
105
- getWallet: (id: string) => Promise<WalletInfo>;
106
- getTrades: (id: string, limit?: number) => Promise<TradeRecord[]>;
85
+ getWallet: (id: string) => Promise<{
86
+ publicKey: string;
87
+ balance: number;
88
+ lamports: number;
89
+ }>;
90
+ getTrades: (id: string, limit?: number) => Promise<{
91
+ id: number;
92
+ action: string;
93
+ mint: string;
94
+ symbol: string | null;
95
+ amountSol: number | null;
96
+ price: number | null;
97
+ pnlSol: number | null;
98
+ pnlPct: number | null;
99
+ reason: string | null;
100
+ createdAt: number;
101
+ }[]>;
107
102
  withdraw: (id: string, toAddress: string, amountSol: number) => Promise<{
108
103
  signature: string;
109
104
  }>;
package/dist/api.js CHANGED
@@ -26,11 +26,9 @@ async function request(path, opts = {}) {
26
26
  }
27
27
  return res.json();
28
28
  }
29
- // ─── API Methods ──────────────────────────────────────────────────────────────
30
29
  exports.api = {
31
- // Health
32
30
  health: () => request('/health'),
33
- // Platform config (burn gate info)
31
+ // Platform config
34
32
  getCliConfig: () => request('/api/cli/config'),
35
33
  // CLI auth
36
34
  register: (walletToken, body) => request('/api/cli/register', { method: 'POST', body, token: walletToken }),
package/dist/index.d.ts CHANGED
@@ -15,6 +15,7 @@
15
15
  * trenchfeed trades — Show recent trade history
16
16
  * trenchfeed stream — Live stream agent events
17
17
  * trenchfeed chat <msg> — Send a message to your agent
18
+ * trenchfeed login — Reconnect with existing API key
18
19
  * trenchfeed logout — Clear stored credentials
19
20
  */
20
21
  export {};