prab-cli 1.2.6 → 1.2.7

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.
@@ -23,6 +23,7 @@ const strategy_engine_1 = require("../lib/crypto/strategy-engine");
23
23
  const market_analyzer_1 = require("../lib/crypto/market-analyzer");
24
24
  const orderblock_strategy_1 = require("../lib/crypto/orderblock-strategy");
25
25
  const ict_strategy_1 = require("../lib/crypto/ict-strategy");
26
+ const strategy_1 = require("../lib/crypto/strategy");
26
27
  const app = (0, express_1.default)();
27
28
  const PORT = process.env.PORT || 3000;
28
29
  // CORS Configuration for Vercel
@@ -66,6 +67,7 @@ app.get("/", (req, res) => {
66
67
  smc: "GET /api/smc/:symbol",
67
68
  orderblock: "GET /api/orderblock/:symbol",
68
69
  ict: "GET /api/ict/:symbol",
70
+ smart: "GET /api/smart/:symbol - Smart Trend Confluence Strategy",
69
71
  strategy: "GET /api/strategy/:symbol",
70
72
  price: "GET /api/price/:symbol",
71
73
  },
@@ -286,6 +288,74 @@ app.get("/api/ict/:symbol", async (req, res) => {
286
288
  });
287
289
  }
288
290
  });
291
+ /**
292
+ * Smart Trend Confluence Strategy
293
+ * High-probability trading with multi-timeframe analysis
294
+ * GET /api/smart/:symbol?htf=4h&ltf=1h
295
+ */
296
+ app.get("/api/smart/:symbol", async (req, res) => {
297
+ try {
298
+ const { symbol } = req.params;
299
+ const htfInterval = req.query.htf || "4h";
300
+ const ltfInterval = req.query.ltf || "1h";
301
+ const result = await (0, strategy_1.generateStrategySignal)(symbol, htfInterval, ltfInterval);
302
+ res.json({
303
+ success: true,
304
+ data: {
305
+ symbol: symbol.toUpperCase() + "USDT",
306
+ signal: result.signal,
307
+ direction: result.direction,
308
+ confluenceScore: {
309
+ total: result.score.total,
310
+ meetsMinimum: result.score.meetsMinimum,
311
+ breakdown: result.score.breakdown,
312
+ factors: result.score.factors,
313
+ },
314
+ tradeSetup: {
315
+ entry: result.entry,
316
+ stopLoss: result.stopLoss,
317
+ takeProfit1: result.takeProfit1,
318
+ takeProfit2: result.takeProfit2,
319
+ riskRewardRatio: result.riskRewardRatio,
320
+ },
321
+ timeframes: {
322
+ higher: {
323
+ interval: result.higherTimeframe.interval,
324
+ trend: result.higherTimeframe.trend,
325
+ ema10: result.higherTimeframe.ema10,
326
+ ema20: result.higherTimeframe.ema20,
327
+ ema50: result.higherTimeframe.ema50,
328
+ ema200: result.higherTimeframe.ema200,
329
+ rsi: result.higherTimeframe.rsi,
330
+ },
331
+ lower: {
332
+ interval: result.lowerTimeframe.interval,
333
+ trend: result.lowerTimeframe.trend,
334
+ ema10: result.lowerTimeframe.ema10,
335
+ ema20: result.lowerTimeframe.ema20,
336
+ ema50: result.lowerTimeframe.ema50,
337
+ ema200: result.lowerTimeframe.ema200,
338
+ rsi: result.lowerTimeframe.rsi,
339
+ emaTilt: result.lowerTimeframe.emaTilt,
340
+ },
341
+ },
342
+ pullback: result.pullback,
343
+ candlePattern: result.candlePattern,
344
+ keyLevels: result.keyLevels,
345
+ volume: result.volume,
346
+ reasoning: result.reasoning,
347
+ warnings: result.warnings,
348
+ },
349
+ timestamp: Date.now(),
350
+ });
351
+ }
352
+ catch (error) {
353
+ res.status(500).json({
354
+ success: false,
355
+ error: error.message || "Internal server error",
356
+ });
357
+ }
358
+ });
289
359
  /**
290
360
  * Full Trading Strategy
291
361
  * GET /api/strategy/:symbol?style=moderate&direction=both&leverage=20
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "prab-cli",
3
- "version": "1.2.6",
3
+ "version": "1.2.7",
4
4
  "description": "AI-powered coding assistant for your terminal. Built with Groq's lightning-fast LLMs, featuring autonomous tool execution, syntax-highlighted output, and git integration.",
5
5
  "main": "dist/index.js",
6
6
  "bin": {
@@ -69,7 +69,7 @@
69
69
  "@langchain/core": "^1.1.11",
70
70
  "@langchain/groq": "^1.0.2",
71
71
  "@langchain/openai": "^1.2.2",
72
- "chalk": "^5.6.2",
72
+ "chalk": "^4.1.2",
73
73
  "commander": "^14.0.2",
74
74
  "cors": "^2.8.5",
75
75
  "diff": "^8.0.2",
@@ -78,7 +78,7 @@
78
78
  "glob": "^13.0.0",
79
79
  "groq-sdk": "^0.37.0",
80
80
  "inquirer": "^13.1.0",
81
- "ora": "^9.0.0",
81
+ "ora": "^5.4.1",
82
82
  "simple-git": "^3.30.0",
83
83
  "zod": "^4.3.5"
84
84
  },