Skip to content
RoxyAPI
Get API Key

What the I-Ching Oracle API covers.

Castings

  • Three-coin casting with old and young lines

  • Every changing line read by position and polarity

  • Resulting hexagram the reading transforms into

  • Hexagram of the day and a daily cast

Hexagrams

  • King Wen sequence with Chinese name and pinyin

  • Judgment and Image for every hexagram

  • Readings for love, career and decisions

  • Lookup by yin and yang line pattern

Trigrams

  • Bagua trigrams as upper and lower pairs

  • Element, direction, season and family member

  • Body part, animal and core attribute

I-Ching oracle API with all 64 hexagrams, 384 changing lines, 8 trigrams, and modern interpretations for love, career, and decision-making. Cast readings with the authentic three-coin method, get a daily hexagram, and explore the Book of Changes programmatically. Built for divination apps, AI oracle chatbots, fortune-telling platforms, daily wisdom features, and spiritual guidance products. One key covers every RoxyAPI domain, with Remote MCP and typed SDKs.

Every I-Ching calculation is covered by 15,481 automated tests per deploy, 3,683 of them gold-standard tests locked to the named references on our methodology page. See how we test.

Interpretations in English, Deutsch, Español, Français, हिन्दी, Português, Русский, Türkçe, one query parameter away.

Start your way. No code, agents or code.

No-code builders

Paste a widget into any site builder, install the WordPress plugin, or start from an MIT template you can white-label. Results render from the I-Ching Oracle API with no backend.

AI agents

A Remote MCP server exposes every endpoint as a tool for Claude, ChatGPT, Cursor and any MCP client, with no local install. Opt-in compact responses cut the tokens your agent reads by roughly 40 to 52 percent, and one call stays one request.

Developers

Typed SDKs for TypeScript, Python, PHP, C#, Go, Rust, and Dart, generated from the live spec, each with an AGENTS.md so your coding assistant calls the I-Ching Oracle API correctly.

No-code widgets and drop-in UI components.

This is what your visitors see. Paste one snippet into Wix, Squarespace, or WordPress and the I-Ching Oracle API reading appears on your site, with no code and no backend. Developers install the same components from npm for Next.js, React, Vue, Svelte, Angular, or plain HTML. MIT licensed and included in every plan.

MIT licensedFramework agnosticThemeable via CSS variablesnpm or CDN
Show all I-Ching Oracle UI componentsShow fewer I-Ching Oracle UI components
ElementRenders
<roxy-hexagram>Hexagram figure with trigrams, judgment, image, and a reading per line (statement plus meaning); a cast highlights the moving lines and the resulting hexagram
<roxy-reference-card>Symbol, name, description, keyword chips, and an attribute grid for any glossary lookup

Component preview

The real component, running on sample data.

Loading the component...

I-Ching Oracle API features, in detail.

The depth behind every line above, written out in full.

  • Complete 64 hexagram database with King Wen sequence, traditional Chinese names, pinyin, Unicode symbols, and binary patterns for authentic I-Ching readings
  • Modern interpretations for each hexagram covering general meaning, love and relationships, career guidance, decision-making wisdom, and actionable advice
  • 384 changing lines (6 lines x 64 hexagrams), each with its oracle statement AND a written meaning that reads the line from its position in the hexagram and its yin or yang, so an agent never has to invent what a moving line is telling you
  • Authentic three-coin casting method with changing lines, resulting hexagram transformation, and castings that reopen unchanged when shared or saved
  • Daily hexagram and daily cast that stay the same for one user all day, for daily wisdom features, oracle of the day, and contemplation prompts

Start building with one key.

Want to try without writing code? Try this domain live in API playground →

Terminal
npm install @roxyapi/sdk
Usage
import { createRoxy } from '@roxyapi/sdk'

const roxy = createRoxy(process.env.ROXY_API_KEY!)
const domain = roxy.iching
SDK docs

Generating your own client? Get the I-Ching OpenAPI schema.

Want to ship faster? Clone a free template and white-label it as your own app.

Building with Cursor, Claude Code, or Bolt? Use our AI prompts to generate a complete app.

Building on WordPress? Install the RoxyAPI plugin and drop a shortcode, no code required.

GET /api/v2/iching/cast
{
  "hexagram": {
    "number": 45,
    "symbol": "䷬",
    "chinese": "萃",
    "english": "Gathering Together (Massing)",
    "pinyin": "Cuì",
    "binary": "000110",
    "upperTrigram": "Lake",
    "lowerTrigram": "Earth",
    "judgment": "People and resources are collecting around one point, and the collection holds only if it has a genuine center. Make the reason for gathering explicit, seek the person who can hold it, and offer what the occasion is actually worth.",
    "image": "The lake gathers above the earth, water massed in one place and pressing on whatever contains it. What is assembled is also what can burst, so keep your defenses in repair while the gathering is still going well.",
    "interpretation": {
      "general": "People and resources are gathering together around a central purpose. This is the time for collective action, communal effort, and organized assembly. Ensure the gathering has strong, worthy leadership and a unifying purpose. Prepare for unexpected challenges.",
      "love": "A favorable time for coming together and strengthening bonds. Gather with those you love and share in meaningful rituals. Unity creates strength.",
      "career": "Success comes through bringing people together around a common purpose. Organization and leadership create the structure for collective achievement. Prepare for challenges.",
      "decision": "The time favors gathering resources and support. Bring people together through offerings and shared vision. Unity of purpose leads to success.",
      "advice": "When water gathers over earth, prepare for unexpected challenges even in success. Great offerings bring great gatherings. See the great person and prosper."
    },
    "changingLines": [
      {
        "position": 1,
        "text": "The wish to join is real but does not carry through, and confusion follows; one call for help turns the tears into laughter.",
        "meaning": "A weak line at the very beginning, cut off from the ally it belongs with. The querent is sincere and ineffective, which is the specific failure of this position. Ask openly for the help you need instead of waiting to be noticed, and the isolation ends at once."
      },
      {
        "position": 2,
        "text": "The querent is drawn forward by others, and even a small seasonal offering is accepted.",
        "meaning": "Weak and central, answering a strong ruler above, this line does not have to engineer its own inclusion. Let yourself be brought in rather than pushing your way in. Bring whatever you genuinely have, since the gathering is measuring sincerity and not the size of the contribution."
      },
      {
        "position": 3,
        "text": "The querent tries to join, sighs, and finds no advantage anywhere, and going on anyway leaves only a small regret.",
        "meaning": "The weak line at the exposed threshold has no natural partner and is being turned away by everyone nearby. Persistence is the only move available, and it does eventually find an opening. Expect the association you finally reach to be second best, and take it."
      },
      {
        "position": 4,
        "text": "Only great good fortune makes this position free of fault.",
        "meaning": "A strong line without the rank that would justify its influence, standing between the ruler and the crowd. The querent is gathering people around a position that is not formally theirs, which is dangerous unless the work is entirely selfless. Serve the center, take no credit, and the exposure is survivable."
      },
      {
        "position": 5,
        "text": "The gathering forms around the querent in the seat of authority, and if some still hold back, become the kind of person they cannot doubt.",
        "meaning": "The ruling line is strong, central, and correctly placed, so the position itself is legitimate. Position alone does not produce trust, and the holdouts are not a problem to be solved by pressure. Deepen the constancy of your own conduct and they come in on their own."
      },
      {
        "position": 6,
        "text": "The querent sighs and weeps, and there is no fault in it.",
        "meaning": "Past the peak, this weak line is outside the gathering while everyone below has already found a place. The grief is real, and it is also the evidence that the querent still wants to belong. Show it plainly instead of performing indifference, because the honest sorrow is what opens a way back."
      }
    ]
  },
  "lines": [
    8,
    8,
    8,
    7,
    9,
    8
  ],
  "changingLinePositions": [
    5
  ],
  "resultingHexagram": {
    "number": 16,
    "symbol": "䷏",
    "chinese": "豫",
    "english": "Enthusiasm",
    "pinyin": "Yù",
    "binary": "000100",
    "upperTrigram": "Thunder",
    "lowerTrigram": "Earth",
    "judgment": "Something has caught, and the energy released is enough to install leaders and to set armies moving. Enthusiasm is a resource in this situation, so give it a form and a direction before it burns itself out.",
    "image": "Thunder breaks out of the earth and the ground itself resounds. Give collective feeling something to run through: honour what has genuinely been achieved, and let the celebration carry a real meaning.",
    "interpretation": {
      "general": "Enthusiasm and inspiration are stirring. This is the right time to set things in motion, rally support, and begin new initiatives. Like thunder breaking from the earth, energy wants to move. Channel this enthusiasm wisely through proper planning and inspired action.",
      "love": "Shared enthusiasm brings joy to relationships. Find what inspires both of you and pursue it together. Positive energy attracts positive connections.",
      "career": "Inspire others through your vision and energy. The time is right for rallying support around your ideas. Enthusiasm properly channeled moves people to action.",
      "decision": "Act with enthusiasm and confidence. This is a favorable time to move forward with plans that inspire you. Let your energy set the tone.",
      "advice": "When thunder rises from the earth, all things respond with enthusiasm. Use this energy to set things in motion. Proper timing and inspiration together create momentum."
    },
    "changingLines": [
      {
        "position": 1,
        "text": "Trumpeting your own enthusiasm brings misfortune.",
        "meaning": "The first place is the beginning, and this yin line sits at the bottom of the situation with a powerful connection above it that it did nothing to earn. Announcing that connection converts it into a liability. Say nothing about who you are close to, because boasting from a low position is what gets the connection taken away."
      },
      {
        "position": 2,
        "text": "Firm as a rock, and not waiting even a full day.",
        "meaning": "The second place is inner and central, and this yin line is the only one in the hexagram that is not swept along by the mood. It sees where the enthusiasm is heading before the enthusiasm gets there, and it moves at once. Stay clear headed inside the excitement and act on what you see the moment you see it."
      },
      {
        "position": 3,
        "text": "Staring up at the one above and enjoying yourself, and every day of hesitation adds to the regret.",
        "meaning": "The third place is the exposed threshold, and this yin line has attached itself to the source of the excitement and is coasting on it. Living on the energy of another person is not a position, it is a postponement. Change course now, because the regret grows with every day it is delayed."
      },
      {
        "position": 4,
        "text": "You are the source the enthusiasm comes from; do not doubt it, and friends gather the way hair gathers into a clasp.",
        "meaning": "The fourth place is next to authority, and this single yang line actually generates the movement everyone else is riding. Its one real danger is self suspicion. Trust what you are doing and hold the center of it, and people will assemble around you without being asked."
      },
      {
        "position": 5,
        "text": "A chronic complaint that never quite kills you.",
        "meaning": "This is the ruling line, and a yin line in the place of authority is weak, hemmed in by the strong line just beneath it, and unable to enjoy any of what is happening. The affliction is also a protection, since it prevents the collapse into pleasure that would finish the position off. Accept the constraint, stay alive inside it, and do not compete for energy that belongs to someone else."
      },
      {
        "position": 6,
        "text": "The enthusiasm has gone blind, and even now a change of course leaves you without fault.",
        "meaning": "The sixth place is past the peak, and this yin line has stayed with the excitement long after it stopped meaning anything. Nothing is at stake here except the willingness to admit that. Turn away from what is finished, and the error ends with the turning."
      }
    ]
  }
}

Structured JSON with documented fields. Not hallucinated text. See all endpoints

Free templates for I-Ching.

Clone. Edit. Ship. Free and open source by Team Roxy.

Show all 4 templatesShow fewer templates

Browse all templates or use AI prompts to generate a custom app.

What you can build with the I-Ching Oracle API.

The products teams ship on the I-Ching Oracle API.

  • Build I-Ching divination apps with authentic coin-toss readings: users ask their question and receive complete hexagram interpretations with changing lines and transformations
  • Add daily oracle features to wellness and meditation apps: daily hexagrams, daily cast readings, and contemplation prompts from 3,000 years of Chinese philosophy
  • Build AI I-Ching chatbots with MCP: your OpenAI, Claude, or Gemini agent auto-discovers oracle endpoints and delivers conversational hexagram readings
  • Create Chinese philosophy education platforms teaching the Book of Changes, Taoist principles, trigram symbolism, and hexagram patterns through interactive exploration
  • Ship comprehensive spiritual guidance platforms combining I-Ching with astrology, tarot, numerology, and dream interpretation under one API key
  • Power decision-making and journaling apps: users record situations, cast hexagrams, track how readings relate to outcomes, and gain clarity through structured ancient wisdom

Try every endpoint live, free, in the playground.

Real calls against the production API, no account needed. Every endpoint sits in the public OpenAPI spec and is callable as an MCP tool; open one for its parameters and response examples.

Daily hexagram - Daily I-Ching oracle API
Daily hexagram - Daily I-Ching oracle API

Receive a daily I-Ching hexagram for guidance and reflection. This endpoint uses seeded randomness to ensure the same seed gets the same hexagram on the same day, perfect for "Hexagram of the Day" features in oracle apps, meditation platforms, and daily wisdom tools. Returns the hexagram with judgment, image, and interpretations for love, career, decisions, and practical advice based on ancient Chinese wisdom from the Book of Changes.

Cast daily reading with changing lines - I-Ching divination API
Cast daily reading with changing lines - I-Ching divination API

Cast a complete daily I-Ching reading using the traditional three-coin method with seeded randomness. Unlike the simple daily hexagram, this provides the full casting experience with line values (6-9), changing line positions, and the resulting hexagram if transformation occurs. Same seed + same date = same casting result. Perfect for I-Ching divination apps requiring authentic oracle experience with daily consistency.

List all 64 hexagrams - I-Ching hexagram catalog API
List all 64 hexagrams - I-Ching hexagram catalog API

Browse all 64 I-Ching hexagrams from the Book of Changes with their Chinese names, English translations, and trigram compositions. The hexagrams are ordered by the traditional King Wen sequence used in I-Ching divination for 3,000 years. Each hexagram represents a unique life situation combining two trigrams (Heaven, Earth, Thunder, Wind, Water, Fire, Mountain, Lake) into profound wisdom for decision-making and self-understanding.

Try it
Random hexagram - I-Ching hexagram picker API
Random hexagram - I-Ching hexagram picker API

Receive a random I-Ching hexagram with full interpretation. Perfect for daily oracle features, meditation prompts, or exploring the Book of Changes. Returns complete hexagram data including judgment, image, interpretations for love/career/decisions, and all six changing line meanings.

Try it
Lookup hexagram by line pattern - I-Ching binary lookup API
Lookup hexagram by line pattern - I-Ching binary lookup API

Find an I-Ching hexagram by its binary line pattern. Provide 6 digits (0 or 1) representing broken (yin) and solid (yang) lines from bottom to top. Use this for custom divination interfaces where users input their own line configurations, or to find hexagrams matching specific trigram combinations. Example: "111111" returns Hexagram 1 (The Creative), "000000" returns Hexagram 2 (The Receptive).

Try it
Get hexagram by number - I-Ching hexagram detail API
Get hexagram by number - I-Ching hexagram detail API

Retrieve complete I-Ching hexagram details by King Wen sequence number (1-64). Returns the full hexagram with Chinese name, English translation, judgment text, image text, modern interpretations for general situations, love, career, and decision-making, plus all six changing line meanings. Use this to display detailed hexagram information after casting or for educational reference.

Try it
Cast an I-Ching reading - Hexagram divination API
Cast an I-Ching reading - Hexagram divination API

Generate an authentic I-Ching reading using the traditional three-coin casting method. Each of the six lines is determined by virtually tossing three coins, producing values 6-9 where 6 (old yin) and 9 (old yang) are changing lines. Returns the primary hexagram with full interpretation, the line values showing which lines are changing, and if any lines change, the resulting hexagram that the primary transforms into. Optionally provide a seed for reproducible castings. Perfect for divination apps, oracle features, and decision-making tools.

List all 8 trigrams - Bagua trigram catalog API
List all 8 trigrams - Bagua trigram catalog API

Retrieve all 8 I-Ching trigrams (bagua), the fundamental building blocks of hexagrams. Each trigram consists of three lines and represents a primal force of nature: Heaven (Qian), Earth (Kun), Thunder (Zhen), Wind (Xun), Water (Kan), Fire (Li), Mountain (Gen), and Lake (Dui). Understanding trigrams is essential for interpreting hexagram meanings, as each hexagram combines an upper and lower trigram.

Get trigram by number or name - Bagua trigram detail API
Get trigram by number or name - Bagua trigram detail API

Retrieve a specific I-Ching trigram by its number (1-8) or English name (Heaven, Earth, Thunder, Wind, Water, Fire, Mountain, Lake). Returns complete trigram information including Chinese name, pinyin, element associations, core attributes, and symbolic meaning. Use this to understand the component trigrams of any hexagram.

What customers are building.

KD
Kaylee Dimitrijevic

Founder, United States

I built a living Human Design labyrinth: a free walk through nine gardens with personal chart reports and an AI guide named Phoenix, powered by the RoxyAPI chart engine and 15 of its domains.

A Human Design labyrinth on the web and Google Play, with personal chart reports and an AI guide

LF
Louise Falkenberg

Course creator, Denmark

I think you have done an amazing job, it must have taken a long time. Clients are happy, and so am I.

Natal chart, transit, horoscope, tarot, dream and crystal readings inside her online courses

MM
Mishaal Murawala

Founder, United States

I use RoxyAPI as the data layer for my astrology assistant. It has been reliable.

An astrology assistant on Vedic and KP, dashas, divisional charts, panchang, Western astrology, numerology and tarot

Every customer story comes from an account we confirmed and is published with the approval of that customer.

Read customer stories

Do not take our word for it. Ask the agents.

The receipts are public: the testing methodology, the open MIT benchmark, the transparency report, and the live API playground. Let ChatGPT, Perplexity, or Claude search the web and tell you what they find about RoxyAPI accuracy, MCP, SDKs, and pricing.

Opens a live web search in a new tab.

From your AI agent to a verified I-Ching answer.

Your AI agent

your model, your voice

Remote MCP

auto-discovered, no local setup

Token-optimized

Roxy Ephemeris

15,481 tests, 3683 gold standard

Verified result

18+ domains, one flat rate

Your agent uses calculated charts and readings in its replies, with your model and your own voice. Planetary positions are verified against NASA JPL Horizons. No local setup, no AGPL, no hosted-AI markup.

Audit it yourself: every I-Ching endpoint runs live in the API playground

Included in the same plan as I-Ching Oracle

17 more insight domains

I-Ching Oracle API questions, answered.

How do I cast an I-Ching hexagram with an API?

The I Ching API casts a reading with the traditional three-coin method in a single call and returns the primary hexagram, its full interpretation, the six lines read bottom to top, and any changing lines. You can pass an optional seed so a casting can be reproduced exactly, which is ideal for shareable or saved readings. One RoxyAPI key covers I Ching and every other RoxyAPI domain, activation is instant, and the same casting is available to AI agents as a tool on our Remote MCP server with no local setup or Docker.

Does the API return changing lines and the resulting hexagram?

Yes. Every cast reports which lines are moving and, when one or more change, returns the resulting hexagram the reading transforms into, with its own judgment, image, and interpretation. Each of the six lines carries both its oracle statement and a written meaning, so you can explain exactly what a moving line is asking for rather than handing a user a line of archaic verse and leaving them to guess. That is the depth that turns a simple draw into a real I Ching reading, and it is why an LLM reading our payload does not have to make the interpretation up.

Does the API include all 64 hexagrams of the Book of Changes?

Yes. The full 64-hexagram catalog ships in the traditional King Wen sequence, each with its Chinese name, pinyin with tone marks, Unicode symbol, upper and lower trigram, judgment, image, and layered interpretations for general guidance, love, career, and decisions. You can browse the whole catalog or fetch a single hexagram by its number. The readings are our own editorial content, written from the mechanics of the hexagram and checked against the tradition, so you can build a complete reference without sourcing and licensing the text yourself.

Can I look up an I-Ching hexagram by its line pattern or trigrams?

Yes. The I Ching API resolves any six-line yin and yang pattern to its matching hexagram, so interfaces where users enter their own lines work out of the box. You also get all eight trigrams, the bagua building blocks such as Heaven, Earth, Fire, and Water, and every hexagram names its upper and lower trigram. Pair them to explain how two trigrams combine into a single meaning.

How do I add a daily I-Ching hexagram to my app?

The I Ching API offers a daily hexagram and a full daily cast, both stable for the day so a given user sees the same result all day. That is exactly what oracle of the day, mindfulness, and contemplation features need, and it powers AI wisdom chatbots that reflect on one hexagram each morning. Drop it in with our typed SDKs for TypeScript, Python, PHP, C#, Go, Rust, and Dart, the WordPress plugin, or ready-made UI components.

How much does the I-Ching API cost and how fast can I ship?

Pricing is flat and predictable: one subscription unlocks I Ching plus astrology, tarot, numerology, dreams, and the rest of the catalogue, with no per-domain or per-call fees. Activation is instant, so you can start casting hexagrams as soon as you sign up. AI agents connect to our Remote MCP server with no local setup, and an AGENTS.md file plus llms.txt mean coding assistants can wire up the I Ching API for you.

Start using I-Ching Oracle API today.

An I Ching reading that interprets every changing line, not just the hexagram it lands on.

All 18+ domains included with every plan. Every endpoint, MCP server, SDK, and templates.

Plans from $39/mo, starting at $1.80 per domain on annual billing. No credit card required for testing.

View Pricing & Get API Key