Deltalytix
Sign in

Deltalytix API

Errors

REST error envelope, HTTP status codes, and OAuth error responses.

Errors

REST error envelope

API v1 errors use a consistent JSON body:

{
  "error": "machine_code",
  "message": "Human-readable explanation",
  "details": {}
}
FieldDescription
errorStable machine-readable code
messageHuman-readable explanation
detailsOptional structured context (validation issues, supported values, …)

HTTP status codes

StatusTypical cause
400Validation error (malformed query/body)
401Missing, expired, revoked, or invalid Bearer token
403Authenticated but missing required scope
404Resource not found
422Semantically invalid request (unsupported service/type)
500Unexpected server error

Unauthorized (401)

{
  "error": "unauthorized",
  "message": "Missing or invalid access token"
}

Responses include:

WWW-Authenticate: Bearer resource_metadata="https://www.deltalytix.app/.well-known/oauth-protected-resource"

Insufficient scope (403)

{
  "error": "insufficient_scope",
  "message": "Token is missing required scope trades:write"
}

Unsupported service (422)

{
  "error": "unsupported_service",
  "message": "Only IBKR Flex is supported in this API version",
  "details": {
    "supported": ["ibkr"]
  }
}

OAuth errors

Token endpoint failures use the RFC 6749 shape (not the REST envelope):

{
  "error": "invalid_grant",
  "error_description": "Authorization code is invalid or expired"
}

Common OAuth error values include invalid_request, invalid_client, invalid_grant, unauthorized_client, unsupported_grant_type, and invalid_scope.

Authorization endpoint denials redirect to the registered redirect_uri with error=access_denied (and the original state when provided).

Non-error counts

Some write endpoints report duplicate or zero-import outcomes with HTTP success and count fields instead of an error body. For example, POST /api/v1/trades returns 201 with "imported": 0 when every row already exists.

Handling tips

  1. Branch first on HTTP status, then on error.
  2. Surface message to developers; use error for programmatic handling.
  3. Treat details.supported as the authoritative allow-list when present.
  4. On 401, refresh the OAuth access token or prompt for a new PAT; do not retry indefinitely.

Footer

Deltalytix

Advanced analytics for modern traders.

GitHubYouTubeDiscord

Product

  • Features
  • Pricing
  • Prop Firms Catalogue
  • Teams
  • Support
  • Documentation

Company

  • About

Legal

  • Privacy Policy
  • Terms of Service
  • Disclaimers
© 2026 Deltalytix. All rights reserved.
Trading in futures and forex markets involves significant risks and is not suitable for all investors. An investor could potentially lose all or a portion of their initial investment. Risk capital is money that can be lost without jeopardizing one's financial security or lifestyle. Only risk capital should be used for trading, and only those with sufficient risk capital should consider trading. Past performance is not necessarily indicative of future results.
Hypothetical performance results have many inherent limitations, some of which are described below. No representation is being made that any account will or is likely to achieve profits or losses similar to those shown; in fact, there are frequently sharp differences between hypothetical performance results and the actual results subsequently achieved by any particular trading program. One of the limitations of hypothetical performance results is that they are generally prepared with the benefit of hindsight. In addition, hypothetical trading does not involve financial risk, and no hypothetical trading record can completely account for the impact of financial risk in actual trading. For example, the ability to withstand losses or to adhere to a particular trading program in spite of trading losses are material points which can also adversely affect actual trading results. There are numerous other factors related to the markets in general or to the implementation of any specific trading program which cannot be fully accounted for in the preparation of hypothetical performance results and all of which can adversely affect actual trading results.