Skip to content

GetCustomerSubscriptionsByFilter

Endpoint

GET /copytrade/subscriptions

Authorization

Requires SESSION_CUSTOMER.

Description

Returns copy trading subscriptions related to accounts owned by the authenticated customer.

The method is table-based and supports pagination, sorting and filters. The server first restricts the data to the authenticated customer and then applies request filters, so count is the total number of matching customer subscriptions before pagination.

Query Parameters

Field Type Required Description
limit int Yes Page size. Maximum 50000.
offset int Yes Zero-based row offset.
master_login int No Shortcut filter for master account login.
master_account int No Alias of master_login.
where array No Standard table filter conditions.
whereNot array No Standard negative filter conditions.
whereIn array No Standard IN filter conditions.
whereNotIn array No Standard NOT IN filter conditions.
whereBetween array No Standard range filter conditions.
whereNotBetween array No Standard negative range filter conditions.
orderBy array No Sort expression, for example [["updated_time", "desc"]].

Supported filter fields:

id, subscription_id, master_login, master_account, follower_login, follower_account, enabled, status, copy_mode, volume_mode, risk_multiplier, fixed_volume, copy_sl, copy_tp, copy_partial_close, copy_pending_orders, copy_existing_positions, reverse_direction, max_volume, min_volume, max_positions, symbols_mode, symbols, created_time, updated_time.

Example Request

GET /copytrade/subscriptions?limit=50&offset=0&master_login=10001

Equivalent table filter:

{
  "limit": 50,
  "offset": 0,
  "where": [
    ["master_login", "=", 10001]
  ],
  "orderBy": [
    ["updated_time", "desc"]
  ]
}

Response

{
  "structure": [
    "id",
    "master_login",
    "follower_login",
    "enabled",
    "status",
    "copy_mode",
    "volume_mode",
    "risk_multiplier",
    "fixed_volume",
    "copy_sl",
    "copy_tp",
    "copy_partial_close",
    "copy_pending_orders",
    "copy_existing_positions",
    "reverse_direction",
    "max_volume",
    "min_volume",
    "max_positions",
    "symbols_mode",
    "symbols",
    "created_time",
    "updated_time"
  ],
  "rows": [
    [
      12,
      10001,
      20002,
      1,
      0,
      0,
      1,
      1.5,
      0,
      1,
      1,
      1,
      0,
      0,
      0,
      0,
      0,
      5,
      0,
      "",
      1766400000,
      1766486400
    ]
  ],
  "count": 1
}

Errors

HTTP Error Description
400 INVALID_DATA Request filter or pagination payload is invalid
401 INVALID_CUSTOMER_SESSION Customer session is missing or invalid