Skip to content

Querying data

The list endpoints accept a compact, bracketed query syntax in the URL query string for filtering, ordering, and pagination. This page describes that syntax.

The syntax applies to these GET endpoints:

  • /accounts
  • /transactions
  • /positions

It does not apply to any create or handshake endpoint.

Filters narrow, they never widen

A filter can only reduce the rows a token is already allowed to see. Your brand, your token's scope, and per-account visibility are applied as an outer constraint that a query cannot escape. Filtering on an account or trading account that belongs to another firm returns an empty list — never another firm's data.

Filtering

Filters use WHERE[...] keys. Remember to URL-encode the brackets and values.

Equality

Match a field exactly:

WHERE[leadStatusCode]=3

The literal value null is a sentinel meaning is null. For example, on the positions endpoints, an open position has no close rate, so this selects open positions:

WHERE[closeRate]=null

Any-of (OR) on one field

Repeat a field with the [] suffix to match any of several values:

WHERE[leadStatusCode][]=3&WHERE[leadStatusCode][]=4

Range

Give a min, a max, or both. Either bound may be omitted for an open-ended range. Bound names are case-insensitive:

WHERE[amount][min]=100&WHERE[amount][max]=500

Combining fields

Multiple distinct WHERE[...] fields are combined with AND. There is no top-level OR across different fields.

Rules and errors

  • Field names are matched case-insensitively but must be on the endpoint's allow-list (below). A field that is not filterable returns 400 (invalid partner query).
  • Conflicting clauses on one field — for example equality together with a range, or equality together with an any-of list — return 400.
  • A duplicate scalar value, or the same range bound given twice, returns 400.
  • Unknown top-level query keys are ignored.

Filterable fields

Only the fields listed here can be filtered, per entity.

Accountsid, firstName, lastName, leadStatusCode, createdOn, modifiedOn, affiliateTransactionId, email, phone, campaignId, tag, tag1, ftdExists, registrationUrl, additionalInfo1, additionalInfo2, additionalInfo3, language, promotionCode, brandId.

TransactionstransactionId, accountId, amount, approvedOn, isFtd.

PositionsactionType, amount, closeConversionRate, closeRate, closeTime, digits, fullAmount, fullAmountInDepositCurrency, instrumentName, openConversionRate, openRate, openTime, orderID, profitInAccountCurrency, stopLoss, takeProfit, tpAccount, currency, isoCurrency, accountId, commission.

Ordering

Results are ordered by creation time. Use ORDER[sortOrder] to choose the direction:

ORDER[sortOrder]=asc
  • desc (the default) returns newest first.
  • Any other value — including asc — returns oldest first.

The sort field is fixed to creation time; only the direction can change.

Pagination

Pagination is offset-based. There is no cursor.

Parameter Default Notes
LIMIT[Take]=N 100 Page size. Maximum 500 — larger values are clamped to 500. Take=0 is allowed.
LIMIT[Skip]=N 0 Number of rows to skip before the page.

A non-integer or negative Take or Skip returns 400. To page through results, hold the query fixed and advance Skip by your page size on each request.

Positions: required date range

The positions endpoints require an explicit time window. Supply both startTime and endTime:

  • Either an epoch-millisecond integer, or a string in RFC 3339 (2026-01-31T00:00:00Z) or YYYY-MM-DD form.
  • A missing or unparseable bound returns 400.
GET /positions?startTime=1767225600000&endTime=1769817600000

The result includes both open and closed positions for the window. To read only the open positions, filter on a null close rate: WHERE[closeRate]=null.