流盘-六爻排盘
<p>[TOC]</p>
<h3>接口描述</h3>
<ul>
<li>六爻排盘是一种古老的易学命理系统,起源于易经,是中国古代命理学的重要组成部分,它通过将六个爻位按照顺序排列,形成六爻,每个爻有阳爻和阴爻两种状态,共有64种不同的排列组合,每一种排列组合都称为一卦。</li>
<li>注意:六爻排有【本卦】、【变卦】两大类。每个卦由六爻组成,从下到上依次为初爻、二爻、三爻、四爻、五爻、六爻。每个爻分为阴爻(断线 "--")和阳爻(横线 "-")。为了方便表示,本接口返回参数中的gua_mark包含了爻信息,仅由0和1元素组成六位数字符串。例如,gua_mark="010111",从左到右依次为阴爻、阳爻、阴爻、阳爻、阳爻、阳爻;按此顺序排卦,从下往上排,初爻为阴 "--",二爻为阳 "-",三爻为阴 "--",四爻为阳 "-",五爻为阳 "-",六爻为阳 "-",[最终卦图](<a href="https://anq-file.oss-cn-hangzhou.aliyuncs.com/api-document/fortune/gossip-prediction_demo.jpg">https://anq-file.oss-cn-hangzhou.aliyuncs.com/api-document/fortune/gossip-prediction_demo.jpg</a> "最终卦图")</li>
</ul>
<h3>请求地址</h3>
<p><code>https://api.jumdata.com/fortune/gossip-prediction</code></p>
<h3>请求方式</h3>
<ul>
<li>POST</li>
</ul>
<h3>请求格式</h3>
<ul>
<li>x-www-form-urlencoded</li>
</ul>
<h3>请求参数</h3>
<table>
<thead>
<tr>
<th>名称</th>
<th>类型</th>
<th>必须</th>
<th><div style="width:400px">说明</div></th>
</tr>
</thead>
<tbody>
<tr>
<td>appId</td>
<td>String</td>
<td>是</td>
<td>服务商分配的唯一标识</td>
</tr>
<tr>
<td>timestamp</td>
<td>Long</td>
<td>是</td>
<td>当前时间戳(毫秒数)</td>
</tr>
<tr>
<td>sign</td>
<td>String</td>
<td>是</td>
<td>签名,详见签名算法说明</td>
</tr>
<tr>
<td>sex</td>
<td>String</td>
<td>是</td>
<td>性别,0:男 1:女</td>
</tr>
<tr>
<td>bornYear</td>
<td>String</td>
<td>是</td>
<td>公历出生年,例: 1988</td>
</tr>
<tr>
<td>panModel</td>
<td>String</td>
<td>是</td>
<td>起卦方式,1:自动起卦 2:自选时间 3:终身卦 4:手工指定 5:数字起卦 6:单数起卦 7:双数起卦 </td>
</tr>
<tr>
<td>yaoAddTime</td>
<td>String</td>
<td>否</td>
<td>动爻是否加时辰,例:0:否 1:是 非必传,如果不传递这个参数,默认0,另外此参数仅在panModel为5,6,7时有效</td>
</tr>
<tr>
<td>predictionTime</td>
<td>String</td>
<td>否</td>
<td>公历起盘时间,panModel为2,3时,必传。格式:yyyy-MM-dd HH:mm</td>
</tr>
<tr>
<td>guaYao1</td>
<td>String</td>
<td>否</td>
<td>手工指定初爻参数,0:少阴 1:少阳 2:老阴 3:老阳,panModel为4时,必传</td>
</tr>
<tr>
<td>guaYao2</td>
<td>String</td>
<td>否</td>
<td>手工指定二爻参数,0:少阴 1:少阳 2:老阴 3:老阳,panModel为4时,必传 </td>
</tr>
<tr>
<td>guaYao3</td>
<td>String</td>
<td>否</td>
<td>手工指定三爻参数,0:少阴 1:少阳 2:老阴 3:老阳,panModel为4时,必传</td>
</tr>
<tr>
<td>guaYao4</td>
<td>String</td>
<td>否</td>
<td>手工指定四爻参数,0:少阴 1:少阳 2:老阴 3:老阳,panModel为4时,必传</td>
</tr>
<tr>
<td>guaYao5</td>
<td>String</td>
<td>否</td>
<td>手工指定五爻参数,0:少阴 1:少阳 2:老阴 3:老阳,panModel为4时,必传</td>
</tr>
<tr>
<td>guaYao6</td>
<td>String</td>
<td>否</td>
<td>手工指定六爻参数,0:少阴 1:少阳 2:老阴 3:老阳,panModel为4时,必传</td>
</tr>
<tr>
<td>number</td>
<td>String</td>
<td>否</td>
<td>指定整数数字,例:30,panModel为5,6时,必传</td>
</tr>
<tr>
<td>numberUp</td>
<td>String</td>
<td>否</td>
<td>指定上卦数字,例:2,panModel为7时,必传</td>
</tr>
<tr>
<td>numberDown</td>
<td>String</td>
<td>否</td>
<td>指定下卦数字,例:30,panModel为7时,必传</td>
</tr>
<tr>
<td>lang</td>
<td>String</td>
<td>否</td>
<td>语言:zh-cn 、en-us 、zh-tw,默认:zh-cn </td>
</tr>
</tbody>
</table>
<h3>签名算法说明</h3>
<p><code>sign = sha256(appId + appSecret + timestamp)</code></p>
<p>用服务商分配的 appId、服务商分配的 appSecret,当前时间时间戳 timestamp,按上述顺序拼接成字符串,再进行 sha256 哈希得到。如下:</p>
<pre><code class="language-java">String appId = &quot;xyzxy2121zxyz&quot;;
String timestamp = &quot;1555378976238&quot;;
String appSecret = &quot;efcefcef1121cefcefc1212121&quot;;
String str = appId + appSecret + timestamp;
String sign = sha256(str);</code></pre>
<h3>成功返回样例</h3>
<pre><code class="language-json">{
&quot;code&quot;: 200,//返回码,详见返回码说明
&quot;msg&quot;: &quot;成功&quot;,//code对应的描述
&quot;charge&quot;: true,//计费标志
&quot;taskNo&quot;: &quot;559916803194911492210817&quot;,//本次请求号
&quot;data&quot;: {
&quot;sex&quot;: &quot;男&quot;,
&quot;model&quot;: &quot;手工起卦&quot;, //起卦方式
&quot;gongli&quot;: &quot;2024-06-23 17:06:00&quot;, //公历时间
&quot;nongli&quot;: &quot;二〇二四年五月十八日 酉时&quot;,//农历时间
&quot;nianming&quot;: &quot;己卯&quot;, //年命
&quot;has_biangua&quot;: &quot;0&quot;, //是否有变卦,例:1.代表有变卦信息 0.代表没有变卦信息
&quot;dongyao&quot;: &quot;0&quot;, //动爻位,如果为0则代表没有动爻。如果非0则由数字1~6通过逗号分隔的字符串组成(元素总数不会超过6个),例如,&quot;1&quot; 表示初爻动。例如,&quot;5,6&quot; 表示五爻和六爻动。
&quot;guashen&quot;: &quot;未&quot;, //卦身
&quot;kongwang&quot;: &quot;申酉&quot;, //日空
&quot;shensha_info&quot;: { //六爻神煞,注:六爻神煞只有驿马,桃花,贵人,日禄四大类
&quot;yima&quot;: &quot;申&quot;, //驿马——申
&quot;taohua&quot;: &quot;卯&quot;, //桃花——卯
&quot;guiren&quot;: &quot;丑、未&quot;, //贵人——丑、未
&quot;rilu&quot;: &quot;巳&quot; //日禄——巳
},
&quot;sizhu_info&quot;: { //四柱信息
&quot;year_gan&quot;: &quot;甲&quot;, //年干
&quot;year_zhi&quot;: &quot;辰&quot;, //年支
&quot;month_gan&quot;: &quot;庚&quot;, //月干
&quot;month_zhi&quot;: &quot;午&quot;, //月支
&quot;day_gan&quot;: &quot;戊&quot;, //日干
&quot;day_zhi&quot;: &quot;午&quot;, //日支
&quot;hour_gan&quot;: &quot;辛&quot;, //时干
&quot;hour_zhi&quot;: &quot;酉&quot; //时支
},
&quot;gua_info&quot;: { //卦信息
&quot;bengua&quot;: { //【本卦】信息-永远会有值
&quot;gua_mark&quot;: &quot;010001&quot;, //卦图标记,0代表阴爻,1代表阳爻,
&quot;gua_yao_info&quot;: { //卦爻信息
&quot;liuqin&quot;: { //六亲信息
&quot;gua_yao6&quot;: &quot;父母壬戌土&quot;, //六爻的六亲信息
&quot;gua_yao5&quot;: &quot;兄弟壬申金&quot;, //五爻的六亲信息
&quot;gua_yao4&quot;: &quot;官鬼壬午火&quot;, //四爻的六亲信息
&quot;gua_yao3&quot;: &quot;兄弟丙申金&quot;, //三爻的六亲信息
&quot;gua_yao2&quot;: &quot;官鬼丙午火&quot;, //二爻的六亲信息
&quot;gua_yao1&quot;: &quot;父母丙辰土&quot; //初爻的六亲信息
},
&quot;shiying&quot;: { //世应信息
&quot;shi_yao_position&quot;: &quot;2&quot;,//哪一爻为 &quot;世&quot;,此处为2,则本卦的二爻为&quot;世&quot;
&quot;ying_yao_position&quot;: &quot;5&quot;//哪一爻为 &quot;应&quot;,此处为5,则本卦的五爻为&quot;应&quot;
},
&quot;liushen&quot;: { //六神信息
&quot;gua_yao6&quot;: &quot;朱雀&quot;, //六爻的六神信息
&quot;gua_yao5&quot;: &quot;青龙&quot;, //五爻的六神信息
&quot;gua_yao4&quot;: &quot;玄武&quot;, //四爻的六神信息
&quot;gua_yao3&quot;: &quot;白虎&quot;, //三爻的六神信息
&quot;gua_yao2&quot;: &quot;螣蛇&quot;, //二爻的六神信息
&quot;gua_yao1&quot;: &quot;勾陈&quot; //初爻的六神信息
},
&quot;fushen&quot;: { //伏神信息
&quot;has_fushen&quot;: &quot;1&quot;, //是否有伏神:如果为0则代表没有伏神,可忽略。如果为1则代表有伏神,需添加。
&quot;fushen_arr&quot;: [ //以数组形式展示伏神
{
&quot;fushen&quot;: &quot;妻财甲寅木&quot;, //伏神
&quot;fushen_yao_position&quot;: &quot;2&quot; //伏神所在爻位,此处为2,则本卦的二爻伏神为&quot;妻财甲寅木&quot;
},
{
&quot;fushen&quot;: &quot;子孙甲子水&quot;, //伏神
&quot;fushen_yao_position&quot;: &quot;1&quot; //伏神所在爻位,此处为1,则本卦的初爻伏神为&quot;子孙甲子水&quot;
}
]
}
},
&quot;gua_name&quot;: &quot;山水蒙&quot;, //卦命
&quot;gua_gong&quot;: &quot;离宫&quot;, //卦宫
&quot;gua_qian&quot;: &quot;卦中爻象犯小耗,君子占之运不高,xxx&quot;, //卦签
&quot;gua_qian_desc&quot;: &quot;异卦(下坎上艮)相叠,xxx&quot;, //解卦
&quot;gua_yaoci&quot;: &quot;蒙:亨。匪我求童蒙,xxx&quot;, //爻辞
&quot;gua_description&quot;: { //占事结果
&quot;gua_shiye&quot;: &quot;事业开始,xxx&quot;, //事业
&quot;gua_jingshang&quot;: &quot;务必小心谨慎,不得急功近利,xxx&quot;, //经商
&quot;gua_qiuming&quot;: &quot;必须接受良好的基础教育,陶冶情操。且动机纯正,可以达到目的。&quot;, //求名
&quot;gua_waichu&quot;: &quot;等候有利时机再行动,等待期间应积极做准备。&quot;, //外出
&quot;gua_hunlian&quot;: &quot;注意考察对方品德,不可以金钱为诱铒。夫妻需相互宽容、理解。&quot;, //婚恋
&quot;gua_juece&quot;: &quot;有时会陷入迷惘困顿的境地,xxx&quot; //决策
},
&quot;gua_xiongji&quot;: &quot;中下卦&quot; //卦的吉凶
},
&quot;biangua&quot;: { //【变卦】如果返回的参数 has_biangua 为0 则此变卦不存在,就不用加了。如果如果返回的参数 has_biangua 为1 则此变卦存在,需添加。
&quot;gua_mark&quot;: &quot;001110&quot;, //卦图标记,0代表阴爻,1代表阳爻,
&quot;gua_yao_info&quot;: { //卦爻信息
&quot;liuqin&quot;: { //六亲信息
&quot;gua_yao6&quot;: &quot;父母壬戌土&quot;, //六爻的六亲信息
&quot;gua_yao5&quot;: &quot;兄弟壬申金&quot;, //五爻的六亲信息
&quot;gua_yao4&quot;: &quot;官鬼壬午火&quot;, //四爻的六亲信息
&quot;gua_yao3&quot;: &quot;兄弟丙申金&quot;, //三爻的六亲信息
&quot;gua_yao2&quot;: &quot;官鬼丙午火&quot;, //二爻的六亲信息
&quot;gua_yao1&quot;: &quot;父母丙辰土&quot; //初爻的六亲信息
},
&quot;shiying&quot;: { //世应信息
&quot;shi_yao_position&quot;: &quot;3&quot;,//哪一爻为 &quot;世&quot;,此处为3,则变卦的三爻为&quot;世&quot;
&quot;ying_yao_position&quot;: &quot;1&quot;//哪一爻为 &quot;应&quot;,此处为1,则变卦的初爻为&quot;应&quot;
},
&quot;liushen&quot;: [], //变卦没有六神,只有本卦才有六神,此处忽略
&quot;fushen&quot;: [] //变卦没有伏神,只有本卦才有伏神,此处忽略
},
&quot;gua_name&quot;: &quot;泽山咸&quot;, //卦命
&quot;gua_gong&quot;: &quot;兑宫&quot;, //卦宫
&quot;gua_qian&quot;: &quot;运去黄金失色,xxx&quot;,
&quot;gua_qian_desc&quot;: &quot;异卦(下艮上兑)相叠。艮为山;xxx&quot;,
&quot;gua_yaoci&quot;: &quot;咸:亨,利贞,取女吉。xxx&quot;,
&quot;gua_description&quot;: {
&quot;gua_shiye&quot;: &quot;和为贵,和则万事兴,务以诚感人,xxx&quot;,
&quot;gua_jingshang&quot;: &quot;有利可图。xxx&quot;,
&quot;gua_qiuming&quot;: &quot;志向应宏大,xxx&quot;,
&quot;gua_waichu&quot;: &quot;虽希望外出,xxx&quot;,
&quot;gua_hunlian&quot;: &quot;成功的可能性极大。xxx&quot;,
&quot;gua_juece&quot;: &quot;吉祥如意。人际关系好,善于交际。xxx&quot;
},
&quot;gua_xiongji&quot;: &quot;中上卦&quot;
}
}
}
}</code></pre>
<h3>失败返回样例</h3>
<pre><code class="language-json">{
&quot;msg&quot;: &quot;性别不能为空&quot;,
&quot;code&quot;: 400
}</code></pre>
<h3>返回字段说明</h3>
<table>
<thead>
<tr>
<th>字段名</th>
<th><div style="width:400px">说明</div></th>
</tr>
</thead>
<tbody>
<tr>
<td>code</td>
<td>返回码,详见返回码说明</td>
</tr>
<tr>
<td>msg</td>
<td>code对应的描述</td>
</tr>
<tr>
<td>charge</td>
<td>计费标志</td>
</tr>
<tr>
<td>taskNo</td>
<td>本次请求号</td>
</tr>
<tr>
<td>data</td>
<td>返回具体结果,详见成功返回样例</td>
</tr>
</tbody>
</table>
<h3>code返回码说明</h3>
<table>
<thead>
<tr>
<th>code</th>
<th><div style="width:400px">说明</div></th>
</tr>
</thead>
<tbody>
<tr>
<td>200</td>
<td>成功(计费)</td>
</tr>
<tr>
<td>400</td>
<td>参数错误</td>
</tr>
<tr>
<td>404</td>
<td>请求地址不正确</td>
</tr>
<tr>
<td>500</td>
<td>服务商维护,请稍候再试</td>
</tr>
<tr>
<td>601</td>
<td>接口未开通</td>
</tr>
<tr>
<td>602</td>
<td>账号停用</td>
</tr>
<tr>
<td>603</td>
<td>余额不足请充值</td>
</tr>
<tr>
<td>604</td>
<td>接口停用</td>
</tr>
<tr>
<td>606</td>
<td>调用超限,请稍候再试</td>
</tr>
<tr>
<td>607</td>
<td>ip不在白名单</td>
</tr>
<tr>
<td>609</td>
<td>请求过于频繁,请稍候再试</td>
</tr>
<tr>
<td>610</td>
<td>请求超时</td>
</tr>
<tr>
<td>999</td>
<td>其他,以实际返回为准</td>
</tr>
</tbody>
</table>