trenchfeed-cli 0.2.0 → 0.2.1
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/LICENSE +21 -0
- package/README.md +433 -29
- package/package.json +12 -27
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 TrenchFeed
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
CHANGED
|
@@ -1,55 +1,459 @@
|
|
|
1
|
-
|
|
1
|
+
<p align="center">
|
|
2
|
+
<img src="https://www.trenchfeed.com/logo.png" alt="TrenchFeed" width="360">
|
|
3
|
+
</p>
|
|
2
4
|
|
|
3
|
-
|
|
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 · 28+ token filters · Paper & live trading · Real-time stream</sub>
|
|
9
|
+
</p>
|
|
4
10
|
|
|
5
|
-
|
|
11
|
+
<p align="center">
|
|
12
|
+
<a href="https://www.npmjs.com/package/trenchfeed-cli"><img src="https://img.shields.io/badge/npm-v0.2.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-6-orange" alt="6 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> ·
|
|
23
|
+
<a href="#watch-live">Watch Live</a> ·
|
|
24
|
+
<a href="#commands">Commands</a> ·
|
|
25
|
+
<a href="#strategies">Strategies</a> ·
|
|
26
|
+
<a href="#configuration">Configuration</a> ·
|
|
27
|
+
<a href="#token-filters">Filters</a> ·
|
|
28
|
+
<a href="#api-reference">API</a> ·
|
|
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:
|
|
6
58
|
|
|
7
59
|
```bash
|
|
8
|
-
|
|
60
|
+
trenchfeed chat "What tokens are you watching right now?"
|
|
9
61
|
```
|
|
10
62
|
|
|
63
|
+
Or watch the full live stream in your browser at `trenchfeed.fun/stream/<agentId>` — complete with voice narration, PnL charts, and position management.
|
|
64
|
+
|
|
11
65
|
## Quick Start
|
|
12
66
|
|
|
13
67
|
```bash
|
|
14
|
-
|
|
15
|
-
trenchfeed
|
|
16
|
-
trenchfeed status # Check PnL and positions
|
|
17
|
-
trenchfeed stream # Live event stream
|
|
68
|
+
npm install -g trenchfeed-cli
|
|
69
|
+
trenchfeed setup
|
|
18
70
|
```
|
|
19
71
|
|
|
72
|
+
<details>
|
|
73
|
+
<summary>From source</summary>
|
|
74
|
+
|
|
75
|
+
```bash
|
|
76
|
+
git clone https://github.com/TrenchFeedbot/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 wallet connection, strategy selection, risk limits, token filters, Twitter, and voice config. Stores your config at `~/.trenchfeed/cli.json`.
|
|
84
|
+
|
|
20
85
|
## Commands
|
|
21
86
|
|
|
22
87
|
| Command | Description |
|
|
23
88
|
|---------|-------------|
|
|
24
|
-
| `trenchfeed setup` | Interactive agent setup wizard |
|
|
89
|
+
| `trenchfeed setup` | Interactive agent setup wizard — full config |
|
|
25
90
|
| `trenchfeed login` | Reconnect with existing API key |
|
|
26
|
-
| `trenchfeed
|
|
91
|
+
| `trenchfeed status` | Agent status, PnL, open positions |
|
|
27
92
|
| `trenchfeed start` | Start trading |
|
|
28
93
|
| `trenchfeed stop` | Stop trading |
|
|
29
|
-
| `trenchfeed pause` | Pause trading |
|
|
30
|
-
| `trenchfeed resume` | Resume
|
|
31
|
-
| `trenchfeed emergency` | Emergency stop
|
|
32
|
-
| `trenchfeed
|
|
33
|
-
| `trenchfeed config` |
|
|
34
|
-
| `trenchfeed wallet` | Show wallet address + balance |
|
|
35
|
-
| `trenchfeed
|
|
36
|
-
| `trenchfeed
|
|
37
|
-
| `trenchfeed
|
|
94
|
+
| `trenchfeed pause` | Pause trading (keeps positions open) |
|
|
95
|
+
| `trenchfeed resume` | Resume paused agent |
|
|
96
|
+
| `trenchfeed emergency` | Emergency stop — sells ALL positions immediately |
|
|
97
|
+
| `trenchfeed config` | View full agent config |
|
|
98
|
+
| `trenchfeed config --set key=value` | Update any config value live |
|
|
99
|
+
| `trenchfeed wallet` | Show wallet address + SOL balance |
|
|
100
|
+
| `trenchfeed wallet --withdraw <addr> --amount <sol>` | Withdraw SOL to address |
|
|
101
|
+
| `trenchfeed trades` | Recent trade history |
|
|
102
|
+
| `trenchfeed trades -n 50` | Show last 50 trades |
|
|
103
|
+
| `trenchfeed stream` | Live WebSocket stream — thoughts, trades, PnL |
|
|
104
|
+
| `trenchfeed chat "message"` | Chat with your agent |
|
|
105
|
+
| `trenchfeed logout` | Clear stored credentials |
|
|
38
106
|
|
|
39
107
|
## Strategies
|
|
40
108
|
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
109
|
+
| Strategy | Description |
|
|
110
|
+
|----------|-------------|
|
|
111
|
+
| **Ghost Filtered** | Scans with Ghost V2 insider wallet cluster analysis before every trade. Highest safety. Default. |
|
|
112
|
+
| **Sniper** | Fastest execution (~400ms). gRPC event-driven, skips AI eval, Jito bundles. Fire-and-forget. |
|
|
113
|
+
| **Spread Farmer** | Targets 10-45% bonding curve range with tight exits. Scalp-style. |
|
|
114
|
+
| **Whale Follower** | Copies detected whale wallet moves in real-time. |
|
|
115
|
+
| **Full Degen** | Aggressive trading with minimal filters. High risk, high reward. |
|
|
116
|
+
| **Custom** | Define your own strategy with a natural language prompt — powered by Claude AI. |
|
|
47
117
|
|
|
48
|
-
##
|
|
118
|
+
## Configuration
|
|
49
119
|
|
|
50
|
-
|
|
120
|
+
The setup wizard covers every option. You can also update any field live:
|
|
51
121
|
|
|
52
122
|
```bash
|
|
53
|
-
trenchfeed config --set maxPositionSol=1
|
|
54
|
-
trenchfeed config --set stopLossPct=
|
|
123
|
+
trenchfeed config --set maxPositionSol=1.0
|
|
124
|
+
trenchfeed config --set stopLossPct=15
|
|
125
|
+
trenchfeed config --set dryRun=false
|
|
126
|
+
trenchfeed config --set requireMintRevoked=true
|
|
55
127
|
```
|
|
128
|
+
|
|
129
|
+
### Identity
|
|
130
|
+
|
|
131
|
+
| Key | Type | Default | Description |
|
|
132
|
+
|-----|------|---------|-------------|
|
|
133
|
+
| `name` | string | TrenchAgent | Agent display name |
|
|
134
|
+
| `personality` | string | — | Agent personality prompt |
|
|
135
|
+
| `strategy` | string | ghost-filtered | Trading strategy |
|
|
136
|
+
| `executionMode` | string | default | Execution mode: `default`, `sniper`, or `careful` |
|
|
137
|
+
| `customStrategyPrompt` | string | — | Custom strategy prompt (for `custom` strategy) |
|
|
138
|
+
|
|
139
|
+
### Risk Management
|
|
140
|
+
|
|
141
|
+
| Key | Type | Default | Description |
|
|
142
|
+
|-----|------|---------|-------------|
|
|
143
|
+
| `maxPositionSol` | number | 0.5 | Max SOL per position |
|
|
144
|
+
| `maxTradeSizeSol` | number | 1 | Max SOL per single trade |
|
|
145
|
+
| `maxConcurrentPositions` | number | 3 | Max tokens to hold at once |
|
|
146
|
+
| `stopLossPct` | number | 20 | Sell if down this % |
|
|
147
|
+
| `takeProfitPct` | number | 50 | Sell if up this % |
|
|
148
|
+
| `dailyLossLimitSol` | number | 2 | Stop trading after losing this SOL |
|
|
149
|
+
| `dryRun` | boolean | true | `true` = paper trading, `false` = live SOL |
|
|
150
|
+
|
|
151
|
+
### Ghost V2 Insider Detection
|
|
152
|
+
|
|
153
|
+
| Key | Type | Default | Description |
|
|
154
|
+
|-----|------|---------|-------------|
|
|
155
|
+
| `ghostEnabled` | boolean | true | Enable Ghost V2 insider wallet scanning |
|
|
156
|
+
| `minGhostScore` | number | 60 | Min score to buy (0-100, higher = pickier) |
|
|
157
|
+
|
|
158
|
+
### Automation
|
|
159
|
+
|
|
160
|
+
| Key | Type | Default | Description |
|
|
161
|
+
|-----|------|---------|-------------|
|
|
162
|
+
| `autoTrade` | boolean | true | Execute trades automatically |
|
|
163
|
+
| `confirmAboveSol` | number | — | Require confirmation above this SOL amount |
|
|
164
|
+
| `allowFollowers` | boolean | false | Allow copy-trading |
|
|
165
|
+
| `followerFeePercent` | number | 1 | Fee charged to followers on profits |
|
|
166
|
+
|
|
167
|
+
## Token Filters
|
|
168
|
+
|
|
169
|
+
Set any filter to control what tokens the agent will buy. Only tokens passing **all** set filters are eligible.
|
|
170
|
+
|
|
171
|
+
### Market & Liquidity
|
|
172
|
+
|
|
173
|
+
| Key | Type | Description |
|
|
174
|
+
|-----|------|-------------|
|
|
175
|
+
| `minMarketCap` | number | Min market cap in USD |
|
|
176
|
+
| `maxMarketCap` | number | Max market cap in USD |
|
|
177
|
+
| `minLiquidity` | number | Min liquidity in SOL |
|
|
178
|
+
| `maxLiquidity` | number | Max liquidity in SOL |
|
|
179
|
+
|
|
180
|
+
### Token Age & Holders
|
|
181
|
+
|
|
182
|
+
| Key | Type | Description |
|
|
183
|
+
|-----|------|-------------|
|
|
184
|
+
| `tokenAgeMinSeconds` | number | Min token age in seconds |
|
|
185
|
+
| `tokenAgeMaxSeconds` | number | Max token age in seconds |
|
|
186
|
+
| `minHolders` | number | Min holder count |
|
|
187
|
+
| `maxHolders` | number | Max holder count |
|
|
188
|
+
|
|
189
|
+
### Bonding Curve
|
|
190
|
+
|
|
191
|
+
| Key | Type | Description |
|
|
192
|
+
|-----|------|-------------|
|
|
193
|
+
| `minBondingProgress` | number | Min progress (0-1, e.g. `0.8` = 80%) |
|
|
194
|
+
| `maxBondingProgress` | number | Max progress (0-1) |
|
|
195
|
+
| `onlyGraduated` | boolean | Only buy tokens that graduated to Raydium/PumpSwap |
|
|
196
|
+
| `onlyBondingCurve` | boolean | Only buy tokens still on bonding curve |
|
|
197
|
+
|
|
198
|
+
### Transaction Activity
|
|
199
|
+
|
|
200
|
+
| Key | Type | Description |
|
|
201
|
+
|-----|------|-------------|
|
|
202
|
+
| `minBuyCount` | number | Min buy transactions |
|
|
203
|
+
| `maxBuyCount` | number | Max buy transactions |
|
|
204
|
+
| `minSellCount` | number | Min sell transactions |
|
|
205
|
+
| `maxSellCount` | number | Max sell transactions |
|
|
206
|
+
| `minTxCount` | number | Min total transactions |
|
|
207
|
+
|
|
208
|
+
### Volume & Price Momentum
|
|
209
|
+
|
|
210
|
+
| Key | Type | Description |
|
|
211
|
+
|-----|------|-------------|
|
|
212
|
+
| `minVolume24h` | number | Min 24h volume in USD |
|
|
213
|
+
| `maxVolume24h` | number | Max 24h volume in USD |
|
|
214
|
+
| `minPriceChange5m` | number | Min 5-minute price change % |
|
|
215
|
+
| `maxPriceChange5m` | number | Max 5-minute price change % |
|
|
216
|
+
| `minPriceChange1h` | number | Min 1-hour price change % |
|
|
217
|
+
| `maxPriceChange1h` | number | Max 1-hour price change % |
|
|
218
|
+
|
|
219
|
+
### Anti-Rug Filters
|
|
220
|
+
|
|
221
|
+
| Key | Type | Description |
|
|
222
|
+
|-----|------|-------------|
|
|
223
|
+
| `maxTopHolderPct` | number | Skip if top holders own above this % |
|
|
224
|
+
| `maxDevHoldingsPct` | number | Skip if dev holds above this % |
|
|
225
|
+
| `rejectDevBlacklisted` | boolean | Skip if dev wallet is blacklisted |
|
|
226
|
+
| `maxFreshWalletPct` | number | Skip if fresh wallets above this % of buys |
|
|
227
|
+
| `maxBundledBuysPct` | number | Skip if bundled/sniped buys above this % |
|
|
228
|
+
|
|
229
|
+
### DexScreener & Security
|
|
230
|
+
|
|
231
|
+
| Key | Type | Description |
|
|
232
|
+
|-----|------|-------------|
|
|
233
|
+
| `requireDexPaid` | boolean | Only buy tokens with paid DexScreener listing |
|
|
234
|
+
| `minDexBoosts` | number | Min DexScreener boosts |
|
|
235
|
+
| `requireMintRevoked` | boolean | Only buy if mint authority is revoked |
|
|
236
|
+
| `requireFreezeRevoked` | boolean | Only buy if freeze authority is revoked |
|
|
237
|
+
| `blacklistedMints` | string[] | Token addresses to never buy |
|
|
238
|
+
|
|
239
|
+
### Twitter Auto-Posting
|
|
240
|
+
|
|
241
|
+
| Key | Type | Description |
|
|
242
|
+
|-----|------|-------------|
|
|
243
|
+
| `twitter.enabled` | boolean | Enable Twitter posting |
|
|
244
|
+
| `twitter.events.buy` | boolean | Tweet on buy |
|
|
245
|
+
| `twitter.events.sell` | boolean | Tweet on sell |
|
|
246
|
+
| `twitter.events.dailySummary` | boolean | Post daily summary |
|
|
247
|
+
| `twitter.approvalRequired` | boolean | Require approval before posting |
|
|
248
|
+
| `twitter.autoPost` | boolean | Auto-post without manual trigger |
|
|
249
|
+
| `twitter.maxPostsPerDay` | number | Max tweets per day |
|
|
250
|
+
| `twitter.activeHoursStart` | number | Posting start hour (0-23) |
|
|
251
|
+
| `twitter.activeHoursEnd` | number | Posting end hour (0-24) |
|
|
252
|
+
| `twitter.weekendPosting` | boolean | Post on weekends |
|
|
253
|
+
| `twitter.dryRun` | boolean | Log tweets but don't post |
|
|
254
|
+
|
|
255
|
+
### Voice Narration
|
|
256
|
+
|
|
257
|
+
| Key | Type | Description |
|
|
258
|
+
|-----|------|-------------|
|
|
259
|
+
| `voice.enabled` | boolean | Enable voice narration |
|
|
260
|
+
| `voice.voice` | string | Voice ID (Ryan, Aiden, Cherry, Serena, Ethan, Jada, Kai) |
|
|
261
|
+
| `voice.instruct` | string | Voice instruction/tone |
|
|
262
|
+
| `voice.narrateAll` | boolean | Narrate all events (not just trades) |
|
|
263
|
+
|
|
264
|
+
---
|
|
265
|
+
|
|
266
|
+
## API Reference
|
|
267
|
+
|
|
268
|
+
Build your own integrations against the TrenchFeed API.
|
|
269
|
+
|
|
270
|
+
**Base URL**: `https://trenchfeed-api-production.up.railway.app`
|
|
271
|
+
|
|
272
|
+
### Authentication
|
|
273
|
+
|
|
274
|
+
```
|
|
275
|
+
Authorization: Bearer <api-key>
|
|
276
|
+
```
|
|
277
|
+
|
|
278
|
+
Get your API key via `trenchfeed setup` or `POST /api/cli/register`.
|
|
279
|
+
|
|
280
|
+
### Platform
|
|
281
|
+
|
|
282
|
+
| Method | Path | Auth | Description |
|
|
283
|
+
|--------|------|------|-------------|
|
|
284
|
+
| `GET` | `/health` | No | Server health + stats |
|
|
285
|
+
| `GET` | `/api/cli/config` | No | Platform config (burn gate info) |
|
|
286
|
+
| `GET` | `/api/config` | No | Full platform config |
|
|
287
|
+
|
|
288
|
+
### CLI Auth
|
|
289
|
+
|
|
290
|
+
| Method | Path | Auth | Description |
|
|
291
|
+
|--------|------|------|-------------|
|
|
292
|
+
| `POST` | `/api/cli/register` | Yes | Register + create agent + get API key |
|
|
293
|
+
| `POST` | `/api/cli/token` | Yes | Generate new API key |
|
|
294
|
+
|
|
295
|
+
<details>
|
|
296
|
+
<summary>Register request body</summary>
|
|
297
|
+
|
|
298
|
+
```json
|
|
299
|
+
{
|
|
300
|
+
"config": {
|
|
301
|
+
"name": "MyAgent",
|
|
302
|
+
"strategy": "ghost-filtered",
|
|
303
|
+
"maxPositionSol": 0.5,
|
|
304
|
+
"stopLossPct": 20,
|
|
305
|
+
"takeProfitPct": 50
|
|
306
|
+
},
|
|
307
|
+
"burnTxSignature": "5KtP..."
|
|
308
|
+
}
|
|
309
|
+
```
|
|
310
|
+
</details>
|
|
311
|
+
|
|
312
|
+
### Agent Management
|
|
313
|
+
|
|
314
|
+
| Method | Path | Auth | Description |
|
|
315
|
+
|--------|------|------|-------------|
|
|
316
|
+
| `GET` | `/api/agents/me` | Yes | Get your agent |
|
|
317
|
+
| `GET` | `/api/agents/:id` | Yes | Agent detail + positions |
|
|
318
|
+
| `POST` | `/api/agents/:id/start` | Yes | Start trading |
|
|
319
|
+
| `POST` | `/api/agents/:id/stop` | Yes | Stop trading |
|
|
320
|
+
| `POST` | `/api/agents/:id/pause` | Yes | Pause trading |
|
|
321
|
+
| `POST` | `/api/agents/:id/resume` | Yes | Resume trading |
|
|
322
|
+
| `POST` | `/api/agents/:id/emergency` | Yes | Emergency stop + sell all |
|
|
323
|
+
| `PATCH` | `/api/agents/:id/config` | Yes | Update config (any field) |
|
|
324
|
+
| `DELETE` | `/api/agents/:id` | Yes | Delete agent |
|
|
325
|
+
|
|
326
|
+
<details>
|
|
327
|
+
<summary>Update config request body</summary>
|
|
328
|
+
|
|
329
|
+
```json
|
|
330
|
+
{
|
|
331
|
+
"maxPositionSol": 1.0,
|
|
332
|
+
"stopLossPct": 15,
|
|
333
|
+
"dryRun": false,
|
|
334
|
+
"requireMintRevoked": true
|
|
335
|
+
}
|
|
336
|
+
```
|
|
337
|
+
</details>
|
|
338
|
+
|
|
339
|
+
### Wallet
|
|
340
|
+
|
|
341
|
+
| Method | Path | Auth | Description |
|
|
342
|
+
|--------|------|------|-------------|
|
|
343
|
+
| `GET` | `/api/agents/:id/wallet` | Yes | Wallet address + balance |
|
|
344
|
+
| `POST` | `/api/agents/:id/wallet/withdraw` | Yes | Withdraw SOL |
|
|
345
|
+
|
|
346
|
+
<details>
|
|
347
|
+
<summary>Withdraw request body</summary>
|
|
348
|
+
|
|
349
|
+
```json
|
|
350
|
+
{
|
|
351
|
+
"toAddress": "Abc123...",
|
|
352
|
+
"amountSol": 0.5
|
|
353
|
+
}
|
|
354
|
+
```
|
|
355
|
+
</details>
|
|
356
|
+
|
|
357
|
+
### Trades & Public
|
|
358
|
+
|
|
359
|
+
| Method | Path | Auth | Description |
|
|
360
|
+
|--------|------|------|-------------|
|
|
361
|
+
| `GET` | `/api/agents/:id/trades?limit=50` | No | Trade history |
|
|
362
|
+
| `GET` | `/api/agents/public` | No | All public agents |
|
|
363
|
+
| `GET` | `/api/agents/public/:id` | No | Public agent detail |
|
|
364
|
+
| `GET` | `/api/leaderboard` | No | Agent leaderboard |
|
|
365
|
+
| `GET` | `/api/agents/:id/stats` | No | Agent stats (PnL, win rate, ROI) |
|
|
366
|
+
|
|
367
|
+
### Tips
|
|
368
|
+
|
|
369
|
+
| Method | Path | Auth | Description |
|
|
370
|
+
|--------|------|------|-------------|
|
|
371
|
+
| `POST` | `/api/agents/:id/tip` | Yes | Send tip to agent |
|
|
372
|
+
| `GET` | `/api/agents/:id/tips` | No | Tip history |
|
|
373
|
+
| `GET` | `/api/agents/:id/tips/leaderboard` | No | Tip leaderboard |
|
|
374
|
+
| `GET` | `/api/agents/:id/tips/total` | No | Total tips received |
|
|
375
|
+
|
|
376
|
+
## WebSocket
|
|
377
|
+
|
|
378
|
+
Connect to real-time agent event streams.
|
|
379
|
+
|
|
380
|
+
```
|
|
381
|
+
wss://trenchfeed-api-production.up.railway.app/ws/agents/:agentId
|
|
382
|
+
```
|
|
383
|
+
|
|
384
|
+
### Events
|
|
385
|
+
|
|
386
|
+
| Event | Fields | Description |
|
|
387
|
+
|-------|--------|-------------|
|
|
388
|
+
| `thought` | `text` | Agent's reasoning and analysis |
|
|
389
|
+
| `trade` | `action`, `mint`, `symbol`, `amountSol`, `price` | Buy/sell executed |
|
|
390
|
+
| `pnl_update` | `openPnlSol`, `closedPnlSol`, `positions[]` | Live PnL + positions |
|
|
391
|
+
| `status_change` | `oldStatus`, `newStatus` | Agent status changed |
|
|
392
|
+
| `error` | `message` | Error occurred |
|
|
393
|
+
| `chat_response` | `text` | Response to chat message |
|
|
394
|
+
|
|
395
|
+
### Send Chat
|
|
396
|
+
|
|
397
|
+
```json
|
|
398
|
+
{ "type": "chat", "text": "What tokens are you watching?" }
|
|
399
|
+
```
|
|
400
|
+
|
|
401
|
+
### Terminal Feed
|
|
402
|
+
|
|
403
|
+
```
|
|
404
|
+
wss://trenchfeed-api-production.up.railway.app/ws/terminal
|
|
405
|
+
```
|
|
406
|
+
|
|
407
|
+
Live PumpFun token feed — new pairs, migrations, graduations, candle data.
|
|
408
|
+
|
|
409
|
+
---
|
|
410
|
+
|
|
411
|
+
## Architecture
|
|
412
|
+
|
|
413
|
+
```
|
|
414
|
+
┌─────────────────────────────────────────────────────────────────────┐
|
|
415
|
+
│ TrenchFeed Platform │
|
|
416
|
+
├─────────────┬──────────────┬──────────────┬────────────────────────┤
|
|
417
|
+
│ CLI Tool │ Web Dashboard │ REST API │ WebSocket │
|
|
418
|
+
│ (this pkg) │ (trenchfeed.fun) │ │ /ws/agents/:id │
|
|
419
|
+
└──────┬──────┴──────┬───────┴──────┬───────┴────────┬───────────────┘
|
|
420
|
+
│ │ │ │
|
|
421
|
+
└─────────────┴──────┬───────┴────────────────┘
|
|
422
|
+
│
|
|
423
|
+
┌─────────────▼─────────────┐
|
|
424
|
+
│ Agent Manager │
|
|
425
|
+
│ create / start / stop │
|
|
426
|
+
│ config hot-reload │
|
|
427
|
+
└─────────────┬─────────────┘
|
|
428
|
+
│
|
|
429
|
+
┌──────────────────┼──────────────────┐
|
|
430
|
+
│ │ │
|
|
431
|
+
┌────────▼────────┐ ┌──────▼──────┐ ┌────────▼────────┐
|
|
432
|
+
│ Trading Engine │ │ Ghost V2 │ │ Token Scanner │
|
|
433
|
+
│ tick loop (5s) │ │ insider │ │ PumpFun WS + │
|
|
434
|
+
│ buy/sell/manage │ │ detection │ │ DexScreener │
|
|
435
|
+
└────────┬────────┘ └─────────────┘ └─────────────────┘
|
|
436
|
+
│
|
|
437
|
+
┌────┴─────┐
|
|
438
|
+
│ PumpFun │ Sniper Engine │ Raydium │ Meteora
|
|
439
|
+
│ SDK │ (gRPC+Jito, │ (graduated│ (DLMM)
|
|
440
|
+
│ (bonding │ <50ms) │ tokens) │
|
|
441
|
+
│ curve) │ │ │
|
|
442
|
+
└──────────┘
|
|
443
|
+
```
|
|
444
|
+
|
|
445
|
+
## Requirements
|
|
446
|
+
|
|
447
|
+
- **Node.js** 20+
|
|
448
|
+
- **Solana wallet** for authentication
|
|
449
|
+
- **SOL** in agent wallet for live trading (paper trading requires no funds)
|
|
450
|
+
|
|
451
|
+
## License
|
|
452
|
+
|
|
453
|
+
[MIT](LICENSE)
|
|
454
|
+
|
|
455
|
+
---
|
|
456
|
+
|
|
457
|
+
<p align="center">
|
|
458
|
+
<sub>Built by <a href="https://github.com/TrenchFeedbot">TrenchFeed</a> · Powered by Claude AI · Trading on Solana</sub>
|
|
459
|
+
</p>
|
package/package.json
CHANGED
|
@@ -1,34 +1,19 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "trenchfeed-cli",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.1",
|
|
4
4
|
"description": "CLI for TrenchFeed — deploy and manage AI trading agents on Solana from your terminal.",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
|
-
"bin": {
|
|
7
|
-
|
|
6
|
+
"bin": { "trenchfeed": "dist/index.js" },
|
|
7
|
+
"repository": {
|
|
8
|
+
"type": "git",
|
|
9
|
+
"url": "https://github.com/TrenchFeedbot/trenchfeed-cli.git"
|
|
8
10
|
},
|
|
9
|
-
"
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
"keywords": [
|
|
15
|
-
"trenchfeed",
|
|
16
|
-
"solana",
|
|
17
|
-
"memecoin",
|
|
18
|
-
"trading",
|
|
19
|
-
"ai-agent",
|
|
20
|
-
"cli"
|
|
21
|
-
],
|
|
22
|
-
"author": "AJSignals",
|
|
11
|
+
"homepage": "https://github.com/TrenchFeedbot/trenchfeed-cli",
|
|
12
|
+
"bugs": "https://github.com/TrenchFeedbot/trenchfeed-cli/issues",
|
|
13
|
+
"scripts": { "build": "tsc", "start": "node dist/index.js", "dev": "tsx src/index.ts" },
|
|
14
|
+
"keywords": ["trenchfeed","solana","memecoin","trading","ai-agent","cli"],
|
|
15
|
+
"author": "TrenchFeed",
|
|
23
16
|
"license": "MIT",
|
|
24
|
-
"engines": {
|
|
25
|
-
|
|
26
|
-
},
|
|
27
|
-
"dependencies": {
|
|
28
|
-
"chalk": "^5.3.0",
|
|
29
|
-
"commander": "^14.0.3",
|
|
30
|
-
"figlet": "^1.10.0",
|
|
31
|
-
"inquirer": "^13.2.5",
|
|
32
|
-
"ws": "^8.16.0"
|
|
33
|
-
}
|
|
17
|
+
"engines": { "node": ">=20.0.0" },
|
|
18
|
+
"dependencies": { "chalk": "^5.3.0", "commander": "^14.0.3", "figlet": "^1.10.0", "inquirer": "^13.2.5", "ws": "^8.16.0" }
|
|
34
19
|
}
|