Deltalytix
Sign in

Deltalytix API

Trades

List and create trades with filters, pagination, and the shared import/dedupe pipeline.

Trades

Manage the authenticated user’s trade history.

List trades

GET /api/v1/trades

Scope: trades:read

Query parameters

ParameterDescription
accountNumberFilter by account number
instrumentFilter by instrument symbol
sideFilter by side
fromInclusive lower bound on entryDate (ISO 8601)
toInclusive upper bound on entryDate (ISO 8601)
cursorOpaque pagination cursor
limitPage size (default 100, max 500)

Example

curl "https://www.deltalytix.app/api/v1/trades?accountNumber=SIM-001&limit=50" \
  -H "Authorization: Bearer dltx_at_…"
const params = new URLSearchParams({
  accountNumber: "SIM-001",
  from: "2026-01-01T00:00:00.000Z",
  limit: "50",
});
 
const res = await fetch(`https://www.deltalytix.app/api/v1/trades?${params}`, {
  headers: { Authorization: `Bearer ${accessToken}` },
});
const page = await res.json();

Response 200

{
  "data": [
    {
      "id": "trade_01HZX…",
      "accountNumber": "SIM-001",
      "instrument": "ES",
      "side": "long",
      "quantity": 2,
      "entryPrice": 5120.25,
      "closePrice": 5128.5,
      "entryDate": "2026-03-15T14:30:00.000Z",
      "closeDate": "2026-03-15T15:10:00.000Z",
      "pnl": 825,
      "commission": 8.64,
      "timeInPosition": 2400,
      "tags": ["breakout"],
      "comment": "Morning continuation",
      "createdAt": "2026-03-15T15:12:01.000Z"
    }
  ],
  "nextCursor": null
}

Create trades

POST /api/v1/trades

Scope: trades:write

Creates one or more trades using the same dedupe pipeline as the dashboard (UUID v5 identity + createMany with skipDuplicates). Duplicate payloads are counted, not treated as hard failures.

Request body

{
  "trades": [
    {
      "accountNumber": "SIM-001",
      "instrument": "ES",
      "quantity": 2,
      "entryPrice": 5120.25,
      "closePrice": 5128.5,
      "entryDate": "2026-03-15T14:30:00.000Z",
      "closeDate": "2026-03-15T15:10:00.000Z",
      "pnl": 825,
      "side": "long",
      "commission": 8.64,
      "entryId": "optional-broker-entry-id",
      "closeId": "optional-broker-close-id",
      "timeInPosition": 2400,
      "tags": ["breakout"],
      "comment": "Morning continuation"
    }
  ]
}
FieldRequiredNotes
accountNumberYesTarget account
instrumentYesSymbol / contract
quantityYesSize
entryPriceYesEntry price
closePriceYesExit price
entryDateYesISO 8601
closeDateYesISO 8601
pnlYesRealized P&L
sideNoe.g. long / short
commissionNoFees
entryIdNoBroker entry identifier
closeIdNoBroker exit identifier
timeInPositionNoDuration in seconds
tagsNoString array
commentNoFree text

Example

curl -X POST https://www.deltalytix.app/api/v1/trades \
  -H "Authorization: Bearer dltx_at_…" \
  -H "Content-Type: application/json" \
  -d '{
    "trades": [
      {
        "accountNumber": "SIM-001",
        "instrument": "ES",
        "quantity": 2,
        "entryPrice": 5120.25,
        "closePrice": 5128.5,
        "entryDate": "2026-03-15T14:30:00.000Z",
        "closeDate": "2026-03-15T15:10:00.000Z",
        "pnl": 825,
        "side": "long",
        "commission": 8.64
      }
    ]
  }'

Response 201

{
  "imported": 1,
  "duplicates": 0,
  "total": 1
}

If every row is a duplicate, the response still returns success with counts (for example "imported": 0, "duplicates": 3, "total": 3), not an error status.

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.