From 4a8b304802e4b40b69399bc01810667c94577b61 Mon Sep 17 00:00:00 2001 From: Matthias Date: Tue, 2 Aug 2022 20:09:43 +0200 Subject: [PATCH] Add leverage to forceentry field --- src/components/ftbot/ForceEntryForm.vue | 20 ++++++++++++++++++++ src/types/types.ts | 1 + 2 files changed, 21 insertions(+) diff --git a/src/components/ftbot/ForceEntryForm.vue b/src/components/ftbot/ForceEntryForm.vue index ba677d3b..2b7b7276 100644 --- a/src/components/ftbot/ForceEntryForm.vue +++ b/src/components/ftbot/ForceEntryForm.vue @@ -58,6 +58,20 @@ @keydown.enter.native="handleEntry" > + + + (null); const stakeAmount = ref(null); + const leverage = ref(null); + const ordertype = ref(''); const orderSide = ref(OrderSides.long); @@ -122,6 +138,9 @@ export default defineComponent({ if (botStore.activeBot.botApiVersion >= 2.13 && botStore.activeBot.shortAllowed) { payload.side = orderSide.value; } + if (leverage.value) { + payload.leverage = leverage.value; + } botStore.activeBot.forceentry(payload); nextTick(() => { root?.proxy.$bvModal.hide('forceentry-modal'); @@ -159,6 +178,7 @@ export default defineComponent({ stakeAmount, ordertype, orderSide, + leverage, }; }, }); diff --git a/src/types/types.ts b/src/types/types.ts index f65df686..be4fe456 100644 --- a/src/types/types.ts +++ b/src/types/types.ts @@ -9,6 +9,7 @@ export interface ForceEnterPayload { price?: number; ordertype?: string; stakeamount?: number; + leverage?: number; } export interface ForceSellPayload {