Platform Status
Health check for edge + core API services.
curl -s /api/v1/status {
"ok": true,
"status": "operational",
"region": "ap-southeast",
"version": "2026.05",
"time": "2026-05-24T00:00:00.000Z"
} Build institutional-grade trading experiences with ultra-low latency endpoints, real-time feeds, and fintech-grade observability.
curl -s 'http://localhost:4321/api/v1/market/quote?symbol=AAPL' \
-H 'Authorization: Bearer <API_KEY>' TradePro API provides market data, portfolio analytics, and trading workflows. This template ships with a local sandbox so you can preview requests and responses instantly.
Use a Bearer API key in the Authorization header. For production deployments, issue keys server-side and scope them per workspace.
Authorization: Bearer <API_KEY> This UI simulates API keys locally. Keys are stored in your browser storage to power the live sandbox.
REST endpoints are grouped by product surface: market data, asset coverage, portfolio, trading, and AI.
For real-time feeds, use WebSocket streaming for trades, quotes, and order updates. This template focuses on documentation and uses REST sandbox for live previews.
wss://api.tradepro.com/v1/ws
subscribe:
{
"op": "subscribe",
"channel": "quotes",
"symbol": "AAPL"
} Interactive endpoint cards with live previews.
Health check for edge + core API services.
curl -s /api/v1/status {
"ok": true,
"status": "operational",
"region": "ap-southeast",
"version": "2026.05",
"time": "2026-05-24T00:00:00.000Z"
} Latest price snapshot for a symbol across supported venues.
curl -s '/api/v1/market/quote?symbol=AAPL' -H 'Authorization: Bearer <API_KEY>' {
"symbol": "AAPL",
"price": 178.23,
"change": 2.45,
"changePercent": 1.39,
"currency": "USD",
"asOf": "2026-05-24T00:00:00.000Z"
} OHLCV candle series for charting and backtests.
curl -s '/api/v1/market/candles?symbol=AAPL&interval=1d&limit=30' -H 'Authorization: Bearer <API_KEY>' {
"symbol": "AAPL",
"interval": "1d",
"candles": [
{
"t": "2026-05-20",
"o": 175.1,
"h": 179.2,
"l": 174.7,
"c": 178.23,
"v": 52300000
}
]
} Company profile, listing, and fundamental metadata.
curl -s '/api/v1/stocks/profile?symbol=AAPL' -H 'Authorization: Bearer <API_KEY>' {
"symbol": "AAPL",
"name": "Apple Inc.",
"exchange": "NASDAQ",
"sector": "Technology",
"website": "https://www.apple.com"
} Real-time spot price for crypto pairs.
curl -s '/api/v1/crypto/price?pair=BTC-USD' -H 'Authorization: Bearer <API_KEY>' {
"pair": "BTC-USD",
"price": 67234.5,
"changePercent": 1.87,
"asOf": "2026-05-24T00:00:00.000Z"
} Mid-market FX rates with institutional rounding.
curl -s '/api/v1/forex/rates?base=USD"e=IDR' -H 'Authorization: Bearer <API_KEY>' {
"pair": "USD-IDR",
"rate": 16325.25,
"asOf": "2026-05-24T00:00:00.000Z"
} Aggregated portfolio metrics and risk summary.
curl -s '/api/v1/portfolio/summary' -H 'Authorization: Bearer <API_KEY>' {
"equity": 25432.12,
"pnlToday": 123.56,
"pnlTodayPercent": 0.49,
"beta": 1.08,
"var95": 812.4,
"currency": "USD"
} Create a market/limit order with idempotency support.
curl -s '/api/v1/trading/order' -X POST -H 'Content-Type: application/json' -H 'Authorization: Bearer <API_KEY>' -d '{"symbol":"AAPL","side":"buy","type":"market","qty":1}' {
"orderId": "ord_01J2R3T4V5W6X7Y8Z9",
"status": "accepted",
"symbol": "AAPL",
"side": "buy",
"qty": 1,
"receivedAt": "2026-05-24T00:00:00.000Z"
} Low-latency market sentiment score + explanation.
curl -s '/api/v1/ai/sentiment?symbol=AAPL' -H 'Authorization: Bearer <API_KEY>' {
"symbol": "AAPL",
"score": 0.73,
"label": "bullish",
"model": "tradepro-sentiment-2026",
"asOf": "2026-05-24T00:00:00.000Z"
} Errors use predictable shapes for easy logging and retries.
{
"error": {
"code": "UNAUTHORIZED",
"message": "Missing or invalid API key"
}
} {
"error": {
"code": "RATE_LIMITED",
"message": "Too many requests",
"retryAfterMs": 1200
}
} Limits are per key, per region, with burst tolerance. Use caching for market snapshots.
Use fetch-based clients or wrap the API in an SDK. These snippets match the live sandbox endpoints.
export class TradeProClient {
constructor(private apiKey: string, private baseUrl = 'http://localhost:4321') {}
async quote(symbol: string) {
const url = new URL('/api/v1/market/quote', this.baseUrl);
url.searchParams.set('symbol', symbol);
const res = await fetch(url, { headers: { Authorization: 'Bearer ' + this.apiKey } });
if (!res.ok) throw await res.json();
return res.json();
}
} import requests
def quote(api_key: str, symbol: str):
r = requests.get(
'http://localhost:4321/api/v1/market/quote',
params={'symbol': symbol},
headers={'Authorization': 'Bearer ' + api_key}
)
r.raise_for_status()
return r.json() Live status uses the sandbox endpoint /api/v1/status.
{
"loading": true
} Example packaging that feels like a real fintech platform.