fix(okx): 修复OKX交易执行器和WebSocket客户端配置问题
- 在OkxTradeExecutor中添加posSide参数以支持双向持仓模式
- 修复size参数的符号问题,确保传给OKX的值为正数
- 调整OkxWebSocketClientManager中的网格交易参数配置
- 将gridRate从0.03调整为0.0025
- 将baseQuantity和quantity从15调整为1
| | |
| | | BigDecimal entryPrice = (avgPxStr != null && !avgPxStr.isEmpty()) |
| | | ? new BigDecimal(avgPxStr) : BigDecimal.ZERO; |
| | | |
| | | log.info("[OKX-WS] positions 持仓更新, instId:{}, posSide:{}, pos:{}, avgPx:{}", |
| | | dataInstId, posSide, size, entryPrice); |
| | | // log.info("[OKX-WS] positions 持仓更新, instId:{}, posSide:{}, pos:{}, avgPx:{}", |
| | | // dataInstId, posSide, size, entryPrice); |
| | | |
| | | if (getGridTradeService() != null) { |
| | | getGridTradeService().onPositionUpdate(contract, direction, size, entryPrice); |