| | |
| | | if (!getContract().equals(item.getString("contract"))) continue; |
| | | BigDecimal pnl = new BigDecimal(item.getString("pnl")); |
| | | String side = item.getString("side"); |
| | | log.info("[{}] side:{}, pnl:{}", CHANNEL_NAME, side, pnl); |
| | | log.info("[{}] 平仓更新, 方向:{}, 盈亏:{}", CHANNEL_NAME, side, pnl); |
| | | if (getGridTradeService() != null) { |
| | | getGridTradeService().onPositionClose(getContract(), side, pnl); |
| | | } |
| | | } |
| | | } catch (Exception e) { log.error("[{}] handle fail", CHANNEL_NAME, e); } |
| | | } catch (Exception e) { log.error("[{}] 处理数据失败", CHANNEL_NAME, e); } |
| | | return true; |
| | | } |
| | | } |