API For CLI Developers
Use this when you automate trade-idea workflows (IB CLI, scripts) outside the browser.
1. Create a token
- Sign in at Jow Dones.
- Open Settings → API tokens.
- Name the token (for example
IB workstation) and click Create token. - Copy the secret immediately — it is shown once. Store it in a password manager or secret store.
Revoke unused tokens from the same page.
2. Base URL and auth
- API host:
https://api.jowdones.com(production). - Paths: user-facing REST routes live under
/api/.... - Header:
Authorization: Bearer <token>where<token>is your personal secret (prefixjd_).
export JOW_DONES_API_BASE_URL="https://api.jowdones.com" # no trailing /apiexport JOW_DONES_API_TOKEN="jd_...."Local Docker typically uses http://localhost with the same /api/... paths behind the gateway (see your compose port mapping).
3. Trade ideas lifecycle (REST)
Typical flow: list ideas → approve → place or fail at broker → record execution.
| Method | Path | Purpose |
|---|---|---|
| GET | /api/orders?status=approved | List ideas (filter by status as needed) |
| POST | /api/orders/{id}/approve | Approve for broker |
| POST | /api/orders/{id}/place | Mark accepted at broker (optional broker ids in JSON body) |
| POST | /api/orders/{id}/fail | Mark submission failed (failure_reason in body) |
| POST | /api/orders/{id}/execute | Record fill (executed_price, optional qty/fees/timestamp) |
Token management
| Method | Path |
|---|---|
| GET | /api/users/me/api-tokens |
| POST | /api/users/me/api-tokens with {"name": "My CLI"} |
| DELETE | /api/users/me/api-tokens/{token_id} |
4. curl example
BASE="$JOW_DONES_API_BASE_URL/api"HDR=(-H "Authorization: Bearer $JOW_DONES_API_TOKEN")
curl -s "${HDR[@]}" "$BASE/orders?status=approved"5. Python example
import os, requests
base = os.environ["JOW_DONES_API_BASE_URL"].rstrip("/") + "/api"h = {"Authorization": f"Bearer {os.environ['JOW_DONES_API_TOKEN']}"}
r = requests.get(f"{base}/orders", params={"status": "approved"}, headers=h, timeout=30)r.raise_for_status()6. OpenAPI (Swagger)
Interactive docs for the investor API (including schemas) are published on the API host:
For the product workflow in chat, see Trade Ideas.