| | |
| | | import com.xcong.excoin.modules.contract.entity.ContractOrderEntity; |
| | | import com.xcong.excoin.modules.contract.service.impl.OrderWebsocketServiceImpl; |
| | | import com.xcong.excoin.modules.documentary.service.FollowOrderOperationService; |
| | | import com.xcong.excoin.modules.member.entity.MemberEntity; |
| | | import com.xcong.excoin.utils.dingtalk.DingTalkUtils; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | |
| | | import javax.validation.constraints.NotNull; |
| | | import java.math.BigDecimal; |
| | | import java.util.concurrent.ExecutorService; |
| | | import java.util.concurrent.Executors; |
| | |
| | | try { |
| | | followOrderOperationService.addFollowerOrder(id); |
| | | } catch (Exception e) { |
| | | log.info("--->", e); |
| | | log.error("产生跟单任务报错", e); |
| | | } |
| | | } |
| | | }); |
| | | } |
| | | |
| | | /** |
| | | * 全仓模式 -- 预估强平价 |
| | | * |
| | | * @param symbol 币种 |
| | | * @param memberEntity 会员信息 |
| | | */ |
| | | public static void sendWholeForceClosingPrice(@NotNull String symbol, @NotNull MemberEntity memberEntity) { |
| | | EXECUTOR.execute(new Runnable() { |
| | | @Override |
| | | public void run() { |
| | | try { |
| | | CalculateUtil.getForceSetPriceForWhole(null, memberEntity); |
| | | } catch (Exception e) { |
| | | log.error("全仓模式预估强平价", e); |
| | | } |
| | | } |
| | | }); |