diff --git a/src/components/ftbot/DownloadDataMain.vue b/src/components/ftbot/DownloadDataMain.vue new file mode 100644 index 00000000..af9654f3 --- /dev/null +++ b/src/components/ftbot/DownloadDataMain.vue @@ -0,0 +1,82 @@ + + + + + Download Data + + + + Select Pairs + + + + + + + + + Select timeframes + + + + + + + + + + Custom Exchange + + + + Start Download + + + + diff --git a/src/stores/ftbot.ts b/src/stores/ftbot.ts index 74bc728d..be3c55e9 100644 --- a/src/stores/ftbot.ts +++ b/src/stores/ftbot.ts @@ -54,6 +54,7 @@ import { PairHistory, HyperoptLossListResponse, HyperoptLossObj, + DownloadDataPayload, } from '@/types'; import axios, { AxiosResponse } from 'axios'; import { useWebSocket } from '@vueuse/core'; @@ -704,6 +705,18 @@ export function createBotSubStore(botId: string, botName: string) { return Promise.reject(error); } }, + async startDataDownload(payload: DownloadDataPayload) { + try { + const { data } = await api.post>( + '/download_data', + payload, + ); + return Promise.resolve(data); + } catch (error) { + console.error(error); + return Promise.reject(error); + } + }, // // Post methods // // TODO: Migrate calls to API to a seperate module unrelated to pinia? async startBot() {