Complete reference for all Stratify REST API endpoints with request/response examples, parameters, and error handling.
Base URL: http://localhost:8000/api/v1
Authentication: Bearer token required for most endpoints
/api/v1/market/quote/{symbol}Get current market quote for a symbol.
Parameters:
symbol (path, required) - Stock symbol (e.g., AAPL)Response:
{
"success": true,
"data": {
"symbol": "AAPL",
"price": 182.50,
"change": 2.30,
"change_percent": 1.28,
"volume": 52847392,
"high": 183.20,
"low": 180.15,
"market_cap": 2847392847392
}
}/api/v1/market/ohlcv/{symbol}Get historical OHLCV data.
Parameters:
symbol (path) - Stock symboltimeframe (query) - 1m, 5m, 15m, 1h, 1d, 1wfrom (query) - Start date (YYYY-MM-DD)to (query) - End date (YYYY-MM-DD)/api/v1/watchlistsList all user watchlists.
/api/v1/watchlistsCreate new watchlist.
Request Body:
{
"name": "Tech Stocks",
"description": "Large-cap technology companies",
"symbols": ["AAPL", "MSFT", "GOOGL"]
}/api/v1/watchlists/{id}/symbolsAdd symbols to watchlist.
/api/v1/backtesting/runRun a backtest.
Request Body:
{
"strategy_id": "uuid-here",
"symbol": "AAPL",
"start_date": "2024-01-01",
"end_date": "2024-12-31",
"initial_capital": 100000,
"timeframe": "1d"
}/api/v1/backtesting/results/{backtest_id}Get backtest results and metrics.
/api/v1/paper/ordersPlace a paper trading order.
Request Body:
{
"portfolio_id": "uuid-here",
"symbol": "AAPL",
"side": "buy",
"order_type": "market",
"quantity": 100
}/api/v1/paper/portfolios/{id}/positionsGet current positions in paper portfolio.
{
"success": true,
"data": { ... },
"message": "Operation successful",
"timestamp": "2026-01-22T15:30:00Z"
}{
"success": false,
"error": {
"code": "VALIDATION_ERROR",
"message": "Invalid symbol",
"details": { "symbol": "Must be valid ticker" }
},
"timestamp": "2026-01-22T15:30:00Z"
}