mirror of
https://github.com/NoFxAiOS/nofx.git
synced 2026-07-10 14:27:00 +08:00
feat: add time period selector to competition chart (1D/3D/7D/30D/All)
This commit is contained in:
@@ -409,10 +409,12 @@ export const api = {
|
||||
},
|
||||
|
||||
// 批量获取多个交易员的历史数据(无需认证)
|
||||
async getEquityHistoryBatch(traderIds: string[]): Promise<any> {
|
||||
// hours: 可选参数,获取最近N小时的数据(0表示全部数据)
|
||||
// 常用值: 24=1天, 72=3天, 168=7天, 720=30天, 0=全部
|
||||
async getEquityHistoryBatch(traderIds: string[], hours?: number): Promise<any> {
|
||||
const result = await httpClient.post<any>(
|
||||
`${API_BASE}/equity-history-batch`,
|
||||
{ trader_ids: traderIds }
|
||||
{ trader_ids: traderIds, hours: hours || 0 }
|
||||
)
|
||||
if (!result.success) throw new Error('获取批量历史数据失败')
|
||||
return result.data!
|
||||
|
||||
Reference in New Issue
Block a user