Exceptions
backtest360.client.Backtest360Error
Bases: Exception
Raised on any non-2xx response from the Backtest360 API.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
message
|
str
|
Human-readable description of the error. |
required |
status
|
int
|
HTTP status code returned by the engine (0 for client-side errors). |
required |
code
|
str | None
|
Machine-readable error code (e.g. |
None
|
body
|
dict | str | None
|
Parsed response body (dict) or raw text if JSON parsing failed. |
None
|
request_id
|
str | None
|
Value of the |
None
|
Example
try: ... result = client.backtest(strategy, df) ... except Backtest360Error as e: ... if e.status == 401: ... print("Invalid API key") ... elif e.status == 429: ... print("Rate limited, retry later") ... else: ... raise
Common error codes
| Code | Status | Meaning |
|---|---|---|
AUTH_INVALID |
401 | API key not found or malformed |
AUTH_REVOKED |
401 | Key has been revoked |
AUTH_EXPIRED |
401 | Key has passed its expiry date |
RATE_LIMIT_EXCEEDED |
429 | Per-minute or per-day limit hit |
CONCURRENCY_LIMIT |
429 | Per-key concurrency cap reached |
VALIDATION_ERROR |
422 | Strategy or request payload invalid |
SDK_NO_API_KEY |
0 | No API key provided (client-side) |
SDK_PATH_FORBIDDEN |
0 | Attempted to access a non-/api/ path (client-side) |