Extract pair/candle type from types.ts

This commit is contained in:
Matthias 2024-04-28 13:37:42 +02:00
parent 658271ea91
commit 6dc6bc0661
3 changed files with 69 additions and 65 deletions

67
src/types/candleTypes.ts Normal file
View File

@ -0,0 +1,67 @@
export interface AvailablePairPayload {
timeframe?: string;
stake_currency?: string;
}
export type PairIntervalTuple = [string, string, string];
export interface AvailablePairResult {
pairs: string[];
/**
* List of lists, as [pair, timeframe, candletype]
*/
pair_interval: PairIntervalTuple[];
length: number;
}
export interface PairCandlePayload {
pair: string;
timeframe: string;
limit?: number;
columns?: string[];
}
export interface PairHistoryPayload {
pair: string;
timeframe: string;
timerange: string;
strategy: string;
freqaimodel?: string;
}
export interface PairHistory {
strategy: string;
pair: string;
timeframe: string;
timeframe_ms: number;
columns: string[];
/** All columns - available starting with api 2.35
* Contains all columns - columns may be filtered to the ones available.
*/
all_columns?: string[];
data: number[][];
length: number;
/** Number of buy signals in this response */
buy_signals: number;
/** Number of sell signals in this response */
sell_signals: number;
/** Number of long entry signals in this response */
enter_long_signals?: number;
/** Number of long exit signals in this response */
exit_long_signals?: number;
/** Number of short entry signals in this response */
enter_short_signals?: number;
/** Number of short exit signals in this response */
exit_short_signals?: number;
last_analyzed: number;
/** Data start date in as millisecond timestamp */
data_start_ts: number;
/** Data start date in in the format YYYY-MM-DD HH24:MI:SS+00:00 */
data_start: string;
/** End date in in the format YYYY-MM-DD HH24:MI:SS+00:00 */
data_stop: string;
/** Data end date in as millisecond timestamp */
data_stop_ts: number;
}

View File

@ -4,6 +4,7 @@ export * from './backtest';
export * from './balance';
export * from './blacklist';
export * from './botComparison';
export * from './candleTypes';
export * from './chart';
export * from './daily';
export * from './exchange';
@ -12,6 +13,6 @@ export * from './locks';
export * from './pairlists';
export * from './plot';
export * from './profit';
export * from './tradeStats';
export * from './trades';
export * from './tradeStats';
export * from './types';

View File

@ -189,70 +189,6 @@ export interface FreqAIModelListResult {
freqaimodels: string[];
}
export interface AvailablePairPayload {
timeframe?: string;
stake_currency?: string;
}
export type PairIntervalTuple = [string, string, string];
export interface AvailablePairResult {
pairs: string[];
/**
* List of lists, as [pair, timeframe, candletype]
*/
pair_interval: PairIntervalTuple[];
length: number;
}
export interface PairCandlePayload {
pair: string;
timeframe: string;
limit?: number;
columns?: string[];
}
export interface PairHistoryPayload {
pair: string;
timeframe: string;
timerange: string;
strategy: string;
freqaimodel?: string;
}
export interface PairHistory {
strategy: string;
pair: string;
timeframe: string;
timeframe_ms: number;
columns: string[];
data: number[][];
length: number;
/** Number of buy signals in this response */
buy_signals: number;
/** Number of sell signals in this response */
sell_signals: number;
/** Number of long entry signals in this response */
enter_long_signals?: number;
/** Number of long exit signals in this response */
exit_long_signals?: number;
/** Number of short entry signals in this response */
enter_short_signals?: number;
/** Number of short exit signals in this response */
exit_short_signals?: number;
last_analyzed: number;
/** Data start date in as millisecond timestamp */
data_start_ts: number;
/** Data start date in in the format YYYY-MM-DD HH24:MI:SS+00:00 */
data_start: string;
/** End date in in the format YYYY-MM-DD HH24:MI:SS+00:00 */
data_stop: string;
/** Data end date in as millisecond timestamp */
data_stop_ts: number;
}
export interface SysInfoResponse {
cpu_pct: number[];
ram_pct: number;