mooket2 银河奶牛历史价格(包含强化物品)history(enhancement included) price for milkywayidle
抄的https://greasyfork.org/zh-CN/scripts/530316-mooket ,有些功能不一样,使用需关闭原版mooket
Translated with DeepL.com (free version)
该接口用于一次性查询多个物品、多个强化等级(Variant)的历史行情数据。
https://q7.nainai.eu.org/api/market/historiesGETapplication/json| 参数名 | 类型 | 必填 | 说明 |
|---|---|---|---|
item_id |
Array/String | 是 | 物品路径。支持传递多个,如 item_id=A&item_id=B |
variant |
String | 是 | 强化等级 ID。支持单值、连续范围、不连续值混合输入 (限 0-20) |
days |
Integer | 否 | 查询过去几天的数据。默认为 1 |
variant=0variant=0-5 (解析为 0, 1, 2, 3, 4, 5)variant=0,5,10 (仅查询指定 ID)variant=0,2,5-8 (解析为 0, 2, 5, 6, 7, 8)查询两个物品在 0, 2, 3 变体下过去 1 天的数据:
GET /api/market/histories?item_id=/items/cedar_log&item_id=/items/pine_log&variant=0,2-3&days=1
接口返回三层嵌套字典结构:{ 物品ID: { 变体ID: [数据流水列表] } }。
{
"/items/cedar_log": {
"0": [
{
"time": 1773831143,
"a": 270.0,
"b": 260.0,
"p": 263.0,
"v": 10992.0
}
],
"2": [],
"3": [
{
"time": 1773831143,
"a": 310.0,
"b": 300.0,
"p": 305.0,
"v": 540.0
}
]
},
"/items/pine_log": {
"0": [...],
"2": [...],
"3": [...]
}
}
字段说明 time: Unix 时间戳 (秒)。
a: 平均卖价 (Average Ask)。
b: 平均买价 (Average Bid)。
p: 成交价格 (Price)。
v: 成交量 (Volume)。
空数据处理: 若请求的变体在指定时间内无成交,对应的 Key 仍会存在,但值为 []。
变体范围限制: 为了性能安全,variant 数值被硬性限制在 0 至 20 之间。
不可强化的物品variant 数值为:0。