TorqueTorque

Search docs

Search Torque documentation pages & sections

Errors & Rate Limits

Platform API v1 returns structured JSON errors. Business API keys are rate-limited; execute routes support optional idempotency for safe retries. Probe GET /capabilities (manifest v19) for the live operations block.

Error envelope

Most /api/v1 routes return:

error.json
{
  "error": {
    "code": "INVALID_API_KEY",
    "message": "Human-readable explanation.",
    "details": { "optional": "context" }
  }
}
CodeWhen
UNAUTHORIZEDMissing or malformed Authorization header
INVALID_API_KEYUnknown or revoked business API key
INVALID_TOKENInvalid or expired smart wallet JWT
FORBIDDENWallet mismatch or inactive business
VALIDATION_ERRORInvalid query or JSON body
RATE_LIMIT_EXCEEDEDBusiness key exceeded 100 requests in rolling minute
COOLDOWNIntelligence force reroll within cooldown window
CONFIG_ERRORDeployment missing required configuration
NOT_FOUNDResource not available for current query
ENSO_ERROR / JUPITER_ERROR / BUILD_FAILEDExecute route build failures

Business API key rate limits

Routes using Authorization: Bearer sk_live_… enforce 100 requests per rolling minute per key (Intelligence READ, datasets, markets, programmatic assistant chat, GET /accounts/business, etc.).

rate-limit-response
HTTP/1.1 429 Too Many Requests
Retry-After: 42

{
  "error": {
    "code": "RATE_LIMIT_EXCEEDED",
    "message": "API rate limit exceeded (100 requests per minute). Retry shortly.",
    "details": { "retryAfterSeconds": 42 }
  }
}
  • Honor the Retry-After header (seconds).
  • Limits are per API key, not per IP.
  • Smart wallet JWT execute routes (Actions) are not counted against this business-key bucket.

COOLDOWN vs rate limit quota

Intelligence views with force=1 may return 429 with error.code: "COOLDOWN" and error.details.retryAfterMs — angle reroll cooldown, not the per-key 100/min quota. See Intelligence API.

Execute idempotency

POST /api/v1/execute/** (aliases /actions/**) accept an optional header:

idempotency-header
Idempotency-Key: <client-generated-uuid>

When present, Torque stores the JSON response for 24 hours. Retries with the same key and same authenticated wallet return the cached status and body without rebuilding the route. Scope: wallet email + route + key. Use a fresh key for intentionally new operations.

Discovery via capabilities

capabilities-operations.sh
curl -sS "https://app.torque.fi/api/v1/capabilities" | jq '.manifestVersion, .operations.rateLimits, .operations.idempotency'

Manifest v19 includes operations.rateLimits, operations.idempotency, operations.aliasHeaders, and assistantTurnTensor (8 write verbs + 8 read families). SDK clients should retry on RATE_LIMIT_EXCEEDED using Retry-After or error.details.retryAfterSeconds.

Was this helpful?