Add botState type

This commit is contained in:
Matthias 2020-07-13 21:05:43 +02:00
parent 61d6f54577
commit 6de14c33f5
2 changed files with 32 additions and 1 deletions

View File

@ -1,4 +1,5 @@
import { api } from '../../shared/apiService';
import { BotState } from '../types';
export default {
namespaced: true,
@ -56,7 +57,7 @@ export default {
updateBalance(state, balance) {
state.balance = balance;
},
updateState(state, botState) {
updateState(state, botState: BotState) {
state.botState = botState;
},
updateVersion(state, version) {

View File

@ -2,6 +2,30 @@ export interface DailyInterface {
timescale: number;
}
export interface BotState {
bid_strategy: object;
ask_strategy: object;
dry_run: boolean;
exchange: string;
forcebuy_enabled: boolean;
max_open_trades: number;
minimal_roi: object;
stake_amount: number;
stake_currency: string;
state: string;
stoploss: number;
strategy: string;
/** Timeframe in readable form (e.g. 5m) */
timeframe: string;
/** Timeframe in Milliseconds */
timeframe_ms: number;
trailing_only_offset_is_reached: boolean;
trailing_stop: boolean;
trailing_stop_positive: number;
trailing_stop_positive_offset: number;
}
export interface Trade {
trade_id: number;
pair: string;
@ -9,10 +33,16 @@ export interface Trade {
amount: number;
timeframe: string;
open_rate: number;
/** Open date in the format Y-M-d HH:mm:ss */
open_date: string;
open_timestamp: number;
fee_open: number;
fee_open_cost?: number;
fee_open_currency?: string;
/** Close date in the format Y-M-d HH:mm:ss */
close_date?: string;
close_timestamp?: number;
close_rate?: number;
close_profit?: number;
fee_close?: number;