feat: daily volume top20 rank per exchange in market page
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -8234,6 +8234,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
|
||||
@@ -8254,6 +8264,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] gate: {_hub_err}")
|
||||
|
||||
Reference in New Issue
Block a user