Calculate profit
CalculateProfit
Description: Calculates the profit or loss for a trade based on open/close price, volume, and symbol configuration.
Request Parameters
| Name |
Type |
Required |
Description |
| login |
int |
Yes |
User login ID |
| open_price |
double |
Yes |
Price at which the trade was opened |
| close_price |
double |
Yes |
Price at which the trade was closed |
| volume |
int |
Yes |
Volume of the trade in minimal lots |
| symbol |
string |
Yes |
Trading symbol (e.g., "EURUSD") |
Request Example
{
"login": 123456,
"open_price": 1.1000,
"close_price": 1.1050,
"volume": 1000,
"symbol": "EURUSD"
}
Response Parameters
| Name |
Type |
Description |
| profit |
double |
Calculated profit or loss |
Response Example