API Reference
The customer API is served under the base path /api/v0/. All authenticated endpoints require the header Authorization: Bearer <token>. See Authentication for how to obtain a token.
Base URL
All endpoints use the base URL https://api.ravenwits.com. The examples below use this URL.
Endpoints summary
| Method | Endpoint | Auth | Description |
|---|---|---|---|
| POST | /api/v0/auth/login/ | No | Sign in with email and password; returns a Bearer token. |
| GET | /api/v0/strategies/<user> | Bearer | List strategies for a user (requires idretailer). |
| POST | /api/v0/user/<user>/submit-purchase | Bearer | Submit a new purchase. |
| PUT | /api/v0/user/<user>/purchase/<uuid>/update | Bearer | Update an existing purchase (e.g. status, outputs). |
| GET | /api/v0/user/<user>/purchase/<uuid>/get | Bearer | Get one purchase by ID. |
| GET | /api/v0/forecasts/latest/ | Bearer | Get the latest forecast (JSON or CSV). |
| GET | /health/ | No | Health check; returns {"status": "healthy"}. |
Try the API (playground)
You can try the API in several ways:
-
API Playground — Send live requests from this documentation: choose an endpoint, add your Bearer token (or request body for login), and click Try it! to see the response. Works in the browser when the API allows requests from this site.
-
Copy and run the examples — Each endpoint page in this reference includes a Request section with a
curlcommand. Replace{your-token}with your Bearer token, then run the command in your terminal. -
Interactive API docs — Open https://api.ravenwits.com/docs/v0/ in your browser to browse endpoints and, where available, send test requests.
-
Postman or similar — Use the base URL
https://api.ravenwits.comand add the headerAuthorization: Bearer <token>. Use the paths and bodies from this reference.
Detailed endpoint docs
- Login — POST
/api/v0/auth/login/ - List strategies — GET
/api/v0/strategies/<user> - Submit purchase — POST
/api/v0/user/<user>/submit-purchase - Update purchase — PUT
/api/v0/user/<user>/purchase/<uuid>/update - Get purchase — GET
/api/v0/user/<user>/purchase/<uuid>/get - Latest forecast — GET
/api/v0/forecasts/latest/ - Health check — GET
/health/