This repo teaches AI coding agents (Cursor, Claude Code, Aider, Codex, Windsurf, RooCode, Gemini CLI) how to use the RoxyAPI flying star natal chart endpoint.
- Method:
POST - URL:
https://roxyapi.com/api/v2/feng-shui/flying-stars/natal - Auth:
X-API-Keyheader - Domain:
feng-shui(one of 14+ in the RoxyAPI catalog) - Operation ID:
generateFlyingStarChartmatches the SDK method name in camelCase - MCP tool:
post_feng_shui_flying_stars_natalonhttps://roxyapi.com/mcp/feng-shui
import { createRoxy } from '@roxyapi/sdk';
const roxy = createRoxy(process.env.ROXY_API_KEY!);
const { data, error } = await roxy.fengShui.generateFlyingStarChart({
body: { period: 9, facing: 'wu' },
});import os
from roxy_sdk import create_roxy
roxy = create_roxy(os.environ["ROXY_API_KEY"])
chart = roxy.feng_shui.generate_flying_star_chart(period=9, facing="wu")This endpoint describes a building, not a person. It takes no birth date, no birth time, no latitude and no longitude, so there is nothing to geocode. Do not call /location/search for it. The one setup step worth making is a period lookup: if the caller knows a completion date rather than a period number, GET /feng-shui/periods?date=YYYY-MM-DD first and feed currentPeriod into the natal call.
period(integer, optional): 1 to 9. The twenty year period the building was completed in, or last renovated heavily enough to reset. 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 nowfacing(string, conditional): the mountain the front faces, by pinyin id or compass label. The facing side is the open, active, public side, which is not always the side with the front doorfacingDegrees(number, conditional): 0 to 360, the bearing measured looking out from inside. Resolved to one of the 24 mountainslang(query string, optional): nine locales alongside English, including Simplified and Traditional Chinese
Send facing or facingDegrees. Sending neither returns a 400 with code of bad_request.
facing is a 24 value enum, NOT a compass word. Passing "south", "north" or "SE" returns a 400.
- Pinyin ids:
renziguichougenyinjiamaoyichenxunsibingwudingweikunshengengyouxinxuqianhai - Compass labels:
N1N2N3NE1NE2NE3E1E2E3SE1SE2SE3S1S2S3SW1SW2SW3W1W2W3NW1NW2NW3
The two vocabularies are interchangeable and index the same 24 sectors in the same order, so wu and S2 return an identical chart. Matching is case insensitive.
period: the period the chart was built for, echoed or resolvedfacing: the resolved facing mountain object, withid,label,chinese,pinyin,direction,yuan,polarity,startDegree,endDegreesitting: the mountain directly opposite, same shapefacingDegrees: echo of the bearing, present ONLY when a bearing was sent. Branch on presence, never on a sentinelstraddling: boolean, true when the bearing fell in the outer 3 degrees of its mountain rather than the central 9. Always false when the facing was named as a mountainmountainCenterStar,waterCenterStar: the star that entered the centre of each plate, 1 to 9mountainFlight,waterFlight:forwardorreverse, published separately because the two plates fly independentlystructure:id,name,chinese,meaning.idis one ofprosperous-mountain-prosperous-water,reversed,double-facing,double-sittingpalaces[]: all nine, centre first and then along the Lo Shu flight path. Each haspalace,base,period,mountain,water,reading, andcombinationwhen the pair is a named formation
- Coordinates are never needed. Never call
/location/searchfor this endpoint. - The period is DATED, not assumed. Period 9 opened on 4 February 2024 and runs to 2043. A building completed in January 2024 is Period 8. Never hardcode a period constant: read it from
/feng-shui/periods, which resolvescurrentPeriodfor any date. palaces[].palace,structure.id,combination.id,mountainFlight,waterFlight,facing.id,facing.directionand the star numbers are stable English machine values, never localized. Branch on them safely under any language.structure.name,structure.meaning,palaces[].readingand the star meanings translate in place;combination.namekeeps its English value and addsnameLocalizedbeside it.combinationis ABSENT for the pairs the tradition does not name. Check presence before reading it. The composedreadingis always present and carries the meaning either way.combination.idis canonical with the lower number first, so mountain 9 with water 7 and mountain 7 with water 9 both resolve to7-9. Nature is on the object asnature.- Each of the nine stars appears exactly once on each plate. That invariant is what makes a chart checkable, and it is a cheap assertion to add to a test.
- Read
mountainfor health, for the people in the room and for the relationships between them, andwaterfor money, opportunity and whatever arrives from outside. Do not average them into one score. - A
straddlingof true means the bearing sits on a boundary and the case calls for a different construction. Surface the flag rather than presenting the returned chart as settled. - The natal chart is fixed for the life of the building. The annual and monthly plates are the moving layer, so overlay
/feng-shui/flying-stars/annual/{year}and/feng-shui/flying-stars/monthlyon the same nine palaces rather than recasting the natal chart. - The annual changeover is Li Chun in early February and NOT Lunar New Year, which in 2026 falls roughly two weeks later. The annual endpoint returns
changeoverDateso the plate is applied on the right day.
GET /feng-shui/periods(listNinePeriods,get_feng_shui_periods): the nine periods from 1864 to 2043 with the exact Li Chun date each opened, pluscurrentPeriodfor a date you passGET /feng-shui/flying-stars/stars(listFlyingStars,get_feng_shui_flying_stars): the nine star catalogue with element, home palace, trigram, ruling period, meaning, and the elements that strengthen or drain each starGET /feng-shui/flying-stars/annual/{year}(getAnnualFlyingStars,get_feng_shui_flying_stars_annual_year): the annual plate, universal to every building, withchangeoverDateGET /feng-shui/flying-stars/monthly(getMonthlyFlyingStars,get_feng_shui_flying_stars_monthly): the monthly overlay on SOLAR months, where month 1 begins at Li Chun and no month lines up with a calendar monthGET /feng-shui/bagua(listBaguaSectors,get_feng_shui_bagua): the bagua life areas, eight compass sectors plus the centre, with element, colors, trigram and focusPOST /feng-shui/eight-mansions(generateEightMansions,post_feng_shui_eight_mansions): the Eight Mansions map for a person rather than a building, ranked best to worst
2026-Q3 against https://roxyapi.com/api/v2/openapi.json. Re-fetch the spec for ground truth before changing this file.
- Full catalog: https://roxyapi.com/AGENTS.md
- LLM index: https://roxyapi.com/llms.txt
- Methodology: https://roxyapi.com/methodology