feat: include exchangeID in /markets response

This commit is contained in:
Matthias
2025-02-02 13:30:17 +01:00
parent 59837ef6ac
commit ecf013dd18
2 changed files with 4 additions and 2 deletions

View File

@@ -622,6 +622,7 @@ class MarketModel(BaseModel):
class MarketResponse(BaseModel):
markets: dict[str, MarketModel]
exchange_id: str
class SysInfo(BaseModel):

View File

@@ -489,13 +489,14 @@ def markets(
handleExchangePayload(query, config_loc)
exchange = get_exchange(config_loc)
else:
exchange = rpc._exchange
exchange = rpc._freqtrade.exchange
return {
"markets": exchange.get_markets(
base_currencies=[query.base] if query.base else None,
quote_currencies=[query.quote] if query.quote else None,
)
),
"exchange_id": exchange.id,
}