Flying Star natal chart (Xuan Kong Fei Xing)
curl -X POST https://api.astroway.info/v1/chinese/feng-shui/flying-star \ -H "X-Api-Key: aw_live_..." \ -H "Content-Type: application/json" \ -d '{ "period": 8, "facing": 180, "year": 2026 }'const res = await fetch('https://api.astroway.info/v1/chinese/feng-shui/flying-star', { method: 'POST', headers: { 'X-Api-Key': process.env.ASTROWAY_API_KEY, 'Content-Type': 'application/json', }, body: JSON.stringify({ "period": 8, "facing": 180, "year": 2026 }),});const { ok, data, error } = await res.json();if (!ok) throw new Error(error.message);console.log(data);import os, requests
r = requests.post( 'https://api.astroway.info/v1/chinese/feng-shui/flying-star', headers={'X-Api-Key': os.environ['ASTROWAY_API_KEY'], 'Content-Type': 'application/json'}, json={ 'period': 8, 'facing': 180, 'year': 2026 },)result = r.json()if not result['ok']: raise RuntimeError(result['error']['message'])print(result['data'])<?phpuse GuzzleHttp\Client;
$client = new Client(['base_uri' => 'https://api.astroway.info/v1/']);$r = $client->post('chinese/feng-shui/flying-star', [ 'headers' => ['X-Api-Key' => getenv('ASTROWAY_API_KEY')], 'json' => [ 'period' => 8, 'facing' => 180, 'year' => 2026, ],]);$result = json_decode($r->getBody(), true);if (!$result['ok']) throw new \RuntimeException($result['error']['message']);print_r($result['data']);The nine-palace natal chart of a building: mountain star, period star and facing star per sector, the named arrangement (旺山旺水 and the other three), and the special patterns. Send the facing in degrees or as one of the 24 mountains, and the period directly or as the date the building was occupied. Neither is defaulted.
Authorizations
Section titled “Authorizations ”Parameters
Section titled “ Parameters ”Query Parameters
Section titled “Query Parameters ”Comma-separated dotted paths, relative to data, to keep in the response. A path is applied to every element of an array, so planets.name means the name of each planet. Paths that match nothing come back in _fields_unmatched; a list where nothing matches at all is a 400, because an empty object would be a confident wrong answer.
Example
planets.name,planets.longitudeRound every non-integer number in the response to this many decimal places. Integers are left alone, because an id is not a measurement. Ecliptic longitudes ship with fourteen decimals by default; 2 is about a tenth of an arcminute.
Example
4Request Body required
Section titled “Request Body required ”object
Hours from UTC at the given moment, not minutes. Fractional zones are hours too: 5.5 for India, 5.75 for Nepal, -3.5 for Newfoundland. Defaults to 0, meaning UTC.
Example
{ "period": 8, "facing": 180, "year": 2026}Responses
Section titled “ Responses ”Successful calculation
object
object
object
object
object
object
object
object
object
object
object
object
object
object
Example
{ "ok": true, "data": { "period": { "number": 8, "source": "given", "startYear": null, "endYear": null }, "facing": { "degrees": 180, "mountain": "S2", "chinese": "午", "pinyin": "Wu", "sector": "S", "polarity": "yin" }, "sitting": { "mountain": "N2", "chinese": "子", "pinyin": "Zi", "sector": "N", "degrees": 0 }, "palaces": [ { "palace": "N", "sector": "N", "degrees": "337.5-22.5", "mountainStar": { "star": 9, "chinese": "九紫", "name": "Purple Fire", "element": "Fire", "nature": "auspicious", "meaning": "Future prosperity, celebration and multiplication. The ruling star of period 9." }, "periodStar": { "star": 4, "chinese": "四綠", "name": "Green Wood", "element": "Wood", "nature": "mixed", "meaning": "Study, writing and romance. Read as scholarly when timely and as scandal when not." }, "facingStar": { "star": 7, "chinese": "七赤", "name": "Red Metal", "element": "Metal", "nature": "inauspicious", "meaning": "Robbery, betrayal and cutting. Was timely in period 7 and is read as hostile now." }, "annualStar": { "star": 6, "chinese": "六白", "name": "White Metal", "element": "Metal", "nature": "auspicious", "meaning": "Authority, patronage and heaven luck. The retiring star of period 6." }, "pair": "9-7" } ], "chartType": { "id": "double-facing", "chinese": "雙星到向", "meaning": "Both stars gather in the facing palace: read as good for money, and as needing a mountain form at the back to support people." }, "patterns": [], "flight": { "mountain": { "centre": 4, "direction": "forward" }, "facing": { "centre": 3, "direction": "reverse" } }, "annualYear": 2026, "warnings": [], "notes": [ "The mountain star (山星) is read for people and health, the facing star (向星) for money and opportunity, and the period star (運星) for the era the building belongs to." ] }}Validation error
Example
{ "ok": false, "error": { "code": "INVALID_INPUT", "message": "Validation failed: date: Date must be YYYY-MM-DD", "details": [ { "path": "date", "message": "Date must be YYYY-MM-DD" } ] }}Missing or invalid API key
Example
{ "ok": false, "error": { "code": "INVALID_API_KEY", "message": "Invalid API key" }}