mirror of
https://github.com/freqtrade/frequi.git
synced 2024-11-26 04:55:15 +00:00
Add some types to vuex actions
This commit is contained in:
parent
3fdd4c0323
commit
222d9e9c40
|
@ -49,6 +49,7 @@
|
|||
"sass-loader": "^10.0.2",
|
||||
"typescript": "~4.0.2",
|
||||
"vue-cli-plugin-bootstrap-vue": "~0.6.0",
|
||||
"vue-template-compiler": "^2.6.12"
|
||||
"vue-template-compiler": "^2.6.12",
|
||||
"vuex-class": "^0.3.2"
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,5 +1,13 @@
|
|||
import { api } from '@/shared/apiService';
|
||||
import { BotState, BlacklistPayload, ForcebuyPayload, Logs, DailyPayload, Trade } from '@/types';
|
||||
import {
|
||||
BotState,
|
||||
BlacklistPayload,
|
||||
ForcebuyPayload,
|
||||
Logs,
|
||||
DailyPayload,
|
||||
Trade,
|
||||
PairHistoryPayload,
|
||||
} from '@/types';
|
||||
|
||||
import { showAlert } from './alerts';
|
||||
|
||||
|
@ -113,7 +121,7 @@ export default {
|
|||
.then((result) => commit('updateOpenTrades', result.data))
|
||||
.catch(console.error);
|
||||
},
|
||||
getPairHistory({ commit }, payload) {
|
||||
getPairHistory({ commit }, payload: PairHistoryPayload) {
|
||||
if (payload.pair && payload.timeframe && payload.limit) {
|
||||
return api
|
||||
.get('/pair_history', {
|
||||
|
|
|
@ -137,3 +137,9 @@ export interface ClosedTrade extends Trade {
|
|||
initial_stop_loss_pct?: number;
|
||||
open_order_id?: string;
|
||||
}
|
||||
|
||||
export interface PairHistoryPayload {
|
||||
pair: string;
|
||||
timeframe: string;
|
||||
limit: number;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user