mirror of
https://github.com/freqtrade/freqtrade.git
synced 2026-02-10 16:20:39 +00:00
feat: include exchangeID in /markets response
This commit is contained in:
@@ -622,6 +622,7 @@ class MarketModel(BaseModel):
|
||||
|
||||
class MarketResponse(BaseModel):
|
||||
markets: dict[str, MarketModel]
|
||||
exchange_id: str
|
||||
|
||||
|
||||
class SysInfo(BaseModel):
|
||||
|
||||
@@ -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,
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user