Fix dashboard PnL using spot contract size of 1.
Prefer perpetual symbols and normalize before market.contractSize lookup so Gate BTC float matches ~0.4U not thousands. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -3416,7 +3416,7 @@ def resolve_order_entry_price(order_resp, exchange_symbol, fallback_price):
|
||||
|
||||
def get_contract_size(exchange_symbol):
|
||||
ensure_markets_loaded()
|
||||
market = exchange.market(exchange_symbol)
|
||||
market = exchange.market(normalize_exchange_symbol(exchange_symbol))
|
||||
return float(market.get("contractSize") or 1)
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user