diff --git a/src/components/ftbot/TradeDetail.vue b/src/components/ftbot/TradeDetail.vue index bd933c8b..babfe89a 100644 --- a/src/components/ftbot/TradeDetail.vue +++ b/src/components/ftbot/TradeDetail.vue @@ -80,6 +80,17 @@ {{ formatPrice(trade.interest_rate) }} +
+ Orders +
+ + (#{{ key + 1 }}) + {{ order.ft_order_side }} for + {{ formatPrice(order.safe_price) }} | {{ order.remaining }} / + {{ order.filled }} +
+
@@ -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; diff --git a/src/types/trades.ts b/src/types/trades.ts index 1e67e942..6b2477cc 100644 --- a/src/types/trades.ts +++ b/src/types/trades.ts @@ -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 {