2020-05-17 21:41:38 +00:00
|
|
|
<template>
|
2020-05-21 17:48:53 +00:00
|
|
|
<div class="container-fluid h-100">
|
2020-05-17 21:41:38 +00:00
|
|
|
<div class="row">
|
|
|
|
<div class="row col-md-4">
|
|
|
|
<div class="col-md-12">
|
|
|
|
<div class="row">
|
|
|
|
<div class="col-md-12">
|
2020-06-12 17:40:18 +00:00
|
|
|
<ReloadControl />
|
2020-05-17 21:41:38 +00:00
|
|
|
<BotControls class="mt-3" />
|
|
|
|
</div>
|
|
|
|
<div class="col-md-12">
|
|
|
|
<b-tabs content-class="mt-3" class="mt-3">
|
|
|
|
<b-tab title="Status" active>
|
|
|
|
<BotStatus />
|
|
|
|
</b-tab>
|
|
|
|
<b-tab title="Performance">
|
|
|
|
<Performance class="performance-view" />
|
|
|
|
</b-tab>
|
2020-05-18 15:41:58 +00:00
|
|
|
<b-tab title="Balance" lazy>
|
2020-05-17 21:41:38 +00:00
|
|
|
<Balance />
|
|
|
|
</b-tab>
|
2020-05-18 15:41:58 +00:00
|
|
|
<b-tab title="Daily Stats" lazy>
|
|
|
|
<DailyStats />
|
|
|
|
</b-tab>
|
|
|
|
|
2020-07-19 13:35:10 +00:00
|
|
|
<b-tab title="Pairlist" lazy>
|
2020-05-22 12:43:32 +00:00
|
|
|
<FTBotAPIPairList />
|
|
|
|
</b-tab>
|
2020-05-17 21:41:38 +00:00
|
|
|
</b-tabs>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div class="col-md-8">
|
|
|
|
<div class="row">
|
|
|
|
<div class="col-md-12">
|
|
|
|
<TradeList
|
|
|
|
class="open-trades"
|
|
|
|
:trades="openTrades"
|
|
|
|
title="Open trades"
|
|
|
|
v-bind:activeTrades="true"
|
2020-05-27 18:24:57 +00:00
|
|
|
emptyText="Currently no open trades."
|
2020-05-17 21:41:38 +00:00
|
|
|
/>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div class="row">
|
|
|
|
<div class="col-md-12">
|
2020-05-27 18:24:57 +00:00
|
|
|
<TradeList
|
|
|
|
class="trade-history"
|
2020-07-17 14:42:28 +00:00
|
|
|
:trades="closedTrades"
|
2020-05-27 18:24:57 +00:00
|
|
|
title="Trade history"
|
|
|
|
emptyText="No closed trades so far."
|
2020-06-04 17:56:19 +00:00
|
|
|
v-if="!detailTradeId"
|
2020-05-27 18:24:57 +00:00
|
|
|
/>
|
2020-06-04 17:56:19 +00:00
|
|
|
<TradeDetail v-if="detailTradeId" :trade="openTradeDetail"></TradeDetail>
|
2020-05-17 21:41:38 +00:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
2020-08-15 15:31:56 +00:00
|
|
|
<div class="row">
|
|
|
|
<LogViewer />
|
|
|
|
</div>
|
2020-05-17 21:41:38 +00:00
|
|
|
</div>
|
|
|
|
</template>
|
|
|
|
|
2020-06-20 15:46:08 +00:00
|
|
|
<script lang="ts">
|
|
|
|
import { Component, Vue } from 'vue-property-decorator';
|
2020-06-29 19:14:16 +00:00
|
|
|
import { namespace } from 'vuex-class';
|
2020-05-17 21:41:38 +00:00
|
|
|
|
2020-05-18 15:41:58 +00:00
|
|
|
import TradeList from '@/components/ftbot/TradeList.vue';
|
|
|
|
import Performance from '@/components/ftbot/Performance.vue';
|
|
|
|
import BotControls from '@/components/ftbot/BotControls.vue';
|
|
|
|
import BotStatus from '@/components/ftbot/BotStatus.vue';
|
|
|
|
import Balance from '@/components/ftbot/Balance.vue';
|
|
|
|
import DailyStats from '@/components/ftbot/DailyStats.vue';
|
2020-05-22 12:43:32 +00:00
|
|
|
import FTBotAPIPairList from '@/components/ftbot/FTBotAPIPairList.vue';
|
2020-06-04 17:56:19 +00:00
|
|
|
import TradeDetail from '@/components/ftbot/TradeDetail.vue';
|
2020-06-12 17:40:18 +00:00
|
|
|
import ReloadControl from '@/components/ftbot/ReloadControl.vue';
|
2020-08-15 15:31:56 +00:00
|
|
|
import LogViewer from '@/components/ftbot/LogViewer.vue';
|
2020-06-29 18:43:54 +00:00
|
|
|
|
2020-07-19 13:45:44 +00:00
|
|
|
import { Trade } from '@/store/types';
|
2020-08-29 09:13:26 +00:00
|
|
|
import { UserStoreGetters } from '@/store/modules/ftbot';
|
2020-06-29 18:43:54 +00:00
|
|
|
|
|
|
|
const ftbot = namespace('ftbot');
|
2020-05-17 21:41:38 +00:00
|
|
|
|
2020-06-20 15:46:08 +00:00
|
|
|
@Component({
|
2020-05-18 18:49:30 +00:00
|
|
|
components: {
|
|
|
|
TradeList,
|
|
|
|
Performance,
|
|
|
|
BotControls,
|
|
|
|
BotStatus,
|
|
|
|
Balance,
|
|
|
|
DailyStats,
|
2020-05-22 12:43:32 +00:00
|
|
|
FTBotAPIPairList,
|
2020-06-04 17:56:19 +00:00
|
|
|
TradeDetail,
|
2020-06-12 17:40:18 +00:00
|
|
|
ReloadControl,
|
2020-08-15 15:31:56 +00:00
|
|
|
LogViewer,
|
2020-05-18 18:49:30 +00:00
|
|
|
},
|
2020-06-20 15:46:08 +00:00
|
|
|
})
|
2020-06-29 18:43:54 +00:00
|
|
|
export default class Trading extends Vue {
|
|
|
|
@ftbot.State detailTradeId!: string;
|
|
|
|
|
2020-08-29 09:13:26 +00:00
|
|
|
@ftbot.Getter openTrades!: Array<Trade>;
|
2020-06-29 18:43:54 +00:00
|
|
|
|
2020-08-29 09:13:26 +00:00
|
|
|
@ftbot.Getter closedTrades!: Array<Trade>;
|
2020-06-29 18:43:54 +00:00
|
|
|
|
2020-08-29 09:13:26 +00:00
|
|
|
@ftbot.Getter [UserStoreGetters.openTradeDetail]!: Trade;
|
2020-06-29 18:43:54 +00:00
|
|
|
}
|
2020-05-17 21:41:38 +00:00
|
|
|
</script>
|
|
|
|
|
|
|
|
<style scoped>
|
|
|
|
.open-trades {
|
|
|
|
min-height: 250px;
|
2020-05-21 17:48:53 +00:00
|
|
|
max-height: 300px;
|
2020-05-17 21:41:38 +00:00
|
|
|
}
|
|
|
|
.trade-history {
|
|
|
|
min-height: 300px;
|
|
|
|
max-height: 500px;
|
|
|
|
}
|
|
|
|
</style>
|