Перейти до вмісту
AstroWay/api v2.158.7 · docs
усі системи в нормі

I Ching Hexagram (DEPRECATED: use /iching/throw-coins)

Deprecated
POST
/iching
request.sh
curl -X POST https://api.astroway.info/v1/iching \
-H "X-Api-Key: aw_live_..." \
-H "Content-Type: application/json"

DEPRECATED: legacy un-namespaced random hexagram cast. Superseded by the /iching/* namespace: /iching/throw-coins (seeded + reproducible), /iching/by-question, /iching/with-changing-lines, /iching/daily, /iching/lookup/{n}, all on the Wilhelm-Baynes hexagram set. Still works until its 2027-06-16 sunset, then removed. Casts a single I Ching hexagram (input ignored).

Media type application/json

This endpoint reads nothing from the request body. Send {} (or any object, which is ignored).

object
Example generated
{}

Successful calculation

Media type application/json
object
ok
boolean
data
object
number
number
nullable
name
string
nullable
chinese
string
nullable
trigrams
Array<number>
nullable
lines
Array<object>
nullable
object
value
number
nullable
isYang
boolean
nullable
isChanging
boolean
nullable
Example
{
"ok": true,
"data": {
"number": 5,
"name": "Waiting",
"chinese": "",
"trigrams": [
0
],
"lines": [
{
"value": 7,
"isYang": true,
"isChanging": false
}
]
}
}

Validation error

Media type application/json
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

Media type application/json
Example
{
"ok": false,
"error": {
"code": "INVALID_API_KEY",
"message": "Invalid API key"
}
}
Корисно?