Update variable to better reflect it's content

This commit is contained in:
Matthias 2023-04-19 18:20:25 +02:00
parent caf524c685
commit f1e03a6873

View File

@ -303,11 +303,11 @@ def get_strategy(strategy: str, config=Depends(get_config)):
@router.get('/freqaimodels', response_model=FreqAIModelListResponse, tags=['freqai']) @router.get('/freqaimodels', response_model=FreqAIModelListResponse, tags=['freqai'])
def list_freqaimodels(config=Depends(get_config)): def list_freqaimodels(config=Depends(get_config)):
from freqtrade.resolvers.freqaimodel_resolver import FreqaiModelResolver from freqtrade.resolvers.freqaimodel_resolver import FreqaiModelResolver
strategies = FreqaiModelResolver.search_all_objects( models = FreqaiModelResolver.search_all_objects(
config, False) config, False)
strategies = sorted(strategies, key=lambda x: x['name']) models = sorted(models, key=lambda x: x['name'])
return {'freqaimodels': [x['name'] for x in strategies]} return {'freqaimodels': [x['name'] for x in models]}
@router.get('/available_pairs', response_model=AvailablePairs, tags=['candle data']) @router.get('/available_pairs', response_model=AvailablePairs, tags=['candle data'])