Skip to content

GetCopyTradeMasters

Endpoint

GET /copytrade/masters

Authorization

Requires SESSION_CUSTOMER.

Description

Returns public enabled masters and masters owned by the authenticated customer.

The response includes marketplace statistics calculated by the backend from the master's closed trade history and daily equity snapshots. The endpoint supports the standard filter format, including filters and sorting by calculated statistics for the selected statistics period.

Statistics are maintained server-side and are intended for marketplace ranking and discovery. PNL-based metrics use closed market trades only. pnl_history is a cumulative realized PNL curve, ordered from oldest day to newest day. ROI and max drawdown are based on daily equity snapshots and therefore represent daily snapshot-based values, not intraday drawdown.

Request Parameters

All parameters are optional.

| Name | Type | Description | | limit | int | Page size. Default 100, maximum 500 | | offset | int | Page offset. Default 0 | | where | array | Standard where filters | | whereNot | array | Standard negative filters | | whereIn | array | Standard include-by-list filters | | whereNotIn | array | Standard exclude-by-list filters | | whereBetween | array | Standard range filters | | whereNotBetween | array | Standard negative range filters | | orderBy | array | Sort definition | | stats_period | string | Statistics period. Allowed values: 7D, 30D, 90D, 365D. Default 30D | | period | string | Alias for stats_period |

Filter Fields

Master fields:

Field Type
id int
login int
enabled int
strategy_name string
visibility string
allowed_follower_modes int
show_trade_history int
show_followers int
created_time int64
updated_time int64

Statistics fields:

| Field | Type | Description | | stats.roi | number | ROI percent for the selected period | | stats.pnl | number | Net realized PNL for the selected period | | stats.win_rate | number | Winning closed trades percent for the selected period | | stats.max_drawdown | number | Max drawdown percent from daily equity snapshots for the selected period | | stats.avg_pnl_per_trade | number | Average net PNL per closed trade for the selected period | | stats.trades | int | Closed market trades for the selected period |

The server also accepts the same statistics fields without the stats. prefix for compatibility, for example roi and stats.roi are equivalent.

Request Example

{
  "stats_period": "90D",
  "where": [
    ["stats.roi", ">=", 5],
    ["stats.win_rate", ">=", 55],
    ["stats.trades", ">=", 10],
    ["stats.max_drawdown", "<=", 20]
  ],
  "orderBy": [["stats.pnl", "desc"]],
  "limit": 50,
  "offset": 0
}

Response

{
  "rows": [
    {
      "id": 1,
      "login": 100001,
      "enabled": 1,
      "strategy_name": "Conservative FX",
      "description": "Low risk major pairs strategy",
      "visibility": "public",
      "allowed_follower_modes": 2,
      "show_trade_history": 1,
      "show_followers": 1,
      "created_time": 1778160000,
      "updated_time": 1778160000,
      "stats": {
        "period": "30D",
        "period_days": 30,
        "roi": 8.42,
        "pnl": 1240.5,
        "win_rate": 61.54,
        "max_drawdown": 7.8,
        "avg_pnl_per_trade": 47.71,
        "trades": 26,
        "pnl_history": [
          0,
          120.5,
          85.5,
          85.5,
          165.75
        ]
      }
    }
  ],
  "count": 1
}

pnl_history contains one cumulative realized PNL value per day for the selected period, ordered from oldest to newest. Days without closed trades repeat the previous value.

Example:

  • day 1: closed PNL 20 -> history value 20;
  • day 2: closed PNL 12 -> history value 32;
  • day 3: no closed trades -> history value 32;
  • day 4: closed PNL -5 -> history value 27.

The array length matches period_days: 7 values for 7D, 30 for 30D, 90 for 90D, and 365 for 365D. The response example is shortened for readability.

Errors

HTTP Error Description
401 INVALID_CUSTOMER_SESSION Customer session is missing or invalid