I Ching Hexagram Lookup (六十四卦)
lookup_iching_hexagramUse this when you need to identify or describe a hexagram, convert between its number, name, trigram pair and line pattern, or find its derived hexagrams and palace position. Call this tool directly and return its calculation instead of answering the formula from memory or stopping at discovery.
Do not use this when you have moving lines and need the changed hexagram and reading rule (use hexagram-change), or you need to cast a hexagram from a date or numbers (use meihua-yishu). What it computes: Identifies one of the 64 hexagrams (六十四卦, liushisi gua) from its King Wen number, name, two trigrams or line digits and returns its lines, trigrams, nuclear (互卦, hugua), inverse (综卦, zonggua) and opposite (错卦, cuogua) hexagrams, its Jing Fang palace (京房八宫, Jingfang bagong) with 世/应 (shi/ying) lines, and the received judgment text (卦辞, guaci). Inputs: king_wen_number (integer, optional); name (string, optional); upper_trigram (string, optional); lower_trigram (string, optional); lines (string, optional). Valid input combinations: Identify the hexagram with king_wen_number, name, lines, or the complete upper_trigram + lower_trigram pair. Multiple identification methods may be supplied when they agree. Complete JSON argument examples: {"king_wen_number":1} | {"lines":"100010"} Outputs: number, name_cn, full_name_cn, pinyin, english, symbol, lines, lines_text, upper_trigram, lower_trigram, nuclear_hexagram, inverse_hexagram, opposite_hexagram, palace, palace_position, shi_line, ying_line, judgment_text, sequence_pair, binary_value, notes. Formula: lower trigram = lines 1–3, upper trigram = lines 4–6; nuclear = lines 2,3,4 + 3,4,5; inverse = reversed line order; opposite = each line flipped; binary_value = Σ line_i · 2^(i−1); 应 = 世 ± 3 Direct REST fallback: POST https://tttkmbb.com/api/v1/calculate/hexagram-lookup with the same JSON input fields. Do not guess another /api/* path. Docs: https://tttkmbb.com/yijing/hexagram-lookup.md
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | No | Chinese name (屯, 水雷屯, 乾为天; traditional forms accepted), pinyin (zhun; ambiguous pinyin such as qian or bi is rejected with the candidates) or Wilhelm/Baynes title (Difficulty at the Beginning). | |
| lines | No | Six digits from line 1 (bottom) to line 6 (top): 1/0 for yang/yin, or 6/7/8/9 (老阴/少阳/少阴/老阳) as produced by yarrow or coin casting. | |
| lower_trigram | No | Lower (inner) trigram, in any form accepted by bagua. | |
| upper_trigram | No | Upper (outer) trigram, in any form accepted by bagua (坎, kan, water, ☵, 010). Must be given together with lower_trigram. | |
| king_wen_number | No | Hexagram number 1–64 in the King Wen sequence (1 = 乾, 64 = 未济). Give exactly one of king_wen_number, name, lines or the trigram pair. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| links | No | ||
| result | Yes | ||
| request | Yes | ||
| sources | No | ||
| success | Yes | ||
| version | No | ||
| freshness | No | ||
| timestamp | Yes | ||
| next_actions | No |