This commit is contained in:
27942
2025-12-23 11:45:56 +08:00
parent 6d42ed09eb
commit b68fc79fe3
2 changed files with 228 additions and 2 deletions

View File

@@ -82,7 +82,7 @@ class BitmartFuturesTransaction:
'close': float(k["close_price"])
})
formatted.sort(key=lambda x: x['id'])
return formatted[-3:] # 最近3根: kline_1 (最老), kline_2, kline_3 (最新)
return formatted # 最近3根: kline_1 (最老), kline_2, kline_3 (最新)
except Exception as e:
logger.error(f"获取K线异常: {e}")
self.ding(error=True, msg="获取K线异常")