You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Fix all TypeScript errors + add gateway server and realtime alerts
TypeScript fixes:
- Fix 'this' references in extension factory functions (memory-lancedb,
open-prose, copilot-proxy, google-auth, llm-task, lobster)
- Add type annotations to feed methods (drift, betfair, smarkets)
- Fix db.run() return type usage (logger, secrets, builder)
- Fix tuple types in kalshi orderbook
- Fix sharp module import types
- Add type declarations for tmi.js and lancedb
- Fix export conflicts in trading/index.ts
New features:
- Add gateway server with REST API and WebSocket support
- Add realtime alerts system
- Expand trading documentation
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
| dryRun | Simulate trades without executing (recommended for testing) |
200
+
| minEdge | Minimum edge % to trigger execution |
201
+
| maxPositionSize | Max USD per trade |
202
+
| maxDailyLoss | Stop executing if daily loss exceeds this |
203
+
| maxConcurrentPositions | Maximum simultaneous positions |
204
+
| confirmationDelayMs | Wait time before executing (allows price recheck) |
205
+
206
+
The executor listens for opportunities from the opportunity finder and automatically places orders when criteria are met. Always test with `dryRun: true` first.
207
+
208
+
## Real-time Alerts
209
+
210
+
Push notifications for trading events. Configure in `clodds.json`:
211
+
212
+
```json
213
+
{
214
+
"realtimeAlerts": {
215
+
"enabled": true,
216
+
"targets": [
217
+
{ "platform": "telegram", "chatId": "123456789" }
218
+
],
219
+
"whaleTrades": {
220
+
"enabled": true,
221
+
"minSize": 50000,
222
+
"cooldownMs": 300000
223
+
},
224
+
"arbitrage": {
225
+
"enabled": true,
226
+
"minEdge": 2,
227
+
"cooldownMs": 600000
228
+
},
229
+
"priceMovement": {
230
+
"enabled": true,
231
+
"minChangePct": 5,
232
+
"windowMs": 300000
233
+
},
234
+
"copyTrading": {
235
+
"enabled": true,
236
+
"onCopied": true,
237
+
"onFailed": true
238
+
}
239
+
}
240
+
}
241
+
```
242
+
243
+
| Alert Type | Trigger |
244
+
|------------|---------|
245
+
| Whale Trade | Large trades above minSize threshold |
246
+
| Arbitrage | Opportunities above minEdge % |
247
+
| Price Movement | Price changes above minChangePct % |
248
+
| Copy Trading | When trades are copied or fail |
249
+
250
+
## Performance Dashboard
251
+
252
+
Access the web-based performance dashboard at:
253
+
254
+
```
255
+
http://127.0.0.1:18789/dashboard
256
+
```
257
+
258
+
The dashboard shows:
259
+
- Total trades and win rate
260
+
- Cumulative P&L with interactive chart
261
+
- Sharpe ratio and max drawdown
262
+
- Strategy breakdown with P&L per strategy
263
+
- Recent trades table with entry/exit prices
264
+
265
+
API endpoint for programmatic access:
266
+
```
267
+
GET /api/performance
268
+
```
169
269
170
270
## Portfolio and P&L
171
271
@@ -287,6 +387,83 @@ MEV protection is automatically enabled for swaps:
287
387
-**Solana**: Jito bundles
288
388
-**L2s**: Sequencer protection (built-in)
289
389
390
+
## Telegram Mini App
391
+
392
+
Access Clodds as a Telegram Mini App (Web App) for mobile-friendly portfolio and market access.
393
+
394
+
### Setup
395
+
396
+
1. Register your Mini App with BotFather:
397
+
```
398
+
/newapp
399
+
```
400
+
401
+
2. Set the Web App URL to your gateway:
402
+
```
403
+
https://your-domain.com/miniapp
404
+
```
405
+
406
+
3. Users can access via the menu button in your bot's chat.
407
+
408
+
### Features
409
+
410
+
-**Portfolio**: View total value, P&L, and recent positions
411
+
-**Markets**: Search prediction markets across platforms
412
+
-**Arbitrage**: Scan for opportunities with one tap
413
+
414
+
The Mini App uses Telegram's native theming and haptic feedback for a native experience.
415
+
416
+
### Direct Link
417
+
418
+
Share the Mini App directly:
419
+
```
420
+
https://t.me/YourBot/app
421
+
```
422
+
423
+
## Data Sources
424
+
425
+
Clodds integrates multiple external data sources for edge detection and trading signals.
426
+
427
+
### News Feed
428
+
429
+
RSS feeds from political and financial news sources:
430
+
- Reuters Politics
431
+
- NPR Politics
432
+
- Politico
433
+
- FiveThirtyEight
434
+
435
+
Twitter/X integration (requires `X_BEARER_TOKEN` or `TWITTER_BEARER_TOKEN`):
0 commit comments