API Reference
Base URL: https://w-trader-portal.dataslot.app
Authentication
All API requests require an x-api-key header.
curl -H "x-api-key: YOUR_API_KEY" \ https://w-trader-portal.dataslot.app/api/quote/AAPL
Get your API key by creating an account.
GET/api/quote/{symbol}
Get current market quote for any stock.
| Parameter | In | Description |
|---|---|---|
| symbol | path | Stock ticker (e.g. AAPL, PTT.BK) |
Response
{
"symbol": "AAPL",
"name": "Apple Inc.",
"price": 260.48,
"change": -0.01,
"change_pct": -0.004,
"volume": 28218689,
"market_cap": 3828515864576,
"pe_ratio": 33.01
}GET/api/fundamentals/{symbol}
Get full financial data: income statement, balance sheet, ratios, 5-year history.
| Field | Type | Description |
|---|---|---|
| ratios.pe_ttm | number | Trailing PE ratio |
| ratios.roe | number | Return on Equity |
| ratios.net_margin | number | Net profit margin |
| ratios.debt_to_equity | number | Debt/Equity ratio |
| annual | object | 5-year annual financials |
| quarterly | object | Last 4 quarters |
GET/api/valuation/{symbol}
Compute intrinsic value using multiple methods and get a BUY/HOLD/SELL recommendation. Auto-routes to stock / commodity / crypto / ETF scoring.
| Method | Weight | Description |
|---|---|---|
| DCF | 30% | Discounted Cash Flow — projects 5-year FCF |
| Graham | 15% | Graham Number = √(22.5 × EPS × BVPS) |
| PE Fair Value | 25% | Normalized PE × trailing EPS |
| EPV | 15% | Earnings Power Value |
| Piotroski F-Score | ~8% | 9 financial health signals |
| Quality-Growth | ~7% | Composite of quality + growth metrics |
GET/api/screener
Search and filter stocks using semantic search + fundamental filters.
| Param | Type | Description |
|---|---|---|
| query | string | Natural language search |
| market | string | Filter: US or TH |
| sector | string | Filter sector |
| recommendation | string | BUY, HOLD, SELL |
| max_pe | number | Maximum PE ratio |
| min_roe | number | Minimum ROE (decimal) |
| limit | integer | Max results (1-50) |
GET /api/screener?recommendation=BUY&max_pe=15&limit=5
Error Codes
| Code | Status | Meaning |
|---|---|---|
| 401 | Unauthorized | Missing or invalid API key |
| 404 | Not Found | Ticker not found or no data |
| 500 | Server Error | Internal error (yfinance timeout, etc.) |