— 统一请求参数 —
symbol: string // 统一符号(Pacifica 用基础,如 BTC;Aster 用 BTCUSDT)
side: 'BUY' | 'SELL'
type: 'MARKET' | 'LIMIT' | 'POST_ONLY'
quantity: string // 数量(字符串)
price?: string // 限价必填
tif?: 'GTC' | 'IOC' | 'FOK' // 市价默认 IOC;POST_ONLY 对应 ALO/GTX(按接入映射)
reduceOnly?: boolean
clientOrderId?: string // UUID
— 精度/步进对齐 —
lot_size 与最小数量从 info 获取;数量、价格以字符串传递,内部不四舍五入,仅向下截取步进。exchangeInfo.filters.LOT_SIZE(minQty/maxQty/stepSize),数量超限自动降档重试;市价不传 timeInForce。— 市价单 —
slippage_percent(默认 0.5),tif 使用 IOC;type=MARKET,不带 timeInForce,按签名规则提交;— 限价单/POST_ONLY —
LIMIT/POST_ONLY → tif=GTC/ALO,签名字段包含 tif/price/reduce_only/client_order_id;LIMIT 带 timeInForce=GTC,签名与市价相同但包含 price;— 批量 —
Create 数据必须带 reduce_only;— TP/SL —
/positions/tpsl,symbol 需基础符号,签名 type=set_position_tpsl;— 错误与重试 —
— 统一映射(返回值) —
Order: {
id, symbol, status, side, type, price?, origQty, executedQty, updateTime
}