Quote presentation
Requirements: Show exact values returned from POST /api/trading/quotes: see Quotes:exchange.send_quantityandexchange.receive_quantity,price, andexpires_at- Display a countdown timer (
expires_atminus now) prominently
- USDT → $100.00
- BTC → 225,000 sats
- NGN → ₦5,000
- Rate → 2,250 sats per $1
- “You’re converting: $100.00”
- “You’ll receive: 225,000 sats”
- “Rate: 2,250 sats per $1”
- “Fee: $0.80”
- “Quote valid for: 8 seconds”
Expiration logic
Requirements: Disable “Confirm” button as soon asexpires_at has passed
Show a non-blocking notification:
“Quote expired. Please refresh for a new price.”Optionally provide:
- Auto-refresh quote after expiration
- Manual “Get New Quote” button
Trade confirmation feedback
Requirements: After user confirms: Show progress indicator (modal or inline stepper) Reflect each step of backend trade lifecycle:- Quote validation
- Balance verification
- Execution
- Wallet credit
- Confirm only after Get Order By ID returns status = filled
- [✓] Quote locked
- [✓] Balance available
- [✓] Trade executed
- [✓] Funds credited
Input field logic
Requirements: Input field must: Accept only valid numbers Internally normalize to the smallest unit:- USDT and USDC → base units, 6 decimals (100000000 = $100.00)
- BTC → sats (225000 = 0.00225 BTC)
- NGN → kobo (500000 = ₦5,000)
"100" is 100 USDT, "5000" is ₦5,000), so convert when you build the request. See Currencies and amounts.
Display labels:
- “Enter amount in USD”
- “Enter amount in bitcoin (BTC)”
- “Enter amount in Naira (NGN)”
- Show live preview of converted value
Post-trade success page
Must Display:- inputAmount, outputAmount
- rate used Destination wallet label
- Trade reference Timestamp (optional)
- Trade Successful
- You converted: $100.00
- You received: 225,000 sats Rate: 2,250 sats per $1
- Wallet: BTC Wallet
- Reference: trade_4837ABC
Failure handling
Required Error States:
Provide a dismissible alert and log internally with full context.
Visual hierarchy
Priorities:- Input/output clarity
- Rate integrity
- Quote expiry countdown
- Confirmation status
- Success/Failure state