@autonomaai/mcp-client 1.0.0

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.
@@ -0,0 +1,834 @@
1
+ /**
2
+ * Unified MCP Client Types for autonoma Trading System
3
+ *
4
+ * This file contains all the type definitions for the MCP client library,
5
+ * extracted and consolidated from the original implementation.
6
+ */
7
+ export interface ErrorResponse {
8
+ error: string;
9
+ detail?: string;
10
+ }
11
+ export interface ConfigurationObject {
12
+ [key: string]: string | number | boolean | ConfigurationObject;
13
+ }
14
+ export interface PositionData {
15
+ symbol: string;
16
+ size: number;
17
+ side: 'long' | 'short';
18
+ entry_price: number;
19
+ unrealized_pnl: number;
20
+ [key: string]: string | number;
21
+ }
22
+ export interface HummingbotHealthResponse {
23
+ status: string;
24
+ version: string;
25
+ system: string;
26
+ services: {
27
+ mcp_server: string;
28
+ backend_api: string;
29
+ command_delivery: string;
30
+ controller_architecture: string;
31
+ configuration_management: string;
32
+ live_trading: string;
33
+ hyperliquid_integration: string;
34
+ };
35
+ capabilities: {
36
+ ai_agent_interface: boolean;
37
+ real_exchange_connectivity: boolean;
38
+ controller_based_pools: boolean;
39
+ database_driven_config: boolean;
40
+ hot_reload: boolean;
41
+ live_hyperliquid_trading: boolean;
42
+ multi_strategy_support: boolean;
43
+ batch_operations: boolean;
44
+ real_time_analytics: boolean;
45
+ };
46
+ ai_features: {
47
+ automated_trading: boolean;
48
+ performance_analytics: boolean;
49
+ risk_assessment: boolean;
50
+ optimization_suggestions: boolean;
51
+ market_intelligence: boolean;
52
+ predictive_insights: boolean;
53
+ };
54
+ trading_capabilities: {
55
+ supported_exchanges: string[];
56
+ supported_strategies: string[];
57
+ live_execution: boolean;
58
+ real_time_data: boolean;
59
+ position_management: boolean;
60
+ risk_controls: boolean;
61
+ };
62
+ architecture: {
63
+ type: string;
64
+ deployment_model: string;
65
+ ai_interface: string;
66
+ backend_integration: string;
67
+ scalability: string;
68
+ };
69
+ timestamp: string;
70
+ }
71
+ export interface StrategyInfo {
72
+ name: string;
73
+ description: string;
74
+ parameters: Record<string, string>;
75
+ supported_exchanges: string[];
76
+ risk_management: Record<string, string>;
77
+ performance_features: string[];
78
+ }
79
+ export interface ExchangeProfile {
80
+ name: string;
81
+ type: string;
82
+ mode: string;
83
+ supported_pairs: string[];
84
+ features: string[];
85
+ trading_fees: {
86
+ maker: number;
87
+ taker: number;
88
+ };
89
+ api_rate_limits: Record<string, number>;
90
+ connection_method: string;
91
+ }
92
+ export interface PerformanceCapabilities {
93
+ max_concurrent_strategies: number;
94
+ supported_order_types: string[];
95
+ max_positions: number;
96
+ risk_management_features: string[];
97
+ performance_metrics: string[];
98
+ [key: string]: string | number | string[];
99
+ }
100
+ export interface OperationalFeatures {
101
+ hot_reload: boolean;
102
+ real_time_monitoring: boolean;
103
+ automated_risk_management: boolean;
104
+ multi_exchange_support: boolean;
105
+ strategy_optimization: boolean;
106
+ [key: string]: boolean | string | number;
107
+ }
108
+ export interface HummingbotContext {
109
+ name: string;
110
+ version: string;
111
+ description: string;
112
+ endpoints: string[];
113
+ strategies_supported: StrategyInfo[];
114
+ exchange_profiles: ExchangeProfile[];
115
+ features: string[];
116
+ status: string;
117
+ uptime: number;
118
+ timestamp: string;
119
+ system_architecture: Record<string, string>;
120
+ performance_capabilities: PerformanceCapabilities;
121
+ operational_features: OperationalFeatures;
122
+ }
123
+ export interface CreateControllerRequest {
124
+ name: string;
125
+ strategy: string;
126
+ trading_pair: string;
127
+ config: ConfigurationObject;
128
+ }
129
+ export interface ControllerResponse {
130
+ id: string;
131
+ name: string;
132
+ strategy: string;
133
+ trading_pair: string;
134
+ status: string;
135
+ config: ConfigurationObject;
136
+ created_at: string;
137
+ updated_at: string;
138
+ pool_id?: string;
139
+ }
140
+ export interface ControllerMetrics {
141
+ id: string;
142
+ performance: {
143
+ total_pnl: number;
144
+ win_rate: number;
145
+ total_trades: number;
146
+ current_positions: Record<string, PositionData>;
147
+ };
148
+ status: {
149
+ is_running: boolean;
150
+ last_update: string;
151
+ health_score: number;
152
+ };
153
+ trading_stats: {
154
+ volume_24h: number;
155
+ fees_paid: number;
156
+ active_orders: number;
157
+ };
158
+ }
159
+ export interface ExchangeListResponse {
160
+ supported_exchanges: string[];
161
+ count: number;
162
+ ai_capabilities?: {
163
+ live_trading: boolean;
164
+ real_time_data: boolean;
165
+ multi_strategy: boolean;
166
+ automated_execution: boolean;
167
+ };
168
+ hyperliquid_features?: {
169
+ perpetual_trading: boolean;
170
+ spot_trading: boolean;
171
+ low_fees: boolean;
172
+ fast_execution: boolean;
173
+ vault_integration: boolean;
174
+ };
175
+ }
176
+ export interface ConnectExchangeRequest {
177
+ exchange: string;
178
+ trading_pair: string;
179
+ credentials: {
180
+ wallet_address?: string;
181
+ private_key?: string;
182
+ api_key?: string;
183
+ api_secret?: string;
184
+ };
185
+ }
186
+ export interface TradingConnectionResponse {
187
+ controller_id: string;
188
+ exchange: string;
189
+ trading_pair: string;
190
+ status: string;
191
+ connected_at: string;
192
+ account_balance?: Record<string, number>;
193
+ }
194
+ export interface MarketDataResponse {
195
+ symbol: string;
196
+ price: number;
197
+ bid: number;
198
+ ask: number;
199
+ volume_24h: number;
200
+ change_24h: number;
201
+ timestamp: string;
202
+ exchange: string;
203
+ }
204
+ export interface ExecuteSignalRequest {
205
+ controller_id: string;
206
+ signal: {
207
+ type: string;
208
+ side: string;
209
+ amount: number;
210
+ price?: number;
211
+ order_type: string;
212
+ };
213
+ }
214
+ export interface SignalExecutionResponse {
215
+ success: boolean;
216
+ order_id?: string;
217
+ message: string;
218
+ timestamp: string;
219
+ }
220
+ export interface CreateBotRequest {
221
+ name: string;
222
+ strategy: string;
223
+ trading_pair: string;
224
+ config: ConfigurationObject;
225
+ }
226
+ export interface BotResponse {
227
+ id: string;
228
+ name: string;
229
+ strategy: string;
230
+ trading_pair: string;
231
+ status: string;
232
+ config: ConfigurationObject;
233
+ created_at: string;
234
+ }
235
+ export interface PoolResponse {
236
+ id: string;
237
+ name: string;
238
+ max_controllers: number;
239
+ current_controllers: number;
240
+ status: string;
241
+ created_at: string;
242
+ }
243
+ export interface CreatePoolRequest {
244
+ name?: string;
245
+ max_controllers?: number;
246
+ }
247
+ export interface HyperliquidOrderbook {
248
+ bids: Array<[string, string]>;
249
+ asks: Array<[string, string]>;
250
+ timestamp: number;
251
+ symbol: string;
252
+ }
253
+ export interface HyperliquidSummary {
254
+ symbol: string;
255
+ price: number;
256
+ volume_24h: number;
257
+ change_24h: number;
258
+ high_24h: number;
259
+ low_24h: number;
260
+ timestamp: number;
261
+ }
262
+ export interface MCPRequest {
263
+ jsonrpc: string;
264
+ id: string | number;
265
+ method: string;
266
+ params?: any;
267
+ }
268
+ export interface MCPResponse {
269
+ jsonrpc: string;
270
+ id: string | number;
271
+ result?: any;
272
+ error?: {
273
+ code: number;
274
+ message: string;
275
+ data?: any;
276
+ };
277
+ }
278
+ export interface MCPTool {
279
+ name: string;
280
+ title: string;
281
+ description: string;
282
+ inputSchema?: {
283
+ type: string;
284
+ properties: any;
285
+ required?: string[];
286
+ };
287
+ }
288
+ export interface MCPToolsListResponse {
289
+ tools: MCPTool[];
290
+ }
291
+ export interface MCPToolCallRequest {
292
+ name: string;
293
+ arguments?: Record<string, any>;
294
+ }
295
+ export interface MCPToolCallResponse {
296
+ content: Array<{
297
+ type: string;
298
+ text: string;
299
+ }>;
300
+ meta?: any;
301
+ isError?: boolean;
302
+ }
303
+ export interface DexscreenerTokenData {
304
+ name: string;
305
+ symbol: string;
306
+ priceUsd: number;
307
+ liquidityUsd: number;
308
+ volumeH1: number;
309
+ priceChangeH1: number;
310
+ pairAddress: string;
311
+ pairUrl: string;
312
+ }
313
+ export interface DexscreenerMarketAnalysis {
314
+ tokens: DexscreenerTokenData[];
315
+ marketSummary: {
316
+ totalLiquidity: number;
317
+ totalVolume: number;
318
+ avgPriceChange: number;
319
+ peakLiquidity: number;
320
+ peakVolume: number;
321
+ peakChange: number;
322
+ };
323
+ riskAssessment: {
324
+ moonshots: number;
325
+ stableGainers: number;
326
+ highVolume: number;
327
+ qualityTokens: number;
328
+ };
329
+ }
330
+ export interface TokenPriceData {
331
+ token: string;
332
+ chain: string;
333
+ price?: number;
334
+ bid?: number;
335
+ ask?: number;
336
+ volume_24h?: number;
337
+ change_24h?: number;
338
+ timestamp?: string;
339
+ }
340
+ export interface TokenVolumeData {
341
+ token: string;
342
+ chain: string;
343
+ interval: string;
344
+ volume?: number;
345
+ tokenFormat?: string;
346
+ source?: string;
347
+ }
348
+ export interface OrderbookData {
349
+ base: string;
350
+ quote: string;
351
+ chain: string;
352
+ midPrice?: number;
353
+ spread?: number;
354
+ bids?: Array<{
355
+ price: number;
356
+ size: number;
357
+ }>;
358
+ asks?: Array<{
359
+ price: number;
360
+ size: number;
361
+ }>;
362
+ }
363
+ export interface EnhancedOHLCVData {
364
+ token: string;
365
+ chain: string;
366
+ interval: string;
367
+ candles: Array<{
368
+ timestamp: number;
369
+ open: number;
370
+ high: number;
371
+ low: number;
372
+ close: number;
373
+ volume: number;
374
+ }>;
375
+ source?: string;
376
+ meta?: {
377
+ construction_method?: string;
378
+ tick_data_points?: number;
379
+ total_candles?: number;
380
+ };
381
+ }
382
+ export interface TokenDiscoveryData {
383
+ chain: string;
384
+ type: string;
385
+ tokens: Array<{
386
+ symbol: string;
387
+ name?: string;
388
+ volume?: number;
389
+ marketCap?: number;
390
+ }>;
391
+ sortBy: string;
392
+ sortOrder: string;
393
+ }
394
+ export interface TradingIntensityData {
395
+ token: string;
396
+ chain: string;
397
+ interval: string;
398
+ tokenFormat: string;
399
+ metrics: {
400
+ tradesPerMinute?: number;
401
+ volumePerMinute?: number;
402
+ activityScore?: number;
403
+ };
404
+ marketState?: string;
405
+ }
406
+ export interface SymbolResolutionData {
407
+ symbol: string;
408
+ chain: string;
409
+ resolved: boolean;
410
+ metadata?: {
411
+ symbol?: string;
412
+ type?: string;
413
+ pair?: string;
414
+ assetId?: number;
415
+ verified?: boolean;
416
+ };
417
+ }
418
+ export interface PerformanceMetricsData {
419
+ chain: string;
420
+ endpoint: string;
421
+ metrics: Array<{
422
+ endpoint: string;
423
+ average_ms?: number;
424
+ latency_ms?: number;
425
+ status?: string;
426
+ }>;
427
+ }
428
+ export interface MCPClientConfig {
429
+ baseUrl: string;
430
+ timeout?: number;
431
+ retries?: number;
432
+ retryDelay?: number;
433
+ enableLogging?: boolean;
434
+ apiKey?: string;
435
+ headers?: Record<string, string>;
436
+ }
437
+ export interface MCPClientOptions {
438
+ timeout?: number;
439
+ retries?: number;
440
+ retryDelay?: number;
441
+ headers?: Record<string, string>;
442
+ }
443
+ export interface WebSocketMessage {
444
+ type: string;
445
+ data: any;
446
+ timestamp: string;
447
+ }
448
+ export interface WebSocketConfig {
449
+ url: string;
450
+ reconnect?: boolean;
451
+ reconnectDelay?: number;
452
+ maxReconnectAttempts?: number;
453
+ }
454
+ export interface YieldOpportunity {
455
+ protocol: string;
456
+ pool: string;
457
+ apy: number;
458
+ tvl: number;
459
+ risk_score: number;
460
+ chain: string;
461
+ asset: string;
462
+ lockup_period?: number;
463
+ minimum_deposit?: number;
464
+ confidence_score: number;
465
+ last_updated: string;
466
+ }
467
+ export interface YieldSearchParams {
468
+ asset?: string;
469
+ chain?: string[];
470
+ min_apy?: number;
471
+ max_risk?: number;
472
+ min_tvl?: number;
473
+ protocols?: string[];
474
+ limit?: number;
475
+ }
476
+ export interface AllocationOptimization {
477
+ strategy: 'max_sharpe' | 'risk_parity' | 'mean_variance';
478
+ allocations: Record<string, number>;
479
+ expected_return: number;
480
+ expected_risk: number;
481
+ sharpe_ratio: number;
482
+ constraints: AllocationConstraints;
483
+ rebalancing_threshold: number;
484
+ }
485
+ export interface AllocationConstraints {
486
+ max_protocol_allocation: number;
487
+ max_single_asset: number;
488
+ min_liquidity: number;
489
+ max_risk_score: number;
490
+ required_chains?: string[];
491
+ }
492
+ export interface ArbitrageOpportunity {
493
+ protocol_a: string;
494
+ protocol_b: string;
495
+ asset: string;
496
+ apy_difference: number;
497
+ potential_profit: number;
498
+ execution_cost: number;
499
+ net_profit: number;
500
+ risk_assessment: string;
501
+ time_sensitivity: 'low' | 'medium' | 'high';
502
+ }
503
+ export interface BacktestResult {
504
+ strategy_name: string;
505
+ period: string;
506
+ total_return: number;
507
+ annualized_return: number;
508
+ volatility: number;
509
+ sharpe_ratio: number;
510
+ max_drawdown: number;
511
+ win_rate: number;
512
+ trade_count: number;
513
+ transaction_costs: number;
514
+ }
515
+ export interface PortfolioRiskAssessment {
516
+ var_95: number;
517
+ var_99: number;
518
+ expected_shortfall: number;
519
+ portfolio_volatility: number;
520
+ correlation_risk: number;
521
+ concentration_risk: number;
522
+ liquidity_risk: number;
523
+ overall_risk_score: number;
524
+ recommendations: string[];
525
+ }
526
+ export interface ProtocolRiskAssessment {
527
+ protocol: string;
528
+ overall_risk_score: number;
529
+ smart_contract_risk: number;
530
+ liquidity_risk: number;
531
+ governance_risk: number;
532
+ audit_score: number;
533
+ tvl_stability: number;
534
+ track_record: number;
535
+ risk_factors: string[];
536
+ recommendation: 'low_risk' | 'medium_risk' | 'high_risk' | 'avoid';
537
+ }
538
+ export interface RiskMetrics {
539
+ score: number;
540
+ category: 'low' | 'medium' | 'high' | 'extreme';
541
+ factors: RiskFactor[];
542
+ var95: number;
543
+ var99: number;
544
+ sharpeRatio?: number;
545
+ maxDrawdown?: number;
546
+ volatility: number;
547
+ }
548
+ export interface RiskFactor {
549
+ type: 'smart_contract' | 'liquidity' | 'impermanent_loss' | 'protocol' | 'market' | 'regulatory';
550
+ severity: 'low' | 'medium' | 'high' | 'extreme';
551
+ impact: number;
552
+ description: string;
553
+ mitigationSuggestion?: string;
554
+ }
555
+ export interface PerformanceAlert {
556
+ type: 'warning' | 'error' | 'info';
557
+ severity: 'low' | 'medium' | 'high';
558
+ message: string;
559
+ timestamp: string;
560
+ protocol?: string;
561
+ action_required?: boolean;
562
+ }
563
+ export interface PerformanceTracking {
564
+ portfolio_value: number;
565
+ total_yield_earned: number;
566
+ yield_rate: number;
567
+ position_breakdown: PositionData[];
568
+ attribution_analysis: AttributionData;
569
+ risk_metrics: RiskMetrics;
570
+ alerts: PerformanceAlert[];
571
+ }
572
+ export interface PositionData {
573
+ protocol: string;
574
+ pool: string;
575
+ amount_deposited: number;
576
+ current_value: number;
577
+ yield_earned: number;
578
+ apy: number;
579
+ risk_score: number;
580
+ allocation_percentage: number;
581
+ }
582
+ export interface AttributionData {
583
+ protocol_contribution: Record<string, number>;
584
+ asset_contribution: Record<string, number>;
585
+ chain_contribution: Record<string, number>;
586
+ strategy_alpha: number;
587
+ }
588
+ export interface APYHistoryData {
589
+ protocol: string;
590
+ pool: string;
591
+ historical_data: APYDataPoint[];
592
+ statistics: APYStatistics;
593
+ trend_analysis: TrendAnalysis;
594
+ volatility_metrics: VolatilityMetrics;
595
+ }
596
+ export interface APYDataPoint {
597
+ timestamp: string;
598
+ apy: number;
599
+ tvl: number;
600
+ volume_24h: number;
601
+ utilization_rate: number;
602
+ }
603
+ export interface APYStatistics {
604
+ mean_apy: number;
605
+ median_apy: number;
606
+ std_deviation: number;
607
+ min_apy: number;
608
+ max_apy: number;
609
+ percentile_25: number;
610
+ percentile_75: number;
611
+ }
612
+ export interface TrendAnalysis {
613
+ trend_direction: 'up' | 'down' | 'stable';
614
+ trend_strength: number;
615
+ momentum: number;
616
+ seasonality: Record<string, number>;
617
+ }
618
+ export interface VolatilityMetrics {
619
+ apy_volatility: number;
620
+ tvl_volatility: number;
621
+ stability_score: number;
622
+ risk_adjusted_return: number;
623
+ }
624
+ export interface FindYieldOpportunitiesParams {
625
+ search_criteria: YieldSearchParams;
626
+ risk_tolerance: 'conservative' | 'moderate' | 'aggressive';
627
+ time_horizon: 'short' | 'medium' | 'long';
628
+ }
629
+ export interface OptimizeAllocationParams {
630
+ current_portfolio: PositionData[];
631
+ available_capital: number;
632
+ optimization_strategy: 'max_sharpe' | 'risk_parity' | 'mean_variance';
633
+ constraints: AllocationConstraints;
634
+ rebalancing_frequency: 'daily' | 'weekly' | 'monthly';
635
+ }
636
+ export interface AnalyzeArbitrageParams {
637
+ asset: string;
638
+ chains: string[];
639
+ protocols: string[];
640
+ min_profit_threshold: number;
641
+ max_execution_cost: number;
642
+ }
643
+ export interface BacktestStrategyParams {
644
+ strategy_config: {
645
+ name: string;
646
+ allocation_method: string;
647
+ rebalancing_frequency: string;
648
+ risk_limits: Record<string, number>;
649
+ };
650
+ start_date: string;
651
+ end_date: string;
652
+ initial_capital: number;
653
+ include_costs: boolean;
654
+ }
655
+ export interface CalculateRiskParams {
656
+ portfolio: PositionData[];
657
+ time_horizon: number;
658
+ confidence_level: number;
659
+ correlation_window: number;
660
+ }
661
+ export interface AssessProtocolRiskParams {
662
+ protocol: string;
663
+ include_governance: boolean;
664
+ include_smart_contract: boolean;
665
+ include_market: boolean;
666
+ }
667
+ export interface TrackPerformanceParams {
668
+ portfolio_id?: string;
669
+ time_range: '24h' | '7d' | '30d' | '90d' | '1y';
670
+ include_attribution: boolean;
671
+ benchmark?: string;
672
+ }
673
+ export interface GetAPYHistoryParams {
674
+ protocol: string;
675
+ pool?: string;
676
+ asset?: string;
677
+ time_range: '7d' | '30d' | '90d' | '180d' | '1y';
678
+ granularity: 'hourly' | 'daily' | 'weekly';
679
+ }
680
+ export interface GetApyHistoryRequest {
681
+ protocol: string;
682
+ chain: string;
683
+ pool?: string;
684
+ timeframe?: '7d' | '30d' | '90d' | '180d' | '1y';
685
+ includeRiskMetrics?: boolean;
686
+ includeStatistics?: boolean;
687
+ minTvl?: number;
688
+ maxRiskScore?: number;
689
+ }
690
+ export interface FindYieldOpportunitiesRequest {
691
+ chains?: string[];
692
+ minApy?: number;
693
+ maxRisk?: number;
694
+ minTvl?: number;
695
+ protocols?: string[];
696
+ assets?: string[];
697
+ includeArbitrage?: boolean;
698
+ riskTolerance?: 'conservative' | 'moderate' | 'aggressive';
699
+ sortBy?: 'apy' | 'risk_adjusted_return' | 'tvl' | 'risk_score';
700
+ }
701
+ export interface AnalyzeArbitrageOpportunitiesRequest {
702
+ sourceChain: string;
703
+ targetChain: string;
704
+ token: string;
705
+ amount?: number;
706
+ includeGasCosts?: boolean;
707
+ slippageTolerance?: number;
708
+ bridgeProtocols?: string[];
709
+ }
710
+ export interface BacktestStrategyRequest {
711
+ strategy: 'yield_farming' | 'arbitrage' | 'optimization' | 'balanced';
712
+ protocols?: string[];
713
+ chains?: string[];
714
+ startDate: string;
715
+ endDate: string;
716
+ initialAmount: number;
717
+ rebalanceFrequency?: 'daily' | 'weekly' | 'monthly' | 'quarterly';
718
+ riskTolerance?: 'conservative' | 'moderate' | 'aggressive';
719
+ includeTransactionCosts?: boolean;
720
+ optimizationMethod?: 'max_sharpe' | 'risk_parity' | 'mean_variance';
721
+ }
722
+ export interface CalculatePortfolioRiskRequest {
723
+ positions: Array<{
724
+ protocol: string;
725
+ chain?: string;
726
+ asset: string;
727
+ amount: number;
728
+ currentApy?: number;
729
+ }>;
730
+ riskMetrics?: ('var' | 'correlation' | 'concentration' | 'stress_test')[];
731
+ confidenceLevel?: 90 | 95 | 99;
732
+ timeHorizon?: number;
733
+ stressScenarios?: string[];
734
+ }
735
+ export interface OptimizeYieldAllocationRequest {
736
+ amount: number;
737
+ riskTolerance: 'conservative' | 'moderate' | 'aggressive';
738
+ optimizationMethod: 'max_sharpe' | 'risk_parity' | 'mean_variance' | 'min_variance';
739
+ constraints?: {
740
+ maxProtocolAllocation?: number;
741
+ maxChainAllocation?: number;
742
+ maxRiskScore?: number;
743
+ minYield?: number;
744
+ };
745
+ includeProtocols?: string[];
746
+ excludeProtocols?: string[];
747
+ targetChains?: string[];
748
+ rebalanceFrequency?: 'never' | 'daily' | 'weekly' | 'monthly';
749
+ }
750
+ export interface AssessProtocolRiskRequest {
751
+ protocol: string;
752
+ chain?: string;
753
+ includeHistoricalEvents?: boolean;
754
+ riskCategories?: ('smart_contract' | 'economic' | 'governance' | 'liquidity' | 'oracle')[];
755
+ depth?: 'basic' | 'detailed' | 'comprehensive';
756
+ }
757
+ export interface TrackYieldPerformanceRequest {
758
+ portfolioId: string;
759
+ timeframe?: '1d' | '7d' | '30d' | '90d' | '1y' | 'all';
760
+ includeBenchmarks?: boolean;
761
+ benchmarks?: string[];
762
+ attributionAnalysis?: boolean;
763
+ includeRealTimeData?: boolean;
764
+ alertThresholds?: {
765
+ minYield?: number;
766
+ maxDrawdown?: number;
767
+ riskScoreChange?: number;
768
+ };
769
+ granularity?: 'hourly' | 'daily' | 'weekly';
770
+ }
771
+ export interface YieldOpportunity {
772
+ protocol: string;
773
+ chain: string;
774
+ pool: string;
775
+ asset: string;
776
+ apy: number;
777
+ tvl: number;
778
+ riskScore: number;
779
+ riskAdjustedReturn: number;
780
+ confidence: number;
781
+ }
782
+ export interface ArbitrageOpportunity {
783
+ sourceChain: string;
784
+ targetChain: string;
785
+ token: string;
786
+ sourceApy: number;
787
+ targetApy: number;
788
+ apyDifference: number;
789
+ estimatedProfit: number;
790
+ bridgeCost: number;
791
+ gasCost: number;
792
+ netProfit: number;
793
+ profitability: number;
794
+ risk: 'low' | 'medium' | 'high';
795
+ }
796
+ export interface BacktestPerformance {
797
+ totalReturn: number;
798
+ annualizedReturn: number;
799
+ sharpeRatio: number;
800
+ sortinoRatio: number;
801
+ maxDrawdown: number;
802
+ volatility: number;
803
+ winRate: number;
804
+ }
805
+ export interface PortfolioRisk {
806
+ portfolioValue: number;
807
+ riskScore: number;
808
+ diversificationScore: number;
809
+ var: {
810
+ confidence95: number;
811
+ confidence99: number;
812
+ timeHorizon: number;
813
+ };
814
+ correlation: {
815
+ matrix: number[][];
816
+ averageCorrelation: number;
817
+ };
818
+ concentration: {
819
+ herfindahlIndex: number;
820
+ maxAllocation: number;
821
+ protocolExposure: Record<string, number>;
822
+ };
823
+ }
824
+ export interface OptimizedAllocation {
825
+ protocol: string;
826
+ chain: string;
827
+ asset: string;
828
+ allocation: number;
829
+ amount: number;
830
+ expectedApy: number;
831
+ riskScore: number;
832
+ weight: number;
833
+ }
834
+ //# sourceMappingURL=types.d.ts.map