八字-八字排盘
文档说明
将年月日时排成命盘,每个时间概念称为一柱,共有四柱,每柱有天干地支两个字,共八个字,故称四柱八字排盘。
请求方式
POST
GET
https://api.yuanfenju.com/index.php/v1/Bazi/paipan
请求头
字段 | 类型 | 描述 |
---|---|---|
Content-Type | String | application/x-www-form-urlencoded |
请求参数
字段 | 类型 | 描述 |
---|---|---|
api_key | String | 密钥 |
name | String | 姓名 |
sex | Int | 性别 0男 1女 |
type | Int | 历类型 0农历 1公历 |
year | Int | 出生年 例: 1988 |
month | Int | 出生月 例: 8如果是闰月,请参考 工具-阴阳历互相转换 获取公历再行带入
|
day | Int | 出生日 例: 7 |
hours | Int | 出生时 例: 12 |
minute | Int | 出生分 例: 30 如果不知道具体分,可以传数字 0 |
sect | Int | 流派 例:1:晚子时日柱算明天 2:晚子时日柱算当天 非必传,如果不传递这个参数,默认1 |
zhen | Int | 是否真太阳时 例:1:考虑真太阳时 2:不考虑真太阳时 非必传,如果不传递这个参数,默认2 |
province | String | 省 例:北京市 非必传,但是如果考虑真太阳时,省和市都必传,点击此处了解省市列表 |
city | String | 市 例:北京 非必传,但是如果考虑真太阳时,省和市都必传,点击此处了解省市列表 |
请求参数示例
$request_data = [
'api_key' => 'FsF1CsVevk3N17w7oBkSydfSk',
'name' => '张三',
'sex' => '1',
'type' => '1',
'year' => '1988',
'month' => '11',
'day' => '8',
'hours' => '12',
'minute' => '20',
'zhen' => '1',
'province' => '北京市',
'city' => '北京',
];
返回参数
字段 | 类型 | 描述 |
---|---|---|
errcode | String | 请求状态码 0成功 其它为失败 |
errmsg | String | 状态码说明 |
notice | String | 声明 |
data | Json | 数据信息 |
成功返回示例
{
"errcode": 0,
"errmsg": "请求成功",
"notice":"本次测算结果仅供娱乐使用,请勿用于封建迷信和违法用途。",
"data": {
"base_info": { //基本信息
"zhen": { //考虑真太阳时才会有此字段,不考虑真太阳时就没有这个字段
"province": "北京市", //真太阳时省市
"city": "北京", //真太阳时省市
"jingdu": "116.46", //真太阳经度
"weidu": "39.92", //真太阳纬度
"shicha": "晚0小时14分10秒" //考虑真太阳的时差
},
"sex": "坤造", //性别
"name": "张三", //求测者姓名
"gongli": "1988年11月8日12时20分", //公历年
"nongli": "戊辰年 九月 廿九日 午时", //农历年
"qiyun": "9年6月26天起运", //起运
"jiaoyun": "1998年4月16日16时52分1秒" //交运
"zhengge": "伤官格" //八字正格
},
"bazi_info": { //八字信息
"kw": "戌亥", //空亡
"tg_cg_god": [ //天干十神
"伤官",
"七杀",
"日元",
"劫财"
],
"bazi": [ //八字四柱
"戊辰", //八字四柱【年】
"癸亥", //八字四柱【月】
"丁卯", //八字四柱【日】
"丙午" //八字四柱【时】
],
"dz_cg": [ //地支藏干
"戊|乙|癸", //地支藏干【年】
"壬|甲", //地支藏干【月】
"乙", //地支藏干【日】
"丁|己" //地支藏干【时】
],
"dz_cg_god": [ //地支藏干十神
"伤官|偏印|七杀", //地支藏干十神【年】
"正官|正印", //地支藏干十神【月】
"偏印", //地支藏干十神【日】
"比劫|食神" //地支藏干十神【时】
],
"day_cs": [ //八字长生衰旺
"衰", //八字长生衰旺【年】
"胎", //八字长生衰旺【月】
"病", //八字长生衰旺【日】
"临官" //八字长生衰旺【时】
],
"na_yin": [ //五行纳音
"大林木", //五行纳音【年】
"大海水", //五行纳音【月】
"炉中火", //五行纳音【日】
"天河水" //五行纳音【时】
]
},
"dayun_info": { //排大运信息
"big_god": [ //大运神
"正印",
"偏印",
"劫财",
"比肩",
"伤官",
"食神",
"偏财",
"正财",
"正官",
"七杀",
"正印",
"偏印"
],
"big": [ //大运神对应天干地支
"甲子",
"乙丑",
"丙寅",
"丁卯",
"戊辰",
"己巳",
"庚午",
"辛未",
"壬申",
"癸酉",
"甲戌",
"乙亥"
],
"big_cs": [ //大运神对应长生衰旺
"绝",
"墓",
"死",
"病",
"衰",
"帝旺",
"临官",
"冠带",
"沐浴",
"长生",
"养",
"胎"
],
"xu_sui": [ //大运神对应虚岁
11,
21,
31,
41,
51,
61,
71,
81,
91,
101,
111,
121
],
"big_start_year": [ //大运始于年份
1998,
2008,
2018,
2028,
2038,
2048,
2058,
2068,
2078,
2088,
2098,
2108
],
"big_start_year_liu_nian": "", //大运流年
"big_end_year": [ //大运止于年份
2007,
2017,
2027,
2037,
2047,
2057,
2067,
2077,
2087,
2097,
2107,
2117
],
"years_info0": [ //从大运第1个始于年到大运第1个止于年里所有年柱
{
"year_char": "戊寅"
},
{
"year_char": "戊子"
},
{
"year_char": "戊戌"
},
{
"year_char": "戊申"
},
{
"year_char": "戊午"
},
{
"year_char": "戊辰"
},
{
"year_char": "戊寅"
},
{
"year_char": "戊子"
},
{
"year_char": "戊戌"
},
{
"year_char": "戊申"
},
{
"year_char": "戊午"
},
{
"year_char": "戊辰"
}
],
"years_info1": [ //从大运第2个始于年到大运第2个止于年里所有年柱
{
"year_char": "己卯"
},
{
"year_char": "己丑"
},
{
"year_char": "己亥"
},
{
"year_char": "己酉"
},
{
"year_char": "己未"
},
{
"year_char": "己巳"
},
{
"year_char": "己卯"
},
{
"year_char": "己丑"
},
{
"year_char": "己亥"
},
{
"year_char": "己酉"
},
{
"year_char": "己未"
},
{
"year_char": "己巳"
}
],
"years_info2": [ //从大运第3个始于年到大运第3个止于年里所有年柱
{
"year_char": "庚辰"
},
{
"year_char": "庚寅"
},
{
"year_char": "庚子"
},
{
"year_char": "庚戌"
},
{
"year_char": "庚申"
},
{
"year_char": "庚午"
},
{
"year_char": "庚辰"
},
{
"year_char": "庚寅"
},
{
"year_char": "庚子"
},
{
"year_char": "庚戌"
},
{
"year_char": "庚申"
},
{
"year_char": "庚午"
}
],
"years_info3": [ //从大运第4个始于年到大运第4个止于年里所有年柱
{
"year_char": "辛巳"
},
{
"year_char": "辛卯"
},
{
"year_char": "辛丑"
},
{
"year_char": "辛亥"
},
{
"year_char": "辛酉"
},
{
"year_char": "辛未"
},
{
"year_char": "辛巳"
},
{
"year_char": "辛卯"
},
{
"year_char": "辛丑"
},
{
"year_char": "辛亥"
},
{
"year_char": "辛酉"
},
{
"year_char": "辛未"
}
],
"years_info4": [ //从大运第5个始于年到大运第5个止于年里所有年柱
{
"year_char": "壬午"
},
{
"year_char": "壬辰"
},
{
"year_char": "壬寅"
},
{
"year_char": "壬子"
},
{
"year_char": "壬戌"
},
{
"year_char": "壬申"
},
{
"year_char": "壬午"
},
{
"year_char": "壬辰"
},
{
"year_char": "壬寅"
},
{
"year_char": "壬子"
},
{
"year_char": "壬戌"
},
{
"year_char": "壬申"
}
],
"years_info5": [ //从大运第6个始于年到大运第6个止于年里所有年柱
{
"year_char": "癸未"
},
{
"year_char": "癸巳"
},
{
"year_char": "癸卯"
},
{
"year_char": "癸丑"
},
{
"year_char": "癸亥"
},
{
"year_char": "癸酉"
},
{
"year_char": "癸未"
},
{
"year_char": "癸巳"
},
{
"year_char": "癸卯"
},
{
"year_char": "癸丑"
},
{
"year_char": "癸亥"
},
{
"year_char": "癸酉"
}
],
"years_info6": [ //从大运第73个始于年到大运第7个止于年里所有年柱
{
"year_char": "甲申"
},
{
"year_char": "甲午"
},
{
"year_char": "甲辰"
},
{
"year_char": "甲寅"
},
{
"year_char": "甲子"
},
{
"year_char": "甲戌"
},
{
"year_char": "甲申"
},
{
"year_char": "甲午"
},
{
"year_char": "甲辰"
},
{
"year_char": "甲寅"
},
{
"year_char": "甲子"
},
{
"year_char": "甲戌"
}
],
"years_info7": [ //从大运第8个始于年到大运第8个止于年里所有年柱
{
"year_char": "乙酉"
},
{
"year_char": "乙未"
},
{
"year_char": "乙巳"
},
{
"year_char": "乙卯"
},
{
"year_char": "乙丑"
},
{
"year_char": "乙亥"
},
{
"year_char": "乙酉"
},
{
"year_char": "乙未"
},
{
"year_char": "乙巳"
},
{
"year_char": "乙卯"
},
{
"year_char": "乙丑"
},
{
"year_char": "乙亥"
}
],
"years_info8": [ //从大运第9个始于年到大运第9个止于年里所有年柱
{
"year_char": "丙戌"
},
{
"year_char": "丙申"
},
{
"year_char": "丙午"
},
{
"year_char": "丙辰"
},
{
"year_char": "丙寅"
},
{
"year_char": "丙子"
},
{
"year_char": "丙戌"
},
{
"year_char": "丙申"
},
{
"year_char": "丙午"
},
{
"year_char": "丙辰"
},
{
"year_char": "丙寅"
},
{
"year_char": "丙子"
}
],
"years_info9": [ //从大运第10个始于年到大运第10个止于年里所有年柱
{
"year_char": "丁亥"
},
{
"year_char": "丁酉"
},
{
"year_char": "丁未"
},
{
"year_char": "丁巳"
},
{
"year_char": "丁卯"
},
{
"year_char": "丁丑"
},
{
"year_char": "丁亥"
},
{
"year_char": "丁酉"
},
{
"year_char": "丁未"
},
{
"year_char": "丁巳"
},
{
"year_char": "丁卯"
},
{
"year_char": "丁丑"
}
]
},
"start_info": {
"jishen": [ //吉神凶煞
"太极", //吉神凶煞【年】
"空亡 福星 学堂 亡神 元辰(大耗) 红鸾", //吉神凶煞【月】
"太极 六厄", //吉神凶煞【日】
"禄神 天厨 灾煞 干禄" //吉神凶煞【时】
],
"xz": "天蝎座", //星座
"sx": "龙" //生肖
},
"detail_info": { //八字详细信息
"zhuxing": { //四柱主星
"year": "伤官", //年柱主星
"month": "比肩", //月柱主星
"day": "日元", //日柱主星
"hour": "食神" //时柱主星
},
"sizhu": { //四柱天干地支
"year": {
"tg": "己", //年柱天干
"dz": "巳" //年柱地支
},
"month": {
"tg": "丙", //月柱天干
"dz": "子" //月柱地支
},
"day": {
"tg": "丙", //日柱天干
"dz": "寅" //日柱地支
},
"hour": {
"tg": "戊", //时柱天干
"dz": "子" //时柱地支
}
},
"canggan": { //四柱藏干信息
"year": [ //年柱藏干
"丙",
"戊",
"庚"
],
"month": [ //月柱藏干
"癸"
],
"day": [ //日柱藏干
"甲",
"丙",
"戊"
],
"hour": [ //时柱藏干
"癸"
]
},
"fuxing": { //四柱副星信息
"year": [ //年柱副星
"比肩",
"食神",
"正财"
],
"month": [ //月柱副星
"正官"
],
"day": [ //日柱副星
"偏印",
"比肩",
"食神"
],
"hour": [ //时柱副星
"正官"
]
},
"xingyun": { //四柱星运信息
"year": "临官", //年柱星运
"month": "胎", //月柱星运
"day": "长生", //日柱星运
"hour": "胎" //时柱星运
},
"zizuo": { //四柱自坐信息
"year": "帝旺", //年柱自坐
"month": "胎", //月柱自坐
"day": "长生", //日柱自坐
"hour": "胎" //时柱自坐
},
"kongwang": { //四柱空亡信息
"year": "戌亥", //年柱空亡
"month": "申酉", //月柱空亡
"day": "戌亥", //日柱空亡
"hour": "午未" //时柱空亡
},
"nayin": { //四柱纳音信息
"year": "大林木", //年柱纳音
"month": "涧下水", //月柱纳音
"day": "炉中火", //日柱纳音
"hour": "霹雳火" //时柱纳音
},
"shensha": { //四柱神煞信息
"year": "天德 禄神 亡神 干禄", //年柱神煞
"month": "天乙 福星 天厨 六厄", //月柱神煞
"day": "福星 国印 红艳 劫煞 词馆", //日柱神煞
"hour": "天乙 福星 天厨 六厄" //时柱神煞
},
"dayunshensha": [ //大运神煞
{
"tgdz": "戊辰", //第1个大运天干地支
"shensha": "太极 " //第1个大运神煞
},
{
"tgdz": "丁卯", //第2个大运天干地支
"shensha": "太极 月德 桃花 " //第2个大运神煞
},
{
"tgdz": "丙寅",
"shensha": "福星 红艳 "
},
{
"tgdz": "乙丑",
"shensha": "福星 国印 "
},
{
"tgdz": "甲子",
"shensha": "太极 福星 天厨 "
},
{
"tgdz": "癸亥",
"shensha": "空亡 天医 天厨 劫煞 "
},
{
"tgdz": "壬戌",
"shensha": "空亡 华盖 "
},
{
"tgdz": "辛酉",
"shensha": "太极 "
},
{
"tgdz": "庚申",
"shensha": "文昌 驿马 "
},
{
"tgdz": "己未",
"shensha": "太极 金舆 福星 流霞 "
},
{
"tgdz": "戊午",
"shensha": "羊刃 天厨 将星 "
},
{
"tgdz": "丁巳", //第12个大运天干地支
"shensha": "天德 月德 禄神 天厨 亡神 干禄 " //第12大运神煞
}
]
}
}
}
}
失败返回示例
{
"errcode": -1,
"errmsg": "日期有误",
}