Saetta AI API docs
Quantitative trading intelligence. The Saetta AI API is on this same site at /api. It is HTTPS-only. Open today: Saetta Signals (below), for plan members, with their own key. No other API route is open on this site yet: the front door answers every other path with 404 Not found. Keys and authenticator setup are managed in the account portal at /portal/.
Quickstart
Two reads: Saetta Signals. Send your key in the Authorization header (Bearer). A signals answer is JSON. Keys go in the header, never in the web address.
# Every signal it can serve, the newer ones included: the timed feed (no body; next page: ?cursor=) curl -sS "https://saettaai.com/api/v2/signals" \ -H "Authorization: Bearer $API_KEY" # Only signals with no label (rules with a tested record): no query string and no body curl -sS "https://saettaai.com/api/v1/signals" \ -H "Authorization: Bearer $API_KEY"
Calling the API
Create an API key in the portal. Send it in the Authorization header using the Bearer scheme, in exactly one Authorization header. Never put an API key in the web address: the signals routes take no query string (GET /api/v2/signals takes only cursor), and the front door refuses any other with 404. The example host is saettaai.com.
# Every Saetta Signal it can serve (the timed feed, first page) with the Python standard library
import json
import os
from urllib.request import Request, urlopen
headers = {"Authorization": "Bearer " + os.environ["API_KEY"]}
request = Request("https://saettaai.com/api/v2/signals", headers=headers)
with urlopen(request, timeout=15) as response:
print(json.dumps(json.load(response), indent=2))
Routes
Saetta Signals is under /api/v1 and /api/v2; every other route is under the /api/v1 prefix. Only Saetta Signals is open on this site. The routes marked Not open are coming: today the front door answers them with 404 Not found.
| Method and path | Scope | Status | Description |
|---|---|---|---|
GET /api/v1/signals | rankings:read | Plan members | Saetta Signals, for plan members' keys; no query string. Readable at any time. It never carries a new signal. See the How to subscribe page. |
GET /api/v2/signals | rankings:read | Plan members | Every Saetta Signal it can serve, the newer ones included: the timed feed, for plan members' keys; no query string, or ?cursor= for the next page. Readable at any time. |
POST /api/v2/signals/acks | rankings:read | Plan members | The receipts of the signals a client showed; the Saetta plug-in sends them. Sent with its read, it uses no extra check. |
GET /api/v1/health | None | Not open | Service status. |
GET /api/v1/usage | usage:read | Not open | Request counts for the calling key or account. |
GET /api/v1/keys | keys:read | Not open | The calling key's metadata, status, limits and scopes. |
GET /api/v1/stocks/{ticker} | ticker:read | Not open | Data for a single stock. |
Authentication and headers
Every private request must authenticate using a secret API key. API keys follow the format mk_live_[id]_[secret][crc]. You can generate keys in the customer portal. Transmit your key in the standard HTTP header:
Authorization: Bearer mk_live_234567abcdef_xK8mP2nQ4rT6vY1z3bC5dE7fG9hJ0kL2mN4pQ6rS8tU0EhJvA
Send exactly one Authorization header. A request with more than one key in Authorization, or more than one Authorization header, is refused (401). Never include an API key in web addresses or query strings. A key sent in a web address is refused, as Calling the API says. Treat a key that was ever in a web address as exposed.
Permission scopes
Each key carries permission scopes. A plan member's key carries exactly one, rankings:read, which Saetta Signals checks. The other scopes belong to routes that are not open on this site yet:
| Scope | Coverage | Assignment |
|---|---|---|
usage:read | Read the calling key's own request counts and quota consumption. | Not open on this site |
usage:account | Read account-wide request totals across all active keys in the account. | Not open on this site |
keys:read | Inspect key metadata, creation dates, IP allowlists, and expiration. | Not open on this site |
rankings:read | Plan members' keys use this scope for the signals routes: GET /api/v1/signals, GET /api/v2/signals and POST /api/v2/signals/acks. | Every plan member's key |
ticker:read | Query individual stock analysis and company metrics. | Coming soon (not open on this site) |
Rate limits and headers
Saetta Signals has its own limits per account, apart from every other API budget. With the plug-in, each time you ask is one check: the pages it reads and the receipts it sends use no more checks. Each plan sets only how often you can check (see the pricing page). There is no daily total. A limit answers 429 rate_limited with Retry-After. Starter: 1 check every 5 minutes on average (a burst of 5); 1 key. Pro: 1 check every 60 seconds on average (a burst of 5); 1 key. Elite: 1 check every 10 seconds on average (a burst of 10); 1 key. On Starter, Pro and Elite a check is a GET /api/v2/signals without a cursor (or with the cursor a finished read returned); the next pages of the same read (up to 7, fetched straight away; a slower page uses a check) and one acknowledgement per page use no check. Reads are allowed at any time.
| Header | Meaning |
|---|---|
Cache-Control | no-store on every answer: do not store or cache it. |
X-Content-Sha256 | The SHA-256 of the answer body, on every signals answer (200). |
X-Request-Id | The signals service's request id, for support. Answers from the front door or the safety gate have none. |
Retry-After | Seconds to wait: on 429 rate_limited, and on the front door's and the safety gate's 503 answers. |
Query parameters
GET /api/v1/signals takes no query string and no body, and has no pages: each read gives the signals in view at that moment, at most 25. GET /api/v2/signals takes no body and one optional query parameter, cursor: each read gives one page of at most 25 signals; while has_more is true, read the next page with ?cursor= and the answer's next_cursor. A cursor that is not valid or has expired answers 400 invalid_cursor: read again without one.
Response bodies and schemas
A Saetta Signals answer is JSON, with X-Request-Id from the signals service. A path under /api that is not open is answered by the front door with a JSON 404 whose error code is not_found.
Saetta Signals
Open to plan members, with their own key. Its limits are on the How to subscribe page. The route is GET /api/v1/signals, with no query string and no body. Send your key as Authorization: Bearer on every request. Each answer is JSON with exactly these keys: schema (saetta.signals.trial.v1), as_of, now_session_rule, count, excluded_unservable, alerts (at most 25) and request_id. Each signal has exactly these fields:
| Field | Meaning |
|---|---|
rule | The identifier of the tested rule behind the signal. |
record_sha | The digest of the sealed signal record: your receipt. |
seq | The signal's number in its sealed chain. Picks of different rules can be in different chains. |
sealed_at | When the signal was sealed (UTC). |
release_at | The release time (UTC). No signal is shown before it. |
act_by_et | The time to act on the entry day (New York time). |
status | closed once the time to act has passed (always, by default); actionable while the entry is still ahead (only if signals are shown before the entry). |
ticker | The ticker of the stock or fund, one to five capital letters. |
issuer_name | The issuer name, or null when it cannot be shown safely. |
entry_session | The entry day (a New York date). |
entry_auction | The auction to enter at on the entry day, as a fixed text value. |
exit_session | The exit day (a New York date). |
exit_auction | The auction to exit at on the exit day, as a fixed text value. |
hold_sessions | The number of sessions from the entry day to the exit day. |
deadline_met | Whether the signal was sealed before the study's decision deadline. |
suggested_stop_bps | On a plan: the suggested stop, in basis points below your own fill price: the signal's own tested stop where it has one, otherwise 3000 (30%). You may use your own. |
suggested_stop | On a plan: the same stop in words. |
sizing_guide | On Pro and Elite, once you set a max loss per pick on Plan & billing: shares = your max loss / (your entry price - suggested stop), in words; otherwise null. Arithmetic only, not advice. |
Saetta Signals, the timed feed
Open to plan members, with their own key in the same header. The route is GET /api/v2/signals: it carries every signal it can serve, the newer ones included, from its release and never after its exit. Closing picks appear at about 15:40 New York time and stay actionable until about 15:49 (on a day the market closes early, about 12:40 to 12:49). Picks that stay actionable for only a few minutes are paused while we test improvements. Starter gets closing picks only: a plan never receives a pick type it does not include, not even later as history. Each answer is JSON with exactly these keys: schema (saetta.signals.feed.v2), as_of, request_id, approval_revision, count, items (one page, at most 25), has_more, next_cursor, unavailable and excluded. Each signal has these fields; only a newer signal has the last two:
| Field | Meaning |
|---|---|
receipt | The SHA-256 digest of the signal's sealed record: your receipt. |
code | A neutral code for the rule behind the signal, the same for each of its signals. |
status | actionable while its order deadline is still ahead with at least lead_s left; closed after that. |
ticker | The ticker of the stock or fund, one to five capital letters. |
decision_at | When the signal was decided (UTC). |
release_at | The release time (UTC). No signal is shown before it. |
order_deadline | The time by which the order must be placed (UTC), or null: then the signal is history only. A morning pick's deadline can be as late as 20:00 New York time on its entry day, or 17:00 on a day the market closes early (see entry_auction). |
lead_s | The seconds the signal needs left before its order deadline to be shown as actionable. |
entry_session | The entry day (a New York date). |
entry_auction | How to enter on the entry day, as a fixed text value: open is the tested entry at the open (an at-the-open order placed before 09:28 New York time), close at the close; null for a market order. A morning pick can stay actionable after the open, until its order_deadline: an order then is not the tested entry, and an at-the-open order sent after 09:28 New York time waits for the next day's open or is refused, depending on your broker. |
exit_session | The exit day (a New York date). |
exit_auction | How to exit on the exit day, as a fixed text value; null for a timed sale at exit_at. |
exit_at | The exit time (UTC). The signal leaves the feed then. |
stop_bps | A stop, in basis points, or null for none. |
stop_from | When that stop starts, or null. |
suggested_stop_bps | On a plan: the suggested stop, in basis points below your own fill price: the signal's own tested stop where it has one, otherwise 3000 (30%). You may use your own. |
suggested_stop | On a plan: the same stop in words. |
sizing_guide | On Pro and Elite, once you set a max loss per pick on Plan & billing: shares = your max loss / (your entry price - suggested stop), in words; otherwise null. Arithmetic only, not advice. |
entry_delay_s | Newer signals only: the seconds after you receive the signal at which to place your order (60). |
label | Newer signals only, always: "new signal, live record building, not a tested record". Like every pick, their picks count in the live record when the modelled portfolio takes them. |
Your receipt: SHA-256 and the chain number
Every pick of GET /api/v1/signals carries two values to keep:
record_sha: the SHA-256 digest of the pick's sealed record.seq: that record's number in its chain of sealed records.
Saetta keeps its sealed records in SHA-256 hash chains. Each record's digest also covers the digest of the record before it in the same chain, so changing or removing a record changes its digest and every later one: a digest you kept would no longer match. Store record_sha and seq with every pick you use. If you ever need to ask about a pick, quote both. Every item of GET /api/v2/signals carries receipt, the SHA-256 digest of its sealed record: keep it the same way. Picks carry no digital signature today: you read them only from this site's API, over HTTPS, with your own key.
Error codes and responses
Errors from the signals service are JSON, with a code, a message and a request id. The front door and its safety gate answer some requests before the signals service sees them; their answers carry no request id.
{
"error": {
"code": "unauthenticated",
"message": "A valid API key is required in the Authorization header (Bearer).",
"request_id": "req_8f1b2c3d4e5f"
}
}
| Who answers | Status | Code | Meaning |
|---|---|---|---|
| Front door | 401 | admission_required | No key was sent, or the key cannot read now. If you made it a moment ago, ask again shortly. Otherwise Plan & billing says why: the plan may have ended, a payment may be in progress, or the key was replaced, reset by us, or made before keys worked on their own (then use your newer key, or create one there). |
| Front door | 503 | temporarily_unavailable | Access is closed or paused, or the door cannot check admission right now. |
| Front door | 429 | rate_limited | Too many requests. Retry-After says when to try again. |
| Front door | 404 | not_found | Any other path, a query string (other than cursor on GET /api/v2/signals), or another method (POST only to /api/v2/signals/acks). |
| Safety gate | 503 | alerts_unavailable | The answer failed its safety checks, or the signals service could not be reached. Nothing partial is sent. A single pick that fails its checks is left out and the others are sent. |
| Signals service | 400 | invalid_request | The request does not match the route: for example a body. |
| Signals service | 400 | invalid_cursor | The cursor of GET /api/v2/signals is not valid or has expired: read again without one. |
| Signals service | 401 | unauthenticated | The key is missing, not valid, revoked or expired. |
| Signals service | 403 | not_trial_member | The key is not an active key of a plan. |
| Signals service | 429 | rate_limited | You checked sooner than your plan's pace allows. Retry-After says when the next read is allowed. |
| Signals service | 503 | lane_off | Signals are not open yet, or are paused. |
| Signals service | 503 | alerts_unavailable | The sealed signals could not be verified right now. Nothing partial is sent. |
Versioning and deprecation
The endpoint address /api/v1 represents version 1. Within v1, additions are backwards-compatible: new routes, new optional query parameters, additional response fields, and new error codes. Client code should ignore unknown response fields and handle unfamiliar error codes by their HTTP status class. GET /api/v2/signals is a second signals route beside GET /api/v1/signals, not its replacement: the v1 route keeps working. If a v1 route is ever retired, it remains operational for at least 6 months after its successor is released, its responses include Deprecation and Sunset headers, and account owners receive notice at least 90 days prior to retirement.
Dates and times
All timestamps in request parameters and API responses use ISO 8601 formatting. Dates are represented in calendar format (YYYY-MM-DD). Timestamps are in UTC, denoted with trailing Z (either second-precision YYYY-MM-DDTHH:MM:SSZ or millisecond-precision YYYY-MM-DDTHH:MM:SS.mmmZ). Specific market-session fields suffixed with _et report time in US Eastern Time with explicit numeric offset (such as -04:00 or -05:00).
What not to expect
There is no broker order placement and no personal investment advice. Picks can be wrong, and we do not manage brokerage accounts or guarantee outcomes. The service does not redistribute raw vendor data. Features marked coming soon, including a WebSocket stream, are not open.