Trading Terminal

The TradeStaq Pro Trading Terminal is a professional-grade interface for manual trading with real-time market data, advanced charting, and instant order execution.

Overview

The trading terminal provides:

  • Real-Time Price Feeds - WebSocket-connected live prices
  • Advanced Charting - Multi-timeframe OHLCV charts
  • Quick Order Entry - One-click trading
  • Position Management - Live P&L tracking
  • Order History - Recent trades and fills
  • Keyboard Shortcuts - Lightning-fast execution

Accessing the Terminal

  1. Navigate to Dashboard → Trading
  2. Or use keyboard shortcut (if configured)
  3. Terminal loads with last-used settings

Terminal Layout

┌─────────────────────────────────────────────────────────────────────┐
│  [Exchange ▼]  [🔍 Search Symbol]  $50,123.45  +2.34%  Balance: $10k │
├────────────────────────────────────┬────────────────────────────────┤
│                                    │                                │
│                                    │  ORDER ENTRY                   │
│                                    │  ┌────────────────────────────┤
│   TRADING CHART                    │  │ [LONG] [SHORT]             │
│                                    │  │                            │
│   [1m] [5m] [15m] [1h] [4h] [1d]   │  │ Type: [Market ▼]           │
│                                    │  │ Size: [____] BTC           │
│   ┌────────────────────────────┐   │  │ [25%] [50%] [75%] [100%]   │
│   │                            │   │  │                            │
│   │     Candlestick Chart      │   │  │ □ Stop Loss  [____]        │
│   │         (Live)             │   │  │ □ Take Profit [____]       │
│   │                            │   │  │                            │
│   │                            │   │  │ [  PLACE ORDER  ]          │
│   └────────────────────────────┘   │  └────────────────────────────┤
│                                    │                                │
│                                    │  POSITIONS                     │
│                                    │  BTC/USDT Long 0.1            │
│                                    │  Entry: $50,000               │
│                                    │  P&L: +$123.45 (+0.25%)       │
│                                    │  [Close] [Modify]             │
│                                    │                                │
├────────────────────────────────────┴────────────────────────────────┤
│  ORDER HISTORY                                                       │
│  ┌─────────────┬────────┬────────┬─────────┬────────┬─────────────┐ │
│  │ Time        │ Symbol │ Side   │ Type    │ Size   │ Price       │ │
│  ├─────────────┼────────┼────────┼─────────┼────────┼─────────────┤ │
│  │ 10:30:45    │ BTC    │ Buy    │ Market  │ 0.1    │ $50,000     │ │
│  │ 10:25:12    │ ETH    │ Sell   │ Limit   │ 1.5    │ $3,200      │ │
│  └─────────────┴────────┴────────┴─────────┴────────┴─────────────┘ │
├─────────────────────────────────────────────────────────────────────┤
│  ● Connected  │  Paper Mode  │  Ctrl+/ for shortcuts               │
└─────────────────────────────────────────────────────────────────────┘

Header Bar

Exchange Selector

Click to switch between connected exchanges:

ElementDescription
Exchange NameCurrently selected exchange
Connection StatusGreen dot = connected
BalanceAvailable trading balance

Symbol Search

Find and switch trading pairs:

  • Click search box or press Ctrl+K
  • Type symbol (e.g., "BTC", "ETH/USDT")
  • Select from results
  • Recent symbols shown first

Price Display

ElementDescription
Current PriceReal-time market price
24h ChangePercentage change (color-coded)
High/Low24h high and low prices

Trading Chart

Timeframe Selection

Available timeframes:

ButtonPeriodUse Case
1m1 minuteScalping
5m5 minutesQuick trades
15m15 minutesDay trading
30m30 minutesIntraday
1h1 hourSwing entry
4h4 hoursSwing trading
1d1 dayPosition trading
1w1 weekLong-term

Chart Features

FeatureDescription
CandlesticksOHLCV data visualization
VolumeTrading volume bars
ZoomMouse wheel to zoom
PanClick and drag
CrosshairPrice/time cursor

Chart Data Source

Charts fetch data from:

GET /api/charts/candles?symbol=BTC/USDT&exchangeId=xxx&timeframe=1h

Features:

  • Auto-refresh on new candles
  • Fallback to public data for paper trading
  • Symbol normalization across exchanges

Order Entry Panel

Order Side

ButtonAction
LONGOpen or add to long position
SHORTOpen or add to short position

Order Types

TypeDescription
MarketExecute immediately at best price
LimitExecute at specified price or better

Size Input

Enter position size:

  • Direct input in base currency (e.g., 0.1 BTC)
  • Quick buttons: 25%, 50%, 75%, 100% of balance
  • Size validation based on exchange minimums

Stop Loss / Take Profit

Optional exit orders:

FieldDescription
Stop LossPrice to cut losses
Take ProfitPrice to take profits

When enabled, creates bracket order with entry.

Place Order Button

Click to submit order. Button shows:

  • Estimated cost
  • Direction (Long/Short)
  • Loading state during submission

Position Panel

Shows current open positions:

Position Information

FieldDescription
SymbolTrading pair
SideLong or Short
SizePosition size
Entry PriceAverage entry
Current PriceLive market price
Unrealized P&LCurrent profit/loss
P&L %Percentage return
LiquidationLiquidation price (futures)

Position Actions

ActionDescription
CloseMarket close entire position
Close %Close partial position
ModifyAdjust SL/TP
AddIncrease position

P&L Color Coding

  • Green: Profit
  • Red: Loss
  • Gray: Breakeven

Order History Panel

Recent Orders

Shows last 20 orders:

ColumnDescription
TimeOrder timestamp
SymbolTrading pair
SideBuy/Sell
TypeMarket/Limit
SizeOrder size
PriceFill price
StatusFilled/Cancelled/Pending

Order Status Icons

IconStatus
Filled
Partially filled
Open/Pending
Cancelled
!Failed

Real-Time Features

WebSocket Price Feed

The terminal maintains live connections:

┌────────────────────────────────────────────────────────────┐
│                 WEBSOCKET PRICE FEED                        │
│                                                             │
│  Exchange  ──── WebSocket ────  Terminal                   │
│                                                             │
│  Updates:                                                   │
│  • Price: Every tick (~100ms)                              │
│  • Orderbook: Real-time                                     │
│  • Positions: On change                                     │
│  • Orders: On fill                                          │
│                                                             │
│  Status: ● Connected (ping: 45ms)                          │
└────────────────────────────────────────────────────────────┘

Connection Status

StatusIndicatorAction
ConnectedGreen dotNormal
ReconnectingYellow dotAuto-retry
DisconnectedRed dotManual refresh

Auto-Reconnect

If connection drops:

  1. Automatic reconnection attempts
  2. Data resync on reconnect
  3. No manual intervention needed
  4. Notification if prolonged disconnect

Keyboard Shortcuts

Press Ctrl+/ to view all shortcuts:

Navigation

ShortcutAction
Ctrl+KOpen symbol search
EscapeClose modal/cancel

Trading

ShortcutAction
(Coming)Quick buy/sell
(Coming)Close all positions

Chart

ShortcutAction
1-7Switch timeframe
+/-Zoom in/out
RReset chart view

Paper vs Live Trading

Visual Indicators

ModeIndicator
Paper"Paper Mode" badge, purple theme
Live"Live" badge, standard theme

Paper Trading Features

  • Virtual $10,000 balance
  • Simulated execution
  • Real market prices
  • No actual trades placed

Switching Modes

  1. Select different exchange in dropdown
  2. Paper exchanges show "(Paper)" suffix
  3. Confirm mode before trading

Mobile Responsiveness

The terminal adapts to screen size:

Desktop (> 1024px)

  • Full layout with all panels
  • Chart and order entry side-by-side
  • Order history visible

Tablet (768px - 1024px)

  • Chart above order entry
  • Collapsible panels
  • Touch-friendly buttons

Mobile (< 768px)

  • Simplified layout
  • Swipe between views
  • Large touch targets
  • Essential info only

Best Practices

Before Trading

  1. ✓ Verify correct exchange selected
  2. ✓ Check connection status (green)
  3. ✓ Confirm Paper vs Live mode
  4. ✓ Review available balance
  5. ✓ Set stop loss before entry

During Trading

  1. ✓ Monitor positions panel
  2. ✓ Watch for disconnection alerts
  3. ✓ Use keyboard shortcuts for speed
  4. ✓ Don't move stops further away

Risk Management

  1. Always use stop losses
  2. Size positions appropriately
  3. Don't overtrade
  4. Respect daily loss limits

Troubleshooting

Chart Not Loading

Solutions:

  • Check internet connection
  • Verify exchange is connected
  • Try refreshing the page
  • Select a different timeframe

Prices Not Updating

Solutions:

  • Check connection status indicator
  • Refresh the page
  • Switch to a different symbol and back
  • Check exchange API status

Order Not Submitting

Solutions:

  • Verify sufficient balance
  • Check order size meets minimum
  • Ensure exchange is in Active status
  • Review error message details

Position Not Showing

Solutions:

  • Click refresh on positions panel
  • Check if on correct exchange
  • Verify position isn't already closed
  • Sync exchange balance

API Endpoints Used

The terminal uses these endpoints:

EndpointPurpose
GET /api/charts/candlesFetch OHLCV data
GET /api/positionsGet open positions
POST /api/trading/priceGet current price
POST /api/ordersPlace orders
GET /api/exchanges/[id]/marketsGet tradeable symbols

Next Steps