@extends('layouts.app') @section('title', 'Trades') @section('content') @include('partials.admin-nav') @php use App\Support\Money; @endphp
@foreach(['open', 'closed', 'all'] as $s){{ ucfirst($s) }}@endforeach
@foreach($trades as $t) @endforeach
#UserPositionEntryExitMarginNet P&L
{{ $t->id }}{{ $t->user->email }} {{ strtoupper($t->side->value) }} {{ Money::fmt((string) $t->quantity, 4) }} {{ $t->instrument->symbol }} {{ $t->leverage }}x {{ Money::fmt((string) $t->entry_price) }}{{ $t->exit_price ? Money::fmt((string) $t->exit_price) : '—' }} {{ Money::fmt((string) $t->margin) }} @if($t->status->value === 'closed'){{ Money::fmt($t->netPnl()) }}
{{ $t->close_reason?->label() }}
@else — @endif
@if($t->status->value === 'open')
@csrf
@endif
{{ $trades->links() }}
@endsection