2020-05-17 18:43:19 +00:00
|
|
|
<template>
|
2020-05-22 18:04:27 +00:00
|
|
|
<div>
|
|
|
|
<div class="mb-2">
|
|
|
|
<label class="mr-auto h3">Daily Stats</label>
|
2020-07-02 18:05:20 +00:00
|
|
|
<b-button class="float-right" size="sm" @click="getDaily">↻</b-button>
|
2020-05-17 18:52:14 +00:00
|
|
|
</div>
|
2020-05-22 18:04:27 +00:00
|
|
|
<div>
|
2020-06-04 18:06:58 +00:00
|
|
|
<b-table class="table-sm" :items="dailyStats.data" :fields="dailyFields"> </b-table>
|
2020-05-17 18:52:14 +00:00
|
|
|
</div>
|
2020-05-17 18:43:19 +00:00
|
|
|
</div>
|
|
|
|
</template>
|
|
|
|
|
|
|
|
<script>
|
|
|
|
import { mapActions, mapState } from 'vuex';
|
|
|
|
|
|
|
|
export default {
|
|
|
|
name: 'DailyStats',
|
|
|
|
computed: {
|
|
|
|
...mapState('ftbot', ['dailyStats']),
|
2020-06-04 18:06:58 +00:00
|
|
|
dailyFields() {
|
2020-05-17 18:43:19 +00:00
|
|
|
return [
|
|
|
|
{ key: 'date', label: 'Day' },
|
|
|
|
{ key: 'abs_profit', label: 'Profit' },
|
|
|
|
{ key: 'fiat_value', label: `In ${this.dailyStats.fiat_display_currency}` },
|
|
|
|
{ key: 'trade_count', label: 'Trades' },
|
|
|
|
];
|
|
|
|
},
|
|
|
|
},
|
|
|
|
methods: {
|
|
|
|
...mapActions('ftbot', ['getDaily']),
|
|
|
|
},
|
|
|
|
mounted() {
|
|
|
|
this.getDaily();
|
|
|
|
},
|
|
|
|
};
|
|
|
|
</script>
|