增加资金费率

This commit is contained in:
dekun
2026-05-22 14:00:19 +08:00
parent d7f7259ee0
commit 71ed38b32d
13 changed files with 603 additions and 14 deletions
+4 -3
View File
@@ -25,8 +25,8 @@ def build_markdown(snapshot: dict) -> str:
f"> 统计周期(北京时间 8:00 切日)",
f"> **{period_label}**",
"",
"| 排名 | 合约 | 成交额(USDT) | 涨跌幅 | 标记 |",
"| --- | --- | --- | --- | --- |",
"| 排名 | 合约 | 成交额(USDT) | 涨跌幅 | 资金费率 | 标记 |",
"| --- | --- | --- | --- | --- | --- |",
]
for row in items:
tags = []
@@ -37,8 +37,9 @@ def build_markdown(snapshot: dict) -> str:
tag_str = " ".join(tags) if tags else "-"
vol = row.get("quote_volume_fmt") or f"{row.get('quote_volume', 0):.0f}"
pct = row.get("price_change_pct_fmt") or f"{row.get('price_change_pct', 0):+.2f}%"
fr = row.get("funding_rate_fmt") or "-"
lines.append(
f"| {row['rank']} | {row['symbol']} | {vol} | {pct} | {tag_str} |"
f"| {row['rank']} | {row['symbol']} | {vol} | {pct} | {fr} | {tag_str} |"
)
lines.append("")
lines.append("> 标记说明:千万+ = 成交额≥1000万 USDT;涨跌5%+ = |涨跌幅|≥5%")