Close order
curl --request DELETE \
--url https://api.easierprop.com/api/accounts/{id}/orders/{ticket} \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--data '{
"volume": 123
}'import requests
url = "https://api.easierprop.com/api/accounts/{id}/orders/{ticket}"
payload = { "volume": 123 }
headers = {
"X-API-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.delete(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'DELETE',
headers: {'X-API-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({volume: 123})
};
fetch('https://api.easierprop.com/api/accounts/{id}/orders/{ticket}', 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}/orders/{ticket}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "DELETE",
CURLOPT_POSTFIELDS => json_encode([
'volume' => 123
]),
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}/orders/{ticket}"
payload := strings.NewReader("{\n \"volume\": 123\n}")
req, _ := http.NewRequest("DELETE", 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.delete("https://api.easierprop.com/api/accounts/{id}/orders/{ticket}")
.header("X-API-Key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"volume\": 123\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.easierprop.com/api/accounts/{id}/orders/{ticket}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Delete.new(url)
request["X-API-Key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"volume\": 123\n}"
response = http.request(request)
puts response.read_body{
"ok": true,
"data": {
"ticket": 12345678,
"symbol": "EURUSD",
"orderType": "Buy",
"lots": 0.01,
"openPrice": 1.08542,
"stopLoss": 0,
"takeProfit": 0,
"profit": 3.2,
"swap": 0,
"commission": -0.07,
"comment": "",
"openTime": "2026-04-01T12:00:00",
"closePrice": 0,
"closeTime": "",
"dealType": "Buy",
"digits": 5,
"contractSize": 100000,
"volume": 0.01,
"state": "Filled",
"fillPolicy": "FillOrKill",
"expirationType": "GTC",
"expertId": 0,
"dealInternalIn": 0,
"dealInternalOut": 0,
"orderInternal": 0,
"partialCloseDeals": [
{}
],
"partialFillDeals": [
{}
],
"placedType": "ByClient",
"profitRate": 1,
"requestId": 0,
"stopLimitPrice": 0,
"fee": 0,
"closeComment": "",
"closeLots": 0,
"closeVolume": 0,
"openTimestampUTC": 1711972800,
"closeTimestampUTC": 0,
"expirationTime": ""
}
}{
"ok": false,
"error": {
"code": "ACCOUNT_NOT_FOUND",
"message": "Account not found"
}
}Trading
Close order
Close a position or cancel a pending order. Optionally close partial volume.
DELETE
/
api
/
accounts
/
{id}
/
orders
/
{ticket}
Close order
curl --request DELETE \
--url https://api.easierprop.com/api/accounts/{id}/orders/{ticket} \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--data '{
"volume": 123
}'import requests
url = "https://api.easierprop.com/api/accounts/{id}/orders/{ticket}"
payload = { "volume": 123 }
headers = {
"X-API-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.delete(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'DELETE',
headers: {'X-API-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({volume: 123})
};
fetch('https://api.easierprop.com/api/accounts/{id}/orders/{ticket}', 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}/orders/{ticket}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "DELETE",
CURLOPT_POSTFIELDS => json_encode([
'volume' => 123
]),
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}/orders/{ticket}"
payload := strings.NewReader("{\n \"volume\": 123\n}")
req, _ := http.NewRequest("DELETE", 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.delete("https://api.easierprop.com/api/accounts/{id}/orders/{ticket}")
.header("X-API-Key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"volume\": 123\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.easierprop.com/api/accounts/{id}/orders/{ticket}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Delete.new(url)
request["X-API-Key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"volume\": 123\n}"
response = http.request(request)
puts response.read_body{
"ok": true,
"data": {
"ticket": 12345678,
"symbol": "EURUSD",
"orderType": "Buy",
"lots": 0.01,
"openPrice": 1.08542,
"stopLoss": 0,
"takeProfit": 0,
"profit": 3.2,
"swap": 0,
"commission": -0.07,
"comment": "",
"openTime": "2026-04-01T12:00:00",
"closePrice": 0,
"closeTime": "",
"dealType": "Buy",
"digits": 5,
"contractSize": 100000,
"volume": 0.01,
"state": "Filled",
"fillPolicy": "FillOrKill",
"expirationType": "GTC",
"expertId": 0,
"dealInternalIn": 0,
"dealInternalOut": 0,
"orderInternal": 0,
"partialCloseDeals": [
{}
],
"partialFillDeals": [
{}
],
"placedType": "ByClient",
"profitRate": 1,
"requestId": 0,
"stopLimitPrice": 0,
"fee": 0,
"closeComment": "",
"closeLots": 0,
"closeVolume": 0,
"openTimestampUTC": 1711972800,
"closeTimestampUTC": 0,
"expirationTime": ""
}
}{
"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
Order/position ticket number
Body
application/json
Partial close volume. Omit to close entirely.
⌘I