Metatrader 4 api
Service
Service functions not related to account
Simple test
x-api-key<token>
Your API key
In: header
Query Parameters
idstring
Your Account UUID which you connected via the Dashboard
Default
"demo-token-mt5"Response Body
curl -X GET "https://api.metatraderapi.dev/Ping?id=demo-token-mt5""string"Estimate time to connect to speciffied server and port in milliseconds
x-api-key<token>
Your API key
In: header
Query Parameters
idstring
Your Account UUID which you connected via the Dashboard
Default
"demo-token-mt5"hoststring
IP adresses or domain name
Default
"mt4-demo.roboforex.com"port?integer
Port
Default
443Format
int32Response Body
curl -X GET "https://api.metatraderapi.dev/PingHost?id=demo-token-mt5&host=mt4-demo.roboforex.com&port=443"0{
"message": "string",
"code": "INTERNAL_ERROR",
"stackTrace": "string"
}Estimate time to connect to speciffied server and port in milliseconds
x-api-key<token>
Your API key
In: header
Query Parameters
idstring
Your Account UUID which you connected via the Dashboard
Default
"demo-token-mt5"hostsarray<string>
List IP adresses or domain names joined with port by ':' symbol
Response Body
curl -X GET "https://api.metatraderapi.dev/PingHostMany?id=demo-token-mt5&hosts=string"[
0
]{
"message": "string",
"code": "INTERNAL_ERROR",
"stackTrace": "string"
}Broker search by company name
x-api-key<token>
Your API key
In: header
Query Parameters
idstring
Your Account UUID which you connected via the Dashboard
Default
"demo-token-mt5"companystring
Company name
Response Body
curl -X GET "https://api.metatraderapi.dev/Search?id=demo-token-mt5&company=string"[
{
"companyName": "string",
"results": [
{
"name": "string",
"access": [
"string"
]
}
]
}
]{
"message": "string",
"code": "INTERNAL_ERROR",
"stackTrace": "string"
}Extract all IP address and DNS names
Returns an array of a Server objects
x-api-key<token>
Your API key
In: header
Query Parameters
idstring
Your Account UUID which you connected via the Dashboard
Default
"demo-token-mt5"filestring
Response Body
curl -X POST "https://api.metatraderapi.dev/LoadSrv?id=demo-token-mt5" \ -F file="string"[
{
"server": "string",
"ip": 0,
"desc": "string",
"is_proxy": 0,
"priority": 0,
"loading": 0,
"ip_internal": 0,
"ping": 0,
"reserved": 0,
"host": "string",
"port": 0,
"description": "string"
}
]{
"message": "string",
"code": "INTERNAL_ERROR",
"stackTrace": "string"
}Extract all IP address and DNS names from servers.ini
x-api-key<token>
Your API key
In: header
Query Parameters
idstring
Your Account UUID which you connected via the Dashboard
Default
"demo-token-mt5"filestring
Response Body
curl -X POST "https://api.metatraderapi.dev/LoadServersIni?id=demo-token-mt5" \ -F file="string"{
"property1": [
{
"server": "string",
"ip": 0,
"desc": "string",
"is_proxy": 0,
"priority": 0,
"loading": 0,
"ip_internal": 0,
"ping": 0,
"reserved": 0,
"host": "string",
"port": 0,
"description": "string"
}
],
"property2": [
{
"server": "string",
"ip": 0,
"desc": "string",
"is_proxy": 0,
"priority": 0,
"loading": 0,
"ip_internal": 0,
"ping": 0,
"reserved": 0,
"host": "string",
"port": 0,
"description": "string"
}
]
}{
"message": "string",
"code": "INTERNAL_ERROR",
"stackTrace": "string"
}