奇货可查接口文档

奇货可查机构VIP接口文档


建仓过程

<p><strong>简要描述:</strong> </p> <ul> <li>建仓过程接口</li> </ul> <p><strong>请求URL:</strong> </p> <ul> <li><code>https://api.qhkch.com/broker_positions_process/{broker}/{code}[/{start_date}][/{end_date}]</code></li> </ul> <p><strong>请求参数说明</strong> </p> <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;">broker</td> <td style="text-align: left;">席位</td> <td>永安期货</td> </tr> <tr> <td style="text-align: left;">code</td> <td style="text-align: left;">合约代号</td> <td>rb1810</td> </tr> <tr> <td style="text-align: left;">start_date</td> <td style="text-align: left;">开始日期,可选</td> <td>2018-05-03</td> </tr> <tr> <td style="text-align: left;">end_date</td> <td style="text-align: left;">结束日期,可选</td> <td>2018-07-06</td> </tr> </tbody> </table> <p><strong>请求方式:</strong></p> <ul> <li>GET </li> </ul> <p><strong>Header:</strong></p> <pre><code>X-Token:{token} </code></pre> <p><strong>返回示例</strong></p> <pre><code>[ { "long": 12497, "short": 44076, "trans_date": "2018-01-16", "code": "rb1810", "profit": -5811150, "net_hold": -31579, "total_profit": -5462270, "cost": -17.3 }, { "long": 12594, "short": 44500, "trans_date": "2018-01-17", "code": "rb1810", "profit": 1894740, "net_hold": -31906, "total_profit": -3567530, "cost": -11.18 }, { "long": 10834, "short": 44680, "trans_date": "2018-01-18", "code": "rb1810", "profit": -3190600, "net_hold": -33846, "total_profit": -6758130, "cost": -19.97 }, { "long": 11685, "short": 45308, "trans_date": "2018-01-19", "code": "rb1810", "profit": -8123040, "net_hold": -33623, "total_profit": -14881170, "cost": -44.26 }, { "long": 14191, "short": 45096, "trans_date": "2018-01-22", "code": "rb1810", "profit": -17147730, "net_hold": -30905, "total_profit": -32028900, "cost": -103.64 }, { "long": 12240, "short": 32248, "trans_date": "2018-01-23", "code": "rb1810", "profit": 927150, "net_hold": -20008, "total_profit": -31101750, "cost": -155.45 }, { "long": 13790, "short": 30012, "trans_date": "2018-01-24", "code": "rb1810", "profit": -5002000, "net_hold": -16222, "total_profit": -36103750, "cost": -222.56 }, { "long": 14093, "short": 27922, "trans_date": "2018-01-25", "code": "rb1810", "profit": -4542160, "net_hold": -13829, "total_profit": -40645910, "cost": -293.92 }, { "long": 14353, "short": 25791, "trans_date": "2018-01-26", "code": "rb1810", "profit": 829740, "net_hold": -11438, "total_profit": -39816170, "cost": -348.1 }, { "long": 14175, "short": 26620, "trans_date": "2018-01-29", "code": "rb1810", "profit": -228760, "net_hold": -12445, "total_profit": -40044930, "cost": -321.78 }, { "long": 16551, "short": 27455, "trans_date": "2018-01-30", "code": "rb1810", "profit": 1493400, "net_hold": -10904, "total_profit": -38551530, "cost": -353.55 }, { "long": 17644, "short": 27486, "trans_date": "2018-01-31", "code": "rb1810", "profit": 872320, "net_hold": -9842, "total_profit": -37679210, "cost": -382.84 }, { "long": 18650, "short": 29061, "trans_date": "2018-02-01", "code": "rb1810", "profit": -196840, "net_hold": -10411, "total_profit": -37876050, "cost": -363.81 }, { "long": 19329, "short": 29043, "trans_date": "2018-02-02", "code": "rb1810", "profit": -832880, "net_hold": -9714, "total_profit": -38708930, "cost": -398.49 }, { "long": 18105, "short": 28550, "trans_date": "2018-02-05", "code": "rb1810", "profit": -291420, "net_hold": -10445, "total_profit": -39000350, "cost": -373.39 }, { "long": 19525, "short": 27638, "trans_date": "2018-02-06", "code": "rb1810", "profit": -2193450, "net_hold": -8113, "total_profit": -41193800, "cost": -507.75 }, { "long": 18646, "short": 28139, "trans_date": "2018-02-07", "code": "rb1810", "profit": 1379210, "net_hold": -9493, "total_profit": -39814590, "cost": -419.41 }, { "long": 20877, "short": 28416, "trans_date": "2018-02-08", "code": "rb1810", "profit": -189860, "net_hold": -7539, "total_profit": -40004450, "cost": -530.63 }, { "long": 20991, "short": 29858, "trans_date": "2018-02-09", "code": "rb1810", "profit": 678510, "net_hold": -8867, "total_profit": -39325940, "cost": -443.51 }, { "long": 20641, "short": 30036, "trans_date": "2018-02-12", "code": "rb1810", "profit": 1152710, "net_hold": -9395, "total_profit": -38173230, "cost": -406.31 }, { "long": 21473, "short": 28898, "trans_date": "2018-02-13", "code": "rb1810", "profit": -1785050, "net_hold": -7425, "total_profit": -39958280, "cost": -538.16 }, { "long": 21648, "short": 29494, "trans_date": "2018-02-14", "code": "rb1810", "profit": -1113750, "net_hold": -7846, "total_profit": -41072030, "cost": -523.48 }, { "long": 23575, "short": 29303, "trans_date": "2018-02-22", "code": "rb1810", "profit": 2353800, "net_hold": -5728, "total_profit": -38718230, "cost": -675.95 }, { "long": 32823, "short": 32867, "trans_date": "2018-02-23", "code": "rb1810", "profit": -1603840, "net_hold": -44, "total_profit": -40322070, "cost": -91641.07 }, { "long": 31517, "short": 33646, "trans_date": "2018-02-26", "code": "rb1810", "profit": -36960, "net_hold": -2129, "total_profit": -40359030, "cost": -1895.68 }, { "long": 26020, "short": 41136, "trans_date": "2018-02-27", "code": "rb1810", "profit": 0, "net_hold": -15116, "total_profit": -40359030, "cost": -267 }, { "long": 26137, "short": 40810, "trans_date": "2018-02-28", "code": "rb1810", "profit": 151160, "net_hold": -14673, "total_profit": -40207870, "cost": -274.03 }, { "long": 21049, "short": 37675, "trans_date": "2018-03-01", "code": "rb1810", "profit": 0, "net_hold": -16626, "total_profit": -40207870, "cost": -241.84 }, { "long": 20568, "short": 39055, "trans_date": "2018-03-02", "code": "rb1810", "profit": 3158940, "net_hold": -18487, "total_profit": -37048930, "cost": -200.41 }, { "long": 20478, "short": 40222, "trans_date": "2018-03-05", "code": "rb1810", "profit": 2773050, "net_hold": -19744, "total_profit": -34275880, "cost": -173.6 }, { "long": 20523, "short": 45669, "trans_date": "2018-03-06", "code": "rb1810", "profit": 2566720, "net_hold": -25146, "total_profit": -31709160, "cost": -126.1 }, { "long": 23046, "short": 41648, "trans_date": "2018-03-07", "code": "rb1810", "profit": -502920, "net_hold": -18602, "total_profit": -32212080, "cost": -173.16 }, { "long": 37336, "short": 57897, "trans_date": "2018-03-08", "code": "rb1810", "profit": 10231100, "net_hold": -20561, "total_profit": -21980980, "cost": -106.91 }, { "long": 30364, "short": 71260, "trans_date": "2018-03-09", "code": "rb1810", "profit": 18299290, "net_hold": -40896, "total_profit": -3681690, "cost": -9 }, { "long": 26905, "short": 79606, "trans_date": "2018-03-12", "code": "rb1810", "profit": 17176320, "net_hold": -52701, "total_profit": 13494630, "cost": 25.61 }, { "long": 27919, "short": 82365, "trans_date": "2018-03-13", "code": "rb1810", "profit": 13702260, "net_hold": -54446, "total_profit": 27196890, "cost": 49.95 } ]</code></pre> <p><strong>返回参数说明</strong> </p> <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;">long</td> <td style="text-align: left;">int</td> <td>多头持仓</td> </tr> <tr> <td style="text-align: left;">short</td> <td style="text-align: left;">int</td> <td>空头持仓</td> </tr> <tr> <td style="text-align: left;">trans_date</td> <td style="text-align: left;">date</td> <td>日期</td> </tr> <tr> <td style="text-align: left;">code</td> <td style="text-align: left;">string</td> <td>合约代号</td> </tr> <tr> <td style="text-align: left;">profit</td> <td style="text-align: left;">float</td> <td>当日盈亏金额,正数为盈利,负数为亏损,单位元</td> </tr> <tr> <td style="text-align: left;">net_hold</td> <td style="text-align: left;">int</td> <td>净持仓,多头持仓-空头持仓</td> </tr> <tr> <td style="text-align: left;">total_profit</td> <td style="text-align: left;">float</td> <td>累计盈亏金额,正数为盈利,负数为亏损,单位元</td> </tr> <tr> <td style="text-align: left;">cost</td> <td style="text-align: left;">float</td> <td>估算盈亏平衡价格</td> </tr> </tbody> </table>

页面列表

ITEM_HTML