Common reports
The user can request various reports that contain useful information, about users, trading events, etc. Any report can be requested using GET/reports/{reportId}, where you need to insert the ID of the required report. To get IDs of all reports, use the GET/reports method.
This article presents the most frequently used reports below.
Get reports list with IDs
GET/reports
A request to this endpoint allows you to find out the list of all reports available on the server with their IDs. Please note that the report ID will be used in your subsequent requests.
Query
name
string
Filter by name. Several names can be specified using comma separator. By default parameter is blank and response contains all entities.
sort
string
(+/- = asc/Sort response results (ascending/descending) by a given field. Available fields for sorting: name/id. For ascending order sign ‘+’ is used before specified field. For descending - ‘-’.
CURL
curl -X GET "https://sandbox.traderevolution.com:8443/proftrading/rest/reports" -H "accept: application/json" -H "Authorization: Bearer eyItNjcyMTMwNjE4IjotNjcyMTMwNjE4LCItNTI1MjMwNTY1IjotNTI1MjMwNTY1LCIyMDk5MzYyNjY5IjoyMDk5MzYyNjY5LCItMjEwNzgwODc3MiI6LT...KSy2DC8yZTbhKXp9No7rWCD6bXobsA9mMLGLpY3CB6XRIIdCqmBCl3-Y9BWf8E35-AdtJOqSRAQAA.WHM7UoSPwIO66mG3lVlI0hiuWLQB4EHH7yuKBUsRVWY"Response
[
{
"name": "Account Performance Report",
"id": 121
},
{
"name": "Account Statement Report",
"id": 119
},
{
"name": "Account Statement on chosen moment report",
"id": 152
},
{
"name": "Working Orders",
"id": 3242952
},
{
"name": "account operations",
"id": 3242948
}
]In the response, you will get a list of all available reports with their IDs. Use these IDs for your subsequent requests.
Full info about this method can be found here:
https://sandbox.traderevolution.com:8443/proftrading/rest/swagger-ui.html#/Reports/reportsUsingGET
Open positions report
GET/reports/{open_positions_report_id}
Shows data about all the positions opened at the current moment. The ID of the report should be specified in the path. The report displays information as follows:
"positionid" - positionID;
"account" – account name;
"login" – user login name;
"groupname" – user group name;
"instrumentname" – instrument name;
"instrumentgroup" – instrument group name;
"amount" – position amount;
"openprice" – open price;
"buyselltype" – Long/Short;
"opentime" – open time;
"currentprice" – Current price;
"stoploss" – stop loss price;
"sllimitprice" – stop limit loss price;
"takeprofit" - TP price;
"profit" – unrealized PnL;
"swaps" – charged swaps for position (already settled to the balance);
"comission" – charged commissions for position (already settled to the balance);
"currency" – account currency;
"routename" – execution venue;
"margin" – margin value;
"autotrade" – autotrade mode;
"terminaltype" – client type from which a position is opened;
"tradingmode" – mode in which this position is opened;
"omnibusname" – omnibus account name;
"exchange" – exchange name.
CURL (Open positions report has 114 ID in the example)
Response
Each element of the data array corresponds to the column name in the header array.
You can test this report by following the link:
Position history
GET/reports/{position_history_report_id}
Shows history of all positions (both, opened and closed) and Exercise statuses for Options with Options exercise requests. For Options, the Instrument field has a specific format, for example: EUR/USD (Call 11/2008 @1,34). This means EUR/USD call options with a strike price of 1.34 and expired in November 2008. The ID of the report should be specified in the path. The report displays information as follows:
The report displays information as follows:
"date" - position opening date/time;
"account" – account name;
"instrument" – instrument name;
"instrument type" – instrument type, for example Forex;
"position ID" – ID of this position;
"trade ID" – ID of the trade which lead to opening a position;
"open price" – open price of this position;
"operation" – side (buy/sell);
"position status" – current position status (opened/closed);
"trade amount" – amount of trade;
"position amount" – amount of position;
"price" - price of this position;
"profit" – unrealized PnL;
"account ID" – ID of the account - position owner;
"fee" – charged commissions for position (already settled to the balance);
"fee up to min" – amount of fee charged to bring the commission to a minimum value.
CURL (Position history report has 1159290 ID in the example)
Response
Each element of the data array corresponds to the column name in the header array.
You can test this report by following the link:
Account operations report
GET/reports/{account_operations_report_id}
This report shows the detailed information on account operations. Shows all account operations made by selected users/user groups/accounts for the chosen period of time. This report displays information as follows:
"account" - account name;
"createdat" - creation date;
"operationtype" - operation type (withdrawal, deposit, etc);
"amount" - an operation amount in the account currency;
"accountoperationid" - ID of the account operation;
"positionid" - position ID to which this operation is linked (i.e relevant for swaps, commissions), N/A for operations that are not linked to the exact position (i.e Deposit).
Various filters are available to filter account operations. To do this, you should add an appropriate filter to the query (see example below).
You can find all filters and parameters of this request by following the link:
CURL example. Account operations report has 150 ID and is requested for startDate = 1717847365000 (08.06.24 in milliseconds Unix timestamp).
Response
Each element of the data array corresponds to the column name in the header array.
Balance summary report
GET/reports/{balance_summary_report_id}
This report shows detailed balance information on selected users, including settled and unsettled stock operations. By default, this report shows information as follows:
"account" – account name;
"balance_before" – start balance for the selected period;
"trading_in" – sum of credit realized pnl operations (Trading);
"trading_out" - sum of debit realized pnl operations (Trading);
"deposit_with_unsettled" – sum of deposits;
"widthdraw" – sum of withdrawals;
"commission_out" – sum of commissions;
"swaps_in" – sum of credited swaps;
"swaps_out" – sum of debited swaps;
"dividends" – sum of dividends;
"other_account_operations" – other operations;
"total" – sum of all per period;
"balance_after" – ending balance.
Various filters are available to filter account operations. To do this, you should add an appropriate filter to the query (see example below).
You can find all filters and parameters of this request by following the link:
CURL example. Balance summary report has 102 ID and is requested for userId = 146695.
Response
Each element of the data array corresponds to the column name in the header array.
Trades report
GET/reports/{trades_report_id}
This report contains information about order fills (trade operations). By default, this report shows information as follows:
"accname" – account name;
"datetime" – trade time;
"operation" – shows the type: opening trade, closing trade, increasing the existing position trade, decreasing the existing position trade;
"side" – Buy/Sell;
"quantity" – trade amount;
"instrument" – instrument name;
"price" – trade price;
"comission" – commission ;
"realizedpnl" – realized PnL (for closing and decreasing position trades);
"tradeid" – trade ID;
"positionid" – position ID to which the exact trade is related.
Various filters are available to filter account operations. To do this, you should add an appropriate filter to the query (see example below).
You can find all filters and parameters of this request by following the link:
CURL example. The trades report has 117 ID and is requested for startDate = 1717847365000 (08.06.24 in milliseconds Unix timestamp).
Response
Each element of the data array corresponds to the column name in the header array.
Order history report
GET/reports/{order_history_report_id}
This report contains information about orders and their change history (placing, modification, filling, canceling, etc.). By default, this report shows information as follows:
"order_book_account" – account name;
"event time" – event time;
"order_book_side" – Buy/Sell;
"order_book_quantity" – order amount;
"instrument" – instrument name;
"order_book_type" – order type (limit, stop, etc);
"order_book_tif" – order TIF;
"order_book_price" – order price;
"order_book_event" – event type (placing, modification, etc);
"order_book_orderid" – orderID.
Various filters are available to filter account operations. To do this, you should add an appropriate filter to the query (see example below).
You can find all filters and parameters of this request by following the link:
CURL example. Order history report has 112 ID and is requested for startDate = 1717847365000 (08.06.24 in milliseconds Unix timestamp).
Response
Each element of the data array corresponds to the column name in the header array.
Connections event history report
GET/reports/{connection_history_report_id}
This report contains information about users' connection history. By default, this report shows information as follows:
"actualtime" - event time;
"login" - user's login name;
"event" - enter_system/leave_system/enter_system_failure (i.e wrong credentials);
"sessionid" - unique session id;
"ipaddress" - shows IP address;
"nodename" - servers to which the user was connected;
"sessiontype" - trade/quote;
"terminaltype" - front-end type from which the user was connected to the system;
"branding" - white label name;
"terminalversion" - version of the front-end app;
"deviceid" - unique device ID;
"appinstallid"- unique installation ID;
"comments" - any comments if exist.
Various filters are available to filter account operations. To do this, you should add an appropriate filter to the query (see example below).
You can find all filters and parameters of this request by following the link:
CURL example where Connections history report has 160 ID.
Response
Each element of the data array corresponds to the column name in the header array.
Last updated