/** * 服务端 API:持仓域(从 api.js 拆分,2026-08-31) * * 端点: * positions → 全量持仓 */ /** 持仓端点方法表 */ export const POSITION_METHODS = new Set([ 'positions', ]); /** * 处理持仓端点 * @param {string} method * @param {object} args * @param {object} runtime { manager } */ export async function handlePosition(method, args, { manager }) { switch (method) { case 'positions': return await manager.getAllPositions(); default: throw Object.assign(new Error('unknown position method: ' + method), { code: 'not-found' }); } }