查询 Path of Exile 游戏内物品实时市场价格,通过 poe.ninja API 获取数据。
所有 API 端点基于 https://poe.ninja/api/data/
两种数据类型:
currencyoverview - 通货类(Currency、Fragment)itemoverview - 物品类(其余所有类型)必需参数:
league - 联盟名称(如 Settlers、 Standard、 Hardcore)type - 物品类型类型说明Currency通货(Chaos、Divine、Mirror 等)Fragment碎片(Sacrifice at Dusk 等)
类型说明Oil油(Golden Oil 等)Incubator孵化器Scarab圣甲虫Fossil化石Resonator共振器Essence精髓DivinationCard预言卡SkillGem技能宝石BaseType基底类型HelmetEnchant头盔附魔UniqueMap传奇地图Map地图UniqueJewel传奇珠宝UniqueFlask传奇药水UniqueWeapon传奇武器UniqueArmour传奇护甲UniqueAccessory传奇饰品Beast野兽Vial小瓶DeliriumOrb谵妄球Omen征兆UniqueRelic传奇遗物ClusterJewel集群珠宝BlightedMap凋零地图BlightRavagedMap凋零掠夺地图Invitation邀请函Memory记忆Coffin棺材AllflameEmber全燃余烬
text
GET https://poe.ninja/api/data/currencyoverview?league=Settlers&type=Currency
text
GET https://poe.ninja/api/data/itemoverview?league=Settlers&type=UniqueWeapon
text
GET https://poe.ninja/api/data/itemoverview?league=Settlers&type=DivinationCard
json
{
"lines": [
{
"currencyTypeName": "Mirror of Kalandra",
"chaosEquivalent": 143915.04,
"pay": { "value": 0.0000070301 },
"receive": { "value": 146900 },
"paySparkLine": { "totalChange": 42.25 },
"receiveSparkLine": { "totalChange": -3.92 },
"detailsId": "mirror-of-kalandra"
}
],
"currencyDetails": [
{
"id": 22,
"name": "Mirror of Kalandra",
"tradeId": "mirror",
"icon": "https://..."
}
]
}
关键字段:
chaosEquivalent - Chaos 等值价格pay.value - 购买时需要的货币数量receive.value - 出售时获得的货币数量totalChange - 价格变化百分比json
{
"lines": [
{
"id": 22607,
"name": "Golden Oil",
"baseType": "Golden Oil",
"chaosValue": 59,
"exaltedValue": 2.42,
"divineValue": 0.23,
"sparkline": { "totalChange": -1.67 },
"detailsId": "golden-oil",
"listingCount": 1997
}
]
}
关键字段:
chaosValue - Chaos 价格exaltedValue - Exalted 价格divineValue - Divine 价格sparkline.totalChange - 价格变化趋势listingCount - 在售数量脚本说明get_currency.py获取通货价格get_item.py获取物品价格search_item.py搜索特定物品
使用 get_currency.py 查询:
bash
python scripts/get_currency.py --league Settlers --search "divine"
使用 get_item.py 查询:
bash
python scripts/get_item.py --league Settlers --type UniqueWeapon --search "Starforge"
响应中的 sparkline 字段包含价格趋势数据, totalChange 表示变化百分比。
lowConfidenceSparkline 表示交易量低,价格可能不准确icon 字段提供物品图标 URLapi_reference.md - 完整 API 文档和响应示例get_currency.py - 查询通货价格get_item.py - 查询物品价格search_item.py - 搜索物品