AstroWay/api v2.173.1 · id
semua sistem normal
// astrology api · POST /v1/chinese/tong-shu/select

Tong Shu date selection API

Scan a window of days and get back only the ones the almanac endorses for a specific undertaking, with the reason each survivor survived and a count of what was dropped and why.

Endpoint
POST /v1/chinese/tong-shu/select
Cost
20 credits
Latency
~110 ms
Tier
Tier 2
// 01 / What it computes

Tong Shu date selection API

Every day in the window is resolved to its day pillar from the sexagenary cycle, then read through two independent registers. The twelve day officers 建除十二值星 cycle with the month branch and each one carries its own list of what it suits and what it forbids: Full suits signing and celebrating, Close suits almost nothing. The twenty-eight lunar mansions cycle on a seven-day rhythm independent of the officers, and carry their own endorsements. A day passes only when the chosen activity survives both registers. The optional clash filter then removes days whose branch stands opposite the animal you name, which is how the tradition excludes the person the day is being chosen for. The response reports scanned, matched and the breakdown of what was dropped by register and by clash, so an empty answer is legible rather than mysterious.

// 02 / Live request

POST/v1/chinese/tong-shu/select

curl -X POST https://api.astroway.info/v1/chinese/tong-shu/select \
  -H "X-Api-Key: aw_live_..." \
  -H "Content-Type: application/json" \
  -d '{
    "from": "2026-06-01",
    "to": "2026-06-14",
    "activity": "marriage",
    "avoidClashWith": "Horse"
  }'
Response (excerpt)
{
  "ok": true,
  "data": {
    "activity": "marriage",
    "from": "2026-06-01",
    "to": "2026-06-14",
    "scanned": 14,
    "matched": 5,
    "dropped": { "byRegister": 9, "byClash": 0 },
    "days": [
      {
        "date": "2026-06-02",
        "verdict": "suitable",
        "dayPillar": "Ding-Wei",
        "officer": { "chinese": "滿", "name": "Full", "summary": "Fullness and return. Signing, opening, celebrating." },
        "mansion": { "chinese": "尾", "name": "Tail", "quadrant": "Azure Dragon" },
        "clashesWith": "Ox"
      }
    ]
  }
}
// 03 / Parameters

Parameters

nametypeRequired
from string (YYYY-MM-DD) yes First day of the window to scan.
to string (YYYY-MM-DD) yes Last day of the window.
activity string yes What the day is for: marriage, opening, moving, travel, medical, education, funeral and the rest of the register's own list.
avoidClashWith string no An animal name. Days whose branch clashes that animal are dropped, which is how the tradition excludes the person the day is for.
language string no Any of 21 codes for the animal names.
// 04 / When to use it

When to use it

Reach for it in booking flows, event planning, wedding and venue products, clinic scheduling, or anywhere a date picker should quietly prefer some days over others. Because it returns the reasoning and not only the verdict, you can show a user why the third Tuesday is missing rather than silently greying it out. Feed the result into a calendar component directly, or use the counts to decide whether the window needs widening before you ask again.

// 05 / Notes

Notes

Both registers come from the printed almanac tradition rather than from an invented ranking, and the endpoint never invents a day: an empty result stays empty and reports which register emptied it. The day boundary is 23:00, consistent with every other Chinese endpoint here. Activity names follow the register's own list, so an unknown activity is refused with a 400 that names the field.

Try the Tong Shu date selection API

Grab a key and make your first call in under a minute.

99.9% SLA · paket berbayar · 30d status →