2021-12-25 10:21:00 +00:00
|
|
|
<template>
|
|
|
|
<div class="d-flex flex-column">
|
|
|
|
<b-button
|
|
|
|
v-if="botApiVersion <= 1.1"
|
2022-10-30 13:26:23 +00:00
|
|
|
class="btn-xs text-start"
|
2021-12-25 10:21:00 +00:00
|
|
|
size="sm"
|
2022-05-22 07:26:02 +00:00
|
|
|
title="Forceexit"
|
2022-08-03 04:57:17 +00:00
|
|
|
@click="$emit('forceExit', trade)"
|
2021-12-25 10:21:00 +00:00
|
|
|
>
|
2022-11-18 18:48:15 +00:00
|
|
|
<ForceSellIcon :size="16" title="Forceexit" class="me-1" />Forceexit
|
2021-12-25 10:21:00 +00:00
|
|
|
</b-button>
|
|
|
|
<b-button
|
|
|
|
v-if="botApiVersion > 1.1"
|
2022-10-30 13:26:23 +00:00
|
|
|
class="btn-xs text-start"
|
2021-12-25 10:21:00 +00:00
|
|
|
size="sm"
|
2022-05-22 07:26:02 +00:00
|
|
|
title="Forceexit limit"
|
2022-08-03 04:57:17 +00:00
|
|
|
@click="$emit('forceExit', trade, 'limit')"
|
2021-12-25 10:21:00 +00:00
|
|
|
>
|
2022-11-18 18:48:15 +00:00
|
|
|
<ForceSellIcon :size="16" title="Forceexit limit" class="me-1" />Forceexit limit
|
2021-12-25 10:21:00 +00:00
|
|
|
</b-button>
|
|
|
|
<b-button
|
|
|
|
v-if="botApiVersion > 1.1"
|
2022-10-30 13:26:23 +00:00
|
|
|
class="btn-xs text-start mt-1"
|
2021-12-25 10:21:00 +00:00
|
|
|
size="sm"
|
2022-05-22 07:26:02 +00:00
|
|
|
title="Forceexit market"
|
2022-08-03 04:57:17 +00:00
|
|
|
@click="$emit('forceExit', trade, 'market')"
|
2021-12-25 10:21:00 +00:00
|
|
|
>
|
2022-11-18 18:48:15 +00:00
|
|
|
<ForceSellIcon :size="16" title="Forceexit market" class="me-1" />Forceexit market
|
2021-12-25 10:21:00 +00:00
|
|
|
</b-button>
|
2022-08-03 18:09:45 +00:00
|
|
|
<b-button
|
|
|
|
v-if="botApiVersion > 2.16"
|
2022-10-30 13:26:23 +00:00
|
|
|
class="btn-xs text-start mt-1"
|
2022-08-03 18:09:45 +00:00
|
|
|
size="sm"
|
|
|
|
title="Forceexit partial"
|
|
|
|
@click="$emit('forceExitPartial', trade)"
|
|
|
|
>
|
2022-11-18 18:48:15 +00:00
|
|
|
<ForceSellIcon :size="16" title="Forceexit partial" class="me-1" />Forceexit partial
|
2022-08-03 18:09:45 +00:00
|
|
|
</b-button>
|
2021-12-25 10:21:00 +00:00
|
|
|
|
|
|
|
<b-button
|
2022-10-30 13:26:23 +00:00
|
|
|
class="btn-xs text-start mt-1"
|
2021-12-25 10:21:00 +00:00
|
|
|
size="sm"
|
|
|
|
title="Delete trade"
|
|
|
|
@click="$emit('deleteTrade', trade)"
|
|
|
|
>
|
2022-11-18 18:48:15 +00:00
|
|
|
<DeleteIcon :size="16" title="Delete trade" class="me-1" />
|
2021-12-25 10:21:00 +00:00
|
|
|
Delete
|
|
|
|
</b-button>
|
|
|
|
</div>
|
|
|
|
</template>
|
|
|
|
|
2023-01-30 19:07:17 +00:00
|
|
|
<script setup lang="ts">
|
2021-12-25 10:21:00 +00:00
|
|
|
import { Trade } from '@/types';
|
|
|
|
import DeleteIcon from 'vue-material-design-icons/Delete.vue';
|
|
|
|
import ForceSellIcon from 'vue-material-design-icons/CloseBoxMultiple.vue';
|
|
|
|
|
2023-01-30 19:07:17 +00:00
|
|
|
defineProps({
|
|
|
|
botApiVersion: {
|
|
|
|
type: Number,
|
|
|
|
default: 1.0,
|
2021-12-25 10:21:00 +00:00
|
|
|
},
|
2023-01-30 19:07:17 +00:00
|
|
|
trade: {
|
|
|
|
type: Object as () => Trade,
|
|
|
|
required: true,
|
2021-12-25 10:21:00 +00:00
|
|
|
},
|
|
|
|
});
|
2023-01-30 19:07:17 +00:00
|
|
|
defineEmits(['forceExit', 'forceExitPartial', 'deleteTrade']);
|
2021-12-25 10:21:00 +00:00
|
|
|
</script>
|
|
|
|
|
|
|
|
<style scoped lang="scss"></style>
|