@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
@@ -3955,14 +3955,63 @@ init_ForexPoolDataGenerator();
3955
3955
 
3956
3956
  // src/services/forex/BotSimulationEngine.ts
3957
3957
  var STRATEGY_PERSONALITIES = [
3958
+ // ═══════════════════════════════════════════════════════════════════════════
3959
+ // CONSERVATIVE STRATEGIES (保守型) - Low risk, stable returns
3960
+ // ═══════════════════════════════════════════════════════════════════════════
3958
3961
  {
3959
- id: "balanced-01",
3962
+ id: "stable-yield-01",
3963
+ name: "Stable Yield",
3964
+ shortName: "STB",
3965
+ color: "#6B7280",
3966
+ scanIntervalMin: 8e4,
3967
+ scanIntervalMax: 12e4,
3968
+ tradeFrequency: 0.15,
3969
+ positionSizeMin: 5,
3970
+ positionSizeMax: 15,
3971
+ leverageMin: 1,
3972
+ leverageMax: 3,
3973
+ primaryIndicators: ["Bollinger", "Volume"],
3974
+ riskTolerance: "low",
3975
+ preferredPairs: ["BTC/USDT", "ETH/USDT"],
3976
+ rsiBias: 45,
3977
+ tier: "starter",
3978
+ dailyYieldMin: 0.15,
3979
+ dailyYieldMax: 0.25,
3980
+ description: "\u7A33\u5065\u6536\u76CA\u7B56\u7565\uFF0C\u4F4E\u98CE\u9669\u4F4E\u6CE2\u52A8\uFF0C\u9002\u5408\u65B0\u624B\u5165\u95E8",
3981
+ category: "conservative"
3982
+ },
3983
+ {
3984
+ id: "conservative-shield-01",
3985
+ name: "Conservative Shield",
3986
+ shortName: "CON",
3987
+ color: "#10B981",
3988
+ scanIntervalMin: 6e4,
3989
+ scanIntervalMax: 9e4,
3990
+ tradeFrequency: 0.25,
3991
+ positionSizeMin: 10,
3992
+ positionSizeMax: 20,
3993
+ leverageMin: 2,
3994
+ leverageMax: 5,
3995
+ primaryIndicators: ["Bollinger", "Volume", "RSI"],
3996
+ riskTolerance: "low",
3997
+ preferredPairs: ["BTC/USDT", "ETH/USDT"],
3998
+ rsiBias: 45,
3999
+ tier: "basic",
4000
+ dailyYieldMin: 0.25,
4001
+ dailyYieldMax: 0.4,
4002
+ description: "\u4FDD\u5B88\u9632\u5FA1\u7B56\u7565\uFF0C\u6CE8\u91CD\u8D44\u91D1\u5B89\u5168\uFF0C\u7A33\u5B9A\u6536\u76CA",
4003
+ category: "conservative"
4004
+ },
4005
+ // ═══════════════════════════════════════════════════════════════════════════
4006
+ // BALANCED STRATEGIES (平衡型) - Moderate risk, balanced returns
4007
+ // ═══════════════════════════════════════════════════════════════════════════
4008
+ {
4009
+ id: "balanced-alpha-01",
3960
4010
  name: "Balanced Alpha",
3961
4011
  shortName: "BAL",
3962
4012
  color: "#3B82F6",
3963
- scanIntervalMin: 25e3,
3964
- // Slower: 25-40s between cycles
3965
- scanIntervalMax: 4e4,
4013
+ scanIntervalMin: 45e3,
4014
+ scanIntervalMax: 7e4,
3966
4015
  tradeFrequency: 0.4,
3967
4016
  positionSizeMin: 15,
3968
4017
  positionSizeMax: 35,
@@ -3971,34 +4020,92 @@ var STRATEGY_PERSONALITIES = [
3971
4020
  primaryIndicators: ["RSI", "MACD"],
3972
4021
  riskTolerance: "medium",
3973
4022
  preferredPairs: ["BTC/USDT", "ETH/USDT", "SOL/USDT"],
3974
- rsiBias: 50
4023
+ rsiBias: 50,
4024
+ tier: "standard",
4025
+ dailyYieldMin: 0.4,
4026
+ dailyYieldMax: 0.65,
4027
+ description: "\u5E73\u8861\u578B\u7B56\u7565\uFF0C\u98CE\u9669\u6536\u76CA\u5747\u8861\uFF0C\u9002\u5408\u7A33\u5065\u6295\u8D44\u8005",
4028
+ category: "balanced"
3975
4029
  },
3976
4030
  {
3977
- id: "conservative-01",
3978
- name: "Conservative Shield",
3979
- shortName: "CON",
3980
- color: "#10B981",
3981
- scanIntervalMin: 35e3,
3982
- // Slower: 35-55s between cycles
4031
+ id: "smart-rebalance-01",
4032
+ name: "Smart Rebalance",
4033
+ shortName: "SRB",
4034
+ color: "#06B6D4",
4035
+ scanIntervalMin: 5e4,
4036
+ scanIntervalMax: 75e3,
4037
+ tradeFrequency: 0.35,
4038
+ positionSizeMin: 12,
4039
+ positionSizeMax: 30,
4040
+ leverageMin: 3,
4041
+ leverageMax: 8,
4042
+ primaryIndicators: ["RSI", "EMA", "Volume"],
4043
+ riskTolerance: "medium",
4044
+ preferredPairs: ["BTC/USDT", "ETH/USDT", "BNB/USDT", "SOL/USDT"],
4045
+ rsiBias: 50,
4046
+ tier: "standard",
4047
+ dailyYieldMin: 0.45,
4048
+ dailyYieldMax: 0.7,
4049
+ description: "\u667A\u80FD\u518D\u5E73\u8861\u7B56\u7565\uFF0C\u52A8\u6001\u8C03\u6574\u6301\u4ED3\uFF0C\u4F18\u5316\u6536\u76CA",
4050
+ category: "balanced"
4051
+ },
4052
+ // ═══════════════════════════════════════════════════════════════════════════
4053
+ // GROWTH STRATEGIES (成长型) - Higher risk, higher returns
4054
+ // ═══════════════════════════════════════════════════════════════════════════
4055
+ {
4056
+ id: "growth-momentum-01",
4057
+ name: "Growth Momentum",
4058
+ shortName: "GRO",
4059
+ color: "#8B5CF6",
4060
+ scanIntervalMin: 4e4,
4061
+ scanIntervalMax: 6e4,
4062
+ tradeFrequency: 0.45,
4063
+ positionSizeMin: 20,
4064
+ positionSizeMax: 40,
4065
+ leverageMin: 5,
4066
+ leverageMax: 12,
4067
+ primaryIndicators: ["RSI", "MACD", "EMA"],
4068
+ riskTolerance: "medium",
4069
+ preferredPairs: ["BTC/USDT", "ETH/USDT", "SOL/USDT", "AVAX/USDT"],
4070
+ rsiBias: 52,
4071
+ tier: "premium",
4072
+ dailyYieldMin: 0.6,
4073
+ dailyYieldMax: 0.95,
4074
+ description: "\u6210\u957F\u52A8\u91CF\u7B56\u7565\uFF0C\u8FFD\u6C42\u8F83\u9AD8\u6536\u76CA\uFF0C\u9002\u5408\u6709\u7ECF\u9A8C\u6295\u8D44\u8005",
4075
+ category: "growth"
4076
+ },
4077
+ {
4078
+ id: "trend-hunter-01",
4079
+ name: "Trend Hunter",
4080
+ shortName: "TRH",
4081
+ color: "#EC4899",
4082
+ scanIntervalMin: 38e3,
3983
4083
  scanIntervalMax: 55e3,
3984
- tradeFrequency: 0.25,
3985
- positionSizeMin: 10,
3986
- positionSizeMax: 20,
3987
- leverageMin: 2,
3988
- leverageMax: 5,
3989
- primaryIndicators: ["Bollinger", "Volume"],
3990
- riskTolerance: "low",
3991
- preferredPairs: ["BTC/USDT", "ETH/USDT"],
3992
- rsiBias: 45
4084
+ tradeFrequency: 0.48,
4085
+ positionSizeMin: 22,
4086
+ positionSizeMax: 42,
4087
+ leverageMin: 5,
4088
+ leverageMax: 15,
4089
+ primaryIndicators: ["EMA", "MACD", "Volume", "Bollinger"],
4090
+ riskTolerance: "medium",
4091
+ preferredPairs: ["BTC/USDT", "ETH/USDT", "SOL/USDT", "ARB/USDT", "OP/USDT"],
4092
+ rsiBias: 53,
4093
+ tier: "premium",
4094
+ dailyYieldMin: 0.65,
4095
+ dailyYieldMax: 1,
4096
+ description: "\u8D8B\u52BF\u730E\u624B\u7B56\u7565\uFF0C\u6355\u6349\u5E02\u573A\u8D8B\u52BF\uFF0C\u8FFD\u6C42\u8D85\u989D\u6536\u76CA",
4097
+ category: "growth"
3993
4098
  },
4099
+ // ═══════════════════════════════════════════════════════════════════════════
4100
+ // AGGRESSIVE STRATEGIES (激进型) - High risk, high returns
4101
+ // ═══════════════════════════════════════════════════════════════════════════
3994
4102
  {
3995
- id: "aggressive-01",
4103
+ id: "aggressive-momentum-01",
3996
4104
  name: "Aggressive Momentum",
3997
4105
  shortName: "AGG",
3998
4106
  color: "#EF4444",
3999
- scanIntervalMin: 18e3,
4000
- // Slower: 18-30s between cycles
4001
- scanIntervalMax: 3e4,
4107
+ scanIntervalMin: 35e3,
4108
+ scanIntervalMax: 55e3,
4002
4109
  tradeFrequency: 0.5,
4003
4110
  positionSizeMin: 25,
4004
4111
  positionSizeMax: 50,
@@ -4007,7 +4114,103 @@ var STRATEGY_PERSONALITIES = [
4007
4114
  primaryIndicators: ["RSI", "MACD", "EMA", "Volume"],
4008
4115
  riskTolerance: "high",
4009
4116
  preferredPairs: ["BTC/USDT", "ETH/USDT", "SOL/USDT", "DOGE/USDT", "AVAX/USDT"],
4010
- rsiBias: 55
4117
+ rsiBias: 55,
4118
+ tier: "elite",
4119
+ dailyYieldMin: 0.85,
4120
+ dailyYieldMax: 1.4,
4121
+ 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",
4122
+ category: "aggressive"
4123
+ },
4124
+ {
4125
+ id: "leverage-maximizer-01",
4126
+ name: "Leverage Maximizer",
4127
+ shortName: "LEV",
4128
+ color: "#F97316",
4129
+ scanIntervalMin: 3e4,
4130
+ scanIntervalMax: 5e4,
4131
+ tradeFrequency: 0.55,
4132
+ positionSizeMin: 30,
4133
+ positionSizeMax: 55,
4134
+ leverageMin: 10,
4135
+ leverageMax: 25,
4136
+ primaryIndicators: ["RSI", "MACD", "EMA", "Volume", "Bollinger"],
4137
+ riskTolerance: "high",
4138
+ preferredPairs: ["BTC/USDT", "ETH/USDT", "SOL/USDT", "DOGE/USDT", "AVAX/USDT", "ARB/USDT"],
4139
+ rsiBias: 55,
4140
+ tier: "elite",
4141
+ dailyYieldMin: 1,
4142
+ dailyYieldMax: 1.8,
4143
+ description: "\u6760\u6746\u6700\u5927\u5316\u7B56\u7565\uFF0C\u8FFD\u6C42\u6781\u81F4\u6536\u76CA\uFF0C\u9700\u8981\u4E13\u4E1A\u6295\u8D44\u7ECF\u9A8C",
4144
+ category: "aggressive"
4145
+ },
4146
+ // ═══════════════════════════════════════════════════════════════════════════
4147
+ // QUANTITATIVE STRATEGIES (量化型) - AI-driven, advanced algorithms
4148
+ // ═══════════════════════════════════════════════════════════════════════════
4149
+ {
4150
+ id: "ai-quant-alpha-01",
4151
+ name: "AI Quant Alpha",
4152
+ shortName: "AQA",
4153
+ color: "#A855F7",
4154
+ scanIntervalMin: 42e3,
4155
+ scanIntervalMax: 65e3,
4156
+ tradeFrequency: 0.42,
4157
+ positionSizeMin: 18,
4158
+ positionSizeMax: 38,
4159
+ leverageMin: 4,
4160
+ leverageMax: 12,
4161
+ primaryIndicators: ["RSI", "MACD", "EMA", "Volume", "Bollinger"],
4162
+ riskTolerance: "medium",
4163
+ preferredPairs: ["BTC/USDT", "ETH/USDT", "SOL/USDT", "BNB/USDT"],
4164
+ rsiBias: 51,
4165
+ tier: "premium",
4166
+ dailyYieldMin: 0.7,
4167
+ dailyYieldMax: 1.1,
4168
+ description: "AI\u91CF\u5316Alpha\u7B56\u7565\uFF0C\u673A\u5668\u5B66\u4E60\u9A71\u52A8\uFF0C\u667A\u80FD\u98CE\u63A7",
4169
+ category: "quantitative"
4170
+ },
4171
+ {
4172
+ id: "neural-trader-01",
4173
+ name: "Neural Trader",
4174
+ shortName: "NRT",
4175
+ color: "#14B8A6",
4176
+ scanIntervalMin: 4e4,
4177
+ scanIntervalMax: 62e3,
4178
+ tradeFrequency: 0.44,
4179
+ positionSizeMin: 20,
4180
+ positionSizeMax: 40,
4181
+ leverageMin: 5,
4182
+ leverageMax: 15,
4183
+ primaryIndicators: ["RSI", "MACD", "EMA", "Volume", "Bollinger"],
4184
+ riskTolerance: "medium",
4185
+ preferredPairs: ["BTC/USDT", "ETH/USDT", "SOL/USDT", "AVAX/USDT", "LINK/USDT"],
4186
+ rsiBias: 52,
4187
+ tier: "elite",
4188
+ dailyYieldMin: 0.8,
4189
+ dailyYieldMax: 1.25,
4190
+ description: "\u795E\u7ECF\u7F51\u7EDC\u4EA4\u6613\u7B56\u7565\uFF0C\u6DF1\u5EA6\u5B66\u4E60\u6A21\u578B\uFF0C\u81EA\u9002\u5E94\u5E02\u573A",
4191
+ category: "quantitative"
4192
+ },
4193
+ {
4194
+ id: "quantum-edge-01",
4195
+ name: "Quantum Edge",
4196
+ shortName: "QTE",
4197
+ color: "#6366F1",
4198
+ scanIntervalMin: 35e3,
4199
+ scanIntervalMax: 55e3,
4200
+ tradeFrequency: 0.5,
4201
+ positionSizeMin: 25,
4202
+ positionSizeMax: 50,
4203
+ leverageMin: 8,
4204
+ leverageMax: 20,
4205
+ primaryIndicators: ["RSI", "MACD", "EMA", "Volume", "Bollinger"],
4206
+ riskTolerance: "high",
4207
+ preferredPairs: ["BTC/USDT", "ETH/USDT", "SOL/USDT", "AVAX/USDT", "ARB/USDT", "OP/USDT"],
4208
+ rsiBias: 54,
4209
+ tier: "vip",
4210
+ dailyYieldMin: 1.2,
4211
+ dailyYieldMax: 2,
4212
+ description: "VIP\u91CF\u5B50\u4F18\u52BF\u7B56\u7565\uFF0C\u9876\u7EA7AI\u7B97\u6CD5\uFF0C\u6781\u81F4\u6536\u76CA\u8FFD\u6C42",
4213
+ category: "quantitative"
4011
4214
  }
4012
4215
  ];
4013
4216
  var PAIR_PRICES = {
@@ -4248,7 +4451,7 @@ var BotSimulationEngine = class {
4248
4451
  },
4249
4452
  delay
4250
4453
  });
4251
- delay += rand3(800, 1500);
4454
+ delay += rand3(2e3, 3500);
4252
4455
  const thinkingMessages = this.generateThinkingProcess(strategy, pair, price);
4253
4456
  for (const thinking of thinkingMessages) {
4254
4457
  entries.push({
@@ -4261,7 +4464,7 @@ var BotSimulationEngine = class {
4261
4464
  },
4262
4465
  delay
4263
4466
  });
4264
- delay += rand3(600, 1200);
4467
+ delay += rand3(1500, 2500);
4265
4468
  }
4266
4469
  const indicatorParts = [];
4267
4470
  if (strategy.primaryIndicators.includes("RSI") || strategy.primaryIndicators.includes("MACD")) {
@@ -4293,7 +4496,7 @@ var BotSimulationEngine = class {
4293
4496
  },
4294
4497
  delay
4295
4498
  });
4296
- delay += rand3(800, 1500);
4499
+ delay += rand3(2e3, 3500);
4297
4500
  if (Math.random() < 0.12) {
4298
4501
  const sentiment = Math.random() > 0.4 ? "Bullish" : "Bearish";
4299
4502
  entries.push({
@@ -4306,7 +4509,7 @@ var BotSimulationEngine = class {
4306
4509
  },
4307
4510
  delay
4308
4511
  });
4309
- delay += rand3(1e3, 1800);
4512
+ delay += rand3(2500, 4e3);
4310
4513
  }
4311
4514
  if (Math.random() < 0.4) {
4312
4515
  const analysis = this.generateAnalysis(strategy, indicators, pair);
@@ -4320,7 +4523,7 @@ var BotSimulationEngine = class {
4320
4523
  },
4321
4524
  delay
4322
4525
  });
4323
- delay += rand3(1e3, 2e3);
4526
+ delay += rand3(2500, 4e3);
4324
4527
  }
4325
4528
  const signal = this.evaluateSignal(strategy, indicators);
4326
4529
  state.lastSignal = signal.direction;
@@ -4344,7 +4547,7 @@ var BotSimulationEngine = class {
4344
4547
  },
4345
4548
  delay
4346
4549
  });
4347
- delay += rand3(1500, 2500);
4550
+ delay += rand3(3e3, 5e3);
4348
4551
  entries.push({
4349
4552
  entry: {
4350
4553
  strategyId: strategy.id,
@@ -4356,7 +4559,7 @@ var BotSimulationEngine = class {
4356
4559
  },
4357
4560
  delay
4358
4561
  });
4359
- delay += rand3(1200, 2e3);
4562
+ delay += rand3(3e3, 4500);
4360
4563
  const decision = this.makeTradeDecision(strategy, signal, state);
4361
4564
  if (decision.execute) {
4362
4565
  entries.push({
@@ -4376,7 +4579,7 @@ var BotSimulationEngine = class {
4376
4579
  },
4377
4580
  delay
4378
4581
  });
4379
- delay += rand3(1e3, 1800);
4582
+ delay += rand3(2500, 4e3);
4380
4583
  const orderId = `ORD_${Date.now().toString(36).toUpperCase()}`;
4381
4584
  const orderPrice = signal.direction === "LONG" ? price * (1 - rand3(1e-4, 5e-4)) : price * (1 + rand3(1e-4, 5e-4));
4382
4585
  entries.push({
@@ -4401,7 +4604,7 @@ var BotSimulationEngine = class {
4401
4604
  },
4402
4605
  delay
4403
4606
  });
4404
- delay += rand3(2e3, 4e3);
4607
+ delay += rand3(4e3, 7e3);
4405
4608
  const fillPrice = orderPrice * (1 + rand3(-3e-4, 3e-4));
4406
4609
  const slippage = Math.abs(fillPrice - orderPrice) / orderPrice * 100;
4407
4610
  entries.push({
@@ -4450,7 +4653,7 @@ var BotSimulationEngine = class {
4450
4653
  }
4451
4654
  }
4452
4655
  if (state.openPositions.length > 0 && Math.random() < 0.5) {
4453
- delay += rand3(1500, 2500);
4656
+ delay += rand3(3500, 5500);
4454
4657
  let totalPositionPnl = 0;
4455
4658
  const pnlParts = [];
4456
4659
  for (const pos of state.openPositions) {
@@ -4486,7 +4689,7 @@ var BotSimulationEngine = class {
4486
4689
  });
4487
4690
  }
4488
4691
  if (Math.random() < 0.2) {
4489
- delay += rand3(1e3, 2e3);
4692
+ delay += rand3(3e3, 5e3);
4490
4693
  const exposure = state.openPositions.reduce((sum, p) => sum + p.size * p.leverage, 0);
4491
4694
  const maxDrawdown = rand3(2, 12);
4492
4695
  entries.push({