# API Overview — GammaForce Matrix

Base URL: `https://www.wisdep.com/api`

All API responses are JSON. Authentication required for most endpoints (pass session token via cookie or header).

---

## Authentication

| Method | Endpoint | Description |
|--------|----------|-------------|
| POST | `/api/auth/register` | Register new account (email + password) |
| POST | `/api/auth/login` | Login → returns session token |
| POST | `/api/auth/logout` | Invalidate current session |
| GET | `/api/auth/validate` | Check if session token is valid |
| GET | `/api/auth/me` | Get current user profile |
| POST | `/api/auth/forgot-password` | Request password reset email |
| POST | `/api/auth/reset-password` | Reset password with token |
| POST | `/api/auth/change-password` | Change password (authenticated) |
| GET | `/api/auth/google/login` | Initiate Google OAuth flow |
| GET | `/api/auth/google/callback` | Google OAuth callback |
| POST | `/api/auth/resend-verification` | Resend email verification link |

---

## Market Data (Public)

| Method | Endpoint | Description |
|--------|----------|-------------|
| GET | `/api/health` | Service health check |
| GET | `/api/market/status` | US market open/close status |
| GET | `/api/symbols` | List supported symbols (SPX, SPY) |

---

## GEX Data (Authenticated)

| Method | Endpoint | Description |
|--------|----------|-------------|
| GET | `/api/gex/summary` | Current GEX summary — Total GEX, Call Wall, Put Wall, Gamma Flip, Max Pain, Centers |
| GET | `/api/gex/strikes` | GEX breakdown by individual strike price |
| GET | `/api/gex/history` | Historical GEX values over time |
| GET | `/api/gex/replay/*` | Historical replay snapshots (Pro only) |

---

## Options & Greeks (Authenticated)

| Method | Endpoint | Description |
|--------|----------|-------------|
| GET | `/api/iv/smile` | Implied volatility smile data |
| GET | `/api/charm/heatmap` | Vanna & Charm heatmap data |
| GET | `/api/options/*` | Options chain data |
| GET | `/api/klines` | K-line (candlestick) price data |
| GET | `/api/vix/*` | VIX term structure data |

---

## User & Subscription (Authenticated)

| Method | Endpoint | Description |
|--------|----------|-------------|
| GET | `/api/user/info` | Subscription status, expiry, tier |
| GET | `/api/user/profile` | User profile details |
| GET | `/api/user/referral` | Referral code and stats |
| GET | `/api/referral/validate` | Validate a referral code |
| POST | `/api/feedback` | Submit user feedback |
| GET | `/api/survey/*` | User survey endpoints |

---

## WebSocket

| Endpoint | Description |
|----------|-------------|
| `wss://www.wisdep.com/ws` | Real-time data stream — GEX updates, price ticks, level changes |

---

## Payment (Authenticated)

| Method | Endpoint | Description |
|--------|----------|-------------|
| POST | `/api/payment/stripe/*` | Stripe payment flow |
| POST | `/api/payment/alipay/*` | Alipay payment flow |
| GET | `/api/payment/order/*` | Order status query |
| POST | `/api/payment/activation/*` | Activation code redemption |

---

## Rate Limits

- Authentication endpoints: Rate-limited with CAPTCHA protection
- Data endpoints: Reasonable use; excessive requests may be throttled
- WebSocket: One connection per authenticated session

## Response Format

All responses follow:
```json
{
  "success": true,
  "data": { ... }
}
```

Error responses:
```json
{
  "success": false,
  "error": "Error message"
}
```

---

© 2026 GammaForce Matrix. All rights reserved.
