mirror of
https://github.com/freqtrade/freqtrade.git
synced 2026-02-14 10:10:59 +00:00
Better type response
This commit is contained in:
@@ -8,7 +8,7 @@ from freqtrade.constants import Config
|
||||
from freqtrade.exceptions import OperationalException
|
||||
from freqtrade.exchange import ROUND_UP
|
||||
from freqtrade.exchange.types import Ticker
|
||||
from freqtrade.plugins.pairlist.IPairList import IPairList, PairlistParameter
|
||||
from freqtrade.plugins.pairlist.IPairList import IPairList
|
||||
|
||||
|
||||
logger = logging.getLogger(__name__)
|
||||
|
||||
@@ -390,7 +390,13 @@ class StrategyListResponse(BaseModel):
|
||||
|
||||
|
||||
class PairListResponse(BaseModel):
|
||||
pairlists: List[Dict[str, Any]]
|
||||
name: str
|
||||
is_pairlist_generator: bool
|
||||
params: Dict[str, Any]
|
||||
|
||||
|
||||
class PairListsResponse(BaseModel):
|
||||
pairlists: List[PairListResponse]
|
||||
|
||||
|
||||
class FreqAIModelListResponse(BaseModel):
|
||||
|
||||
@@ -15,7 +15,7 @@ from freqtrade.rpc.api_server.api_schemas import (AvailablePairs, Balances, Blac
|
||||
DeleteLockRequest, DeleteTrade, ForceEnterPayload,
|
||||
ForceEnterResponse, ForceExitPayload,
|
||||
FreqAIModelListResponse, Health, Locks, Logs,
|
||||
OpenTradeSchema, PairHistory, PairListResponse,
|
||||
OpenTradeSchema, PairHistory, PairListsResponse,
|
||||
PerformanceEntry, Ping, PlotConfig, Profit,
|
||||
ResultMsg, ShowConfig, Stats, StatusMsg,
|
||||
StrategyListResponse, StrategyResponse, SysInfo,
|
||||
@@ -301,7 +301,7 @@ def get_strategy(strategy: str, config=Depends(get_config)):
|
||||
}
|
||||
|
||||
|
||||
@router.get('/pairlists', response_model=PairListResponse)
|
||||
@router.get('/pairlists', response_model=PairListsResponse)
|
||||
def list_pairlists(config=Depends(get_config)):
|
||||
from freqtrade.resolvers import PairListResolver
|
||||
pairlists = PairListResolver.search_all_objects(
|
||||
|
||||
Reference in New Issue
Block a user