Get your fees of using the eWallet.
URL: https://www.trade-copier.com/webservice/v4/fee/getFees.php
You can send an optional parameter to group fees by message type.
Response: JSON object list
| Field Name | Field Type | Field Description |
|---|---|---|
| amount | string | The amount the fee deducted from the eWallet |
| date_fees | string | Date of the fee |
| message | string | Type of fee. Possible messages include "DAILY_FEES", "DAILY_ORDER" or "DAILY_UPDATE" |
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/fee/getFees.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);
$grouping = ['type_group' => '1']; //group by type
//$grouping = ['type_group' => '0']; //DON'T group by type
//$filter = []; //DON'T group by type
curl_setopt($ch, CURLOPT_POSTFIELDS, http_build_query($grouping));
// Execute request
$json = json_decode(curl_exec($ch));
// Close connection
curl_close($ch);
if(array_key_exists('data', $json))
{
echo '<table id="api_data">';
foreach($json->data as $row) {
foreach($row as $key => $val) {
echo '<th>'.$key.'</th>';
}
break;
}
foreach($json->dataas $fee)
{
echo '<tr>';
foreach($fee 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);
}
?>