Get MT4 Trades
GET /public/v1/mt4/trades
Query Parameters
| Key | Type | Required | Rule | Description | 
|---|---|---|---|---|
| connection_id | string | Mandatory | minimum 0 | MT4 Server ID given by this API | 
| type | string | Mandatory | minimum 0 | type of trades | 
| start | string | Mandatory | YYYY-MM-DD | starting time | 
| end | string | Mandatory | YYYY-MM-DD | ending time, must not exceed 3 months from starting time | 
| skip | number | Optional | minimum 0default0 | the number of the records that is skipping from the full list | 
| limit | number | Optional | minimum 0maximum500default10 | the number of records each page will show | 
| user_id | string | Optional | length 8 | filter trades by user id | 
| login | number | Optional | minimum 0 | filter trades by MT4 login | 
| order_id | number | Optional | minimum 0 | filter trades by order id | 
Expected HTTP status code
- 200
Response
| Name | Type | Description | 
|---|---|---|
| count | number | total number of the list | 
| records | array | list of accounts in array | 
| records[].login | number | account login | 
| records[].order_id | number | order ticket number | 
| records[].cmd | number | action, 0 - buy, 1 - sell, 2 - buy limit, 3 - sell limit, 4 - buy stop, 5 - sell stop, 6 - balance, 7 - credit | 
| records[].symbol | string | trade symbol | 
| records[].volume | number | volume in lots | 
| records[].swaps | number | swaps | 
| records[].stop_loss | number | stop loss | 
| records[].take_profit | number | take profit | 
| records[].open_price | number | open price | 
| records[].close_price | number | close price | 
| records[].open_time | string | open time | 
| records[].close_time | string | close time | 
| records[].profit | number | profit | 
| records[].commission | number | commission | 
| records[].comment | string | comment | 
| records[].crm_user | object | account's CRM user information | 
| records[].crm_user.id | string | CRM user ID | 
| records[].crm_user.email | string | CRM user's email | 
| records[].crm_user.name | string | CRM user's name | 
| records[].crm_user.phone.number | string | CRM user's phone number | 
| records[].crm_user.phone.country_code | string | CRM user's phone country code | 
| records[].crm_user.owner_id | string | CRM user's owner's ID | 
| records[].crm_user.owner_name | string | CRM user's owner's name | 
| records[].crm_user.referrer_id | string | CRM user's referrer's ID | 
| records[].crm_user.referrer_name | string | CRM user's referrer's name | 
| records[].crm_user.rank_id | string | CRM user's rank ID | 
| records[].crm_user.tier | string | CRM user's tier | 
Error
| Code | Type | Description | 
|---|---|---|
| 400 | mt4_connection_not_found | Cannot find connection from given connection_id | 
Type of Trades
| Type | Description | 
|---|---|
| trade history | closed trades | 
| open position | opened trades | 
| pending order | pending order | 
| transactions | deposit, withdrawal and credits |