@one_deploy/sdk 1.2.0 → 1.2.2

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.
Files changed (43) hide show
  1. package/dist/{ForexPoolDataGenerator--__twRwl.d.mts → ForexPoolDataGenerator-JxTPpJPz.d.mts} +1 -1
  2. package/dist/{ForexPoolDataGenerator-eUgwsU_B.d.ts → ForexPoolDataGenerator-qwWv6sCE.d.ts} +1 -1
  3. package/dist/{OneForexTradeHistory-TlKxjbFF.d.ts → OneForexTradeHistory-BE4rJH5t.d.ts} +1 -1
  4. package/dist/{OneForexTradeHistory-iDySMcw0.d.mts → OneForexTradeHistory-DbuHXRy0.d.mts} +1 -1
  5. package/dist/components/index.d.mts +2 -2
  6. package/dist/components/index.d.ts +2 -2
  7. package/dist/config/index.d.mts +1 -1
  8. package/dist/config/index.d.ts +1 -1
  9. package/dist/{console-BfTMA7ah.d.mts → console-Dvf-N9Gr.d.mts} +7 -0
  10. package/dist/{console-BfTMA7ah.d.ts → console-Dvf-N9Gr.d.ts} +7 -0
  11. package/dist/hooks/index.d.mts +2 -2
  12. package/dist/hooks/index.d.ts +2 -2
  13. package/dist/hooks/index.js +399 -38
  14. package/dist/hooks/index.js.map +1 -1
  15. package/dist/hooks/index.mjs +399 -38
  16. package/dist/hooks/index.mjs.map +1 -1
  17. package/dist/index.d.mts +4 -4
  18. package/dist/index.d.ts +4 -4
  19. package/dist/index.js +399 -38
  20. package/dist/index.js.map +1 -1
  21. package/dist/index.mjs +399 -38
  22. package/dist/index.mjs.map +1 -1
  23. package/dist/providers/index.d.mts +1 -1
  24. package/dist/providers/index.d.ts +1 -1
  25. package/dist/react-native.d.mts +4 -4
  26. package/dist/react-native.d.ts +4 -4
  27. package/dist/react-native.js +239 -36
  28. package/dist/react-native.js.map +1 -1
  29. package/dist/react-native.mjs +239 -36
  30. package/dist/react-native.mjs.map +1 -1
  31. package/dist/services/index.d.mts +2 -2
  32. package/dist/services/index.d.ts +2 -2
  33. package/dist/services/index.js +239 -36
  34. package/dist/services/index.js.map +1 -1
  35. package/dist/services/index.mjs +239 -36
  36. package/dist/services/index.mjs.map +1 -1
  37. package/dist/types/index.d.mts +1 -1
  38. package/dist/types/index.d.ts +1 -1
  39. package/dist/{useForexTrading-ZgW_G40Q.d.ts → useForexTrading-CA2DPQVf.d.ts} +1 -1
  40. package/dist/{useForexTrading-BleeSor8.d.mts → useForexTrading-I7nIQyog.d.mts} +1 -1
  41. package/package.json +1 -1
  42. package/src/services/forex/BotSimulationEngine.ts +463 -35
  43. package/src/services/forex/index.ts +12 -1
@@ -2576,14 +2576,63 @@ init_ForexPoolDataGenerator();
2576
2576
 
2577
2577
  // src/services/forex/BotSimulationEngine.ts
2578
2578
  var STRATEGY_PERSONALITIES = [
2579
+ // ═══════════════════════════════════════════════════════════════════════════
2580
+ // CONSERVATIVE STRATEGIES (保守型) - Low risk, stable returns
2581
+ // ═══════════════════════════════════════════════════════════════════════════
2579
2582
  {
2580
- id: "balanced-01",
2583
+ id: "stable-yield-01",
2584
+ name: "Stable Yield",
2585
+ shortName: "STB",
2586
+ color: "#6B7280",
2587
+ scanIntervalMin: 8e4,
2588
+ scanIntervalMax: 12e4,
2589
+ tradeFrequency: 0.15,
2590
+ positionSizeMin: 5,
2591
+ positionSizeMax: 15,
2592
+ leverageMin: 1,
2593
+ leverageMax: 3,
2594
+ primaryIndicators: ["Bollinger", "Volume"],
2595
+ riskTolerance: "low",
2596
+ preferredPairs: ["BTC/USDT", "ETH/USDT"],
2597
+ rsiBias: 45,
2598
+ tier: "starter",
2599
+ dailyYieldMin: 0.15,
2600
+ dailyYieldMax: 0.25,
2601
+ description: "\u7A33\u5065\u6536\u76CA\u7B56\u7565\uFF0C\u4F4E\u98CE\u9669\u4F4E\u6CE2\u52A8\uFF0C\u9002\u5408\u65B0\u624B\u5165\u95E8",
2602
+ category: "conservative"
2603
+ },
2604
+ {
2605
+ id: "conservative-shield-01",
2606
+ name: "Conservative Shield",
2607
+ shortName: "CON",
2608
+ color: "#10B981",
2609
+ scanIntervalMin: 6e4,
2610
+ scanIntervalMax: 9e4,
2611
+ tradeFrequency: 0.25,
2612
+ positionSizeMin: 10,
2613
+ positionSizeMax: 20,
2614
+ leverageMin: 2,
2615
+ leverageMax: 5,
2616
+ primaryIndicators: ["Bollinger", "Volume", "RSI"],
2617
+ riskTolerance: "low",
2618
+ preferredPairs: ["BTC/USDT", "ETH/USDT"],
2619
+ rsiBias: 45,
2620
+ tier: "basic",
2621
+ dailyYieldMin: 0.25,
2622
+ dailyYieldMax: 0.4,
2623
+ description: "\u4FDD\u5B88\u9632\u5FA1\u7B56\u7565\uFF0C\u6CE8\u91CD\u8D44\u91D1\u5B89\u5168\uFF0C\u7A33\u5B9A\u6536\u76CA",
2624
+ category: "conservative"
2625
+ },
2626
+ // ═══════════════════════════════════════════════════════════════════════════
2627
+ // BALANCED STRATEGIES (平衡型) - Moderate risk, balanced returns
2628
+ // ═══════════════════════════════════════════════════════════════════════════
2629
+ {
2630
+ id: "balanced-alpha-01",
2581
2631
  name: "Balanced Alpha",
2582
2632
  shortName: "BAL",
2583
2633
  color: "#3B82F6",
2584
- scanIntervalMin: 25e3,
2585
- // Slower: 25-40s between cycles
2586
- scanIntervalMax: 4e4,
2634
+ scanIntervalMin: 45e3,
2635
+ scanIntervalMax: 7e4,
2587
2636
  tradeFrequency: 0.4,
2588
2637
  positionSizeMin: 15,
2589
2638
  positionSizeMax: 35,
@@ -2592,34 +2641,92 @@ var STRATEGY_PERSONALITIES = [
2592
2641
  primaryIndicators: ["RSI", "MACD"],
2593
2642
  riskTolerance: "medium",
2594
2643
  preferredPairs: ["BTC/USDT", "ETH/USDT", "SOL/USDT"],
2595
- rsiBias: 50
2644
+ rsiBias: 50,
2645
+ tier: "standard",
2646
+ dailyYieldMin: 0.4,
2647
+ dailyYieldMax: 0.65,
2648
+ description: "\u5E73\u8861\u578B\u7B56\u7565\uFF0C\u98CE\u9669\u6536\u76CA\u5747\u8861\uFF0C\u9002\u5408\u7A33\u5065\u6295\u8D44\u8005",
2649
+ category: "balanced"
2596
2650
  },
2597
2651
  {
2598
- id: "conservative-01",
2599
- name: "Conservative Shield",
2600
- shortName: "CON",
2601
- color: "#10B981",
2602
- scanIntervalMin: 35e3,
2603
- // Slower: 35-55s between cycles
2652
+ id: "smart-rebalance-01",
2653
+ name: "Smart Rebalance",
2654
+ shortName: "SRB",
2655
+ color: "#06B6D4",
2656
+ scanIntervalMin: 5e4,
2657
+ scanIntervalMax: 75e3,
2658
+ tradeFrequency: 0.35,
2659
+ positionSizeMin: 12,
2660
+ positionSizeMax: 30,
2661
+ leverageMin: 3,
2662
+ leverageMax: 8,
2663
+ primaryIndicators: ["RSI", "EMA", "Volume"],
2664
+ riskTolerance: "medium",
2665
+ preferredPairs: ["BTC/USDT", "ETH/USDT", "BNB/USDT", "SOL/USDT"],
2666
+ rsiBias: 50,
2667
+ tier: "standard",
2668
+ dailyYieldMin: 0.45,
2669
+ dailyYieldMax: 0.7,
2670
+ description: "\u667A\u80FD\u518D\u5E73\u8861\u7B56\u7565\uFF0C\u52A8\u6001\u8C03\u6574\u6301\u4ED3\uFF0C\u4F18\u5316\u6536\u76CA",
2671
+ category: "balanced"
2672
+ },
2673
+ // ═══════════════════════════════════════════════════════════════════════════
2674
+ // GROWTH STRATEGIES (成长型) - Higher risk, higher returns
2675
+ // ═══════════════════════════════════════════════════════════════════════════
2676
+ {
2677
+ id: "growth-momentum-01",
2678
+ name: "Growth Momentum",
2679
+ shortName: "GRO",
2680
+ color: "#8B5CF6",
2681
+ scanIntervalMin: 4e4,
2682
+ scanIntervalMax: 6e4,
2683
+ tradeFrequency: 0.45,
2684
+ positionSizeMin: 20,
2685
+ positionSizeMax: 40,
2686
+ leverageMin: 5,
2687
+ leverageMax: 12,
2688
+ primaryIndicators: ["RSI", "MACD", "EMA"],
2689
+ riskTolerance: "medium",
2690
+ preferredPairs: ["BTC/USDT", "ETH/USDT", "SOL/USDT", "AVAX/USDT"],
2691
+ rsiBias: 52,
2692
+ tier: "premium",
2693
+ dailyYieldMin: 0.6,
2694
+ dailyYieldMax: 0.95,
2695
+ description: "\u6210\u957F\u52A8\u91CF\u7B56\u7565\uFF0C\u8FFD\u6C42\u8F83\u9AD8\u6536\u76CA\uFF0C\u9002\u5408\u6709\u7ECF\u9A8C\u6295\u8D44\u8005",
2696
+ category: "growth"
2697
+ },
2698
+ {
2699
+ id: "trend-hunter-01",
2700
+ name: "Trend Hunter",
2701
+ shortName: "TRH",
2702
+ color: "#EC4899",
2703
+ scanIntervalMin: 38e3,
2604
2704
  scanIntervalMax: 55e3,
2605
- tradeFrequency: 0.25,
2606
- positionSizeMin: 10,
2607
- positionSizeMax: 20,
2608
- leverageMin: 2,
2609
- leverageMax: 5,
2610
- primaryIndicators: ["Bollinger", "Volume"],
2611
- riskTolerance: "low",
2612
- preferredPairs: ["BTC/USDT", "ETH/USDT"],
2613
- rsiBias: 45
2705
+ tradeFrequency: 0.48,
2706
+ positionSizeMin: 22,
2707
+ positionSizeMax: 42,
2708
+ leverageMin: 5,
2709
+ leverageMax: 15,
2710
+ primaryIndicators: ["EMA", "MACD", "Volume", "Bollinger"],
2711
+ riskTolerance: "medium",
2712
+ preferredPairs: ["BTC/USDT", "ETH/USDT", "SOL/USDT", "ARB/USDT", "OP/USDT"],
2713
+ rsiBias: 53,
2714
+ tier: "premium",
2715
+ dailyYieldMin: 0.65,
2716
+ dailyYieldMax: 1,
2717
+ description: "\u8D8B\u52BF\u730E\u624B\u7B56\u7565\uFF0C\u6355\u6349\u5E02\u573A\u8D8B\u52BF\uFF0C\u8FFD\u6C42\u8D85\u989D\u6536\u76CA",
2718
+ category: "growth"
2614
2719
  },
2720
+ // ═══════════════════════════════════════════════════════════════════════════
2721
+ // AGGRESSIVE STRATEGIES (激进型) - High risk, high returns
2722
+ // ═══════════════════════════════════════════════════════════════════════════
2615
2723
  {
2616
- id: "aggressive-01",
2724
+ id: "aggressive-momentum-01",
2617
2725
  name: "Aggressive Momentum",
2618
2726
  shortName: "AGG",
2619
2727
  color: "#EF4444",
2620
- scanIntervalMin: 18e3,
2621
- // Slower: 18-30s between cycles
2622
- scanIntervalMax: 3e4,
2728
+ scanIntervalMin: 35e3,
2729
+ scanIntervalMax: 55e3,
2623
2730
  tradeFrequency: 0.5,
2624
2731
  positionSizeMin: 25,
2625
2732
  positionSizeMax: 50,
@@ -2628,7 +2735,103 @@ var STRATEGY_PERSONALITIES = [
2628
2735
  primaryIndicators: ["RSI", "MACD", "EMA", "Volume"],
2629
2736
  riskTolerance: "high",
2630
2737
  preferredPairs: ["BTC/USDT", "ETH/USDT", "SOL/USDT", "DOGE/USDT", "AVAX/USDT"],
2631
- rsiBias: 55
2738
+ rsiBias: 55,
2739
+ tier: "elite",
2740
+ dailyYieldMin: 0.85,
2741
+ dailyYieldMax: 1.4,
2742
+ description: "\u6FC0\u8FDB\u52A8\u91CF\u7B56\u7565\uFF0C\u9AD8\u98CE\u9669\u9AD8\u6536\u76CA\uFF0C\u9002\u5408\u98CE\u9669\u627F\u53D7\u80FD\u529B\u5F3A\u7684\u6295\u8D44\u8005",
2743
+ category: "aggressive"
2744
+ },
2745
+ {
2746
+ id: "leverage-maximizer-01",
2747
+ name: "Leverage Maximizer",
2748
+ shortName: "LEV",
2749
+ color: "#F97316",
2750
+ scanIntervalMin: 3e4,
2751
+ scanIntervalMax: 5e4,
2752
+ tradeFrequency: 0.55,
2753
+ positionSizeMin: 30,
2754
+ positionSizeMax: 55,
2755
+ leverageMin: 10,
2756
+ leverageMax: 25,
2757
+ primaryIndicators: ["RSI", "MACD", "EMA", "Volume", "Bollinger"],
2758
+ riskTolerance: "high",
2759
+ preferredPairs: ["BTC/USDT", "ETH/USDT", "SOL/USDT", "DOGE/USDT", "AVAX/USDT", "ARB/USDT"],
2760
+ rsiBias: 55,
2761
+ tier: "elite",
2762
+ dailyYieldMin: 1,
2763
+ dailyYieldMax: 1.8,
2764
+ description: "\u6760\u6746\u6700\u5927\u5316\u7B56\u7565\uFF0C\u8FFD\u6C42\u6781\u81F4\u6536\u76CA\uFF0C\u9700\u8981\u4E13\u4E1A\u6295\u8D44\u7ECF\u9A8C",
2765
+ category: "aggressive"
2766
+ },
2767
+ // ═══════════════════════════════════════════════════════════════════════════
2768
+ // QUANTITATIVE STRATEGIES (量化型) - AI-driven, advanced algorithms
2769
+ // ═══════════════════════════════════════════════════════════════════════════
2770
+ {
2771
+ id: "ai-quant-alpha-01",
2772
+ name: "AI Quant Alpha",
2773
+ shortName: "AQA",
2774
+ color: "#A855F7",
2775
+ scanIntervalMin: 42e3,
2776
+ scanIntervalMax: 65e3,
2777
+ tradeFrequency: 0.42,
2778
+ positionSizeMin: 18,
2779
+ positionSizeMax: 38,
2780
+ leverageMin: 4,
2781
+ leverageMax: 12,
2782
+ primaryIndicators: ["RSI", "MACD", "EMA", "Volume", "Bollinger"],
2783
+ riskTolerance: "medium",
2784
+ preferredPairs: ["BTC/USDT", "ETH/USDT", "SOL/USDT", "BNB/USDT"],
2785
+ rsiBias: 51,
2786
+ tier: "premium",
2787
+ dailyYieldMin: 0.7,
2788
+ dailyYieldMax: 1.1,
2789
+ description: "AI\u91CF\u5316Alpha\u7B56\u7565\uFF0C\u673A\u5668\u5B66\u4E60\u9A71\u52A8\uFF0C\u667A\u80FD\u98CE\u63A7",
2790
+ category: "quantitative"
2791
+ },
2792
+ {
2793
+ id: "neural-trader-01",
2794
+ name: "Neural Trader",
2795
+ shortName: "NRT",
2796
+ color: "#14B8A6",
2797
+ scanIntervalMin: 4e4,
2798
+ scanIntervalMax: 62e3,
2799
+ tradeFrequency: 0.44,
2800
+ positionSizeMin: 20,
2801
+ positionSizeMax: 40,
2802
+ leverageMin: 5,
2803
+ leverageMax: 15,
2804
+ primaryIndicators: ["RSI", "MACD", "EMA", "Volume", "Bollinger"],
2805
+ riskTolerance: "medium",
2806
+ preferredPairs: ["BTC/USDT", "ETH/USDT", "SOL/USDT", "AVAX/USDT", "LINK/USDT"],
2807
+ rsiBias: 52,
2808
+ tier: "elite",
2809
+ dailyYieldMin: 0.8,
2810
+ dailyYieldMax: 1.25,
2811
+ description: "\u795E\u7ECF\u7F51\u7EDC\u4EA4\u6613\u7B56\u7565\uFF0C\u6DF1\u5EA6\u5B66\u4E60\u6A21\u578B\uFF0C\u81EA\u9002\u5E94\u5E02\u573A",
2812
+ category: "quantitative"
2813
+ },
2814
+ {
2815
+ id: "quantum-edge-01",
2816
+ name: "Quantum Edge",
2817
+ shortName: "QTE",
2818
+ color: "#6366F1",
2819
+ scanIntervalMin: 35e3,
2820
+ scanIntervalMax: 55e3,
2821
+ tradeFrequency: 0.5,
2822
+ positionSizeMin: 25,
2823
+ positionSizeMax: 50,
2824
+ leverageMin: 8,
2825
+ leverageMax: 20,
2826
+ primaryIndicators: ["RSI", "MACD", "EMA", "Volume", "Bollinger"],
2827
+ riskTolerance: "high",
2828
+ preferredPairs: ["BTC/USDT", "ETH/USDT", "SOL/USDT", "AVAX/USDT", "ARB/USDT", "OP/USDT"],
2829
+ rsiBias: 54,
2830
+ tier: "vip",
2831
+ dailyYieldMin: 1.2,
2832
+ dailyYieldMax: 2,
2833
+ description: "VIP\u91CF\u5B50\u4F18\u52BF\u7B56\u7565\uFF0C\u9876\u7EA7AI\u7B97\u6CD5\uFF0C\u6781\u81F4\u6536\u76CA\u8FFD\u6C42",
2834
+ category: "quantitative"
2632
2835
  }
2633
2836
  ];
2634
2837
  var PAIR_PRICES = {
@@ -2869,7 +3072,7 @@ var BotSimulationEngine = class {
2869
3072
  },
2870
3073
  delay
2871
3074
  });
2872
- delay += rand3(800, 1500);
3075
+ delay += rand3(2e3, 3500);
2873
3076
  const thinkingMessages = this.generateThinkingProcess(strategy, pair, price);
2874
3077
  for (const thinking of thinkingMessages) {
2875
3078
  entries.push({
@@ -2882,7 +3085,7 @@ var BotSimulationEngine = class {
2882
3085
  },
2883
3086
  delay
2884
3087
  });
2885
- delay += rand3(600, 1200);
3088
+ delay += rand3(1500, 2500);
2886
3089
  }
2887
3090
  const indicatorParts = [];
2888
3091
  if (strategy.primaryIndicators.includes("RSI") || strategy.primaryIndicators.includes("MACD")) {
@@ -2914,7 +3117,7 @@ var BotSimulationEngine = class {
2914
3117
  },
2915
3118
  delay
2916
3119
  });
2917
- delay += rand3(800, 1500);
3120
+ delay += rand3(2e3, 3500);
2918
3121
  if (Math.random() < 0.12) {
2919
3122
  const sentiment = Math.random() > 0.4 ? "Bullish" : "Bearish";
2920
3123
  entries.push({
@@ -2927,7 +3130,7 @@ var BotSimulationEngine = class {
2927
3130
  },
2928
3131
  delay
2929
3132
  });
2930
- delay += rand3(1e3, 1800);
3133
+ delay += rand3(2500, 4e3);
2931
3134
  }
2932
3135
  if (Math.random() < 0.4) {
2933
3136
  const analysis = this.generateAnalysis(strategy, indicators, pair);
@@ -2941,7 +3144,7 @@ var BotSimulationEngine = class {
2941
3144
  },
2942
3145
  delay
2943
3146
  });
2944
- delay += rand3(1e3, 2e3);
3147
+ delay += rand3(2500, 4e3);
2945
3148
  }
2946
3149
  const signal = this.evaluateSignal(strategy, indicators);
2947
3150
  state.lastSignal = signal.direction;
@@ -2965,7 +3168,7 @@ var BotSimulationEngine = class {
2965
3168
  },
2966
3169
  delay
2967
3170
  });
2968
- delay += rand3(1500, 2500);
3171
+ delay += rand3(3e3, 5e3);
2969
3172
  entries.push({
2970
3173
  entry: {
2971
3174
  strategyId: strategy.id,
@@ -2977,7 +3180,7 @@ var BotSimulationEngine = class {
2977
3180
  },
2978
3181
  delay
2979
3182
  });
2980
- delay += rand3(1200, 2e3);
3183
+ delay += rand3(3e3, 4500);
2981
3184
  const decision = this.makeTradeDecision(strategy, signal, state);
2982
3185
  if (decision.execute) {
2983
3186
  entries.push({
@@ -2997,7 +3200,7 @@ var BotSimulationEngine = class {
2997
3200
  },
2998
3201
  delay
2999
3202
  });
3000
- delay += rand3(1e3, 1800);
3203
+ delay += rand3(2500, 4e3);
3001
3204
  const orderId = `ORD_${Date.now().toString(36).toUpperCase()}`;
3002
3205
  const orderPrice = signal.direction === "LONG" ? price * (1 - rand3(1e-4, 5e-4)) : price * (1 + rand3(1e-4, 5e-4));
3003
3206
  entries.push({
@@ -3022,7 +3225,7 @@ var BotSimulationEngine = class {
3022
3225
  },
3023
3226
  delay
3024
3227
  });
3025
- delay += rand3(2e3, 4e3);
3228
+ delay += rand3(4e3, 7e3);
3026
3229
  const fillPrice = orderPrice * (1 + rand3(-3e-4, 3e-4));
3027
3230
  const slippage = Math.abs(fillPrice - orderPrice) / orderPrice * 100;
3028
3231
  entries.push({
@@ -3071,7 +3274,7 @@ var BotSimulationEngine = class {
3071
3274
  }
3072
3275
  }
3073
3276
  if (state.openPositions.length > 0 && Math.random() < 0.5) {
3074
- delay += rand3(1500, 2500);
3277
+ delay += rand3(3500, 5500);
3075
3278
  let totalPositionPnl = 0;
3076
3279
  const pnlParts = [];
3077
3280
  for (const pos of state.openPositions) {
@@ -3107,7 +3310,7 @@ var BotSimulationEngine = class {
3107
3310
  });
3108
3311
  }
3109
3312
  if (Math.random() < 0.2) {
3110
- delay += rand3(1e3, 2e3);
3313
+ delay += rand3(3e3, 5e3);
3111
3314
  const exposure = state.openPositions.reduce((sum, p) => sum + p.size * p.leverage, 0);
3112
3315
  const maxDrawdown = rand3(2, 12);
3113
3316
  entries.push({