feat: daily volume top20 rank per exchange in market page

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
dekun
2026-06-08 15:46:36 +08:00
parent 09eb9dc475
commit 4bf0c2363f
11 changed files with 763 additions and 6 deletions
+11
View File
@@ -7857,6 +7857,16 @@ def _hub_fetch_ohlcv(symbol, timeframe, since_ms=None, limit=500):
)
def _hub_fetch_volume_rank(top_n=20):
from hub_volume_rank_lib import fetch_usdt_swap_volume_rank
return fetch_usdt_swap_volume_rank(
exchange=exchange,
ensure_markets_loaded=ensure_markets_loaded,
top_n=top_n,
)
try:
import sys
from pathlib import Path
@@ -7877,6 +7887,7 @@ try:
account_fn=_hub_account_bundle,
views={"add_order": add_order, "add_key": add_key},
ohlcv_fn=_hub_fetch_ohlcv,
volume_rank_fn=_hub_fetch_volume_rank,
)
except Exception as _hub_err:
print(f"[hub_bridge] okx: {_hub_err}")