mirror of
https://github.com/freqtrade/frequi.git
synced 2024-11-24 20:15:15 +00:00
feat: add hyperopt-loss list endpoint
Some checks failed
Some checks failed
This commit is contained in:
parent
31468f7716
commit
e4811a97b0
|
@ -52,6 +52,8 @@ import {
|
|||
EntryStats,
|
||||
PairIntervalTuple,
|
||||
PairHistory,
|
||||
HyperoptLossListResponse,
|
||||
HyperoptLossObj,
|
||||
} from '@/types';
|
||||
import axios, { AxiosResponse } from 'axios';
|
||||
import { useWebSocket } from '@vueuse/core';
|
||||
|
@ -106,6 +108,7 @@ export function createBotSubStore(botId: string, botName: string) {
|
|||
strategyPlotConfig: undefined as PlotConfig | undefined,
|
||||
strategyList: [] as string[],
|
||||
freqaiModelList: [] as string[],
|
||||
hyperoptLossList: [] as HyperoptLossObj[],
|
||||
exchangeList: [] as Exchange[],
|
||||
strategy: {} as StrategyResult,
|
||||
pairlist: [] as string[],
|
||||
|
@ -504,6 +507,17 @@ export function createBotSubStore(botId: string, botName: string) {
|
|||
return Promise.reject(error);
|
||||
}
|
||||
},
|
||||
async getHyperoptLossList() {
|
||||
try {
|
||||
// Only available starting with 2.40
|
||||
const { data } = await api.get<HyperoptLossListResponse>('/hyperopt-loss');
|
||||
this.hyperoptLossList = data.loss_functions;
|
||||
return Promise.resolve(data);
|
||||
} catch (error) {
|
||||
console.error(error);
|
||||
return Promise.reject(error);
|
||||
}
|
||||
},
|
||||
async getExchangeList() {
|
||||
try {
|
||||
const { data } = await api.get<ExchangeListResult>('/exchanges');
|
||||
|
|
|
@ -189,6 +189,15 @@ export interface FreqAIModelListResult {
|
|||
freqaimodels: string[];
|
||||
}
|
||||
|
||||
export interface HyperoptLossObj {
|
||||
name: string;
|
||||
description: string;
|
||||
}
|
||||
|
||||
export interface HyperoptLossListResponse {
|
||||
loss_functions: HyperoptLossObj[];
|
||||
}
|
||||
|
||||
export interface SysInfoResponse {
|
||||
cpu_pct: number[];
|
||||
ram_pct: number;
|
||||
|
|
Loading…
Reference in New Issue
Block a user