@extends('portal.layouts.master') @section('title', 'Prediction Markets') @section('page-title', 'Prediction Markets') @php $categories = [ '' => 'All', 'crypto' => 'Crypto', 'politics' => 'Politics', 'geopolitics' => 'Geopolitics', 'finance' => 'Finance / Economy', 'tech' => 'Tech / AI', 'world' => 'World Affairs', 'sports' => 'Sports', 'awards' => 'Pop Culture', ]; @endphp @section('extra-css') @endsection @section('content') @if(session('success')) @endif @if(session('error')) @endif
{{-- ═══════════════ LEFT SIDEBAR ═══════════════ --}} {{-- ═══════════════ CENTER TABLE ═══════════════ --}}
@if(in_array($view, ['markets', 'watchlist'], true)) {{-- Filter chip bar --}}
@if($view === 'watchlist') Saved Markets @endif @if($tag) {{ $categories[$tag] ?? $tag }} × @endif @if($search) "{{ $search }}" × @endif @if($status) {{ ucfirst($status) }} × @endif @if($view === 'markets') @endif
{{-- Market table --}} @if($markets->isEmpty())

{{ $view === 'watchlist' ? 'Your watchlist is empty.' : 'No markets found' . ($search ? ' for "' . e($search) . '"' : '') . '.' }}

{{ $view === 'watchlist' ? 'Browse markets' : 'Clear filters' }}
@else
@php $n = 0; @endphp @foreach($markets as $m) @php $n++; $yp = round($m['yes_price'] * 100, 1); $np = round(100 - $yp, 1); $vol = $m['volume24h'] >= 1e6 ? '$' . number_format($m['volume24h'] / 1e6, 2) . 'M' : ($m['volume24h'] >= 1e3 ? '$' . number_format($m['volume24h'] / 1e3, 1) . 'K' : '$' . number_format($m['volume24h'], 0)); $liq = $m['liquidity'] >= 1e6 ? '$' . number_format($m['liquidity'] / 1e6, 2) . 'M' : ($m['liquidity'] >= 1e3 ? '$' . number_format($m['liquidity'] / 1e3, 1) . 'K' : '$' . number_format($m['liquidity'], 0)); $ends = $m['endDate'] ? \Carbon\Carbon::parse($m['endDate'])->format('M d, Y') : '—'; $tagList = implode(', ', array_slice($m['tags'], 0, 2)); @endphp @endforeach
# Market Buy Yes Buy No Volume Liquidity Ends Save
{{ $n }}
{{ $m['question'] }}
@if($tagList)
{{ $tagList }}
@endif
{{ $vol }} {{ $liq }} {{ $ends }}
@endif @elseif($view === 'positions')
My Positions

Your open prediction-market holdings.

@if($positions->isEmpty())

You have no open positions.

Explore markets
@else
@foreach($positions as $position) @endforeach
MarketOutcomeSharesAverage priceCost basisStatus
{{ $position->question }}
{{ $position->outcome }} {{ number_format((float) $position->shares, 2) }} {{ number_format((float) $position->avg_price * 100, 1) }}¢ {{ number_format((float) $position->shares * (float) $position->avg_price, 2) }} {{ $position->currency }} Open
@endif @else
Activity

Your latest prediction-market transactions.

@if($trades->isEmpty())

No prediction-market activity yet.

Explore markets
@else
@foreach($trades as $trade) @endforeach
DateMarketActionOutcomeSharesPriceTotal
{{ optional($trade->traded_at)->format('M d, Y H:i') }}
{{ $trade->question }}
{{ strtoupper($trade->side) }} {{ $trade->outcome }} {{ number_format((float) $trade->shares, 2) }} {{ number_format((float) $trade->price * 100, 1) }}¢ {{ number_format((float) $trade->total_cost, 2) }} {{ $trade->currency }}
@endif @endif
{{-- ═══════════════ RIGHT FLYOUT ═══════════════ --}}
{{-- Flash alert --}} {{-- Header --}}
Select a market
{{-- Meta row --}}
Click a market row to view details.
{{-- YES / NO prices --}}
YES
—
Spread
—
NO
—
{{-- Tab bar --}}
{{-- CHART TAB --}}
@foreach(['1h','6h','1d','1w','1m','max'] as $iv) @endforeach
Select a market to view chart
YES NO Source: Polymarket Data
{{-- TRADE TAB --}}
USD
Est. Shares —
Est. Cost —
Avg. Price —
@csrf
Available Balance
$0.00 Deposit
{{-- HISTORY TAB --}}
Select a market to view your trade history.
{{-- INFO TAB --}}
Select a market to view details.
{{-- /pm-flyout-body --}}
{{-- /pm-flyout --}}
{{-- /pm-shell --}} {{-- Market overview modal: row clicks explain the market before trading. --}} @endsection @push('scripts') @endpush