油价聚合

地区油价查询

请求

GET /v1/oil

响应

等待请求
发送请求后显示 JSON 响应。

响应字段

字段类型说明
requestedRegionCodestring / null请求传入的六位地区编码。全国查询为 null。
nextAdjustmentAtstring · 日期时间 / null下次预计或已确认的调价时间。时间未知时为 null。
adjustmentStatusstringconfirmed 为已确认,estimated 为预估,unknown 为未知。
pricesobject[]全国查询返回可用省级记录。按地区查询返回一条报价,允许回退到所属省份。
prices[].regionCodestring报价实际所属的六位地区编码。
prices[].regionNamestring报价实际所属的地区名称。
prices[].scopestring实际报价范围,province 为省级,city 为城市级。
prices[].areaNamestring报价地区或价区名称。
prices[].updatedAtstring · 日期或日期时间 / null报价记录的更新时间。时间未知时为 null。
prices[].unitstring聚合接口标注的单位,固定为 CNY/L。
prices[].priceobject按油品组织的价格。非空值统一为保留两位小数的元/升字符串。
prices[].price.92string92 号汽油价格。
prices[].price.95string95 号汽油价格。
prices[].price.98string / null普通 98 号汽油报价。当前口径下暂无报价时为 null。
prices[].price.0string / null0 号柴油价格。数据缺失时为 null。
prices[].effectiveAtstring · 日期时间 / null价格生效时间。当前适配器无法逐条核实,返回 null。
prices[].fetchedAtstring · 日期时间该数据最近一次成功采集的时间。
prices[].staleboolean超过 36 小时未成功采集,或已确认调价后仍未验证为本轮价格时为 true。

状态码

状态码说明
200查询成功。成功响应结构见上表。
304客户端发送的 If-None-Match 命中缓存。响应无正文。
400INVALID_REGION_CODE,地区编码格式错误或缺少必填编码。
404UNKNOWN_REGION,该地区尚未收录。
429请求超出频率限制。响应含 statusCode(number)、error 和 message(string)。
503PRICE_UNAVAILABLE,暂无可用快照。

400、404 和 503 业务错误响应包含 error(错误码)和 message(说明),均为字符串。