|
|
@@ -139,14 +139,14 @@ pub async fn collect_depth_json(start_timestamp: i64, end_timestamp: i64, exchan
|
|
|
// 尝试反序列化文件内容
|
|
|
if let Ok(depth_list) = serde_json::from_str::<Vec<SpecialDepth>>(&content) {
|
|
|
// info!("{} 找到 1 条", filename);
|
|
|
- for depth in depth_list {
|
|
|
+ for depth in depth_list.iter().rev() {
|
|
|
// 不在时间范围内的就不要返回了
|
|
|
let t = depth.t.to_i64().unwrap();
|
|
|
if t < start_timestamp || t > end_timestamp {
|
|
|
continue
|
|
|
}
|
|
|
|
|
|
- depths.push(depth)
|
|
|
+ depths.push(depth.clone())
|
|
|
}
|
|
|
}
|
|
|
}
|