| | |
| | | String mode = pos.getString("mode"); |
| | | BigDecimal size = new BigDecimal(pos.getString("size")); |
| | | BigDecimal entryPrice = new BigDecimal(pos.getString("entry_price")); |
| | | log.info("[{}] mode:{}, size:{}, entry:{}", CHANNEL_NAME, mode, size, entryPrice); |
| | | log.info("[{}] 持仓更新, 模式:{}, 数量:{}, 入场价:{}", CHANNEL_NAME, mode, size, entryPrice); |
| | | if (getGridTradeService() != null) { |
| | | getGridTradeService().onPositionUpdate(getContract(), mode, size, entryPrice); |
| | | } |
| | | } |
| | | } catch (Exception e) { log.error("[{}] handle fail", CHANNEL_NAME, e); } |
| | | } catch (Exception e) { log.error("[{}] 处理数据失败", CHANNEL_NAME, e); } |
| | | return true; |
| | | } |
| | | } |