Update account
curl --request PUT \
--url https://api.easierprop.com/api/accounts/{id} \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--data '
{
"label": "<string>",
"broker_host": "<string>",
"broker_port": 123,
"server_name": "<string>",
"mt5_login": 123,
"password": "<string>",
"is_enabled": true,
"auto_connect": true,
"hardware_id": "<string>",
"proxy_host": "<string>",
"proxy_port": 123,
"proxy_user": "<string>",
"proxy_password": "<string>"
}
'import requests
url = "https://api.easierprop.com/api/accounts/{id}"
payload = {
"label": "<string>",
"broker_host": "<string>",
"broker_port": 123,
"server_name": "<string>",
"mt5_login": 123,
"password": "<string>",
"is_enabled": True,
"auto_connect": True,
"hardware_id": "<string>",
"proxy_host": "<string>",
"proxy_port": 123,
"proxy_user": "<string>",
"proxy_password": "<string>"
}
headers = {
"X-API-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {'X-API-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
label: '<string>',
broker_host: '<string>',
broker_port: 123,
server_name: '<string>',
mt5_login: 123,
password: '<string>',
is_enabled: true,
auto_connect: true,
hardware_id: '<string>',
proxy_host: '<string>',
proxy_port: 123,
proxy_user: '<string>',
proxy_password: '<string>'
})
};
fetch('https://api.easierprop.com/api/accounts/{id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.easierprop.com/api/accounts/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'label' => '<string>',
'broker_host' => '<string>',
'broker_port' => 123,
'server_name' => '<string>',
'mt5_login' => 123,
'password' => '<string>',
'is_enabled' => true,
'auto_connect' => true,
'hardware_id' => '<string>',
'proxy_host' => '<string>',
'proxy_port' => 123,
'proxy_user' => '<string>',
'proxy_password' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-API-Key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.easierprop.com/api/accounts/{id}"
payload := strings.NewReader("{\n \"label\": \"<string>\",\n \"broker_host\": \"<string>\",\n \"broker_port\": 123,\n \"server_name\": \"<string>\",\n \"mt5_login\": 123,\n \"password\": \"<string>\",\n \"is_enabled\": true,\n \"auto_connect\": true,\n \"hardware_id\": \"<string>\",\n \"proxy_host\": \"<string>\",\n \"proxy_port\": 123,\n \"proxy_user\": \"<string>\",\n \"proxy_password\": \"<string>\"\n}")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("X-API-Key", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.put("https://api.easierprop.com/api/accounts/{id}")
.header("X-API-Key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"label\": \"<string>\",\n \"broker_host\": \"<string>\",\n \"broker_port\": 123,\n \"server_name\": \"<string>\",\n \"mt5_login\": 123,\n \"password\": \"<string>\",\n \"is_enabled\": true,\n \"auto_connect\": true,\n \"hardware_id\": \"<string>\",\n \"proxy_host\": \"<string>\",\n \"proxy_port\": 123,\n \"proxy_user\": \"<string>\",\n \"proxy_password\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.easierprop.com/api/accounts/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["X-API-Key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"label\": \"<string>\",\n \"broker_host\": \"<string>\",\n \"broker_port\": 123,\n \"server_name\": \"<string>\",\n \"mt5_login\": 123,\n \"password\": \"<string>\",\n \"is_enabled\": true,\n \"auto_connect\": true,\n \"hardware_id\": \"<string>\",\n \"proxy_host\": \"<string>\",\n \"proxy_port\": 123,\n \"proxy_user\": \"<string>\",\n \"proxy_password\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"ok": true,
"data": {
"id": "70f60784-20f1-45ba-9a04-8e01c0b810c3",
"label": "ICMarkets Demo",
"broker_host": "mt5-demo.icmarkets.com",
"broker_port": 443,
"server_name": "ICMarketsSC-Demo",
"mt5_login": 51234567,
"is_enabled": true,
"auto_connect": false,
"hardware_id": "<string>",
"has_proxy": false,
"session_status": "disconnected",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z"
}
}{
"ok": false,
"error": {
"code": "ACCOUNT_NOT_FOUND",
"message": "Account not found"
}
}Accounts
Update account
Partial update. Only include fields you want to change. Updating credentials disconnects the active session.
PUT
/
api
/
accounts
/
{id}
Update account
curl --request PUT \
--url https://api.easierprop.com/api/accounts/{id} \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--data '
{
"label": "<string>",
"broker_host": "<string>",
"broker_port": 123,
"server_name": "<string>",
"mt5_login": 123,
"password": "<string>",
"is_enabled": true,
"auto_connect": true,
"hardware_id": "<string>",
"proxy_host": "<string>",
"proxy_port": 123,
"proxy_user": "<string>",
"proxy_password": "<string>"
}
'import requests
url = "https://api.easierprop.com/api/accounts/{id}"
payload = {
"label": "<string>",
"broker_host": "<string>",
"broker_port": 123,
"server_name": "<string>",
"mt5_login": 123,
"password": "<string>",
"is_enabled": True,
"auto_connect": True,
"hardware_id": "<string>",
"proxy_host": "<string>",
"proxy_port": 123,
"proxy_user": "<string>",
"proxy_password": "<string>"
}
headers = {
"X-API-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {'X-API-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
label: '<string>',
broker_host: '<string>',
broker_port: 123,
server_name: '<string>',
mt5_login: 123,
password: '<string>',
is_enabled: true,
auto_connect: true,
hardware_id: '<string>',
proxy_host: '<string>',
proxy_port: 123,
proxy_user: '<string>',
proxy_password: '<string>'
})
};
fetch('https://api.easierprop.com/api/accounts/{id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.easierprop.com/api/accounts/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'label' => '<string>',
'broker_host' => '<string>',
'broker_port' => 123,
'server_name' => '<string>',
'mt5_login' => 123,
'password' => '<string>',
'is_enabled' => true,
'auto_connect' => true,
'hardware_id' => '<string>',
'proxy_host' => '<string>',
'proxy_port' => 123,
'proxy_user' => '<string>',
'proxy_password' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-API-Key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.easierprop.com/api/accounts/{id}"
payload := strings.NewReader("{\n \"label\": \"<string>\",\n \"broker_host\": \"<string>\",\n \"broker_port\": 123,\n \"server_name\": \"<string>\",\n \"mt5_login\": 123,\n \"password\": \"<string>\",\n \"is_enabled\": true,\n \"auto_connect\": true,\n \"hardware_id\": \"<string>\",\n \"proxy_host\": \"<string>\",\n \"proxy_port\": 123,\n \"proxy_user\": \"<string>\",\n \"proxy_password\": \"<string>\"\n}")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("X-API-Key", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.put("https://api.easierprop.com/api/accounts/{id}")
.header("X-API-Key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"label\": \"<string>\",\n \"broker_host\": \"<string>\",\n \"broker_port\": 123,\n \"server_name\": \"<string>\",\n \"mt5_login\": 123,\n \"password\": \"<string>\",\n \"is_enabled\": true,\n \"auto_connect\": true,\n \"hardware_id\": \"<string>\",\n \"proxy_host\": \"<string>\",\n \"proxy_port\": 123,\n \"proxy_user\": \"<string>\",\n \"proxy_password\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.easierprop.com/api/accounts/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["X-API-Key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"label\": \"<string>\",\n \"broker_host\": \"<string>\",\n \"broker_port\": 123,\n \"server_name\": \"<string>\",\n \"mt5_login\": 123,\n \"password\": \"<string>\",\n \"is_enabled\": true,\n \"auto_connect\": true,\n \"hardware_id\": \"<string>\",\n \"proxy_host\": \"<string>\",\n \"proxy_port\": 123,\n \"proxy_user\": \"<string>\",\n \"proxy_password\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"ok": true,
"data": {
"id": "70f60784-20f1-45ba-9a04-8e01c0b810c3",
"label": "ICMarkets Demo",
"broker_host": "mt5-demo.icmarkets.com",
"broker_port": 443,
"server_name": "ICMarketsSC-Demo",
"mt5_login": 51234567,
"is_enabled": true,
"auto_connect": false,
"hardware_id": "<string>",
"has_proxy": false,
"session_status": "disconnected",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z"
}
}{
"ok": false,
"error": {
"code": "ACCOUNT_NOT_FOUND",
"message": "Account not found"
}
}Authorizations
Client API key (prefixed with sk_). On /api/* endpoints the key
is scoped to its own MT5 accounts. On /admin/* endpoints the key
identifies its owning admin and grants access to all of that
admin's keys — so any of your sk_ works to manage any of your
other keys (cross-admin operations are rejected as 400 Key not found).
Path Parameters
Account ID
Body
application/json
⌘I