mirror of
https://github.com/freqtrade/frequi.git
synced 2024-11-10 18:23:50 +00:00
Show Orders in trade detail if possible
This commit is contained in:
parent
b406fe14d4
commit
8d9ff616bb
|
@ -80,6 +80,17 @@
|
|||
{{ formatPrice(trade.interest_rate) }}
|
||||
</ValuePair>
|
||||
</div>
|
||||
<details v-if="trade.orders">
|
||||
<summary>Orders</summary>
|
||||
<div v-for="(order, key) in trade.orders" :key="key">
|
||||
<span>
|
||||
(#{{ key + 1 }}) <DateTimeTZ :date="order.order_timestamp" show-timezone />
|
||||
<b class="ml-1">{{ order.ft_order_side }}</b> for
|
||||
<b>{{ formatPrice(order.safe_price) }}</b> | {{ order.remaining }} /
|
||||
{{ order.filled }}</span
|
||||
>
|
||||
</div>
|
||||
</details>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -90,10 +101,11 @@ import { Component, Vue, Prop } from 'vue-property-decorator';
|
|||
import { formatPercent, formatPriceCurrency, formatPrice, timestampms } from '@/shared/formatters';
|
||||
import ValuePair from '@/components/general/ValuePair.vue';
|
||||
import TradeProfit from '@/components/ftbot/TradeProfit.vue';
|
||||
import DateTimeTZ from '@/components/general/DateTimeTZ.vue';
|
||||
import { Trade } from '@/types';
|
||||
|
||||
@Component({
|
||||
components: { ValuePair, TradeProfit },
|
||||
components: { ValuePair, TradeProfit, DateTimeTZ },
|
||||
})
|
||||
export default class TradeDetail extends Vue {
|
||||
@Prop({ type: Object, required: true }) trade!: Trade;
|
||||
|
|
|
@ -4,6 +4,22 @@ export enum TradingMode {
|
|||
FUTURES = 'FUTURES',
|
||||
}
|
||||
|
||||
export interface Order {
|
||||
pair: string;
|
||||
order_id: string;
|
||||
status: string;
|
||||
remaining: number;
|
||||
amount: number;
|
||||
safe_price: number;
|
||||
cost: number;
|
||||
filled: number;
|
||||
ft_order_side: string;
|
||||
order_type: string;
|
||||
is_open: boolean;
|
||||
order_timestamp?: number;
|
||||
order_filled_timestamp?: number;
|
||||
}
|
||||
|
||||
export interface Trade {
|
||||
/**
|
||||
* corresponds to the UI (ftbot.1) - does NOT relate to the backend!
|
||||
|
@ -76,6 +92,7 @@ export interface Trade {
|
|||
interest_rate?: number;
|
||||
funding_fees?: number;
|
||||
trading_mode?: string;
|
||||
orders?: Order[];
|
||||
}
|
||||
|
||||
export interface ClosedTrade extends Trade {
|
||||
|
|
Loading…
Reference in New Issue
Block a user