获取历史持仓列表(正确)
<p>[TOC]</p>
<h5>简要描述</h5>
<ul>
<li>获取历史持仓列表(正确)</li>
</ul>
<h5>请求URL</h5>
<ul>
<li><code>/swap/position/historyNew</code></li>
</ul>
<h5>请求方式</h5>
<ul>
<li>GET </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;">pageNo</td>
<td style="text-align: left;">是</td>
<td style="text-align: left;">number</td>
<td>第几页</td>
</tr>
<tr>
<td style="text-align: left;">pageSize</td>
<td style="text-align: left;">是</td>
<td style="text-align: left;">number</td>
<td>每页数量</td>
</tr>
<tr>
<td style="text-align: left;">openType</td>
<td style="text-align: left;">是</td>
<td style="text-align: left;">String</td>
<td>开仓类型 0市价1限价2计划3合并 多个条件[0,1]</td>
</tr>
<tr>
<td style="text-align: left;">closeType</td>
<td style="text-align: left;">是</td>
<td style="text-align: left;">String</td>
<td>平仓类型</td>
</tr>
<tr>
<td style="text-align: left;">startTime</td>
<td style="text-align: left;">是</td>
<td style="text-align: left;">String</td>
<td>开始时间</td>
</tr>
<tr>
<td style="text-align: left;">endTime</td>
<td style="text-align: left;">是</td>
<td style="text-align: left;">String</td>
<td>结束时间</td>
</tr>
<tr>
<td style="text-align: left;">position</td>
<td style="text-align: left;">是</td>
<td style="text-align: left;">String</td>
<td>仓位id</td>
</tr>
</tbody>
</table>
<h5>返回示例</h5>
<pre><code> {
&quot;content&quot;: [
{
&quot;id&quot;: 185260,
&quot;memberId&quot;: 804921,
&quot;leverage&quot;: 10.00,
&quot;totalPosition&quot;: 2.00000000,
&quot;openPrice&quot;: 3537.83537800,
&quot;closedOpenPrice&quot;: 3532.19467770,
&quot;closePrice&quot;: 3532.19467770,
&quot;principalAmount&quot;: 0E-8,
&quot;totalPrincipalAmount&quot;: 707.56707560,
&quot;frozenPosition&quot;: 0E-8,
&quot;closedPosition&quot;: 2.00000000,
&quot;type&quot;: 0,
&quot;moneyType&quot;: 1,
&quot;direction&quot;: &quot;BUY&quot;,
&quot;usdtProfit&quot;: -11.28140060,
&quot;shareNumber&quot;: 500.00000000,
&quot;status&quot;: &quot;DONE&quot;,
&quot;coin&quot;: {
&quot;id&quot;: 2,
&quot;name&quot;: &quot;ETH永续合约&quot;,
&quot;symbol&quot;: &quot;ETH/USDT&quot;,
&quot;coinSymbol&quot;: &quot;ETH&quot;,
&quot;baseSymbol&quot;: &quot;USDT&quot;,
&quot;sort&quot;: 2,
&quot;coinScale&quot;: 2,
&quot;baseCoinScale&quot;: 4,
&quot;type&quot;: &quot;PERPETUAL&quot;,
&quot;enable&quot;: 1,
&quot;visible&quot;: 1,
&quot;exchangeable&quot;: 1,
&quot;enableOpenSell&quot;: 1,
&quot;enableOpenBuy&quot;: 1,
&quot;enableMarketSell&quot;: 1,
&quot;enableMarketBuy&quot;: 1,
&quot;enableTriggerEntrust&quot;: 1,
&quot;spreadType&quot;: 1,
&quot;spread&quot;: 0.00001000,
&quot;leverageType&quot;: 2,
&quot;leverage&quot;: &quot;1200&quot;,
&quot;shareNumber&quot;: 500.00000000,
&quot;minShare&quot;: 0.10000000,
&quot;maxShare&quot;: 10000.00000000,
&quot;intervalHour&quot;: 1,
&quot;feePercent&quot;: 0.01911000,
&quot;maintenanceMarginRate&quot;: 0.01000000,
&quot;openFee&quot;: 0.00050000,
&quot;closeFee&quot;: 0.00050000,
&quot;takerFee&quot;: 0.00100000,
&quot;makerFee&quot;: 0.00100000,
&quot;followFee&quot;: 0.00025000,
&quot;totalProfit&quot;: 507432.65406077,
&quot;totalLoss&quot;: 577870.04096583,
&quot;totalOpenFee&quot;: 0E-8,
&quot;totalCloseFee&quot;: 213400.30785309,
&quot;currentTime&quot;: null,
&quot;currentPrice&quot;: null,
&quot;usdtRate&quot;: 6.42,
&quot;maxTotalShare&quot;: 2000000.00000000,
&quot;minScale&quot;: 1
},
&quot;createTime&quot;: 1718791732000,
&quot;openTime&quot;: 1718791732000,
&quot;latestOpenTime&quot;: 1718791732000,
&quot;closeTime&quot;: 1718793056000,
&quot;openType&quot;: 0,
&quot;closeType&quot;: 0,
&quot;decimalScale&quot;: 1,
&quot;commissionFee&quot;: 70.70030056,
&quot;blastedAmount&quot;: null,
&quot;isLock&quot;: null,
&quot;violateTime&quot;: null,
&quot;currentPrice&quot;: 3532.19467770,
&quot;followOrderId&quot;: null,
&quot;followPositionId&quot;: null,
&quot;dividendPercent&quot;: null,
&quot;isSpecial&quot;: null,
&quot;loadUser&quot;: false,
&quot;usdtBuyPosition&quot;: null,
&quot;marginDifference&quot;: null,
&quot;cutList&quot;: [],
&quot;estimatedBlastPrice&quot;: null,
&quot;marginRate&quot;: null,
&quot;currencyBalance&quot;: null,
&quot;contractBalance&quot;: null,
&quot;followCount&quot;: null,
&quot;currentPosition&quot;: 0,
&quot;currentOpenValue&quot;: 0E-8,
&quot;currentProfit&quot;: 0E-8,
&quot;currentMarketValue&quot;: 0E-8,
&quot;availablePosition&quot;: 0,
&quot;currentMargin&quot;: 0E-8
}
],
&quot;totalPages&quot;: 13,
&quot;totalElements&quot;: 13,
&quot;last&quot;: false,
&quot;sort&quot;: [
{
&quot;direction&quot;: &quot;DESC&quot;,
&quot;property&quot;: &quot;id&quot;,
&quot;ignoreCase&quot;: false,
&quot;nullHandling&quot;: &quot;NATIVE&quot;,
&quot;descending&quot;: true,
&quot;ascending&quot;: false
}
],
&quot;size&quot;: 1,
&quot;number&quot;: 0,
&quot;first&quot;: true,
&quot;numberOfElements&quot;: 1
}</code></pre>
<h5>返回参数说明</h5>
<table>
<thead>
<tr>
<th style="text-align: left;">参数名</th>
<th style="text-align: left;">类型</th>
<th>说明</th>
</tr>
</thead>
<tbody>
<tr>
<td style="text-align: left;">id</td>
<td style="text-align: left;">int</td>
<td>仓位id</td>
</tr>
<tr>
<td style="text-align: left;">coin.symbol</td>
<td style="text-align: left;">String</td>
<td>币种</td>
</tr>
<tr>
<td style="text-align: left;">usdtProfit</td>
<td style="text-align: left;">double</td>
<td>平仓仓位收益</td>
</tr>
<tr>
<td style="text-align: left;">leverage</td>
<td style="text-align: left;">double</td>
<td>杠杆倍数</td>
</tr>
<tr>
<td style="text-align: left;">openType</td>
<td style="text-align: left;">int</td>
<td>开仓类型 0市价委托 1限价委托 2计划委托</td>
</tr>
<tr>
<td style="text-align: left;">type</td>
<td style="text-align: left;">int</td>
<td>0:合仓,1:分仓,2:加仓</td>
</tr>
<tr>
<td style="text-align: left;">direction</td>
<td style="text-align: left;">String</td>
<td>BUY:做多,SELL:做空</td>
</tr>
<tr>
<td style="text-align: left;">status</td>
<td style="text-align: left;">int</td>
<td>STARTED:未平仓;PARTLYDONE:部分成交;DONE:全部成交</td>
</tr>
<tr>
<td style="text-align: left;">closeType</td>
<td style="text-align: left;">int</td>
<td>平仓类型:0:平仓;1:市价全平;2:一键平仓;3:反向开仓;4:止盈止损;5:爆仓;6:管理员平仓;7:跟单账户止盈;8:跟单账户止损;9:跟单仓位止盈;10:跟单仓位止损;11:跟单用户平仓;</td>
</tr>
<tr>
<td style="text-align: left;">createTime</td>
<td style="text-align: left;">long</td>
<td>开仓时间</td>
</tr>
<tr>
<td style="text-align: left;">closeTime</td>
<td style="text-align: left;">long</td>
<td>成交时间</td>
</tr>
<tr>
<td style="text-align: left;">totalPrincipalAmount</td>
<td style="text-align: left;">double</td>
<td>总保证金</td>
</tr>
<tr>
<td style="text-align: left;">entrustPrice</td>
<td style="text-align: left;">doulbe</td>
<td>委托价格</td>
</tr>
<tr>
<td style="text-align: left;">openPrice</td>
<td style="text-align: left;">doulbe</td>
<td>开仓价格</td>
</tr>
<tr>
<td style="text-align: left;">triggerPrice</td>
<td style="text-align: left;">doulbe</td>
<td>触发价格</td>
</tr>
<tr>
<td style="text-align: left;">totalPosition</td>
<td style="text-align: left;">doulbe</td>
<td>委托数量(总仓位)</td>
</tr>
<tr>
<td style="text-align: left;">commissionFee</td>
<td style="text-align: left;">double</td>
<td>手续费</td>
</tr>
</tbody>
</table>
<h5>备注</h5>
<ul>
<li>更多返回错误代码请看首页的错误代码描述</li>
</ul>