# Feng Shui API Reference

> Compute classical feng shui from one API: Xuan Kong flying star natal charts for any of the nine periods and 24 mountains, Kua numbers and the full Eight Mansions map of favourable and unfavourable directions, annual and monthly star plates, the four annual afflictions with exact degree spans, the compass Bagua map and the 1864 to 2043 period table. Chinese years resolve at Li Chun, computed astronomically, so the boundary is right rather than assumed. One key covers every RoxyAPI domain, with Remote MCP and typed SDKs.

## Calculate Kua number - Feng shui personal direction calculator API

`POST https://roxyapi.com/api/v2/feng-shui/kua`. MCP tool `post_feng_shui_kua`.

Calculate the Kua number, also called the Ming Gua or life gua, from a birth date and sex. Returns the number, the east or west life group, the personal trigram, and all eight compass sectors classified from best to worst. The Chinese year is resolved at Li Chun by default, so an early February birthday is placed in the correct year rather than the calendar one, and the boundary that decided it is echoed back. Built for room and desk placement features, personalised feng shui reports, and any product that needs a favourable direction per person.

### Request

- `lang` (string enum): Response language (BCP 47). Supported: en, tr, de, es, hi, pt, fr, ru, zh-Hans, zh-Hant. Defaults to en. Coverage varies by domain, and a field with no translation in the requested language returns English.
- `date` (string (date), required): Birth date in YYYY-MM-DD format. Only the Chinese YEAR this date falls in enters the formula, so no birth time, latitude or longitude is needed. A January or early February birthday is the case that matters: it usually belongs to the PREVIOUS Chinese year and produces a different Kua. A date is read at the start of its day, and the boundary falls part-way through its own day, so a birth date landing exactly on the boundary day is placed in the outgoing year.
- `gender` (string enum, required): Selects the Kua formula variant. The two formulas are different arithmetic on the same year, and they also differ in where a raw result of 5 is reassigned.
- `yearBoundary` (string enum): Which boundary starts the Chinese year. Defaults to li-chun, the astronomical start of spring in early February, which is the classical position and the one feng shui uses for periods, annual stars and afflictions alike. Send lunar-new-year to match popular zodiac tables, which start the year two to four weeks later. The two disagree for anyone born between the two dates.

### Response

- `kua` (number, required): Kua number, 1 to 9 excluding 5. This is the value every other feng shui calculation about a person keys on.
- `rawKua` (number, required): The formula output before any reassignment. Equal to kua except when the formula produced 5, which has no trigram and no direction and must be moved.
- `reassigned` (boolean, required): Whether the raw result was 5 and had to be moved onto a trigram, to 2 for a man and to 8 for a woman.
- `gender` (string, required): Echo of the sex sent, which selected the formula variant.
- `group` (string, required): Life group, east or west. East group Kuas are 1, 3, 4 and 9 and share North, East, Southeast and South as their favourable sectors; west group Kuas are 2, 6, 7 and 8 and share Northeast, Southwest, West and Northwest. Always English, safe to compare against.
- `solarYear` (number, required): The Chinese year the birth date fell in under the boundary applied. This is the year the formula actually used, which is the previous calendar year for an early-in-the-year birthday.
- `boundaryDate` (string, required): Calendar date of the boundary that decided the year, computed astronomically rather than assumed. Li Chun is commonly quoted as 4 February and lands on the 3rd or the 5th in roughly one year in four.
- `trigram` (object, required): 
- `trigram.number` (number, required): Trigram number, 1 to 8, the same identifier the I-Ching trigram endpoints use. It is a lookup key, not a ranking.
- `trigram.chinese` (string, required): Chinese character for the trigram. Data, identical in every language.
- `trigram.english` (string, required): English name of the trigram, byte identical to the English value the I-Ching trigram endpoints publish for this number. Always English here, whatever the lang parameter says, so it stays safe to compare against. Use nameLocalized for anything a reader sees.
- `trigram.nameLocalized` (string): Trigram name in the requested language, for display only. Present only when lang is set to a language other than English, since in English it would repeat english exactly. Never compare against this value.
- `trigram.pinyin` (string, required): Tone-marked pinyin for the trigram. Data, identical in every language.
- `trigram.symbol` (string, required): Unicode trigram symbol, for rendering a Bagua diagram without an icon set.
- `trigram.binary` (string, required): Three lines bottom to top, 1 for yang and 0 for yin. The Eight Mansions classification of any sector is decided by which of these three lines differ from your own trigram.
- `trigram.element` (string, required): Five phase of this entry: Wood, Fire, Earth, Metal or Water. Always English so it stays safe to compare against and to key styling on. The full cycles live on the Chinese astrology elements endpoint.
- `trigram.elementLocalized` (string): Five phase name in the requested language, for display only. Present only when lang is set to a language other than English. Never compare against this value.
- `trigram.direction` (string, required): Compass sector, one of North, Northeast, East, Southeast, South, Southwest, West, Northwest. Always English, whatever the lang parameter says, so it stays safe to compare against in code and against the same value on the I-Ching trigram endpoints.
- `trigram.directionLocalized` (string): Compass sector in the requested language, for display only, the same word the composed readings use. Present only when lang is set to a language other than English. Never compare against this value.
- `trigram.familyMember` (string, required): Family role of the trigram. Read alongside an affliction to know which member of the household a sector points at. Always English, and it carries no localized sibling: no vocabulary this package ships names the eight family roles.
- `sectors` (array of object, required): All eight sectors classified for this Kua, in compass order from North. Exactly four are auspicious and four are inauspicious, and the two sets partition the compass. Call the eight mansions endpoint for the same map with full readings and ranked placement guidance.
- `sectors[].direction` (string, required): Compass sector, one of North, Northeast, East, Southeast, South, Southwest, West, Northwest. Always English, whatever the lang parameter says, so it stays safe to compare against in code and against the same value on the I-Ching trigram endpoints.
- `sectors[].star` (string, required): Eight Mansions star for this sector, one of sheng-chi, tian-yi, yan-nian, fu-wei, huo-hai, wu-gui, liu-sha, jue-ming. Always English, safe to compare against and to key styling on.
- `sectors[].starName` (string, required): Display name of the star. Always English, whatever the lang parameter says. Use starNameLocalized for anything a reader sees.
- `sectors[].starNameLocalized` (string): Star name in the requested language, for display only. Present only when lang is set to a language other than English, since in English it would repeat starName exactly. Never compare against this value.
- `sectors[].nature` (string, required): Whether the sector helps or harms: auspicious or inauspicious.
- `sectors[].rank` (number, required): Order within its nature, 1 to 4. Among auspicious sectors 1 is the strongest; among inauspicious sectors 1 is the mildest and 4 the most serious, which is what tells you which affliction to accept when no favourable sector is reachable.
- `sectors[].domain` (string, required): The life domain this sector governs, in a few words, written in the requested language.
- `conventions` (object, required): 
- `conventions.yearBoundary` (string, required): Which boundary decided the Chinese year for this calculation. li-chun starts the year at the astronomical start of spring, in early February, and is the classical position that feng shui uses throughout. lunar-new-year starts it at the first day of the lunar year, which is usually two to four weeks later and is what most popular zodiac tables use. Echoes the resolved value, whether it was sent or defaulted.

### Example request

```bash
curl -X POST "https://roxyapi.com/api/v2/feng-shui/kua" \
  -H "X-API-Key: YOUR_KEY" \
  -H "Content-Type: application/json" \
  -d '{"date":"1985-07-15","gender":"male"}'
```

### Example response

```json
{
  "kua": 6,
  "rawKua": 6,
  "reassigned": false,
  "gender": "male",
  "group": "west",
  "solarYear": 1985,
  "boundaryDate": "1985-02-04",
  "trigram": {
    "number": 4,
    "chinese": "巽",
    "english": "Wind",
    "nameLocalized": "Viento",
    "pinyin": "Xùn",
    "symbol": "☴",
    "binary": "011",
    "element": "Wood",
    "elementLocalized": "Madera",
    "direction": "Southeast",
    "directionLocalized": "Sureste",
    "familyMember": "Eldest Daughter"
  },
  "sectors": [
    {
      "direction": "Southeast",
      "star": "sheng-chi",
      "starName": "Sheng Chi",
      "starNameLocalized": "Aliento generador",
      "nature": "auspicious",
      "rank": 1,
      "domain": "Growth and income"
    }
  ],
  "conventions": {
    "yearBoundary": "li-chun"
  }
}
```

## Look up a Kua number - Eight Mansions reference API

`GET https://roxyapi.com/api/v2/feng-shui/kua/{number}`. MCP tool `get_feng_shui_kua_number`.

Look up the reference chart for one Kua number: its trigram, its east or west life group, and how it classifies all eight compass sectors. A pure reference endpoint with no birth data required, for building a lookup table or a picker. Number 5 is served for completeness and is never a computed result, because it belongs to the centre and has no direction of its own: a man whose formula gives 5 reads Kua 2 and a woman reads Kua 8, and the chart returned for 5 is therefore the Kua 2 chart.

### Request

- `number` (integer, required): Kua number, 1 to 9.
- `lang` (string enum): Response language (BCP 47). Supported: en, tr, de, es, hi, pt, fr, ru, zh-Hans, zh-Hant. Defaults to en. Coverage varies by domain, and a field with no translation in the requested language returns English.

### Response

- `number` (number, required): Kua number, 1 to 9.
- `group` (string, required): Life group, east or west. Always English, safe to compare against and to key styling on.
- `trigram` (object, required): 
- `trigram.number` (number, required): Trigram number, 1 to 8, the same identifier the I-Ching trigram endpoints use. It is a lookup key, not a ranking.
- `trigram.chinese` (string, required): Chinese character for the trigram. Data, identical in every language.
- `trigram.english` (string, required): English name of the trigram, byte identical to the English value the I-Ching trigram endpoints publish for this number. Always English here, whatever the lang parameter says, so it stays safe to compare against. Use nameLocalized for anything a reader sees.
- `trigram.nameLocalized` (string): Trigram name in the requested language, for display only. Present only when lang is set to a language other than English, since in English it would repeat english exactly. Never compare against this value.
- `trigram.pinyin` (string, required): Tone-marked pinyin for the trigram. Data, identical in every language.
- `trigram.symbol` (string, required): Unicode trigram symbol, for rendering a Bagua diagram without an icon set.
- `trigram.binary` (string, required): Three lines bottom to top, 1 for yang and 0 for yin. The Eight Mansions classification of any sector is decided by which of these three lines differ from your own trigram.
- `trigram.element` (string, required): Five phase of this entry: Wood, Fire, Earth, Metal or Water. Always English so it stays safe to compare against and to key styling on. The full cycles live on the Chinese astrology elements endpoint.
- `trigram.elementLocalized` (string): Five phase name in the requested language, for display only. Present only when lang is set to a language other than English. Never compare against this value.
- `trigram.direction` (string, required): Compass sector, one of North, Northeast, East, Southeast, South, Southwest, West, Northwest. Always English, whatever the lang parameter says, so it stays safe to compare against in code and against the same value on the I-Ching trigram endpoints.
- `trigram.directionLocalized` (string): Compass sector in the requested language, for display only, the same word the composed readings use. Present only when lang is set to a language other than English. Never compare against this value.
- `trigram.familyMember` (string, required): Family role of the trigram. Read alongside an affliction to know which member of the household a sector points at. Always English, and it carries no localized sibling: no vocabulary this package ships names the eight family roles.
- `sectors` (array of object, required): All eight sectors classified for this Kua, in compass order from North.
- `sectors[].direction` (string, required): Compass sector, one of North, Northeast, East, Southeast, South, Southwest, West, Northwest. Always English, whatever the lang parameter says, so it stays safe to compare against in code and against the same value on the I-Ching trigram endpoints.
- `sectors[].star` (string, required): Eight Mansions star for this sector, one of sheng-chi, tian-yi, yan-nian, fu-wei, huo-hai, wu-gui, liu-sha, jue-ming. Always English, safe to compare against and to key styling on.
- `sectors[].starName` (string, required): Display name of the star. Always English, whatever the lang parameter says. Use starNameLocalized for anything a reader sees.
- `sectors[].starNameLocalized` (string): Star name in the requested language, for display only. Present only when lang is set to a language other than English, since in English it would repeat starName exactly. Never compare against this value.
- `sectors[].nature` (string, required): Whether the sector helps or harms: auspicious or inauspicious.
- `sectors[].rank` (number, required): Order within its nature, 1 to 4. Among auspicious sectors 1 is the strongest; among inauspicious sectors 1 is the mildest and 4 the most serious, which is what tells you which affliction to accept when no favourable sector is reachable.
- `sectors[].domain` (string, required): The life domain this sector governs, in a few words, written in the requested language.

### Example request

```bash
curl "https://roxyapi.com/api/v2/feng-shui/kua/8" \
  -H "X-API-Key: YOUR_KEY"
```

### Example response

```json
{
  "number": 8,
  "group": "west",
  "trigram": {
    "number": 4,
    "chinese": "巽",
    "english": "Wind",
    "nameLocalized": "Viento",
    "pinyin": "Xùn",
    "symbol": "☴",
    "binary": "011",
    "element": "Wood",
    "elementLocalized": "Madera",
    "direction": "Southeast",
    "directionLocalized": "Sureste",
    "familyMember": "Eldest Daughter"
  },
  "sectors": [
    {
      "direction": "Southeast",
      "star": "sheng-chi",
      "starName": "Sheng Chi",
      "starNameLocalized": "Aliento generador",
      "nature": "auspicious",
      "rank": 1,
      "domain": "Growth and income"
    }
  ]
}
```

## Generate Eight Mansions map - Ba Zhai lucky direction API

`POST https://roxyapi.com/api/v2/feng-shui/eight-mansions`. MCP tool `post_feng_shui_eight_mansions`.

Build the full Eight Mansions (Ba Zhai) map for a person: all eight compass sectors classified into the four favourable stars, Sheng Chi, Tian Yi, Yan Nian and Fu Wei, and the four unfavourable ones, Huo Hai, Wu Gui, Liu Sha and Jue Ming. Sectors come back ordered best to worst with a composed reading each, plus the ranking that decides which affliction to accept when no favourable sector is reachable. Accepts a Kua number directly or derives one from a birth date and sex. Built for bed and desk placement tools, room-by-room reports and floor plan overlays.

### Request

- `lang` (string enum): Response language (BCP 47). Supported: en, tr, de, es, hi, pt, fr, ru, zh-Hans, zh-Hant. Defaults to en. Coverage varies by domain, and a field with no translation in the requested language returns English.
- `kua` (number): Kua number to build the map for, if you already have one. Send this OR date and gender, not neither. A Kua of 5 is read as the Kua 2 chart, since 5 has no direction of its own.
- `date` (string (date)): Birth date in YYYY-MM-DD format, used to derive the Kua when no kua is sent. Requires gender alongside it. A date is read at the start of its day, so a birth date landing exactly on the year boundary is placed in the outgoing year.
- `gender` (string enum): Selects the Kua formula variant. Required when the Kua is being derived from a birth date.
- `yearBoundary` (string enum): Which boundary starts the Chinese year when the Kua is derived from a birth date. Defaults to li-chun, the classical position. Ignored when a kua is sent directly, and echoed back either way.
- `facing` (string enum): Optional compass sector the main door faces, one of North, Northeast, East, Southeast, South, Southwest, West, Northwest. When sent, the response names the star sitting on that sector so a caller can judge an entrance without scanning the whole map.

### Response

- `kua` (number, required): The Kua number this map was built for.
- `group` (string, required): Life group, east or west. Always English, safe to compare against and to key styling on.
- `trigram` (object, required): 
- `trigram.number` (number, required): Trigram number, 1 to 8, the same identifier the I-Ching trigram endpoints use. It is a lookup key, not a ranking.
- `trigram.chinese` (string, required): Chinese character for the trigram. Data, identical in every language.
- `trigram.english` (string, required): English name of the trigram, byte identical to the English value the I-Ching trigram endpoints publish for this number. Always English here, whatever the lang parameter says, so it stays safe to compare against. Use nameLocalized for anything a reader sees.
- `trigram.nameLocalized` (string): Trigram name in the requested language, for display only. Present only when lang is set to a language other than English, since in English it would repeat english exactly. Never compare against this value.
- `trigram.pinyin` (string, required): Tone-marked pinyin for the trigram. Data, identical in every language.
- `trigram.symbol` (string, required): Unicode trigram symbol, for rendering a Bagua diagram without an icon set.
- `trigram.binary` (string, required): Three lines bottom to top, 1 for yang and 0 for yin. The Eight Mansions classification of any sector is decided by which of these three lines differ from your own trigram.
- `trigram.element` (string, required): Five phase of this entry: Wood, Fire, Earth, Metal or Water. Always English so it stays safe to compare against and to key styling on. The full cycles live on the Chinese astrology elements endpoint.
- `trigram.elementLocalized` (string): Five phase name in the requested language, for display only. Present only when lang is set to a language other than English. Never compare against this value.
- `trigram.direction` (string, required): Compass sector, one of North, Northeast, East, Southeast, South, Southwest, West, Northwest. Always English, whatever the lang parameter says, so it stays safe to compare against in code and against the same value on the I-Ching trigram endpoints.
- `trigram.directionLocalized` (string): Compass sector in the requested language, for display only, the same word the composed readings use. Present only when lang is set to a language other than English. Never compare against this value.
- `trigram.familyMember` (string, required): Family role of the trigram. Read alongside an affliction to know which member of the household a sector points at. Always English, and it carries no localized sibling: no vocabulary this package ships names the eight family roles.
- `sectors` (array of object, required): All eight sectors, ordered best to worst rather than by compass, because the question this map answers is which sector to use next. Read down the list until you reach one the building actually has.
- `sectors[].direction` (string, required): Compass sector, one of North, Northeast, East, Southeast, South, Southwest, West, Northwest. Always English, whatever the lang parameter says, so it stays safe to compare against in code and against the same value on the I-Ching trigram endpoints.
- `sectors[].star` (string, required): Eight Mansions star for this sector. Always English, safe to compare against and to key styling on.
- `sectors[].starName` (string, required): Display name of the star. Always English, whatever the lang parameter says. Use starNameLocalized for anything a reader sees.
- `sectors[].starNameLocalized` (string): Star name in the requested language, for display only. Present only when lang is set to a language other than English, since in English it would repeat starName exactly. Never compare against this value.
- `sectors[].chinese` (string, required): Chinese characters for the star. Data, identical in every language.
- `sectors[].pinyin` (string, required): Tone-marked pinyin for the star. Data, identical in every language.
- `sectors[].nature` (string, required): Whether the sector helps or harms: auspicious or inauspicious.
- `sectors[].rank` (number, required): Order within its nature, 1 to 4. Among auspicious sectors 1 is the strongest; among inauspicious sectors 1 is the mildest and 4 the most serious.
- `sectors[].domain` (string, required): The life domain this sector governs, in a few words, written in the requested language.
- `sectors[].trigram` (object, required): 
- `sectors[].trigram.number` (number, required): Trigram number, 1 to 8, the same identifier the I-Ching trigram endpoints use. It is a lookup key, not a ranking.
- `sectors[].trigram.chinese` (string, required): Chinese character for the trigram. Data, identical in every language.
- `sectors[].trigram.english` (string, required): English name of the trigram, byte identical to the English value the I-Ching trigram endpoints publish for this number. Always English here, whatever the lang parameter says, so it stays safe to compare against. Use nameLocalized for anything a reader sees.
- `sectors[].trigram.nameLocalized` (string): Trigram name in the requested language, for display only. Present only when lang is set to a language other than English, since in English it would repeat english exactly. Never compare against this value.
- `sectors[].trigram.pinyin` (string, required): Tone-marked pinyin for the trigram. Data, identical in every language.
- `sectors[].trigram.symbol` (string, required): Unicode trigram symbol, for rendering a Bagua diagram without an icon set.
- `sectors[].trigram.binary` (string, required): Three lines bottom to top, 1 for yang and 0 for yin. The Eight Mansions classification of any sector is decided by which of these three lines differ from your own trigram.
- `sectors[].trigram.element` (string, required): Five phase of this entry: Wood, Fire, Earth, Metal or Water. Always English so it stays safe to compare against and to key styling on. The full cycles live on the Chinese astrology elements endpoint.
- `sectors[].trigram.elementLocalized` (string): Five phase name in the requested language, for display only. Present only when lang is set to a language other than English. Never compare against this value.
- `sectors[].trigram.direction` (string, required): Compass sector, one of North, Northeast, East, Southeast, South, Southwest, West, Northwest. Always English, whatever the lang parameter says, so it stays safe to compare against in code and against the same value on the I-Ching trigram endpoints.
- `sectors[].trigram.directionLocalized` (string): Compass sector in the requested language, for display only, the same word the composed readings use. Present only when lang is set to a language other than English. Never compare against this value.
- `sectors[].trigram.familyMember` (string, required): Family role of the trigram. Read alongside an affliction to know which member of the household a sector points at. Always English, and it carries no localized sibling: no vocabulary this package ships names the eight family roles.
- `sectors[].reading` (string, required): Composed reading for this sector: which star it holds, where that star ranks for this Kua, and what the star means in practice.
- `bestSector` (string, required): Compass sector, one of North, Northeast, East, Southeast, South, Southwest, West, Northwest. Always English, whatever the lang parameter says, so it stays safe to compare against in code and against the same value on the I-Ching trigram endpoints.
- `worstSector` (string, required): Compass sector, one of North, Northeast, East, Southeast, South, Southwest, West, Northwest. Always English, whatever the lang parameter says, so it stays safe to compare against in code and against the same value on the I-Ching trigram endpoints.
- `facingSector` (object): The classification of the sector sent as facing. Absent when no facing was sent.
- `facingSector.direction` (string, required): Compass sector, one of North, Northeast, East, Southeast, South, Southwest, West, Northwest. Always English, whatever the lang parameter says, so it stays safe to compare against in code and against the same value on the I-Ching trigram endpoints.
- `facingSector.star` (string, required): Eight Mansions star sitting on the facing sector.
- `facingSector.nature` (string, required): Whether the facing sector helps or harms for this Kua.
- `conventions` (object, required): 
- `conventions.yearBoundary` (string, required): Which boundary decided the Chinese year for this calculation. li-chun starts the year at the astronomical start of spring, in early February, and is the classical position that feng shui uses throughout. lunar-new-year starts it at the first day of the lunar year, which is usually two to four weeks later and is what most popular zodiac tables use. Echoes the resolved value, whether it was sent or defaulted.

### Example request

```bash
curl -X POST "https://roxyapi.com/api/v2/feng-shui/eight-mansions" \
  -H "X-API-Key: YOUR_KEY" \
  -H "Content-Type: application/json" \
  -d '{"kua":6,"date":"1985-07-15","gender":"male","yearBoundary":"li-chun"}'
```

### Example response

```json
{
  "kua": 6,
  "group": "west",
  "trigram": {
    "number": 4,
    "chinese": "巽",
    "english": "Wind",
    "nameLocalized": "Viento",
    "pinyin": "Xùn",
    "symbol": "☴",
    "binary": "011",
    "element": "Wood",
    "elementLocalized": "Madera",
    "direction": "Southeast",
    "directionLocalized": "Sureste",
    "familyMember": "Eldest Daughter"
  },
  "sectors": [
    {
      "direction": "Southeast",
      "star": "sheng-chi",
      "starName": "Sheng Chi",
      "starNameLocalized": "Aliento generador",
      "chinese": "生氣",
      "pinyin": "Shēng Qì",
      "nature": "auspicious",
      "rank": 1,
      "domain": "Growth and income",
      "trigram": {
        "number": 4,
        "chinese": "巽",
        "english": "Wind",
        "nameLocalized": "Viento",
        "pinyin": "Xùn",
        "symbol": "☴",
        "binary": "011",
        "element": "Wood",
        "elementLocalized": "Madera",
        "direction": "Southeast",
        "directionLocalized": "Sureste",
        "familyMember": "Eldest Daughter"
      },
      "reading": "The West sector reads Sheng Chi for Kua 6. This is one of the four favourable sectors for Kua 6, ranked 1 of four. The generating breath, and the strongest of the four favourable sectors. It is the direction to face while working, to seat a main door in, and to put a desk against, because it reads as advancement, new business and the kind of momentum that compounds. Where a household has to choose one sector to get right, this is the one."
    }
  ],
  "bestSector": "Southeast",
  "worstSector": "Southeast",
  "facingSector": {
    "direction": "Southeast",
    "star": "sheng-chi",
    "nature": "auspicious"
  },
  "conventions": {
    "yearBoundary": "li-chun"
  }
}
```

## Generate flying star natal chart - Xuan Kong Fei Xing API

`POST https://roxyapi.com/api/v2/feng-shui/flying-stars/natal`. MCP tool `post_feng_shui_flying_stars_natal`.

Cast the Xuan Kong flying star natal chart for a building from its construction period and the direction it faces. Returns all nine palaces with the period star, the mountain star that governs health and relationships and the water star that governs wealth, plus the named formation and a composed reading for every palace, and the classical verdict on how the two prosperous stars landed. Facing is accepted as one of the 24 mountains or as a compass bearing. Built for property analysis tools, floor plan overlays and consultation software.

### Request

- `lang` (string enum): Response language (BCP 47). Supported: en, tr, de, es, hi, pt, fr, ru, zh-Hans, zh-Hant. Defaults to en. Coverage varies by domain, and a field with no translation in the requested language returns English.
- `period` (integer): Construction period of the building, 1 to 9. This is the twenty year cycle the building was completed in, or last renovated heavily enough to reset, and it is fixed for the life of the building. Periods change at Li Chun in early February, so a building finished in January 2024 is a Period 8 building. Defaults to the period in force now.
- `facing` (string enum): The mountain the front of the building faces, by id or by compass label such as S2. Send this or facingDegrees, not neither. The facing side is the open, active, public side, which is not always the side with the front door.
- `facingDegrees` (number,null): The compass bearing the front of the building faces, 0 to 360 degrees, measured looking out from inside. Resolved to one of the 24 mountains. Send this or facing, not neither.

### Response

- `period` (number, required): The period this chart was built for. Echoes the period requested, or the period in force now when it was omitted.
- `facing` (object, required): 
- `facing.id` (string, required): Mountain id, the pinyin of the stem, branch or trigram that names it. Always English pinyin, safe to compare against.
- `facing.label` (string, required): Compass label of the mountain, sector plus position 1 to 3 clockwise. The form a facing is usually quoted in.
- `facing.chinese` (string, required): Chinese character for the mountain. Data, identical in every language.
- `facing.pinyin` (string, required): Tone-marked pinyin for the mountain. Data, identical in every language.
- `facing.direction` (string, required): Compass sector, one of North, Northeast, East, Southeast, South, Southwest, West, Northwest. Always English, whatever the lang parameter says, so it stays safe to compare against in code and against the same value on the I-Ching trigram endpoints.
- `facing.yuan` (string, required): Which of the three dragons the mountain holds inside its sector: earth for the first mountain clockwise, heaven for the middle, human for the last. The heaven and human dragons share a polarity, which is why they share a chart.
- `facing.polarity` (string, required): San Yuan polarity of the mountain, yang or yin, which decides whether a plate entering the centre flies forward or in reverse. This is NOT the natural polarity of the stem or branch and the two differ on eight of the 24 mountains.
- `facing.startDegree` (number, required): Start of the 15 degree span, in compass degrees. Wraps past 360 for the two northernmost mountains.
- `facing.endDegree` (number, required): End of the 15 degree span, in compass degrees.
- `sitting` (object, required): 
- `sitting.id` (string, required): Mountain id, the pinyin of the stem, branch or trigram that names it. Always English pinyin, safe to compare against.
- `sitting.label` (string, required): Compass label of the mountain, sector plus position 1 to 3 clockwise. The form a facing is usually quoted in.
- `sitting.chinese` (string, required): Chinese character for the mountain. Data, identical in every language.
- `sitting.pinyin` (string, required): Tone-marked pinyin for the mountain. Data, identical in every language.
- `sitting.direction` (string, required): Compass sector, one of North, Northeast, East, Southeast, South, Southwest, West, Northwest. Always English, whatever the lang parameter says, so it stays safe to compare against in code and against the same value on the I-Ching trigram endpoints.
- `sitting.yuan` (string, required): Which of the three dragons the mountain holds inside its sector: earth for the first mountain clockwise, heaven for the middle, human for the last. The heaven and human dragons share a polarity, which is why they share a chart.
- `sitting.polarity` (string, required): San Yuan polarity of the mountain, yang or yin, which decides whether a plate entering the centre flies forward or in reverse. This is NOT the natural polarity of the stem or branch and the two differ on eight of the 24 mountains.
- `sitting.startDegree` (number, required): Start of the 15 degree span, in compass degrees. Wraps past 360 for the two northernmost mountains.
- `sitting.endDegree` (number, required): End of the 15 degree span, in compass degrees.
- `facingDegrees` (number): Echo of the bearing sent, when one was sent. Absent when the facing was named as a mountain instead.
- `straddling` (boolean, required): Whether the bearing fell in the outer 3 degrees of its mountain rather than the central 9. A bearing there calls for the substitute gua construction, which is a different chart; this chart is always the down gua one, so a true value means the result needs a specialist rather than this endpoint. Always false when the facing was named as a mountain, since naming a mountain expresses no bearing.
- `mountainCenterStar` (number, required): Flying star number, 1 to 9. The number IS the identifier of the star: 8 is always the Eight White Earth star whichever plate it appears on.
- `waterCenterStar` (number, required): Flying star number, 1 to 9. The number IS the identifier of the star: 8 is always the Eight White Earth star whichever plate it appears on.
- `mountainFlight` (string, required): Whether the mountain plate flew forward or in reverse, decided by the polarity of the mountain the centre star answers to. Published because it is the step that separates two charts that otherwise look alike.
- `waterFlight` (string, required): Whether the water plate flew forward or in reverse, decided the same way against the facing mountain.
- `structure` (object, required): 
- `structure.id` (string, required): The classical verdict on the chart: prosperous-mountain-prosperous-water, reversed, double-facing or double-sitting. Always English, safe to switch on.
- `structure.name` (string, required): Display name of the structure, TRANSLATED IN PLACE under the lang parameter. Switch on structure.id, which is the stable machine value in every language. Unlike the star and formation names beside it, this field has no nameLocalized sibling.
- `structure.chinese` (string, required): Chinese name of the structure. Data, identical in every language.
- `structure.meaning` (string, required): What the structure means and what the classical correction for it is.
- `palaces` (array of object, required): All nine palaces, centre first and then along the Lo Shu flight path. Each of the nine stars appears exactly once on each plate, which is the property that makes a chart checkable.
- `palaces[].palace` (string, required): Palace of the Lo Shu grid: one of the eight compass sectors, or Center. Always English, safe to compare against and to key a grid cell on.
- `palaces[].base` (number, required): Flying star number, 1 to 9. The number IS the identifier of the star: 8 is always the Eight White Earth star whichever plate it appears on.
- `palaces[].period` (number, required): Flying star number, 1 to 9. The number IS the identifier of the star: 8 is always the Eight White Earth star whichever plate it appears on.
- `palaces[].mountain` (number, required): Flying star number, 1 to 9. The number IS the identifier of the star: 8 is always the Eight White Earth star whichever plate it appears on.
- `palaces[].water` (number, required): Flying star number, 1 to 9. The number IS the identifier of the star: 8 is always the Eight White Earth star whichever plate it appears on.
- `palaces[].combination` (object): The named classical formation for this mountain and water pair. Absent for the pairs the tradition does not name, where the composed reading carries the meaning instead.
- `palaces[].combination.id` (string, required): Canonical key for the pair, lower number first, so a palace holding mountain 9 and water 8 resolves to the same entry as one holding mountain 8 and water 9.
- `palaces[].combination.name` (string, required): Name of the formation. Always English, whatever the lang parameter says. Use nameLocalized for anything a reader sees.
- `palaces[].combination.nameLocalized` (string): Formation name in the requested language, for display only. Present only when lang is set to a language other than English.
- `palaces[].combination.chinese` (string): Chinese name of the formation. Data, identical in every language.
- `palaces[].combination.nature` (string, required): Whether the formation helps or harms.
- `palaces[].reading` (string, required): What this palace means, composed from the two stars and the phase relation between them. Named formations return their own passage; the rest are built from the star pair.

### Example request

```bash
curl -X POST "https://roxyapi.com/api/v2/feng-shui/flying-stars/natal" \
  -H "X-API-Key: YOUR_KEY" \
  -H "Content-Type: application/json" \
  -d '{"period":9,"facing":"wu","facingDegrees":180}'
```

### Example response

```json
{
  "period": 9,
  "facing": {
    "id": "wu",
    "label": "S2",
    "chinese": "午",
    "pinyin": "Wǔ",
    "direction": "Southeast",
    "yuan": "heaven",
    "polarity": "yin",
    "startDegree": 172.5,
    "endDegree": 187.5
  },
  "sitting": {
    "id": "wu",
    "label": "S2",
    "chinese": "午",
    "pinyin": "Wǔ",
    "direction": "Southeast",
    "yuan": "heaven",
    "polarity": "yin",
    "startDegree": 172.5,
    "endDegree": 187.5
  },
  "facingDegrees": 180,
  "straddling": false,
  "mountainCenterStar": 8,
  "waterCenterStar": 8,
  "mountainFlight": "reverse",
  "waterFlight": "forward",
  "structure": {
    "id": "double-sitting",
    "name": "Double Star at Sitting",
    "chinese": "雙星到坐",
    "meaning": "Both prosperous stars gather at the back of the building. Good for health, for family and for anyone who works from home, weaker for income arriving from outside."
  },
  "palaces": [
    {
      "palace": "Southeast",
      "base": 8,
      "period": 8,
      "mountain": 8,
      "water": 8,
      "combination": {
        "id": "8-9",
        "name": "Prosperity Doubled",
        "nameLocalized": "Prosperidad doblada",
        "chinese": "八逢紫曜",
        "nature": "auspicious"
      },
      "reading": "Fire producing the wealth Earth, and the ruling star of the current period sitting with the one that ruled the last. It reads as celebration attached to money: marriage, birth, a business milestone, and property that appreciates while it is lived in."
    }
  ]
}
```

## Annual flying stars - Yearly feng shui star chart API

`GET https://roxyapi.com/api/v2/feng-shui/flying-stars/annual/{year}`. MCP tool `get_feng_shui_flying_stars_annual_year`.

Return the annual flying star plate for a solar year: which of the nine stars occupies each of the nine palaces, what it means there, and which element strengthens or drains it. The annual plate is universal and does not depend on any building, so it is the layer every yearly feng shui guide is built on. The changeover is Li Chun in early February rather than Lunar New Year, and the exact date is returned so a caller can apply the plate on the right day.

### Request

- `year` (integer, required): Solar year, 1900 to 2100. The year runs from Li Chun to Li Chun, so a date in January belongs to the previous year here.
- `lang` (string enum): Response language (BCP 47). Supported: en, tr, de, es, hi, pt, fr, ru, zh-Hans, zh-Hant. Defaults to en. Coverage varies by domain, and a field with no translation in the requested language returns English.

### Response

- `year` (number, required): The solar year this plate is for.
- `centerStar` (number, required): Flying star number, 1 to 9. The number IS the identifier of the star: 8 is always the Eight White Earth star whichever plate it appears on.
- `changeoverDate` (string, required): The date this plate takes effect, which is Li Chun and NOT Lunar New Year. Lunar New Year 2026 falls on 17 February, roughly two weeks later, and applying the new plate from that date is the most common error in annual feng shui.
- `palaces` (array of object, required): All nine palaces with the star that flew there, centre first and then along the Lo Shu path. The plate is universal: it is the same for every building on earth.
- `palaces[].palace` (string, required): Palace of the Lo Shu grid: one of the eight compass sectors, or Center. Always English, safe to compare against and to key a grid cell on.
- `palaces[].star` (number, required): Flying star number, 1 to 9. The number IS the identifier of the star: 8 is always the Eight White Earth star whichever plate it appears on.
- `palaces[].name` (string, required): Display name of the star in this palace. Always English, whatever the lang parameter says. Use nameLocalized for anything a reader sees.
- `palaces[].nameLocalized` (string): Star name in the requested language, for display only. Present only when lang is set to a language other than English.
- `palaces[].element` (string, required): Five phase of this entry: Wood, Fire, Earth, Metal or Water. Always English so it stays safe to compare against and to key styling on. The full cycles live on the Chinese astrology elements endpoint.
- `palaces[].nature` (string, required): The untimely reading of the star, auspicious or inauspicious.
- `palaces[].enhancer` (string, required): Five phase of this entry: Wood, Fire, Earth, Metal or Water. Always English so it stays safe to compare against and to key styling on. The full cycles live on the Chinese astrology elements endpoint.
- `palaces[].remedy` (string, required): Five phase of this entry: Wood, Fire, Earth, Metal or Water. Always English so it stays safe to compare against and to key styling on. The full cycles live on the Chinese astrology elements endpoint.
- `palaces[].meaning` (string, required): What the star does in the sector it has flown to this period.

### Example request

```bash
curl "https://roxyapi.com/api/v2/feng-shui/flying-stars/annual/2026" \
  -H "X-API-Key: YOUR_KEY"
```

### Example response

```json
{
  "year": 2026,
  "centerStar": 8,
  "changeoverDate": "2026-02-04",
  "palaces": [
    {
      "palace": "Southeast",
      "star": 8,
      "name": "Five Yellow",
      "nameLocalized": "Cinco Amarilla",
      "element": "Wood",
      "nature": "inauspicious",
      "enhancer": "Wood",
      "remedy": "Wood",
      "meaning": "Earth of the central palace, the one star with no trigram and no direction of its own, and the affliction every school treats as the most serious."
    }
  ]
}
```

## Monthly flying stars - Month by month feng shui overlay API

`GET https://roxyapi.com/api/v2/feng-shui/flying-stars/monthly`. MCP tool `get_feng_shui_flying_stars_monthly`.

Return the monthly flying star plate, the faster overlay that sits on top of the annual one. Months here are SOLAR months: month 1 begins at Li Chun in early February and each month begins at the next of the twelve major solar terms, so they never line up with calendar months. Omit both parameters to get the month in progress. Built for monthly guidance features and for timing work around an affliction that only lands for part of the year.

### Request

- `lang` (string enum): Response language (BCP 47). Supported: en, tr, de, es, hi, pt, fr, ru, zh-Hans, zh-Hant. Defaults to en. Coverage varies by domain, and a field with no translation in the requested language returns English.
- `year` (integer): Solar year, 1900 to 2100. Defaults to the solar year in progress, which changes at Li Chun rather than on 1 January.
- `month` (integer): Solar month, 1 to 12, where 1 begins at Li Chun in early February. This is NOT the calendar month: solar month 1 covers roughly 4 February to 5 March. Defaults to the solar month in progress.

### Response

- `year` (number, required): Solar year of the plate. Echoes the year requested, or the solar year in progress when it was omitted.
- `month` (number, required): Solar month of the plate, 1 to 12, where 1 is the month that begins at Li Chun in early February. Echoes the month requested, or the solar month in progress when it was omitted.
- `centerStar` (number, required): Flying star number, 1 to 9. The number IS the identifier of the star: 8 is always the Eight White Earth star whichever plate it appears on.
- `yearBranch` (string, required): Earthly Branch of the solar year, which decides where the monthly sequence starts. Rat, Horse, Rabbit and Rooster years open on 8; Dragon, Dog, Ox and Goat years on 5; Tiger, Monkey, Snake and Pig years on 2.
- `palaces` (array of object, required): All nine palaces of the monthly plate, centre first and then along the Lo Shu path.
- `palaces[].palace` (string, required): Palace of the Lo Shu grid: one of the eight compass sectors, or Center. Always English, safe to compare against and to key a grid cell on.
- `palaces[].star` (number, required): Flying star number, 1 to 9. The number IS the identifier of the star: 8 is always the Eight White Earth star whichever plate it appears on.
- `palaces[].name` (string, required): Display name of the star in this palace. Always English, whatever the lang parameter says. Use nameLocalized for anything a reader sees.
- `palaces[].nameLocalized` (string): Star name in the requested language, for display only. Present only when lang is set to a language other than English.
- `palaces[].element` (string, required): Five phase of this entry: Wood, Fire, Earth, Metal or Water. Always English so it stays safe to compare against and to key styling on. The full cycles live on the Chinese astrology elements endpoint.
- `palaces[].nature` (string, required): The untimely reading of the star, auspicious or inauspicious.
- `palaces[].enhancer` (string, required): Five phase of this entry: Wood, Fire, Earth, Metal or Water. Always English so it stays safe to compare against and to key styling on. The full cycles live on the Chinese astrology elements endpoint.
- `palaces[].remedy` (string, required): Five phase of this entry: Wood, Fire, Earth, Metal or Water. Always English so it stays safe to compare against and to key styling on. The full cycles live on the Chinese astrology elements endpoint.
- `palaces[].meaning` (string, required): What the star does in the sector it has flown to this period.

### Example request

```bash
curl "https://roxyapi.com/api/v2/feng-shui/flying-stars/monthly" \
  -H "X-API-Key: YOUR_KEY"
```

### Example response

```json
{
  "year": 2026,
  "month": 1,
  "centerStar": 8,
  "yearBranch": "wu",
  "palaces": [
    {
      "palace": "Southeast",
      "star": 8,
      "name": "Five Yellow",
      "nameLocalized": "Cinco Amarilla",
      "element": "Wood",
      "nature": "inauspicious",
      "enhancer": "Wood",
      "remedy": "Wood",
      "meaning": "Earth of the central palace, the one star with no trigram and no direction of its own, and the affliction every school treats as the most serious."
    }
  ]
}
```

## List the nine flying stars - Xuan Kong star reference API

`GET https://roxyapi.com/api/v2/feng-shui/flying-stars/stars`. MCP tool `get_feng_shui_flying_stars_stars`.

The reference catalogue of the nine flying stars: name, Chinese characters, five phase, home palace and trigram, the period each rules, what each means, and which element strengthens or drains it. The remedy element is what the star itself produces, because a harmful star is drained by giving it somewhere to go rather than fought with the phase that controls it. A pure reference endpoint that needs no chart.

### Request

- `lang` (string enum): Response language (BCP 47). Supported: en, tr, de, es, hi, pt, fr, ru, zh-Hans, zh-Hant. Defaults to en. Coverage varies by domain, and a field with no translation in the requested language returns English.
- `limit` (integer): Maximum items to return per page. Range: 1-9, default 9.
- `offset` (integer): Number of items to skip for pagination. Default 0.

### Response

- `total` (number, required): Number of stars in the catalogue.
- `limit` (number, required): Page size applied.
- `offset` (number, required): Number of entries skipped.
- `stars` (array of object, required): The nine flying stars in Lo Shu order, 1 through 9.
- `stars[].number` (number, required): Flying star number, 1 to 9. The number IS the identifier of the star: 8 is always the Eight White Earth star whichever plate it appears on.
- `stars[].name` (string, required): Display name of the star. Always English, whatever the lang parameter says, so it stays safe to compare against in code. Use nameLocalized for anything a reader sees.
- `stars[].nameLocalized` (string): Star name in the requested language, for display only. Present only when lang is set to a language other than English, since in English it would repeat name exactly. Never compare against this value.
- `stars[].chinese` (string, required): Chinese characters for the star. Data, identical in every language.
- `stars[].pinyin` (string, required): Tone-marked pinyin for the star. Data, identical in every language.
- `stars[].element` (string, required): Five phase of this entry: Wood, Fire, Earth, Metal or Water. Always English so it stays safe to compare against and to key styling on. The full cycles live on the Chinese astrology elements endpoint.
- `stars[].nature` (string, required): The untimely reading of the star, auspicious or inauspicious. It is not the whole verdict: the ruling star of the period in force is prosperous whatever this says, and a star long past its period is the one that does damage. Only the 5 is harmful in every period.
- `stars[].keywords` (array of string, required): Themes the star governs, for tagging and for quick summaries.
- `stars[].meaning` (string, required): What the star does, how it reads when timely, and how it reads when it is not.
- `stars[].enhancer` (string, required): Five phase of this entry: Wood, Fire, Earth, Metal or Water. Always English so it stays safe to compare against and to key styling on. The full cycles live on the Chinese astrology elements endpoint.
- `stars[].remedy` (string, required): Five phase of this entry: Wood, Fire, Earth, Metal or Water. Always English so it stays safe to compare against and to key styling on. The full cycles live on the Chinese astrology elements endpoint.
- `stars[].palace` (string, required): Palace of the Lo Shu grid: one of the eight compass sectors, or Center. Always English, safe to compare against and to key a grid cell on.
- `stars[].period` (number, required): The twenty year period this star rules. A star is at its strongest during its own period and weakest long after it.
- `stars[].trigram` (object): The trigram of the star palace. Absent for the 5, which owns the centre and has no trigram, which is also why the 5 is the one star with no direction of its own.
- `stars[].trigram.number` (number, required): Trigram number, the same identifier the I-Ching trigram endpoints use.
- `stars[].trigram.english` (string, required): English name of the trigram, byte identical to the I-Ching catalogue.
- `stars[].trigram.chinese` (string, required): Chinese character for the trigram. Data, identical in every language.
- `stars[].base` (number, required): Flying star number, 1 to 9. The number IS the identifier of the star: 8 is always the Eight White Earth star whichever plate it appears on.

### Example request

```bash
curl "https://roxyapi.com/api/v2/feng-shui/flying-stars/stars" \
  -H "X-API-Key: YOUR_KEY"
```

### Example response

```json
{
  "total": 9,
  "limit": 20,
  "offset": 0,
  "stars": [
    {
      "number": 8,
      "name": "Eight White",
      "nameLocalized": "Ocho Blanca",
      "chinese": "八白",
      "pinyin": "Bā Bái",
      "element": "Wood",
      "nature": "auspicious",
      "keywords": [
        "wealth",
        "accumulation"
      ],
      "meaning": "Yang Earth in the northeastern palace, the wealth star that ruled from 2004 to 2023. It builds rather than wins: property, savings, a business that compounds, the kind of prosperity that survives a bad quarter.",
      "enhancer": "Wood",
      "remedy": "Wood",
      "palace": "Southeast",
      "period": 8,
      "trigram": {
        "number": 7,
        "english": "Mountain",
        "chinese": "艮"
      },
      "base": 8
    }
  ]
}
```

## Annual afflictions - Tai Sui, San Sha and Five Yellow API

`GET https://roxyapi.com/api/v2/feng-shui/afflictions/{year}`. MCP tool `get_feng_shui_afflictions_year`.

Return the four annual feng shui afflictions for a solar year with their exact positions: Tai Sui on the mountain of the year branch, Sui Po on the mountain opposite, the Three Killings across the cardinal span opposite the elemental frame of the year, and the Five Yellow wherever it lands on the annual star plate. Positions come with degree ranges rather than only sector names, because Tai Sui occupies 15 degrees and the neighbouring mountains of the same sector are unaffected. All four move at Li Chun in early February, not at Lunar New Year, and the changeover date is returned. Built for renovation planning, date selection and yearly guidance features.

### Request

- `year` (integer, required): Solar year, 1900 to 2100. The year runs from Li Chun to Li Chun, so a date in January belongs to the previous year here.
- `lang` (string enum): Response language (BCP 47). Supported: en, tr, de, es, hi, pt, fr, ru, zh-Hans, zh-Hant. Defaults to en. Coverage varies by domain, and a field with no translation in the requested language returns English.

### Response

- `year` (number, required): The solar year these positions are for.
- `yearBranch` (string, required): Earthly Branch of the solar year, in pinyin. Three of the four afflictions are derived from it. Always English pinyin, safe to compare against.
- `changeoverDate` (string, required): The date all four afflictions move, which is Li Chun and NOT Lunar New Year. In 2026 Lunar New Year falls on 17 February, roughly two weeks after the afflictions have already changed.
- `taiSui` (object, required): The Grand Duke, occupying a single 15 degree mountain rather than a whole sector. Precision matters here more than anywhere else in the system, because the neighbouring mountains of the same sector are unaffected.
- `taiSui.id` (string, required): Stable machine key for the affliction: taiSui, suiPo, sanSha or fiveYellow. Always English, identical in every language, and the field to branch on. Use this rather than name, which is display copy and does translate.
- `taiSui.name` (string, required): Display name of the affliction, translated in place when lang is set (Tai Sui in English, 太岁 under zh-Hans). Display copy, never a comparison key: branch on id instead.
- `taiSui.chinese` (string, required): Chinese characters for the affliction. Data, identical in every language.
- `taiSui.pinyin` (string, required): Tone-marked pinyin. Data, identical in every language.
- `taiSui.meaning` (string, required): What the affliction does and the standing rule for handling it.
- `taiSui.mountain` (object, required): 
- `taiSui.mountain.id` (string, required): Mountain id, the pinyin of the stem, branch or trigram that names it. Always English pinyin, safe to compare against.
- `taiSui.mountain.label` (string, required): Compass label of the mountain, sector plus position 1 to 3 clockwise. The form a facing is usually quoted in.
- `taiSui.mountain.chinese` (string, required): Chinese character for the mountain. Data, identical in every language.
- `taiSui.mountain.pinyin` (string, required): Tone-marked pinyin for the mountain. Data, identical in every language.
- `taiSui.mountain.direction` (string, required): Compass sector, one of North, Northeast, East, Southeast, South, Southwest, West, Northwest. Always English, whatever the lang parameter says, so it stays safe to compare against in code and against the same value on the I-Ching trigram endpoints.
- `taiSui.mountain.yuan` (string, required): Which of the three dragons the mountain holds inside its sector: earth for the first mountain clockwise, heaven for the middle, human for the last. The heaven and human dragons share a polarity, which is why they share a chart.
- `taiSui.mountain.polarity` (string, required): San Yuan polarity of the mountain, yang or yin, which decides whether a plate entering the centre flies forward or in reverse. This is NOT the natural polarity of the stem or branch and the two differ on eight of the 24 mountains.
- `taiSui.mountain.startDegree` (number, required): Start of the 15 degree span, in compass degrees. Wraps past 360 for the two northernmost mountains.
- `taiSui.mountain.endDegree` (number, required): End of the 15 degree span, in compass degrees.
- `taiSui.direction` (string, required): Compass sector, one of North, Northeast, East, Southeast, South, Southwest, West, Northwest. Always English, safe to compare against and to key styling on.
- `taiSui.animal` (string, required): Zodiac animal of the year, which shares the sign Tai Sui occupies. Always English, safe to compare against.
- `taiSui.clashingAnimal` (string, required): The animal directly opposite, which clashes with Tai Sui head on. People of this sign are the ones traditionally advised to take the most care during the year.
- `suiPo` (object, required): The Year Breaker, always the mountain directly opposite Tai Sui.
- `suiPo.id` (string, required): Stable machine key for the affliction: taiSui, suiPo, sanSha or fiveYellow. Always English, identical in every language, and the field to branch on. Use this rather than name, which is display copy and does translate.
- `suiPo.name` (string, required): Display name of the affliction, translated in place when lang is set (Tai Sui in English, 太岁 under zh-Hans). Display copy, never a comparison key: branch on id instead.
- `suiPo.chinese` (string, required): Chinese characters for the affliction. Data, identical in every language.
- `suiPo.pinyin` (string, required): Tone-marked pinyin. Data, identical in every language.
- `suiPo.meaning` (string, required): What the affliction does and the standing rule for handling it.
- `suiPo.mountain` (object, required): 
- `suiPo.mountain.id` (string, required): Mountain id, the pinyin of the stem, branch or trigram that names it. Always English pinyin, safe to compare against.
- `suiPo.mountain.label` (string, required): Compass label of the mountain, sector plus position 1 to 3 clockwise. The form a facing is usually quoted in.
- `suiPo.mountain.chinese` (string, required): Chinese character for the mountain. Data, identical in every language.
- `suiPo.mountain.pinyin` (string, required): Tone-marked pinyin for the mountain. Data, identical in every language.
- `suiPo.mountain.direction` (string, required): Compass sector, one of North, Northeast, East, Southeast, South, Southwest, West, Northwest. Always English, whatever the lang parameter says, so it stays safe to compare against in code and against the same value on the I-Ching trigram endpoints.
- `suiPo.mountain.yuan` (string, required): Which of the three dragons the mountain holds inside its sector: earth for the first mountain clockwise, heaven for the middle, human for the last. The heaven and human dragons share a polarity, which is why they share a chart.
- `suiPo.mountain.polarity` (string, required): San Yuan polarity of the mountain, yang or yin, which decides whether a plate entering the centre flies forward or in reverse. This is NOT the natural polarity of the stem or branch and the two differ on eight of the 24 mountains.
- `suiPo.mountain.startDegree` (number, required): Start of the 15 degree span, in compass degrees. Wraps past 360 for the two northernmost mountains.
- `suiPo.mountain.endDegree` (number, required): End of the 15 degree span, in compass degrees.
- `suiPo.direction` (string, required): Compass sector, one of North, Northeast, East, Southeast, South, Southwest, West, Northwest. Always English, safe to compare against and to key styling on.
- `sanSha` (object, required): The Three Killings. Two readings of its extent are in circulation and both are given: the exact 75 degree branch span in startDegree and endDegree, and the 45 degree cardinal palace named in direction.
- `sanSha.id` (string, required): Stable machine key for the affliction: taiSui, suiPo, sanSha or fiveYellow. Always English, identical in every language, and the field to branch on. Use this rather than name, which is display copy and does translate.
- `sanSha.name` (string, required): Display name of the affliction, translated in place when lang is set (Tai Sui in English, 太岁 under zh-Hans). Display copy, never a comparison key: branch on id instead.
- `sanSha.chinese` (string, required): Chinese characters for the affliction. Data, identical in every language.
- `sanSha.pinyin` (string, required): Tone-marked pinyin. Data, identical in every language.
- `sanSha.meaning` (string, required): What the affliction does and the standing rule for handling it.
- `sanSha.direction` (string, required): Compass sector, one of North, Northeast, East, Southeast, South, Southwest, West, Northwest. Always English, safe to compare against and to key styling on.
- `sanSha.frameElement` (string, required): The five phase the year branch forms with its trine. The Three Killings always sits in the cardinal direction opposite this frame.
- `sanSha.frameDirection` (string, required): Compass sector, one of North, Northeast, East, Southeast, South, Southwest, West, Northwest. Always English, safe to compare against and to key styling on.
- `sanSha.startDegree` (number, required): Start of the afflicted span in compass degrees. The span crosses 360 when the affliction is in the north.
- `sanSha.endDegree` (number, required): End of the afflicted span in compass degrees.
- `sanSha.parts` (array of object, required): The three mountains of the span, first to last in compass order. They are one affliction read in three parts, not three separate ones, and disturbing any part is taken to wake the whole.
- `sanSha.parts[].id` (string, required): Which of the three parts this is: jie-sha, zai-sha or sui-sha, in compass order. Always English, safe to compare against.
- `sanSha.parts[].name` (string, required): Display name of the part, translated in place when lang is set. Display copy, never a comparison key: branch on id instead.
- `sanSha.parts[].chinese` (string, required): Chinese characters for the part. Data, identical in every language.
- `sanSha.parts[].pinyin` (string, required): Tone-marked pinyin. Data, identical in every language.
- `sanSha.parts[].meaning` (string, required): What this part of the span brings.
- `sanSha.parts[].mountain` (object, required): 
- `sanSha.parts[].mountain.id` (string, required): Mountain id, the pinyin of the stem, branch or trigram that names it. Always English pinyin, safe to compare against.
- `sanSha.parts[].mountain.label` (string, required): Compass label of the mountain, sector plus position 1 to 3 clockwise. The form a facing is usually quoted in.
- `sanSha.parts[].mountain.chinese` (string, required): Chinese character for the mountain. Data, identical in every language.
- `sanSha.parts[].mountain.pinyin` (string, required): Tone-marked pinyin for the mountain. Data, identical in every language.
- `sanSha.parts[].mountain.direction` (string, required): Compass sector, one of North, Northeast, East, Southeast, South, Southwest, West, Northwest. Always English, whatever the lang parameter says, so it stays safe to compare against in code and against the same value on the I-Ching trigram endpoints.
- `sanSha.parts[].mountain.yuan` (string, required): Which of the three dragons the mountain holds inside its sector: earth for the first mountain clockwise, heaven for the middle, human for the last. The heaven and human dragons share a polarity, which is why they share a chart.
- `sanSha.parts[].mountain.polarity` (string, required): San Yuan polarity of the mountain, yang or yin, which decides whether a plate entering the centre flies forward or in reverse. This is NOT the natural polarity of the stem or branch and the two differ on eight of the 24 mountains.
- `sanSha.parts[].mountain.startDegree` (number, required): Start of the 15 degree span, in compass degrees. Wraps past 360 for the two northernmost mountains.
- `sanSha.parts[].mountain.endDegree` (number, required): End of the 15 degree span, in compass degrees.
- `fiveYellow` (object, required): The Five Yellow, read off the annual star plate rather than from the year branch, which is why it is the only one of the four that has nothing to do with the animal of the year.
- `fiveYellow.id` (string, required): Stable machine key for the affliction: taiSui, suiPo, sanSha or fiveYellow. Always English, identical in every language, and the field to branch on. Use this rather than name, which is display copy and does translate.
- `fiveYellow.name` (string, required): Display name of the affliction, translated in place when lang is set (Tai Sui in English, 太岁 under zh-Hans). Display copy, never a comparison key: branch on id instead.
- `fiveYellow.chinese` (string, required): Chinese characters for the affliction. Data, identical in every language.
- `fiveYellow.pinyin` (string, required): Tone-marked pinyin. Data, identical in every language.
- `fiveYellow.meaning` (string, required): What the affliction does and the standing rule for handling it.
- `fiveYellow.palace` (string, required): Palace the 5 flew to this year, one of the eight sectors or Center. Always English, safe to compare against.
- `fiveYellow.star` (number, required): Flying star number, 1 to 9. The number IS the identifier of the star: 8 is always the Eight White Earth star whichever plate it appears on.
- `fiveYellow.remedy` (string, required): The phase that drains the 5, which is what the 5 itself produces. Never treat it with Fire, which produces Earth and feeds it.

### Example request

```bash
curl "https://roxyapi.com/api/v2/feng-shui/afflictions/2026" \
  -H "X-API-Key: YOUR_KEY"
```

### Example response

```json
{
  "year": 2026,
  "yearBranch": "wu",
  "changeoverDate": "2026-02-04",
  "taiSui": {
    "id": "taiSui",
    "name": "Tai Sui",
    "chinese": "太歲",
    "pinyin": "Tài Suì",
    "meaning": "The Grand Duke, who occupies the mountain of the year branch. The standing rule is to sit with your back to Tai Sui and never to face him directly.",
    "mountain": {
      "id": "wu",
      "label": "S2",
      "chinese": "午",
      "pinyin": "Wǔ",
      "direction": "Southeast",
      "yuan": "heaven",
      "polarity": "yin",
      "startDegree": 172.5,
      "endDegree": 187.5
    },
    "direction": "South",
    "animal": "horse",
    "clashingAnimal": "rat"
  },
  "suiPo": {
    "id": "suiPo",
    "name": "Sui Po",
    "chinese": "歲破",
    "pinyin": "Suì Pò",
    "meaning": "The Year Breaker, sitting exactly opposite Tai Sui because it is the mountain the year branch clashes with.",
    "mountain": {
      "id": "wu",
      "label": "S2",
      "chinese": "午",
      "pinyin": "Wǔ",
      "direction": "Southeast",
      "yuan": "heaven",
      "polarity": "yin",
      "startDegree": 172.5,
      "endDegree": 187.5
    },
    "direction": "South"
  },
  "sanSha": {
    "id": "sanSha",
    "name": "San Sha",
    "chinese": "三煞",
    "pinyin": "Sān Shà",
    "meaning": "The Three Killings, a 75 degree span opposite the elemental frame of the year. Never sit with your back to it, and facing it is safe.",
    "direction": "South",
    "frameElement": "Fire",
    "frameDirection": "South",
    "startDegree": 322.5,
    "endDegree": 37.5,
    "parts": [
      {
        "id": "zai-sha",
        "name": "Disaster Sha",
        "chinese": "災煞",
        "pinyin": "Zāi Shà",
        "meaning": "The middle component, sitting on the cardinal point itself, and the most volatile of the three. It reads as physical harm: sudden illness, accidents and injury.",
        "mountain": {
          "id": "wu",
          "label": "S2",
          "chinese": "午",
          "pinyin": "Wǔ",
          "direction": "Southeast",
          "yuan": "heaven",
          "polarity": "yin",
          "startDegree": 172.5,
          "endDegree": 187.5
        }
      }
    ]
  },
  "fiveYellow": {
    "id": "fiveYellow",
    "name": "Five Yellow",
    "chinese": "五黃",
    "pinyin": "Wǔ Huáng",
    "meaning": "The annual position of the 5, the one affliction that moves with the flying stars rather than with the year branch.",
    "palace": "South",
    "star": 8,
    "remedy": "Metal"
  }
}
```

## List Bagua sectors - Feng shui bagua map API

`GET https://roxyapi.com/api/v2/feng-shui/bagua`. MCP tool `get_feng_shui_bagua`.

The nine palaces of the compass Bagua map: the eight trigram sectors plus the centre, each with the life area it governs, its five phase, its colours, and both its Later Heaven and Earlier Heaven trigrams. This is the compass map aligned to true directions, so career is always North and wealth is always Southeast whichever way the entrance faces. Trigram details are served from the same source as the I-Ching trigram endpoints, so the two agree field for field. Built for floor plan overlays, room-by-room guides and any interface that maps a space onto life areas.

### Request

- `lang` (string enum): Response language (BCP 47). Supported: en, tr, de, es, hi, pt, fr, ru, zh-Hans, zh-Hant. Defaults to en. Coverage varies by domain, and a field with no translation in the requested language returns English.
- `limit` (integer): Maximum items to return per page. Range: 1-9, default 9.
- `offset` (integer): Number of items to skip for pagination. Default 0.

### Response

- `total` (number, required): Number of palaces in the map.
- `limit` (number, required): Page size applied.
- `offset` (number, required): Number of entries skipped.
- `sectors` (array of object, required): The nine palaces of the compass Bagua map, in Lo Shu palace order starting at North and ending with the centre.
- `sectors[].id` (string, required): Life area id: career, knowledge, family, wealth, fame, love, children, helpful-people or health. Always English, whatever the lang parameter says, so it stays safe to compare against in code. Use nameLocalized for anything a reader sees.
- `sectors[].name` (string, required): Display name of the life area. Always English, whatever the lang parameter says. Use nameLocalized for anything a reader sees.
- `sectors[].nameLocalized` (string): Life area name in the requested language, for display only. Present only when lang is set to a language other than English, since in English it would repeat name exactly. Never compare against this value.
- `sectors[].number` (number, required): Lo Shu number of the palace, 1 to 9. This is the same number the flying stars use, so a chart palace and a Bagua sector line up by it.
- `sectors[].palace` (string, required): Palace of the Lo Shu grid: one of the eight compass sectors, or Center for the ninth. Always English, safe to compare against.
- `sectors[].direction` (string): Compass sector of the palace, taken from the trigram that sits there. Absent on the centre palace, which has no direction.
- `sectors[].element` (string, required): Five phase of this entry: Wood, Fire, Earth, Metal or Water. Always English so it stays safe to compare against and to key styling on. The full cycles live on the Chinese astrology elements endpoint.
- `sectors[].colors` (array of string, required): Colours of the phase this sector carries, for activating it. Derived from the element rather than assigned per sector, so they cannot disagree with the element beside them.
- `sectors[].trigram` (object): The Later Heaven trigram of the sector, which is the arrangement every compass reading and every flying star chart uses. Absent on the centre palace.
- `sectors[].trigram.number` (number, required): Trigram number, 1 to 8, the same identifier the I-Ching trigram endpoints use. It is a lookup key, not a ranking.
- `sectors[].trigram.chinese` (string, required): Chinese character for the trigram. Data, identical in every language.
- `sectors[].trigram.english` (string, required): English name of the trigram, byte identical to the English value the I-Ching trigram endpoints publish for this number. Always English here, whatever the lang parameter says, so it stays safe to compare against. Use nameLocalized for anything a reader sees.
- `sectors[].trigram.nameLocalized` (string): Trigram name in the requested language, for display only. Present only when lang is set to a language other than English, since in English it would repeat english exactly. Never compare against this value.
- `sectors[].trigram.pinyin` (string, required): Tone-marked pinyin for the trigram. Data, identical in every language.
- `sectors[].trigram.symbol` (string, required): Unicode trigram symbol, for rendering a Bagua diagram without an icon set.
- `sectors[].trigram.binary` (string, required): Three lines bottom to top, 1 for yang and 0 for yin. The Eight Mansions classification of any sector is decided by which of these three lines differ from your own trigram.
- `sectors[].trigram.element` (string, required): Five phase of this entry: Wood, Fire, Earth, Metal or Water. Always English so it stays safe to compare against and to key styling on. The full cycles live on the Chinese astrology elements endpoint.
- `sectors[].trigram.elementLocalized` (string): Five phase name in the requested language, for display only. Present only when lang is set to a language other than English. Never compare against this value.
- `sectors[].trigram.direction` (string, required): Compass sector, one of North, Northeast, East, Southeast, South, Southwest, West, Northwest. Always English, whatever the lang parameter says, so it stays safe to compare against in code and against the same value on the I-Ching trigram endpoints.
- `sectors[].trigram.directionLocalized` (string): Compass sector in the requested language, for display only, the same word the composed readings use. Present only when lang is set to a language other than English. Never compare against this value.
- `sectors[].trigram.familyMember` (string, required): Family role of the trigram. Read alongside an affliction to know which member of the household a sector points at. Always English, and it carries no localized sibling: no vocabulary this package ships names the eight family roles.
- `sectors[].earlierHeavenTrigram` (object): The trigram that sits in this direction under the Earlier Heaven arrangement, read for the symbolic relation between opposite sectors. A different question from the Later Heaven trigram, not a competing answer. Absent on the centre palace.
- `sectors[].earlierHeavenTrigram.number` (number, required): Trigram number, 1 to 8, the same identifier the I-Ching trigram endpoints use. It is a lookup key, not a ranking.
- `sectors[].earlierHeavenTrigram.chinese` (string, required): Chinese character for the trigram. Data, identical in every language.
- `sectors[].earlierHeavenTrigram.english` (string, required): English name of the trigram, byte identical to the English value the I-Ching trigram endpoints publish for this number. Always English here, whatever the lang parameter says, so it stays safe to compare against. Use nameLocalized for anything a reader sees.
- `sectors[].earlierHeavenTrigram.nameLocalized` (string): Trigram name in the requested language, for display only. Present only when lang is set to a language other than English, since in English it would repeat english exactly. Never compare against this value.
- `sectors[].earlierHeavenTrigram.pinyin` (string, required): Tone-marked pinyin for the trigram. Data, identical in every language.
- `sectors[].earlierHeavenTrigram.symbol` (string, required): Unicode trigram symbol, for rendering a Bagua diagram without an icon set.
- `sectors[].earlierHeavenTrigram.binary` (string, required): Three lines bottom to top, 1 for yang and 0 for yin. The Eight Mansions classification of any sector is decided by which of these three lines differ from your own trigram.
- `sectors[].earlierHeavenTrigram.element` (string, required): Five phase of this entry: Wood, Fire, Earth, Metal or Water. Always English so it stays safe to compare against and to key styling on. The full cycles live on the Chinese astrology elements endpoint.
- `sectors[].earlierHeavenTrigram.elementLocalized` (string): Five phase name in the requested language, for display only. Present only when lang is set to a language other than English. Never compare against this value.
- `sectors[].earlierHeavenTrigram.direction` (string, required): Compass sector, one of North, Northeast, East, Southeast, South, Southwest, West, Northwest. Always English, whatever the lang parameter says, so it stays safe to compare against in code and against the same value on the I-Ching trigram endpoints.
- `sectors[].earlierHeavenTrigram.directionLocalized` (string): Compass sector in the requested language, for display only, the same word the composed readings use. Present only when lang is set to a language other than English. Never compare against this value.
- `sectors[].earlierHeavenTrigram.familyMember` (string, required): Family role of the trigram. Read alongside an affliction to know which member of the household a sector points at. Always English, and it carries no localized sibling: no vocabulary this package ships names the eight family roles.
- `sectors[].focus` (string, required): What this sector governs, in a few words.
- `sectors[].meaning` (string, required): What the sector governs and how to work with it.

### Example request

```bash
curl "https://roxyapi.com/api/v2/feng-shui/bagua" \
  -H "X-API-Key: YOUR_KEY"
```

### Example response

```json
{
  "total": 9,
  "limit": 20,
  "offset": 0,
  "sectors": [
    {
      "id": "wealth",
      "name": "Wealth and Abundance",
      "nameLocalized": "Riqueza y abundancia",
      "number": 4,
      "palace": "Southeast",
      "direction": "Southeast",
      "element": "Wood",
      "colors": [
        "green",
        "teal"
      ],
      "trigram": {
        "number": 4,
        "chinese": "巽",
        "english": "Wind",
        "nameLocalized": "Viento",
        "pinyin": "Xùn",
        "symbol": "☴",
        "binary": "011",
        "element": "Wood",
        "elementLocalized": "Madera",
        "direction": "Southeast",
        "directionLocalized": "Sureste",
        "familyMember": "Eldest Daughter"
      },
      "earlierHeavenTrigram": {
        "number": 4,
        "chinese": "巽",
        "english": "Wind",
        "nameLocalized": "Viento",
        "pinyin": "Xùn",
        "symbol": "☴",
        "binary": "011",
        "element": "Wood",
        "elementLocalized": "Madera",
        "direction": "Southeast",
        "directionLocalized": "Sureste",
        "familyMember": "Eldest Daughter"
      },
      "focus": "Income, resources, accumulation",
      "meaning": "The southeastern palace, held by Wind, and the sector most households want working. Wind is gradual and persistent, which is the point: this reads as income that builds through repeated effort rather than as sudden gain."
    }
  ]
}
```

## Look up a Bagua sector - Life area reference API

`GET https://roxyapi.com/api/v2/feng-shui/bagua/{id}`. MCP tool `get_feng_shui_bagua_id`.

Look up one palace of the compass Bagua map by its life area id, such as wealth, career or love. Returns the compass sector it occupies, its five phase and colours, both trigram arrangements and what the sector governs. The health palace is the centre and carries no direction and no trigram, because the centre of the Lo Shu is not a trigram.

### Request

- `id` (string enum, required): Life area id. One of career, knowledge, family, wealth, fame, love, children, helpful-people, health.
- `lang` (string enum): Response language (BCP 47). Supported: en, tr, de, es, hi, pt, fr, ru, zh-Hans, zh-Hant. Defaults to en. Coverage varies by domain, and a field with no translation in the requested language returns English.

### Response

- `id` (string, required): Life area id: career, knowledge, family, wealth, fame, love, children, helpful-people or health. Always English, whatever the lang parameter says, so it stays safe to compare against in code. Use nameLocalized for anything a reader sees.
- `name` (string, required): Display name of the life area. Always English, whatever the lang parameter says. Use nameLocalized for anything a reader sees.
- `nameLocalized` (string): Life area name in the requested language, for display only. Present only when lang is set to a language other than English, since in English it would repeat name exactly. Never compare against this value.
- `number` (number, required): Lo Shu number of the palace, 1 to 9. This is the same number the flying stars use, so a chart palace and a Bagua sector line up by it.
- `palace` (string, required): Palace of the Lo Shu grid: one of the eight compass sectors, or Center for the ninth. Always English, safe to compare against.
- `direction` (string): Compass sector of the palace, taken from the trigram that sits there. Absent on the centre palace, which has no direction.
- `element` (string, required): Five phase of this entry: Wood, Fire, Earth, Metal or Water. Always English so it stays safe to compare against and to key styling on. The full cycles live on the Chinese astrology elements endpoint.
- `colors` (array of string, required): Colours of the phase this sector carries, for activating it. Derived from the element rather than assigned per sector, so they cannot disagree with the element beside them.
- `trigram` (object): The Later Heaven trigram of the sector, which is the arrangement every compass reading and every flying star chart uses. Absent on the centre palace.
- `trigram.number` (number, required): Trigram number, 1 to 8, the same identifier the I-Ching trigram endpoints use. It is a lookup key, not a ranking.
- `trigram.chinese` (string, required): Chinese character for the trigram. Data, identical in every language.
- `trigram.english` (string, required): English name of the trigram, byte identical to the English value the I-Ching trigram endpoints publish for this number. Always English here, whatever the lang parameter says, so it stays safe to compare against. Use nameLocalized for anything a reader sees.
- `trigram.nameLocalized` (string): Trigram name in the requested language, for display only. Present only when lang is set to a language other than English, since in English it would repeat english exactly. Never compare against this value.
- `trigram.pinyin` (string, required): Tone-marked pinyin for the trigram. Data, identical in every language.
- `trigram.symbol` (string, required): Unicode trigram symbol, for rendering a Bagua diagram without an icon set.
- `trigram.binary` (string, required): Three lines bottom to top, 1 for yang and 0 for yin. The Eight Mansions classification of any sector is decided by which of these three lines differ from your own trigram.
- `trigram.element` (string, required): Five phase of this entry: Wood, Fire, Earth, Metal or Water. Always English so it stays safe to compare against and to key styling on. The full cycles live on the Chinese astrology elements endpoint.
- `trigram.elementLocalized` (string): Five phase name in the requested language, for display only. Present only when lang is set to a language other than English. Never compare against this value.
- `trigram.direction` (string, required): Compass sector, one of North, Northeast, East, Southeast, South, Southwest, West, Northwest. Always English, whatever the lang parameter says, so it stays safe to compare against in code and against the same value on the I-Ching trigram endpoints.
- `trigram.directionLocalized` (string): Compass sector in the requested language, for display only, the same word the composed readings use. Present only when lang is set to a language other than English. Never compare against this value.
- `trigram.familyMember` (string, required): Family role of the trigram. Read alongside an affliction to know which member of the household a sector points at. Always English, and it carries no localized sibling: no vocabulary this package ships names the eight family roles.
- `earlierHeavenTrigram` (object): The trigram that sits in this direction under the Earlier Heaven arrangement, read for the symbolic relation between opposite sectors. A different question from the Later Heaven trigram, not a competing answer. Absent on the centre palace.
- `earlierHeavenTrigram.number` (number, required): Trigram number, 1 to 8, the same identifier the I-Ching trigram endpoints use. It is a lookup key, not a ranking.
- `earlierHeavenTrigram.chinese` (string, required): Chinese character for the trigram. Data, identical in every language.
- `earlierHeavenTrigram.english` (string, required): English name of the trigram, byte identical to the English value the I-Ching trigram endpoints publish for this number. Always English here, whatever the lang parameter says, so it stays safe to compare against. Use nameLocalized for anything a reader sees.
- `earlierHeavenTrigram.nameLocalized` (string): Trigram name in the requested language, for display only. Present only when lang is set to a language other than English, since in English it would repeat english exactly. Never compare against this value.
- `earlierHeavenTrigram.pinyin` (string, required): Tone-marked pinyin for the trigram. Data, identical in every language.
- `earlierHeavenTrigram.symbol` (string, required): Unicode trigram symbol, for rendering a Bagua diagram without an icon set.
- `earlierHeavenTrigram.binary` (string, required): Three lines bottom to top, 1 for yang and 0 for yin. The Eight Mansions classification of any sector is decided by which of these three lines differ from your own trigram.
- `earlierHeavenTrigram.element` (string, required): Five phase of this entry: Wood, Fire, Earth, Metal or Water. Always English so it stays safe to compare against and to key styling on. The full cycles live on the Chinese astrology elements endpoint.
- `earlierHeavenTrigram.elementLocalized` (string): Five phase name in the requested language, for display only. Present only when lang is set to a language other than English. Never compare against this value.
- `earlierHeavenTrigram.direction` (string, required): Compass sector, one of North, Northeast, East, Southeast, South, Southwest, West, Northwest. Always English, whatever the lang parameter says, so it stays safe to compare against in code and against the same value on the I-Ching trigram endpoints.
- `earlierHeavenTrigram.directionLocalized` (string): Compass sector in the requested language, for display only, the same word the composed readings use. Present only when lang is set to a language other than English. Never compare against this value.
- `earlierHeavenTrigram.familyMember` (string, required): Family role of the trigram. Read alongside an affliction to know which member of the household a sector points at. Always English, and it carries no localized sibling: no vocabulary this package ships names the eight family roles.
- `focus` (string, required): What this sector governs, in a few words.
- `meaning` (string, required): What the sector governs and how to work with it.

### Example request

```bash
curl "https://roxyapi.com/api/v2/feng-shui/bagua/wealth" \
  -H "X-API-Key: YOUR_KEY"
```

### Example response

```json
{
  "id": "wealth",
  "name": "Wealth and Abundance",
  "nameLocalized": "Riqueza y abundancia",
  "number": 4,
  "palace": "Southeast",
  "direction": "Southeast",
  "element": "Wood",
  "colors": [
    "green",
    "teal"
  ],
  "trigram": {
    "number": 4,
    "chinese": "巽",
    "english": "Wind",
    "nameLocalized": "Viento",
    "pinyin": "Xùn",
    "symbol": "☴",
    "binary": "011",
    "element": "Wood",
    "elementLocalized": "Madera",
    "direction": "Southeast",
    "directionLocalized": "Sureste",
    "familyMember": "Eldest Daughter"
  },
  "earlierHeavenTrigram": {
    "number": 4,
    "chinese": "巽",
    "english": "Wind",
    "nameLocalized": "Viento",
    "pinyin": "Xùn",
    "symbol": "☴",
    "binary": "011",
    "element": "Wood",
    "elementLocalized": "Madera",
    "direction": "Southeast",
    "directionLocalized": "Sureste",
    "familyMember": "Eldest Daughter"
  },
  "focus": "Income, resources, accumulation",
  "meaning": "The southeastern palace, held by Wind, and the sector most households want working. Wind is gradual and persistent, which is the point: this reads as income that builds through repeated effort rather than as sudden gain."
}
```

## List the nine periods - San Yuan period table API

`GET https://roxyapi.com/api/v2/feng-shui/periods`. MCP tool `get_feng_shui_periods`.

The nine twenty year periods of the 180 year San Yuan cycle from 1864 to 2043, each with its ruling star, five phase, palace and the exact Li Chun date it opened, plus which period is in force on a given date. A building takes the period it was completed in and keeps that period plate for life, so this is the table that decides which natal chart a property gets. Period 9 opened on 4 February 2024, which means a building finished in January 2024 is still a Period 8 building.

### Request

- `lang` (string enum): Response language (BCP 47). Supported: en, tr, de, es, hi, pt, fr, ru, zh-Hans, zh-Hant. Defaults to en. Coverage varies by domain, and a field with no translation in the requested language returns English.
- `date` (string (date)): Date to resolve the current period for, in YYYY-MM-DD format. Defaults to today in UTC. Useful for asking which period a building was completed in. A date landing exactly on the Li Chun day a period opens is placed in the outgoing period.

### Response

- `total` (number, required): Number of periods in the cycle. Always nine.
- `cycleStartYear` (number, required): First solar year of the recorded 180 year cycle.
- `cycleEndYear` (number, required): Last solar year of the recorded cycle. The cycle then repeats, so 2044 opens Period 1 again.
- `date` (string, required): The date the current period was resolved for. Echoes the date requested, or the current UTC date when it was omitted.
- `currentPeriod` (number, required): The period in force on that date. Resolved at Li Chun, so a date in January belongs to the previous solar year and can fall in the previous period. A date is read at the start of its day in the Chinese calendar frame (UTC+8) and Li Chun falls part-way through its own day, so the date a period opens on still reads as the previous period, the same reading the Kua route gives a birth date.
- `periods` (array of object, required): All nine periods of the 180 year cycle in order, each with its ruling star, element, palace and exact opening date.
- `periods[].number` (number, required): Period number, 1 to 9. A building takes the period it was completed in and keeps that period plate for its whole life, so this is the first input to every natal chart.
- `periods[].startYear` (number, required): First solar year of the period. The period opens at Li Chun of this year, in early February, not on 1 January.
- `periods[].endYear` (number, required): Last solar year of the period. The next period opens at Li Chun of the year after.
- `periods[].startDate` (string, required): Exact date the period opened, computed astronomically. Li Chun is commonly quoted as 4 February and falls on the 3rd or the 5th in roughly one year in four, which is what decides whether a building finished in early February belongs to this period or the last.
- `periods[].era` (string, required): Which sixty year era the period belongs to: upper, middle or lower, three periods each. Always English, safe to compare against.
- `periods[].eraName` (string, required): Display name of the era.
- `periods[].rulingStar` (number, required): Flying star number, 1 to 9. The number IS the identifier of the star: 8 is always the Eight White Earth star whichever plate it appears on.
- `periods[].rulingStarName` (string, required): Display name of the ruling star. Always English, whatever the lang parameter says. Use rulingStarNameLocalized for anything a reader sees.
- `periods[].rulingStarNameLocalized` (string): Ruling star name in the requested language, for display only. Present only when lang is set to a language other than English.
- `periods[].element` (string, required): Five phase of this entry: Wood, Fire, Earth, Metal or Water. Always English so it stays safe to compare against and to key styling on. The full cycles live on the Chinese astrology elements endpoint.
- `periods[].palace` (string, required): Palace the ruling star owns on the Lo Shu base plate. Always English, safe to compare against.
- `periods[].trigram` (object): Trigram of the ruling star palace. Absent for Period 5, whose star owns the centre and has no trigram.
- `periods[].trigram.number` (number, required): Trigram number, the same identifier the I-Ching trigram endpoints use.
- `periods[].trigram.english` (string, required): English name of the trigram, byte identical to the I-Ching catalogue.
- `periods[].trigram.chinese` (string, required): Chinese character for the trigram. Data, identical in every language.
- `periods[].base` (number, required): Flying star number, 1 to 9. The number IS the identifier of the star: 8 is always the Eight White Earth star whichever plate it appears on.

### Example request

```bash
curl "https://roxyapi.com/api/v2/feng-shui/periods" \
  -H "X-API-Key: YOUR_KEY"
```

### Example response

```json
{
  "total": 9,
  "cycleStartYear": 1864,
  "cycleEndYear": 2043,
  "date": "2026-08-23",
  "currentPeriod": 9,
  "periods": [
    {
      "number": 9,
      "startYear": 2024,
      "endYear": 2043,
      "startDate": "2024-02-04",
      "era": "lower",
      "eraName": "Lower Era",
      "rulingStar": 8,
      "rulingStarName": "Nine Purple",
      "rulingStarNameLocalized": "Nueve Purpura",
      "element": "Wood",
      "palace": "South",
      "trigram": {
        "number": 6,
        "english": "Fire",
        "chinese": "離"
      },
      "base": 8
    }
  ]
}
```
