refactor: 缠论引擎包化与 Web 分层(ECR-001)
将根目录引擎迁入 chanlun/ 并保留兼容 shim;拆分 TF_DF 与 web 服务; 前端模块化;strategies 改用 chanlun 导入;补充 ESS 文档与 golden 回归。 Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -0,0 +1,21 @@
|
||||
/* Chan web API client helpers */
|
||||
window.ChanApi = {
|
||||
analyze: function(params) {
|
||||
const q = new URLSearchParams(params);
|
||||
return fetch('/api/analyze?' + q.toString()).then(r => r.json());
|
||||
},
|
||||
chartMetadata: function() {
|
||||
return fetch('/api/chart_metadata').then(r => r.json());
|
||||
},
|
||||
symbols: function() {
|
||||
return fetch('/api/symbols').then(r => r.json());
|
||||
},
|
||||
macdConfig: function(body) {
|
||||
if (body === undefined) return fetch('/api/macd_config').then(r => r.json());
|
||||
return fetch('/api/macd_config', {
|
||||
method: 'POST',
|
||||
headers: {'Content-Type': 'application/json'},
|
||||
body: JSON.stringify(body)
|
||||
}).then(r => r.json());
|
||||
}
|
||||
};
|
||||
Reference in New Issue
Block a user