| | |
| | | package com.xcong.excoin.modules.contract.controller; |
| | | |
| | | import com.xcong.excoin.common.response.Result; |
| | | import com.xcong.excoin.modules.contract.parameter.dto.HoldOrderListDto; |
| | | import com.xcong.excoin.modules.contract.parameter.dto.ChangeBondDto; |
| | | import com.xcong.excoin.modules.contract.parameter.dto.ProfitOrLessDto; |
| | | import com.xcong.excoin.modules.contract.parameter.dto.SubmitOrderDto; |
| | | import com.xcong.excoin.modules.contract.parameter.vo.ContractMoneyInfoVo; |
| | | import com.xcong.excoin.modules.contract.parameter.vo.HoldOrderListVo; |
| | | import com.xcong.excoin.modules.contract.service.ContractHoldOrderService; |
| | | import com.xcong.excoin.modules.contract.service.ContractOrderService; |
| | | import com.xcong.excoin.rabbit.producer.OrderProducer; |
| | | import io.swagger.annotations.*; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.validation.annotation.Validated; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import javax.annotation.Resource; |
| | |
| | | |
| | | @ApiOperation(value = "查询当前持仓订单列表 -- 轮询") |
| | | @ApiResponses({ |
| | | @ApiResponse(code = 0, message = "success", response = HoldOrderListDto.class) |
| | | @ApiResponse(code = 0, message = "success", response = HoldOrderListVo.class) |
| | | }) |
| | | @GetMapping(value = "/findHoldOrderList") |
| | | public Result findHoldOrderList() { |
| | |
| | | return contractHoldOrderService.cancelHoldOrderBatch(); |
| | | } |
| | | |
| | | @ApiOperation(value = "未完成--设置止盈止损") |
| | | @ApiOperation(value = "设置止盈止损") |
| | | @PostMapping(value = "/setTargetProfitOrLoss") |
| | | public Result setTargetProfitOrLoss() { |
| | | return null; |
| | | public Result setTargetProfitOrLoss(@RequestBody @Validated ProfitOrLessDto profitOrLessDto) { |
| | | return contractHoldOrderService.setTargetProfitOrLess(profitOrLessDto); |
| | | } |
| | | |
| | | @ApiOperation(value = "未完成--调整保证金") |
| | | @PostMapping(value = "/tuneUpBond") |
| | | public Result tuneUpBond() { |
| | | return null; |
| | | @ApiOperation(value = "调整保证金") |
| | | @PostMapping(value = "/changeBond") |
| | | public Result changeBond(ChangeBondDto changeBondDto) { |
| | | return contractHoldOrderService.changeBond(changeBondDto); |
| | | } |
| | | |
| | | @ApiOperation(value = "未完成--分页查询历史订单列表") |
| | |
| | | return null; |
| | | } |
| | | |
| | | @ApiOperation(value = "获取合约页面资产信息") |
| | | @ApiResponses({ |
| | | @ApiResponse(code = 0, message = "success", response = ContractMoneyInfoVo.class) |
| | | }) |
| | | @GetMapping(value = "/findContractMoneyInfo") |
| | | public Result findContractMoneyInfo(@ApiParam(name = "symbol", value = "币种", required = true, example = "BTC/USDT") @RequestParam(value = "symbol") String symbol) { |
| | | return contractHoldOrderService.findContractMoneyInfo(symbol); |
| | | } |
| | | |
| | | } |