API v1 (stable) · MT5 · 12 operations ·
base URL https://cloud.mywebapi.com ·
OpenAPI v1 (JSON) ·
Redoc
Every call needs Authorization: Bearer $TOKEN — an OAuth 2.0 client-credentials token from
https://auth.cplugin.net/connect/token (scope webapi).
$TRADE_PLATFORM_ID is the id of a trade platform registered in Toolbox.
GET /api/MT5/{tradePlatform}/OrderGetByGroup/{mask}
Timeout: 10 s by default, adjustable per request with the X-Request-Timeout header. When the trade server does not answer in time: Nothing was changed; the request is safe to repeat.
Parameters
Name
In
Type
Required
Description
tradePlatform
path
string (uuid)
yes
mask
path
string
yes
The groups for which orders are requested. You can specify one group, several groups (comma separated) or a group mask. The mask is specified using * (any value) and ! (exception). For example: demo*,!demoforex - all groups with the names beginning with 'demo', except for the group demoforex.
X-Request-Timeout
header
number (double)
no
How long to wait for the trade server, in seconds (1–300). Default for this operation: 10 s (read). The query parameter requestTimeout does the same for clients that cannot set headers. The applied value is returned in the X-Request-Timeout-Applied response header.
Orders (unfulfilled) by user group mask and symbol (pumping)
GET /api/MT5/{tradePlatform}/OrderGetBySymbol/{mask}/{symbol}
Timeout: 10 s by default, adjustable per request with the X-Request-Timeout header. When the trade server does not answer in time: Nothing was changed; the request is safe to repeat.
Parameters
Name
In
Type
Required
Description
tradePlatform
path
string (uuid)
yes
mask
path
string
yes
The groups for which orders are requested. You can specify one group, several groups (comma separated) or a group mask. The mask is specified using * (any value) and ! (exception). For example: demo*,!demoforex - all groups with the names beginning with 'demo', except for the group demoforex.
symbol
path
string
yes
The symbol for which you need to get orders. You can specify multiple symbols separated by commas.
X-Request-Timeout
header
number (double)
no
How long to wait for the trade server, in seconds (1–300). Default for this operation: 10 s (read). The query parameter requestTimeout does the same for clients that cannot set headers. The applied value is returned in the X-Request-Timeout-Applied response header.
GET /api/MT5/{tradePlatform}/OrderRequestByGroup/{mask}
Timeout: 10 s by default, adjustable per request with the X-Request-Timeout header. When the trade server does not answer in time: Nothing was changed; the request is safe to repeat.
Parameters
Name
In
Type
Required
Description
tradePlatform
path
string (uuid)
yes
mask
path
string
yes
The groups for which orders are requested. You can specify one group, several groups (comma separated) or a group mask. The mask is specified using * (any value) and ! (exception). For example: demo*,!demoforex - all groups with the names beginning with 'demo', except for the group demoforex.
X-Request-Timeout
header
number (double)
no
How long to wait for the trade server, in seconds (1–300). Default for this operation: 10 s (read). The query parameter requestTimeout does the same for clients that cannot set headers. The applied value is returned in the X-Request-Timeout-Applied response header.
GET /api/MT5/{tradePlatform}/OrderRequestByGroupSymbol/{mask}/{symbol}
Timeout: 10 s by default, adjustable per request with the X-Request-Timeout header. When the trade server does not answer in time: Nothing was changed; the request is safe to repeat.
Parameters
Name
In
Type
Required
Description
tradePlatform
path
string (uuid)
yes
mask
path
string
yes
The groups for which orders are requested. You can specify one group, several groups (comma separated) or a group mask. The mask is specified using * (any value) and ! (exception). For example: demo*,!demoforex - all groups with the names beginning with 'demo', except for the group demoforex.
symbol
path
string
yes
The symbol for which you need to get orders. You can specify multiple symbols separated by commas.
X-Request-Timeout
header
number (double)
no
How long to wait for the trade server, in seconds (1–300). Default for this operation: 10 s (read). The query parameter requestTimeout does the same for clients that cannot set headers. The applied value is returned in the X-Request-Timeout-Applied response header.
Orders can only be deleted from the applications connected to the trade server, on which the orders have been created. For all other applications, the response code MT_RET_ERR_NOTMAIN is returned. If the object is not found, the response code MT_RET_ERR_NOTFOUND is returned.
Bulk deletion is executed faster than deletion of the same number of orders in a cycle one by one, using IMTManagerAPI::OrderDelete.The acceleration can be especially noticeable when deleting orders belonging to one account.
To improve performance, it is recommended to create arrays and perform group operations separately for each trading account.
Timeout: 5 s by default, adjustable per request with the X-Request-Timeout header. When the trade server does not answer in time: The operation may still be completed by the server (X-Request-Outcome: unknown): check its result before repeating it.
Parameters
Name
In
Type
Required
Description
tradePlatform
path
string (uuid)
yes
X-Request-Timeout
header
number (double)
no
How long to wait for the trade server, in seconds (1–300). Default for this operation: 5 s (trade operation). The query parameter requestTimeout does the same for clients that cannot set headers. The applied value is returned in the X-Request-Timeout-Applied response header.
GET /api/MT5/{tradePlatform}/HistoryRequest/{login}/{fromTime}/{toTime}
Timeout: 30 s by default, adjustable per request with the X-Request-Timeout header. When the trade server does not answer in time: Nothing was changed; the request is safe to repeat.
Parameters
Name
In
Type
Required
Description
tradePlatform
path
string (uuid)
yes
login
path
integer (int64)
yes
fromTime
path
string (date-time)
no
Default: 0.ToUnixTime64() (01.01.1970) will be used
toTime
path
string (date-time)
no
Default: UInt64.MaxValue.ToUnixTime64() will be used
X-Request-Timeout
header
number (double)
no
How long to wait for the trade server, in seconds (1–300). Default for this operation: 30 s (history or report). The query parameter requestTimeout does the same for clients that cannot set headers. The applied value is returned in the X-Request-Timeout-Applied response header.
GET /api/MT5/{tradePlatform}/HistoryRequestByGroup/{mask}/{fromTime}/{toTime}
Timeout: 30 s by default, adjustable per request with the X-Request-Timeout header. When the trade server does not answer in time: Nothing was changed; the request is safe to repeat.
Parameters
Name
In
Type
Required
Description
tradePlatform
path
string (uuid)
yes
mask
path
string
yes
The groups for which orders are requested. You can specify one group, several groups (comma separated) or a group mask. The mask is specified using * (any value) and ! (exception). For example: demo*,!demoforex - all groups with the names beginning with 'demo', except for the group demoforex.
fromTime
path
string (date-time)
no
Default: 0.ToUnixTime64() (01.01.1970) will be used
toTime
path
string (date-time)
no
Default: UInt64.MaxValue.ToUnixTime64() will be used
X-Request-Timeout
header
number (double)
no
How long to wait for the trade server, in seconds (1–300). Default for this operation: 30 s (history or report). The query parameter requestTimeout does the same for clients that cannot set headers. The applied value is returned in the X-Request-Timeout-Applied response header.
POST /api/MT5/{tradePlatform}/HistoryRequestByTickets
Timeout: 30 s by default, adjustable per request with the X-Request-Timeout header. When the trade server does not answer in time: Nothing was changed; the request is safe to repeat.
Parameters
Name
In
Type
Required
Description
tradePlatform
path
string (uuid)
yes
X-Request-Timeout
header
number (double)
no
How long to wait for the trade server, in seconds (1–300). Default for this operation: 30 s (history or report). The query parameter requestTimeout does the same for clients that cannot set headers. The applied value is returned in the X-Request-Timeout-Applied response header.
Request body
integer (int64)[] (application/json) — Array of orders
Timeout: 10 s by default, adjustable per request with the X-Request-Timeout header. When the trade server does not answer in time: Nothing was changed; the request is safe to repeat.
Parameters
Name
In
Type
Required
Description
tradePlatform
path
string (uuid)
yes
ticket
path
integer (int64)
yes
X-Request-Timeout
header
number (double)
no
How long to wait for the trade server, in seconds (1–300). Default for this operation: 10 s (read). The query parameter requestTimeout does the same for clients that cannot set headers. The applied value is returned in the X-Request-Timeout-Applied response header.
Orders (unfulfilled) by the list of logins (pumping)
GET /api/MT5/{tradePlatform}/OrderGetByLogins
Timeout: 10 s by default, adjustable per request with the X-Request-Timeout header. When the trade server does not answer in time: Nothing was changed; the request is safe to repeat.
Parameters
Name
In
Type
Required
Description
tradePlatform
path
string (uuid)
yes
logins
query
integer (int64)[]
no
X-Request-Timeout
header
number (double)
no
How long to wait for the trade server, in seconds (1–300). Default for this operation: 10 s (read). The query parameter requestTimeout does the same for clients that cannot set headers. The applied value is returned in the X-Request-Timeout-Applied response header.
Orders (unfulfilled) by the list of tickets (pumping)
GET /api/MT5/{tradePlatform}/OrderGetByTickets
Timeout: 10 s by default, adjustable per request with the X-Request-Timeout header. When the trade server does not answer in time: Nothing was changed; the request is safe to repeat.
Parameters
Name
In
Type
Required
Description
tradePlatform
path
string (uuid)
yes
tickets
query
integer (int64)[]
no
X-Request-Timeout
header
number (double)
no
How long to wait for the trade server, in seconds (1–300). Default for this operation: 10 s (read). The query parameter requestTimeout does the same for clients that cannot set headers. The applied value is returned in the X-Request-Timeout-Applied response header.
POST /api/MT5/{tradePlatform}/OrderRequestByTickets
Similar to the GET version, but using request body, you can send a much longer list of ticket
Timeout: 15 s by default, adjustable per request with the X-Request-Timeout header. When the trade server does not answer in time: The operation may still be completed by the server (X-Request-Outcome: unknown): check its result before repeating it.
Parameters
Name
In
Type
Required
Description
tradePlatform
path
string (uuid)
yes
X-Request-Timeout
header
number (double)
no
How long to wait for the trade server, in seconds (1–300). Default for this operation: 15 s (change). The query parameter requestTimeout does the same for clients that cannot set headers. The applied value is returned in the X-Request-Timeout-Applied response header.
Has No Setter In ManagerAPI, so all you can is to read this value.
timeSetupMsc
string (date-time), nullable
Gets and sets the order placing time in milliseconds, since 1970.01.01 If the value of this field is specified, the TimeSetup value will be filled in automatically.
timeDoneMsc
string (date-time), nullable
Gets and sets the order execution time in milliseconds, since 1970.01.01 If the value of this field is specified, the TimeDone value will be filled in automatically.
rateMargin
number (double), nullable
margin conversion rate (from symbol margin currency to deposit currency)
Flags: names of the set bits joined by ", " ("NoLimit, NoStop"), "None" when none is set; a set bit without a name is "Bit<n>" (bit number). Bits: NoLimit = 0x1, NoStop = 0x2, NoSLimit = 0x4, NoSL = 0x8, NoTP = 0x10, NoSO = 0x20, NoExpiration = 0x40. Accepted on input, never written: All = NoLimit, NoStop, NoSLimit, NoSL, NoTP, NoSO, NoExpiration.