mirror of
https://github.com/freqtrade/frequi.git
synced 2024-11-21 23:53:52 +00:00
Add detail view for margin trades
This commit is contained in:
parent
4aef20ca86
commit
4702a0d057
|
@ -5,9 +5,10 @@
|
|||
<h5 class="detail-header">General</h5>
|
||||
<ValuePair description="TradeId">{{ trade.trade_id }}</ValuePair>
|
||||
<ValuePair description="Pair">{{ trade.pair }}</ValuePair>
|
||||
<ValuePair description="Stake">{{
|
||||
formatPriceCurrency(trade.stake_amount, stakeCurrency)
|
||||
}}</ValuePair>
|
||||
<ValuePair description="Stake"
|
||||
>{{ formatPriceCurrency(trade.stake_amount, stakeCurrency) }}
|
||||
{{ trade.leverage ? `(${trade.leverage}x)` : '' }}</ValuePair
|
||||
>
|
||||
<ValuePair description="Open date">{{ timestampms(trade.open_timestamp) }}</ValuePair>
|
||||
<ValuePair v-if="trade.buy_tag" description="Buy tag">{{ trade.buy_tag }}</ValuePair>
|
||||
<ValuePair description="Open Rate">{{ formatPrice(trade.open_rate) }}</ValuePair>
|
||||
|
@ -53,6 +54,17 @@
|
|||
<ValuePair v-if="trade.stoploss_last_update_timestamp" description="Stoploss last updated">
|
||||
{{ timestampms(trade.stoploss_last_update_timestamp) }}
|
||||
</ValuePair>
|
||||
<div v-if="trade.trading_mode !== undefined && trade.trading_mode !== 'SPOT'">
|
||||
<h5 class="detail-header">Futures/Margin</h5>
|
||||
<ValuePair description="Short"> {{ trade.is_short ? 'short' : 'long' }} </ValuePair>
|
||||
<ValuePair description="Leverage"> {{ trade.leverage }} </ValuePair>
|
||||
<ValuePair v-if="trade.funding_fees !== undefined" description="Funding fees">
|
||||
{{ formatPrice(trade.funding_fees) }}
|
||||
</ValuePair>
|
||||
<ValuePair v-if="trade.interest_rate !== undefined" description="Interest rate">
|
||||
{{ formatPrice(trade.interest_rate) }}
|
||||
</ValuePair>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
@ -1,3 +1,9 @@
|
|||
export enum TradingMode {
|
||||
SPOT = 'SPOT',
|
||||
MARGIN = 'MARGIN',
|
||||
FUTURES = 'FUTURES',
|
||||
}
|
||||
|
||||
export interface Trade {
|
||||
/**
|
||||
* corresponds to the UI (ftbot.1) - does NOT relate to the backend!
|
||||
|
@ -64,6 +70,12 @@ export interface Trade {
|
|||
stoploss_current_dist_ratio?: number;
|
||||
stoploss_current_dist_pct?: number;
|
||||
open_order_id?: string;
|
||||
/** Short properties - only available in API versions 2.x and up */
|
||||
is_short?: boolean;
|
||||
leverage?: number;
|
||||
interest_rate?: number;
|
||||
funding_fees?: number;
|
||||
trading_mode?: string;
|
||||
}
|
||||
|
||||
export interface ClosedTrade extends Trade {
|
||||
|
|
Loading…
Reference in New Issue
Block a user