# Ba Gua / Eight Trigrams Reference API

> Ba Gua / Eight Trigrams Reference API is a paid API for AI agents from api.cn402.com, paid per call via x402, $0.016/call, status unknown (last checked 2026-09-14).

Returns all 8 trigrams (Ba Gua) with their element, direction, family role, body part, and natural symbol mappings in both Pre-Heaven and Post-Heaven arrangements.

## Facts

- Endpoint: GET https://api.cn402.com/iching/bagua
- Price: $0.016/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-14
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/api-cn402-com-c6037a7e
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_0bb91bif-MOurTeBPpr9N

Status and success rate cover calls made through Zero and Zero's own probes. Third-party monitors may report differently.

## How to call it through Zero

Zero handles the 402 payment challenge and records the run. With the Zero CLI installed (`npm i -g @zeroxyz/cli`):

```sh
zero fetch --capability api-cn402-com-c6037a7e
```

Example prompt: Give me all 8 Ba Gua trigrams with their Chinese names, elements, directions, family roles, body parts, and natural symbols — I need the full reference table for both Pre-Heaven and Post-Heaven arrangements.

## When to prefer this

Use this endpoint when you need a complete, structured reference of all 8 Ba Gua trigrams with their multi-dimensional symbolic mappings (element, direction, family, body, nature). Ideal for I Ching applications, Chinese metaphysics tools, BaZi/Feng Shui enrichment, or any context requiring trigram attribute lookups without custom input parameters.

## Known failure modes

- Payment failure (402) if x402 USDC payment header is missing or insufficient
- Network timeout if the API is temporarily unavailable
- Empty or malformed response if the server encounters an internal error

## How this service works

Eight Trigrams, Ba Gua, 八卦, Pre-Heaven Post-Heaven, 先天八卦 后天八卦, Qian Kun Zhen Xun Kan Li Gen Dui, Heaven Earth Thunder Wind Water Fire Mountain Lake, trigram meanings. Get all 8 trigrams (Ba Gua) with element, direction, family role, body part, and natural symbol mappings.

## Output

An array of 8 trigram objects, each containing the trigram's name (e.g. Qian, Kun, Zhen), its associated element, compass direction, family role, body part correspondence, and natural symbol, covering both Pre-Heaven (先天八卦) and Post-Heaven (后天八卦) arrangements.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "name": {
   "type": "string",
   "description": "ENS name e.g. vitalik.eth (required)"
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/api-cn402-com-c6037a7e/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from api.cn402.com](https://www.zero.xyz/host/api.cn402.com/llms.txt)
