Improve pairlist from bot behavior for chart mode

This commit is contained in:
Matthias 2023-12-17 15:39:53 +01:00
parent dfe662b4fe
commit 39eedd4121
2 changed files with 7 additions and 2 deletions

View File

@ -51,6 +51,7 @@ import {
MixTagStats,
ExitStats,
EntryStats,
PairIntervalTuple,
} from '@/types';
import axios, { AxiosResponse } from 'axios';
import { defineStore } from 'pinia';
@ -109,6 +110,7 @@ export function createBotSubStore(botId: string, botName: string) {
exchangeList: [] as Exchange[],
strategy: {} as StrategyResult,
pairlist: [] as string[],
pairlistWithTimeframe: [] as PairIntervalTuple[],
currentLocks: undefined as LockResponse | undefined,
// backtesting
backtestRunning: false,
@ -484,6 +486,7 @@ export function createBotSubStore(botId: string, botName: string) {
});
// result is of type AvailablePairResult
this.pairlist = data.pairs;
this.pairlistWithTimeframe = data.pair_interval;
return Promise.resolve(data);
} catch (error) {
console.error(error);

View File

@ -186,12 +186,14 @@ export interface AvailablePairPayload {
stake_currency?: string;
}
export type PairIntervalTuple = [string, string, string];
export interface AvailablePairResult {
pairs: string[];
/**
* List of lists, as [pair, timeframe]
* List of lists, as [pair, timeframe, candletype]
*/
pair_interval: Array<Array<string>>;
pair_interval: PairIntervalTuple[];
length: number;
}