This API endpoint returns detailed account reporting statistics for one or multiple trading accounts.
URL: https://www.trade-copier.com/webservice/v4/reporting/getReporting.php
The request may include an optional filter object that allows you to control which data is returned. You can:
Filter by
account_id, using either a single ID or an array of IDs.Filter by date range using
day_fromandday_to. Type: string (YYYY-MM-DD)Filter by month and/or year; if omitted, the current month and year are used by default.
Apply pagination using
start(offset, default: 0) andlength(limit) to control result size.Pagination limit (max: 1000).
Response: JSON object list
| Field Name | Field Type | Field Description |
|---|---|---|
| account_id | string | Encrypted account ID |
| month | int | Month of the reporting |
| year | int | Year of the reporting |
| name | string | Name of the account |
| broker | string | Broker of the account |
| login | string | Login of the account |
| server | string | Server of the account |
| currency | string | Currency of the follower |
| hwm | float | High Water Mark of the follower's reporting |
| balance_start | float | Balance at the start of the month |
| deposit_withdrawal | float | How much has been withdrawn |
| balance_end | float | Balance at the end of the month or today if current month |
| pnl | float | Profit And Loss of the month in account currency |
| pnlUSD | float | Profit And Loss of the month in USD |
| pnlEUR | float | Profit And Loss of the month in EUR |
| performance | float | Performance in Percentage |
| accountStatus | int | Account is 0=disabled, 1=enabled |
| accountType | int | Account is 0=master, 1=slave |
| balance_last, equity_last, credit_last, free_margin_last | int | Latest account metrics |
PHP example
<?php
echo "<link rel='stylesheet' type='text/css' href='https://www.trade-copier.com/webservice/example.css'>";
$url="https://www.trade-copier.com/webservice/v4/reporting/getReporting.php";
$headers = array(
'Content-Type: application/x-www-form-urlencoded',
'Authorization: Bearer [[TOKEN]]',
);
// Open connection
$ch = curl_init();
// Setting the options
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
//Filter can specify a mix of fields, they are all optional
//$filter = ['start' => 10, 'length' => 50];
//$filter = ['month' => 12, 'year' => 2023, 'start' => 25];
//$filter = ['start' => 30, 'length' => 50, 'month' => 1, 'year' => 2024];
//$filter = ['start' => 0, 'length' => 20, 'account_id' => 'ddfdfgwges'];
//$filter = ['start' => 0, 'length' => 20, 'account_id' => ['ddfdfgwges', 'jtzjeggfh']];
//$filter = ['start' => 0, 'length' => 20, 'year' => 2024, 'month' => 1, 'account_id' => ['ddfdfgwges', 'jtzjeggfh']];
$filter = [];
curl_setopt($ch, CURLOPT_POSTFIELDS, http_build_query($filter));
// Execute request
$json = json_decode(curl_exec($ch));
// Close connection
curl_close($ch);
//We access the order(s) list
if(array_key_exists('reporting', $json)) {
echo '<table id="api_data">';
foreach($json->reporting as $row) {
foreach($row as $key => $val) {
echo '<th>'.$key.'</th>';
}
break;
}
foreach($json->reporting as $stat) {
echo '<tr>';
foreach($stat as $key => $val) {
echo '<td>'.$val.'</td>';
}
echo '</tr>';
}
echo '</table>';
} else {
//This is an error message that can be access like this:
//echo $json->code." ".$json->error;
echo json_encode($json);
}
?>