update
This commit is contained in:
@@ -41,7 +41,7 @@ def get_date_str(timestamp: int) -> str:
|
||||
|
||||
@router.get('/gold/realtime/', operation_id='realtimeGold', response_model=Response[list[RealTimeGold]])
|
||||
async def get_real_time_gold(redis: Annotated[AsyncRedis, Depends(thirdpart_gold.get_redis)], background_tasks: BackgroundTasks) -> Response[list[RealTimeGold]]:
|
||||
"""获取网站金币单价,取页面第4~10条单价均值,元/万金币,两位小数。
|
||||
"""获取网站金币比例,取页面第4~10条的平均比例,万金币/元,两位小数。
|
||||
|
||||
updataTime为数据所属半小时刻度的数字秒级时间戳,:25/:55提前采集对应:30/:00数据。与thirdpart接口共用Redis缓存和
|
||||
后台刷新任务:30分钟自动更新,也支持按需补齐,逐区间隔8秒;初始化未齐时响应体code=202。
|
||||
@@ -145,10 +145,10 @@ async def get_official_gold(redis: Annotated[AsyncRedis, Depends(thirdpart_gold.
|
||||
|
||||
@router.get('/gold/thirdpart/', operation_id='thirdpartGold', response_model=Response[list[RealTimeGold]])
|
||||
async def get_thirdpart_gold(redis: Annotated[AsyncRedis, Depends(thirdpart_gold.get_redis)], background_tasks: BackgroundTasks) -> Response[list[RealTimeGold]]:
|
||||
"""获取跨1~跨8(含跨3A/3B)的第三方单价均值,单位:元/万金币。
|
||||
"""获取跨1~跨8(含跨3A/3B)的第三方平均比例,单位:万金币/元。
|
||||
|
||||
不额外限制最低总价;汇总渠道报价并按公开页面展示规则排序、去重,
|
||||
对i.item1的第4~10条(Python切片[3:10])显示单价取算术平均,
|
||||
对第4~10条(Python切片[3:10])原始单价逐条计算1/Price后取算术平均,
|
||||
四舍五入至两位小数,不按库存或份数加权。
|
||||
|
||||
每30分钟自动后台刷新,跨区页面最短间隔8秒(每分钟不超过8次),Redis锁避免重复刷新。
|
||||
|
||||
Reference in New Issue
Block a user