mirror of
https://github.com/NoFxAiOS/nofx.git
synced 2026-07-12 15:26:55 +08:00
feat: unify NofxOS data provider and fix language consistency
- Add unified NofxOS API key configuration in IndicatorEditor - Add language field to StrategyConfig for consistent prompt generation - Auto-update prompt sections when interface language changes - Remove scattered URL inputs from CoinSourceEditor and IndicatorEditor - Create nofxos provider package with formatted data output - Update kernel engine to use config-based language setting
This commit is contained in:
@@ -99,7 +99,7 @@ export interface TraderInfo {
|
||||
strategy_id?: string
|
||||
strategy_name?: string
|
||||
custom_prompt?: string
|
||||
use_coin_pool?: boolean
|
||||
use_ai500?: boolean
|
||||
use_oi_top?: boolean
|
||||
system_prompt_template?: string
|
||||
}
|
||||
@@ -172,7 +172,7 @@ export interface CreateTraderRequest {
|
||||
custom_prompt?: string
|
||||
override_base_prompt?: boolean
|
||||
system_prompt_template?: string
|
||||
use_coin_pool?: boolean
|
||||
use_ai500?: boolean
|
||||
use_oi_top?: boolean
|
||||
}
|
||||
|
||||
@@ -249,7 +249,7 @@ export interface TraderConfigData {
|
||||
custom_prompt?: string
|
||||
override_base_prompt?: boolean
|
||||
system_prompt_template?: string
|
||||
use_coin_pool?: boolean
|
||||
use_ai500?: boolean
|
||||
use_oi_top?: boolean
|
||||
}
|
||||
|
||||
@@ -462,6 +462,9 @@ export interface PromptSectionsConfig {
|
||||
}
|
||||
|
||||
export interface StrategyConfig {
|
||||
// Language setting: "zh" for Chinese, "en" for English
|
||||
// Determines the language used for data formatting and prompt generation
|
||||
language?: 'zh' | 'en';
|
||||
coin_source: CoinSourceConfig;
|
||||
indicators: IndicatorConfig;
|
||||
custom_prompt?: string;
|
||||
@@ -470,15 +473,14 @@ export interface StrategyConfig {
|
||||
}
|
||||
|
||||
export interface CoinSourceConfig {
|
||||
source_type: 'static' | 'coinpool' | 'oi_top' | 'mixed';
|
||||
source_type: 'static' | 'ai500' | 'oi_top' | 'mixed';
|
||||
static_coins?: string[];
|
||||
excluded_coins?: string[]; // 排除的币种列表
|
||||
use_coin_pool: boolean;
|
||||
coin_pool_limit?: number;
|
||||
coin_pool_api_url?: string; // AI500 币种池 API URL
|
||||
use_ai500: boolean;
|
||||
ai500_limit?: number;
|
||||
use_oi_top: boolean;
|
||||
oi_top_limit?: number;
|
||||
oi_top_api_url?: string; // OI Top API URL
|
||||
// Note: API URLs are now built automatically using nofxos_api_key from IndicatorConfig
|
||||
}
|
||||
|
||||
export interface IndicatorConfig {
|
||||
@@ -499,16 +501,30 @@ export interface IndicatorConfig {
|
||||
atr_periods?: number[];
|
||||
boll_periods?: number[];
|
||||
external_data_sources?: ExternalDataSource[];
|
||||
|
||||
// ========== NofxOS 数据源统一配置 ==========
|
||||
// Unified NofxOS API Key - used for all NofxOS data sources
|
||||
nofxos_api_key?: string;
|
||||
|
||||
// 量化数据源(资金流向、持仓变化、价格变化)
|
||||
enable_quant_data?: boolean;
|
||||
quant_data_api_url?: string;
|
||||
enable_quant_oi?: boolean;
|
||||
enable_quant_netflow?: boolean;
|
||||
|
||||
// OI 排行数据(市场持仓量增减排行)
|
||||
enable_oi_ranking?: boolean;
|
||||
oi_ranking_api_url?: string;
|
||||
oi_ranking_duration?: string; // "1h", "4h", "24h"
|
||||
oi_ranking_limit?: number;
|
||||
|
||||
// NetFlow 排行数据(机构/散户资金流向排行)
|
||||
enable_netflow_ranking?: boolean;
|
||||
netflow_ranking_duration?: string; // "1h", "4h", "24h"
|
||||
netflow_ranking_limit?: number;
|
||||
|
||||
// Price 排行数据(涨跌幅排行)
|
||||
enable_price_ranking?: boolean;
|
||||
price_ranking_duration?: string; // "1h", "4h", "24h" or "1h,4h,24h"
|
||||
price_ranking_limit?: number;
|
||||
}
|
||||
|
||||
export interface KlineConfig {
|
||||
|
||||
Reference in New Issue
Block a user