mirror of
https://github.com/freqtrade/frequi.git
synced 2024-11-21 23:53:52 +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,
|
EntryStats,
|
||||||
PairIntervalTuple,
|
PairIntervalTuple,
|
||||||
PairHistory,
|
PairHistory,
|
||||||
|
HyperoptLossListResponse,
|
||||||
|
HyperoptLossObj,
|
||||||
} from '@/types';
|
} from '@/types';
|
||||||
import axios, { AxiosResponse } from 'axios';
|
import axios, { AxiosResponse } from 'axios';
|
||||||
import { useWebSocket } from '@vueuse/core';
|
import { useWebSocket } from '@vueuse/core';
|
||||||
|
@ -106,6 +108,7 @@ export function createBotSubStore(botId: string, botName: string) {
|
||||||
strategyPlotConfig: undefined as PlotConfig | undefined,
|
strategyPlotConfig: undefined as PlotConfig | undefined,
|
||||||
strategyList: [] as string[],
|
strategyList: [] as string[],
|
||||||
freqaiModelList: [] as string[],
|
freqaiModelList: [] as string[],
|
||||||
|
hyperoptLossList: [] as HyperoptLossObj[],
|
||||||
exchangeList: [] as Exchange[],
|
exchangeList: [] as Exchange[],
|
||||||
strategy: {} as StrategyResult,
|
strategy: {} as StrategyResult,
|
||||||
pairlist: [] as string[],
|
pairlist: [] as string[],
|
||||||
|
@ -504,6 +507,17 @@ export function createBotSubStore(botId: string, botName: string) {
|
||||||
return Promise.reject(error);
|
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() {
|
async getExchangeList() {
|
||||||
try {
|
try {
|
||||||
const { data } = await api.get<ExchangeListResult>('/exchanges');
|
const { data } = await api.get<ExchangeListResult>('/exchanges');
|
||||||
|
|
|
@ -189,6 +189,15 @@ export interface FreqAIModelListResult {
|
||||||
freqaimodels: string[];
|
freqaimodels: string[];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export interface HyperoptLossObj {
|
||||||
|
name: string;
|
||||||
|
description: string;
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface HyperoptLossListResponse {
|
||||||
|
loss_functions: HyperoptLossObj[];
|
||||||
|
}
|
||||||
|
|
||||||
export interface SysInfoResponse {
|
export interface SysInfoResponse {
|
||||||
cpu_pct: number[];
|
cpu_pct: number[];
|
||||||
ram_pct: number;
|
ram_pct: number;
|
||||||
|
|
Loading…
Reference in New Issue
Block a user