fix(hub): merge mark price from Flask snapshot and fix board refresh
Sync hub positions with instance price_snapshot (order_prices and position_marks). Fix monitor board UI when hub restarts (version rewind) and queue snapshot fetches. Expose board aggregate status on /api/ping for diagnostics. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -5770,10 +5770,18 @@ def api_price_snapshot():
|
||||
)
|
||||
order_prices.append(payload)
|
||||
|
||||
from hub_position_metrics import build_position_marks_list
|
||||
|
||||
position_marks = build_position_marks_list(
|
||||
all_swap_positions,
|
||||
format_mark_display=lambda sym, px: format_price_for_symbol(sym, px),
|
||||
)
|
||||
|
||||
return jsonify({
|
||||
"updated_at": app_now_str(),
|
||||
"key_prices": key_prices,
|
||||
"order_prices": order_prices,
|
||||
"position_marks": position_marks,
|
||||
"positions_raw_count": len(all_swap_positions),
|
||||
})
|
||||
|
||||
|
||||
Reference in New Issue
Block a user