ADAPTER.md 1.0 KB

Aster 适配文档

— 端点(REST) —

  • 行情:/fapi/v3/exchangeInfo/fapi/v3/depth/fapi/v3/ticker/price/fapi/v3/fundingRate
  • 下单:/fapi/v3/order(x-www-form-urlencoded),签名串经 personal_sign
  • 账户:/fapi/v2/balance/fapi/v2/positionRisk/fapi/v3/openOrders/fapi/v3/positionSide/dual/fapi/v3/leverage/fapi/v3/marginType

— 签名 —

  • 业务 JSON 排序后 ABI 编码(string,address,address,uint256)→ keccak → personal_sign
  • HMAC:账户查询与杠杆/保证金模式接口需要 X-MBX-APIKEY + signature

— 精度与步进 —

  • 使用 exchangeInfo.symbols[].filtersLOT_SIZE(minQty/maxQty/stepSize) 对齐数量,超限自动降量重试。
  • 市价不传 timeInForce,否则 -1106。

— 常见错误 —

  • -2019:余额不足,策略侧降量或双向减仓。
  • -4005:超过最大数量,自动降量与步进对齐。
  • -4061:持仓模式不匹配,尝试 LONG/SHORTBOTH 回退。