mirror of
https://github.com/freqtrade/frequi.git
synced 2024-11-11 02:33:51 +00:00
Add lock fetching
This commit is contained in:
parent
4e33186ad5
commit
11f967aa05
|
@ -17,6 +17,7 @@ import {
|
||||||
StrategyResult,
|
StrategyResult,
|
||||||
BalanceInterface,
|
BalanceInterface,
|
||||||
DailyReturnValue,
|
DailyReturnValue,
|
||||||
|
LockResponse,
|
||||||
} from '@/types';
|
} from '@/types';
|
||||||
|
|
||||||
import {
|
import {
|
||||||
|
@ -63,6 +64,7 @@ export default {
|
||||||
strategyList: [],
|
strategyList: [],
|
||||||
strategy: {},
|
strategy: {},
|
||||||
pairlist: [],
|
pairlist: [],
|
||||||
|
currentLocks: [],
|
||||||
},
|
},
|
||||||
getters: {
|
getters: {
|
||||||
[BotStoreGetters.plotConfig](state) {
|
[BotStoreGetters.plotConfig](state) {
|
||||||
|
@ -99,6 +101,9 @@ export default {
|
||||||
updateOpenTrades(state, trades) {
|
updateOpenTrades(state, trades) {
|
||||||
state.openTrades = trades;
|
state.openTrades = trades;
|
||||||
},
|
},
|
||||||
|
updateLocks(state, locks: LockResponse) {
|
||||||
|
state.locks = locks;
|
||||||
|
},
|
||||||
updatePerformance(state, performance) {
|
updatePerformance(state, performance) {
|
||||||
state.performanceStats = performance;
|
state.performanceStats = performance;
|
||||||
},
|
},
|
||||||
|
@ -181,6 +186,12 @@ export default {
|
||||||
.then((result) => commit('updateTrades', result.data))
|
.then((result) => commit('updateTrades', result.data))
|
||||||
.catch(console.error);
|
.catch(console.error);
|
||||||
},
|
},
|
||||||
|
getLocks({ commit }) {
|
||||||
|
return api
|
||||||
|
.get('/locks')
|
||||||
|
.then((result) => commit('updateLocks', result.data))
|
||||||
|
.catch(console.error);
|
||||||
|
},
|
||||||
getOpenTrades({ commit }) {
|
getOpenTrades({ commit }) {
|
||||||
return api
|
return api
|
||||||
.get('/status')
|
.get('/status')
|
||||||
|
|
|
@ -65,3 +65,23 @@ export interface ClosedTrade extends Trade {
|
||||||
min_rate: number;
|
min_rate: number;
|
||||||
max_rate: number;
|
max_rate: number;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export interface Lock {
|
||||||
|
pair: string;
|
||||||
|
/** Lock insertion time in the format Y-M-d HH:mm:ss */
|
||||||
|
lock_time: string;
|
||||||
|
/** Time of lock insertion */
|
||||||
|
lock_timestamp: number;
|
||||||
|
|
||||||
|
/** Lock end time in the format Y-M-d HH:mm:ss */
|
||||||
|
lock_end_time: string;
|
||||||
|
/** Time of lock end - will be rounded up to the next candle */
|
||||||
|
lock_end_timestamp: number;
|
||||||
|
reason: string;
|
||||||
|
active: boolean;
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface LockResponse {
|
||||||
|
lock_count: number;
|
||||||
|
locks: Lock[];
|
||||||
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user