Add support for has_open_orders

This commit is contained in:
Matthias 2023-09-10 16:56:42 +02:00
parent 943bafacfe
commit f4766c41e0
3 changed files with 5 additions and 6 deletions

View File

@ -37,7 +37,7 @@
<i-mdi-close-box-multiple class="me-1" />Forceexit partial
</b-button>
<b-button
v-if="botApiVersion >= 2.24 && trade.open_order_id"
v-if="botApiVersion >= 2.24 && (trade.open_order_id || trade.has_open_orders)"
class="btn-xs text-start mt-1"
size="sm"
title="Cancel open orders"

View File

@ -40,11 +40,7 @@
</template>
<template #cell(pair)="row">
<span>
{{
`${row.item.pair}${
row.item.open_order_id === undefined || row.item.open_order_id === null ? '' : '*'
}`
}}
{{ `${row.item.pair}${row.item.open_order_id || row.item.has_open_orders ? '*' : ''}` }}
</span>
</template>
<template #cell(trade_id)="row">

View File

@ -92,7 +92,10 @@ interface TradeBase {
initial_stop_loss_ratio?: number;
initial_stop_loss_pct?: number;
/** deprecated, to be replaced with "has_open_orders" */
open_order_id?: string;
/** Added only recently, replaces open_order_id */
has_open_orders?: boolean;
/** Short properties - only available in API versions 2.x and up */
is_short?: boolean;
leverage?: number;