feat: include exchangeID in /markets response
This commit is contained in:
@@ -622,6 +622,7 @@ class MarketModel(BaseModel):
|
|||||||
|
|
||||||
class MarketResponse(BaseModel):
|
class MarketResponse(BaseModel):
|
||||||
markets: dict[str, MarketModel]
|
markets: dict[str, MarketModel]
|
||||||
|
exchange_id: str
|
||||||
|
|
||||||
|
|
||||||
class SysInfo(BaseModel):
|
class SysInfo(BaseModel):
|
||||||
|
|||||||
@@ -489,13 +489,14 @@ def markets(
|
|||||||
handleExchangePayload(query, config_loc)
|
handleExchangePayload(query, config_loc)
|
||||||
exchange = get_exchange(config_loc)
|
exchange = get_exchange(config_loc)
|
||||||
else:
|
else:
|
||||||
exchange = rpc._exchange
|
exchange = rpc._freqtrade.exchange
|
||||||
|
|
||||||
return {
|
return {
|
||||||
"markets": exchange.get_markets(
|
"markets": exchange.get_markets(
|
||||||
base_currencies=[query.base] if query.base else None,
|
base_currencies=[query.base] if query.base else None,
|
||||||
quote_currencies=[query.quote] if query.quote else None,
|
quote_currencies=[query.quote] if query.quote else None,
|
||||||
)
|
),
|
||||||
|
"exchange_id": exchange.id,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user