Simplify Futures detail page

This commit is contained in:
Matthias 2022-02-27 15:18:23 +01:00
parent bc1728394b
commit 27fe412a17
2 changed files with 9 additions and 3 deletions

View File

@ -70,8 +70,9 @@
</ValuePair> </ValuePair>
<div v-if="trade.trading_mode !== undefined && trade.trading_mode !== 'SPOT'"> <div v-if="trade.trading_mode !== undefined && trade.trading_mode !== 'SPOT'">
<h5 class="detail-header">Futures/Margin</h5> <h5 class="detail-header">Futures/Margin</h5>
<ValuePair description="Short"> {{ trade.is_short ? 'short' : 'long' }} </ValuePair> <ValuePair description="Direction">
<ValuePair description="Leverage"> {{ trade.leverage }} </ValuePair> {{ trade.is_short ? 'short' : 'long' }} - {{ trade.leverage }}x
</ValuePair>
<ValuePair v-if="trade.funding_fees !== undefined" description="Funding fees"> <ValuePair v-if="trade.funding_fees !== undefined" description="Funding fees">
{{ formatPrice(trade.funding_fees) }} {{ formatPrice(trade.funding_fees) }}
</ValuePair> </ValuePair>

View File

@ -1,11 +1,16 @@
export interface BalanceRecords { export interface BalanceRecords {
[key: string]: string | number; [key: string]: string | number | boolean | undefined;
balance: number; balance: number;
currency: string; currency: string;
est_stake: number; est_stake: number;
free: number; free: number;
used: number; used: number;
stake: string; stake: string;
// Properties added in v 2.x
side?: string;
leverage?: number;
is_position: boolean;
position?: number;
} }
export interface BalanceInterface { export interface BalanceInterface {