合约止盈止损接口(新)
<p>[TOC]</p>
<h5>简要描述</h5>
<ul>
<li>合约止盈止损接口</li>
</ul>
<h5>请求URL</h5>
<ul>
<li><code>https://doge-test-api.2travel.vip/swap/order/cut-position/v1?positionId=272488&amp;profitPrice=1885&amp;profitEntrustPrice=0.0&amp;lossPrice=1865&amp;lossEntrustPrice=0.0&amp;volume=20&amp;cutMold=0</code></li>
</ul>
<h5>请求方式</h5>
<ul>
<li>POST </li>
</ul>
<h5>参数</h5>
<table>
<thead>
<tr>
<th style="text-align: left;">参数名</th>
<th style="text-align: left;">必选</th>
<th style="text-align: left;">类型</th>
<th>说明</th>
</tr>
</thead>
<tbody>
<tr>
<td style="text-align: left;">positionId</td>
<td style="text-align: left;">否</td>
<td style="text-align: left;">Long</td>
<td>仓位Id</td>
</tr>
<tr>
<td style="text-align: left;">profitPrice</td>
<td style="text-align: left;">否</td>
<td style="text-align: left;">float</td>
<td>触发价(委托方式是计划/限价必填)</td>
</tr>
<tr>
<td style="text-align: left;">profitEntrustPrice</td>
<td style="text-align: left;">否</td>
<td style="text-align: left;">float</td>
<td>委托价(委托方式是计划/限价必填)</td>
</tr>
<tr>
<td style="text-align: left;">lossPrice</td>
<td style="text-align: left;">否</td>
<td style="text-align: left;">float</td>
<td>触发价(委托方式是计划/限价必填)</td>
</tr>
<tr>
<td style="text-align: left;">lossEntrustPrice</td>
<td style="text-align: left;">否</td>
<td style="text-align: left;">float</td>
<td>委托价(委托方式是计划/限价必填)</td>
</tr>
<tr>
<td style="text-align: left;">volume</td>
<td style="text-align: left;">是</td>
<td style="text-align: left;">float</td>
<td>张数</td>
</tr>
<tr>
<td style="text-align: left;">cutMold</td>
<td style="text-align: left;">是</td>
<td style="text-align: left;">int</td>
<td>0:全部仓位 1:部分仓位</td>
</tr>
</tbody>
</table>
<h5>返回示例</h5>
<pre><code> {
&quot;data&quot;: {
&quot;id&quot;: 759460,
&quot;contractId&quot;: 2,
&quot;memberId&quot;: 800001,
&quot;positionId&quot;: 272488,
&quot;contractOrderEntrustId&quot;: &quot;CE169926056574598&quot;,
&quot;patterns&quot;: &quot;CROSSED&quot;,
&quot;entrustType&quot;: &quot;CLOSE&quot;,
&quot;direction&quot;: &quot;SELL&quot;,
&quot;type&quot;: &quot;SPOT_LIMIT&quot;,
&quot;symbol&quot;: &quot;ETH/USDT&quot;,
&quot;coinSymbol&quot;: &quot;ETH&quot;,
&quot;baseSymbol&quot;: &quot;USDT&quot;,
&quot;triggerPrice&quot;: null,
&quot;entrustPrice&quot;: null,
&quot;lossPrice&quot;: 1865,
&quot;lossEntrustPrice&quot;: 0,
&quot;profitPrice&quot;: 1885,
&quot;profitEntrustPrice&quot;: 0,
&quot;tradedPrice&quot;: 0,
&quot;principalUnit&quot;: &quot;USDT&quot;,
&quot;principalAmount&quot;: 0,
&quot;currentPrice&quot;: 1880.45,
&quot;openFee&quot;: null,
&quot;closeFee&quot;: 0,
&quot;shareNumber&quot;: 500,
&quot;volume&quot;: 10,
&quot;tradedVolume&quot;: 0,
&quot;profitAndLoss&quot;: 0,
&quot;status&quot;: &quot;ENTRUST_ING&quot;,
&quot;createTime&quot;: 1699260565745,
&quot;triggeringTime&quot;: 0,
&quot;isFromSpot&quot;: 1,
&quot;isBlast&quot;: 0,
&quot;isReward&quot;: 0,
&quot;isCut&quot;: 1,
&quot;isOneClose&quot;: 0,
&quot;isMarketAllClose&quot;: 0,
&quot;isLimitPrice&quot;: 0,
&quot;usdtOpenTime&quot;: null,
&quot;usdtOpenPrice&quot;: 1877.918779,
&quot;isReversedOpen&quot;: 0,
&quot;leverage&quot;: 100,
&quot;dealTime&quot;: null,
&quot;positionType&quot;: 0,
&quot;moneyType&quot;: 1,
&quot;openType&quot;: 0,
&quot;closeType&quot;: 4,
&quot;decimalScale&quot;: 1,
&quot;isPercentage&quot;: null,
&quot;violateTime&quot;: null,
&quot;followId&quot;: null,
&quot;followSystemId&quot;: null,
&quot;dividendPercent&quot;: null,
&quot;isSpecial&quot;: null,
&quot;percentageVolume&quot;: null,
&quot;cutType&quot;: null,
&quot;isSpotLimitOrder&quot;:1,
&quot;isSpotLimitOrderMsg&quot;:&quot;已设限价委托,止盈止损可能执行失败&quot;
},
&quot;code&quot;: 0,
&quot;message&quot;: &quot;Order successfully&quot;,
&quot;totalPage&quot;: null,
&quot;totalElement&quot;: null
}</code></pre>
<p><strong> 新加字段 </strong></p>
<pre><code> isSpotLimitOrder; // 是否止盈止损 0:没有 1:有
isSpotLimitOrderMsg; //提示</code></pre>
<h5>返回参数说明</h5>
<h5>备注</h5>
<ul>
<li>更多返回错误代码请看首页的错误代码描述</li>
</ul>