4.3 平均成交价数据接口 - getAveragePrice

优质
小牛编辑
136浏览
2023-12-01

平均成交价数据接口 - GetAveragePrice

获取某个品类的平均成交价信息

Request Parameters

Parameter nameTypeDescriptionRequired
category_idstring品类idYes
platform_idstring平台id,如果为空,则不做过滤No
brand_idstring品牌id,如果为空,则不做过滤No
product_idintSKU单品id,如果为空,则不做过滤No
time_typestring汇总标准: Year,Quarter,Month,Week,如果不提供,默认为MonthNo
start_time查询时间段起始时间,格式为时间字符串或者unix时间戳查询开始时间,如果不提供,则根据结束时间与汇总类型进行计算No
end_time请求串生成时间,格式为时间字符串或者unix时间戳查询截止时间,如果不提供,默认当天No

Response Elements

Parameter nameTypeDescription
actionstring响应动作
average_pricearray平均价格序列,每项参数可见下面 Response Item
total_countint根据过滤条件得到的结果集数量

Response Item

Parameter nameTypeDescription
timestring数据纵轴: year: 2015, month:2015-03月,quarter:2015Q1, week:2015-03-23
vauledouble平均成交价

示例

请求示例

http://open.syntun.cn/api/dq/GetAveragePrice
&category_id=315
&time_type=Quarter
&COMMON_PARAMS

响应示例

{
    "code": 1000,
    "msg": "OK",
    "data": {
        "action": "getAveragePrice",
        "agerage_price": [
            {
                "time": "2014Q1",
                "value": 3346.277161123
            },
            {
                "time": "2014Q2",
                "value": 3127.7185906397
            },
            {
                "time": "2014Q3",
                "value": 3029.3448515561
            },
            {
                "time": "2014Q4",
                "value": 3413.823599491
            },
            {
                "time": "2015Q1",
                "value": 4016.0245204827
            },
            {
                "time": "2015Q2",
                "value": 2929.8784368371
            }
        ],
        "total_count": 6
    }
}