API Reference.
Integrate PORTIQA's portfolio evaluation engine directly into your applications.
Portfolio Evaluation Endpoint
The core endpoint for PORTIQA. Send cash and stock positions plus an optional risk profile; PORTIQA enriches the request from its database and returns scoring, risk analysis, and actionable insights.
Authentication
Authenticate requests using a standard Bearer token in the Authorization header. You can generate your API key in the Dashboard. For shared hosting/FastCGI environments that strip Authorization, PORTIQA also accepts X-Portfolio-Evaluator-Token with the same token.
Request Payload (JSON)
Each request must contain a positions array. The number of unique tickers per evaluation is capped by your plan: 5 (Free/Hobby), 10 (Pro), 20 (Business). Requests above the cap return 413. Enterprise has no cap.
| Parameter | Type | Required | Description |
|---|---|---|---|
positions |
Array | Yes | An array of portfolio positions with essential inputs only. E.g., [{"ticker": "AAPL", "market_value": 25000, "amount": 10}, ...]. Legacy clients may also send this as holdings. |
risk_level |
String | No | The target risk profile. Valid options: low, medium (default), high. |
cash_balance |
Number | No | Cash balance in the same currency as market values. Used to report current cash/invested percentages. |
Response Payload
A successful response returns HTTP 200 with evaluator metrics. PORTIQA enriches ticker data, sectors, factor context, and market regime data before scoring.
Error Handling
| Status Code | Meaning |
|---|---|
400 Bad Request |
Invalid JSON payload, or no positions could be matched to stock data. |
401 Unauthorized |
Missing or invalid API key. |
402 Payment Required |
Subscription is past due, canceled, or otherwise inactive. Update billing to resume access. |
413 Payload Too Large |
Request exceeds your plan's per-evaluation ticker cap (Free/Hobby: 5, Pro: 10, Business: 20). Upgrade or split the portfolio across calls. |
429 Too Many Requests |
Monthly call limit reached for your plan (Free: 5, Hobby: 30, Pro: 100, Business: 1,000). Upgrade or wait for the next billing period — there is no automatic overage. |
500 Internal Server Error |
The evaluation engine failed to process the request. |
Interactive Playground
Test the API directly from your browser. Enter your API key and configure the payload to see a live response.