|
1 | 1 | --- |
2 | 2 | name: neurobro-market-research |
3 | | -description: Run financial market research through the NeuroAPI agent — equity and crypto analysis, technical setups, fundamental research, macro outlooks, and multi-asset investigations via POST /agent/ask. Use when the user asks for stock or token analysis, trade ideas, market commentary, earnings or macro questions, sector comparisons, or any financial research that needs live market reasoning. |
| 3 | +description: Runs financial market research through the NeuroAPI agent — equity and crypto analysis, technical setups, fundamental research, macro outlooks, and multi-asset investigations via POST /agent/ask. Use when the user asks for stock or token analysis, trade ideas, market commentary, earnings or macro questions, sector comparisons, or any financial research that needs live market reasoning. |
| 4 | +license: MIT |
4 | 5 | --- |
5 | 6 |
|
6 | 7 | # Neurobro Market Research |
@@ -193,35 +194,32 @@ trade. |
193 | 194 |
|
194 | 195 | ## Errors and retries |
195 | 196 |
|
196 | | -Error bodies have one shape: `{"detail": "..."}`. Every error carries an |
197 | | -`X-Request-Id` header. |
198 | | - |
199 | | -| Code | Meaning | Action | |
200 | | -| --- | --- | --- | |
201 | | -| `400` | Malformed body or invalid `Idempotency-Key` | Fix the request; don't retry blindly. | |
202 | | -| `401` | Missing/invalid `X-API-Key` | Check `NEUROAPI_API_KEY`; do not retry. | |
203 | | -| `402` | No active plan, or quota exhausted | Stop; tell the user to fix billing. | |
204 | | -| `403` | `mode` not on plan (`code: mode_not_in_plan`) | Retry with `smart` or `fast`. | |
205 | | -| `409` | Same `Idempotency-Key` still in flight | Wait, then retry. | |
206 | | -| `422` | Body failed validation | Read `loc`/`msg`; fix the field. | |
207 | | -| `429` | Rate limit exceeded | Honour `Retry-After`; back off (≤3 tries). | |
208 | | -| `503` | Agent capacity saturated | Retry with exponential backoff; no quota charged. | |
209 | | -| `500` | Server-side bug | Retry idempotent calls once; report `X-Request-Id`. | |
| 197 | +Error bodies are `{"detail": "..."}`, and every error carries an |
| 198 | +`X-Request-Id` header — quote it when reporting issues. Decide what to do by |
| 199 | +error class: |
| 200 | + |
| 201 | +- **Don't retry** — `400`, `401`, `402`, `422`: the request or account is |
| 202 | + wrong. Fix the body, check `NEUROAPI_API_KEY`, or (on `402`) tell the user |
| 203 | + to sort out billing, then stop. |
| 204 | +- **Adjust, then retry** — `403 mode_not_in_plan`: the `mode` isn't on the |
| 205 | + caller's plan; retry with `smart` or `fast`. |
| 206 | +- **Back off and retry** — `429` (honour `Retry-After`, cap at 3 attempts) and |
| 207 | + `503` (agent saturated; exponential backoff; no quota charged). |
| 208 | +- **`500`** — server-side bug; retry only idempotent calls, once. |
210 | 209 |
|
211 | 210 | `/agent/ask` is **non-idempotent** unless you send an `Idempotency-Key` — two |
212 | | -plain calls produce two answers and two charges. Don't retry blindly on `500`. |
| 211 | +plain calls produce two answers and two charges, so never retry blindly. |
| 212 | + |
| 213 | +The full status-code table is in |
| 214 | +[references/endpoints.md](references/endpoints.md). |
213 | 215 |
|
214 | 216 | ## Rate limits |
215 | 217 |
|
216 | 218 | Every response carries `X-RateLimit-Limit`, `X-RateLimit-Remaining`, and |
217 | | -`X-RateLimit-Reset`. On `429`, `Retry-After` gives seconds until reset. For |
218 | | -batch research, pace off `X-RateLimit-Remaining` so you never hit `429`. |
219 | | - |
220 | | -| Plan | `/agent/ask` per minute | |
221 | | -| --- | --- | |
222 | | -| Starter | 60 | |
223 | | -| Pro | 60 | |
224 | | -| Enterprise | 300 (negotiable) | |
| 219 | +`X-RateLimit-Reset`. On `429`, `Retry-After` gives the seconds until reset. |
| 220 | +For batch research, pace off `X-RateLimit-Remaining` so you never hit `429`. |
| 221 | +Per-plan budgets and header details are in |
| 222 | +[references/endpoints.md](references/endpoints.md). |
225 | 223 |
|
226 | 224 | ## Security |
227 | 225 |
|
|
0 commit comments