EVE Market - API 文档


更新日志

2021.05.07 开放API接口

2021.05.31 开放晨曦服务器API接口,queryBuyAssess和querySellAssess支持某个星系内全部订单

2021.11.26 启用全站 HTTPS

2021.11.27 启用分布式部署

2021.12.14 静态文件dogmaattributes支持中文版本

2022.01.01 由于国内节点服务器资源有限,现已关闭全站分布式部署

2022.01.02 晨曦数据抓取模块现由国内节点运行

2022.03.02 增加API请求样式,方便API调用

2022.07.01 合同的API接口已更新,增加listContractAll服务,而listContract服务即将删除

2022.07.02 API请求速率放宽至每分钟至多60次

2022.12.25 主域名改为eve.c3q.cc,原来的URL也能使用,但不保证永久有效

2023.02.15 开放曙光服务器API接口

2023.03.14 修复了一处合同API示例中的代码错误

2023.04.08 全站 HTTP/2 支持


静态文件

所有的静态文件都在此路径之下,https://eve.c3q.cc/market/data/

此目录下目前包含以下内容,每个文件是什么数据,请根据文件名和文件内容理解

categorys, groups, marketgroups, regions, constellations, systems, stations, systemnear, systemposition, stationsystem, types, typename, dogmaattributes

目前有英文版和中文版两种,默认为英文版,若要获取中文版,在路径最后加'zh/'

例如
获取英文版星域静态数据,https://eve.c3q.cc/market/data/regions/
获取中文版星域静态数据,https://eve.c3q.cc/market/data/regions/zh/


API接口

所有的宁静服务器API都是通过此路径进行,https://eve.c3q.cc/market/api/

所有的晨曦服务器API都是通过此路径进行,https://cn.c3q.cc:20080/eve/market/api/

所有的曙光服务器API都是通过此路径进行,https://cn.c3q.cc:20080/eve/market-sg/api/

目前只支持POST请求,同一IP每60秒请求次数不能超过60次,超出限制则返回429错误。若有特殊需求,可在贴吧联系站长。

注意:POST发送的请求实体是 application/x-www-form-urlencoded 格式,不是 json 格式


同一次请求可以请求多个服务,但只要有一个服务请求失败,则全部服务都请求失败

例如

        $.post('https://eve.c3q.cc/market/api/',{
            queryBuyAssess: [35,36],
            buy_location_id: [60003760,1028858195912],
            querySellAssess: 36,
            sell_location_id:10000002
        }, function(data){
            console.log(data);
        });
        

API目前包含以下服务,样例的代码均为 jQuery 调用


对指定物品的进行买单估价

queryBuyAssess: type_id
queryBuyAssess: [type_id...]

附加参数 (必须,二选一):
buy_location_id: region_id
buy_location_id: [location_id...]

[type_id...] 数组成员最多50个,[location_id...] 数组成员最多3个

location_id可以是 星系ID、空间站ID、玩家建筑ID
注意:region_id 是 星域ID

例如

        $.post('https://eve.c3q.cc/market/api/',{
            queryBuyAssess: [35,36],
            buy_location_id:10000002
        });
        $.post('https://eve.c3q.cc/market/api/',{
            queryBuyAssess: 35,
            buy_location_id: [60003760,1028858195912]
        });
        

对指定物品的进行卖单估价

querySellAssess: type_id
querySellAssess: [type_id...]

附加参数 (必须,二选一):
sell_location_id: region_id
sell_location_id: [location_id...]

[type_id...] 数组成员最多50个,[location_id...] 数组成员最多3个

location_id可以是 星系ID、空间站ID、玩家建筑ID
注意:region_id 是 星域ID

例如

        $.post('https://eve.c3q.cc/market/api/',{
            querySellAssess: 35,
            sell_location_id:10000002
        });
        $.post('https://eve.c3q.cc/market/api/',{
            querySellAssess: [35,36],
            sell_location_id: [60003760,1028858195912]
        });
        

列出指定物品的所有买单(按价格降序)

listBuyOrder: type_id
listBuyOrder: [type_id...]

[type_id...] 数组成员最多3个

例如

        $.post('https://eve.c3q.cc/market/api/',{
            listBuyOrder: [35,36]
        });
        返回的数据中,订单的每一行数据意义如下
        
        [type_id, system_id, location_id, price, volume_remain, volume_total, duration, issued, min_volume, order_range]
            duration指订单总的有效时间
            issued订单产生的时间(时间戳)
        

列出指定物品的所有卖单(按价格升序)

listSellOrder: type_id
listSellOrder: [type_id...]

[type_id...] 数组成员最多只能3个

例如

        $.post('https://eve.c3q.cc/market/api/',{
            listSellOrder: 36
        });
        返回的数据中,订单的每一行数据意义如下
        
        [type_id, system_id, location_id, price, volume_remain, volume_total, duration, issued]
            duration指订单总的有效时间
            issued订单产生的时间(时间戳)
        

列出包含指定物品的所有合同(按合同ID排序)

listContractAll: type_id

例如

        $.post('https://eve.c3q.cc/market/api/',{
            listContractAll: 12015
        });
        其中合同的每一行数据意义如下
        
        list : [contract_id, type, reward, price, buyout, date_issued, date_expired, volume, location_id, region_id, title]
            type 指合同类型 (1.交易,2.拍卖)
            reward 指给买家的isk
            price 指给卖家的isk
            buyout 指拍卖合同的直接成交价
            volume 指合同物品的体积
            title 指合同标题
        item : {contract_id: [quantity, type_id, item_id, material_efficiency, time_efficiency, runs]}
        

列出包含指定物品的所有合同(按价格升序) - 即将废弃

listContract: type_id
listContract: [type_id...]

[type_id...] 数组成员最多只能10个

例如

        $.post('https://eve.c3q.cc/market/api/',{
            listContract: [35,36]
        });
        其中合同的每一行数据意义如下
        
        [contract_id, type, reward, price, buyout, date_issued, date_expired, volume, itemcount, location_id, region_id, title]
            type 指合同类型 (1.交易,2.拍卖)
            reward 指给买家的isk
            price 指给卖家的isk
            buyout 指拍卖合同的直接成交价
            volume 指合同物品的体积
            title 指合同标题
        

列出指定合同ID的所有合同物品 - 即将废弃

listContractItem: contract_id
listContractItem: [contract_id...]

[contract_id...] 数组成员最多只能10个

例如

        $.post('https://eve.c3q.cc/market/api/',{
            listContractItem: 169739707
        });
        其中合同物品的每一行数据意义如下
        [quantity, type_id, item_id, material_efficiency, time_efficiency, runs]
        

列出指定物品的默认属性值 (仅支持宁静服务器)

queryTypeDogma: type_id
queryTypeDogma: [type_id...]

[type_id...] 数组成员最多只能50个

例如

        $.post('https://eve.c3q.cc/market/api/',{
            queryTypeDogma: 17478
        });
        提示:需要对照静态文件dogmaattributes使用
        

常用地点ID

星系

    30000142    Jita
    30000144    Perimeter
    30002187    Amarr
    30003491    Ashab
    30002659    Dodixie
    30002661    Botane
    30002053    Hek
    30002510    Rens
    30002526    Frarn
    

空间站

    60003760    Jita IV - Moon 4 - Caldari Navy Assembly Plant
    60008494    Amarr VIII (Oris) - Emperor Family Academy
    60011866    Dodixie IX - Moon 20 - Federation Navy Assembly Plant
    60005686    Hek VIII - Moon 12 - Boundless Creation Factory
    60004588    Rens VI - Moon 8 - Brutor Tribe Treasury
    

玩家建筑 (宁静服务器)

    1028858195912   Perimeter - Tranquility Trading Tower
    1023968078820   Ashab - Tranquility Trade & Prod Center
    1025824394754   Botane - IChooseYou Market and Industry
    1031058135975   Hek - IChooseYou Market and Industry
    1031084757448   Frarn - IChooseYou Market and Industry