curl --request GET \
--url https://public-api.etoro.com/api/v1/trading/info/real/close-orders/{orderId} \
--header 'x-api-key: <api-key>' \
--header 'x-request-id: <x-request-id>' \
--header 'x-user-key: <api-key>'import requests
url = "https://public-api.etoro.com/api/v1/trading/info/real/close-orders/{orderId}"
headers = {
"x-request-id": "<x-request-id>",
"x-api-key": "<api-key>",
"x-user-key": "<api-key>"
}
response = requests.get(url, headers=headers)
print(response.text)const options = {
method: 'GET',
headers: {
'x-request-id': '<x-request-id>',
'x-api-key': '<api-key>',
'x-user-key': '<api-key>'
}
};
fetch('https://public-api.etoro.com/api/v1/trading/info/real/close-orders/{orderId}', 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://public-api.etoro.com/api/v1/trading/info/real/close-orders/{orderId}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"x-api-key: <api-key>",
"x-request-id: <x-request-id>",
"x-user-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"
"net/http"
"io"
)
func main() {
url := "https://public-api.etoro.com/api/v1/trading/info/real/close-orders/{orderId}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("x-request-id", "<x-request-id>")
req.Header.Add("x-api-key", "<api-key>")
req.Header.Add("x-user-key", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://public-api.etoro.com/api/v1/trading/info/real/close-orders/{orderId}")
.header("x-request-id", "<x-request-id>")
.header("x-api-key", "<api-key>")
.header("x-user-key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://public-api.etoro.com/api/v1/trading/info/real/close-orders/{orderId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["x-request-id"] = '<x-request-id>'
request["x-api-key"] = '<api-key>'
request["x-user-key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"orderID": 123,
"CID": 123,
"statusID": 123,
"orderType": 123,
"operationType": 123,
"assetCurrencyID": 123,
"accountCurrencyID": 123,
"instrumentID": 123,
"requestOccurred": "2023-11-07T05:31:56Z",
"proceeds": 123,
"externalOperationType": 123,
"token": "<string>",
"referenceID": "<string>",
"closeActionType": 123,
"errorCode": 123,
"errorMessage": "<string>",
"externalOperationData": "<string>",
"positions": [
{
"positionID": 123,
"occurred": "2023-11-07T05:31:56Z",
"rate": 123,
"units": 123,
"conversionRate": 123,
"amount": 123
}
]
}{
"type": "<string>",
"title": "<string>",
"status": 123,
"detail": "<string>",
"instance": "<string>"
}{
"type": "<string>",
"title": "<string>",
"status": 123,
"detail": "<string>",
"instance": "<string>"
}{
"type": "<string>",
"title": "<string>",
"status": 123,
"detail": "<string>",
"instance": "<string>"
}Get close order information and closed position details
Rate limit: 60 requests per 60 seconds. This is a shared quota — the same budget is consumed by a group of related endpoints, so calling any of them reduces what is left for the others (you cannot call each at the full rate independently). Endpoints sharing this quota:
GET /api/v1/trading/info/real/orders/{orderId}GET /api/v2/trading/info/orders:lookup
Retrieves information about a close order, including its execution status and the positions that were closed as a result of the request. Use this to track the outcome of a position-closing order and identify which positions were affected. This is a read-only call and is the supported way to confirm the outcome of POST or DELETE /api/v1/trading/execution/market-close-orders/… - including when the DELETE response was lost: poll this endpoint with the same close orderId instead of resending the cancel. Executed quantity is reported per affected position in positions[] (units and amount, with occurred and rate set once that position was closed); the order-level proceeds field totals what was realized. A close order that was cancelled before anything executed has no executed entries in positions[]. Any requested units that do not appear as executed in positions[] were not closed. errorCode and errorMessage are populated when processing failed.
curl --request GET \
--url https://public-api.etoro.com/api/v1/trading/info/real/close-orders/{orderId} \
--header 'x-api-key: <api-key>' \
--header 'x-request-id: <x-request-id>' \
--header 'x-user-key: <api-key>'import requests
url = "https://public-api.etoro.com/api/v1/trading/info/real/close-orders/{orderId}"
headers = {
"x-request-id": "<x-request-id>",
"x-api-key": "<api-key>",
"x-user-key": "<api-key>"
}
response = requests.get(url, headers=headers)
print(response.text)const options = {
method: 'GET',
headers: {
'x-request-id': '<x-request-id>',
'x-api-key': '<api-key>',
'x-user-key': '<api-key>'
}
};
fetch('https://public-api.etoro.com/api/v1/trading/info/real/close-orders/{orderId}', 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://public-api.etoro.com/api/v1/trading/info/real/close-orders/{orderId}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"x-api-key: <api-key>",
"x-request-id: <x-request-id>",
"x-user-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"
"net/http"
"io"
)
func main() {
url := "https://public-api.etoro.com/api/v1/trading/info/real/close-orders/{orderId}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("x-request-id", "<x-request-id>")
req.Header.Add("x-api-key", "<api-key>")
req.Header.Add("x-user-key", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://public-api.etoro.com/api/v1/trading/info/real/close-orders/{orderId}")
.header("x-request-id", "<x-request-id>")
.header("x-api-key", "<api-key>")
.header("x-user-key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://public-api.etoro.com/api/v1/trading/info/real/close-orders/{orderId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["x-request-id"] = '<x-request-id>'
request["x-api-key"] = '<api-key>'
request["x-user-key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"orderID": 123,
"CID": 123,
"statusID": 123,
"orderType": 123,
"operationType": 123,
"assetCurrencyID": 123,
"accountCurrencyID": 123,
"instrumentID": 123,
"requestOccurred": "2023-11-07T05:31:56Z",
"proceeds": 123,
"externalOperationType": 123,
"token": "<string>",
"referenceID": "<string>",
"closeActionType": 123,
"errorCode": 123,
"errorMessage": "<string>",
"externalOperationData": "<string>",
"positions": [
{
"positionID": 123,
"occurred": "2023-11-07T05:31:56Z",
"rate": 123,
"units": 123,
"conversionRate": 123,
"amount": 123
}
]
}{
"type": "<string>",
"title": "<string>",
"status": 123,
"detail": "<string>",
"instance": "<string>"
}{
"type": "<string>",
"title": "<string>",
"status": 123,
"detail": "<string>",
"instance": "<string>"
}{
"type": "<string>",
"title": "<string>",
"status": 123,
"detail": "<string>",
"instance": "<string>"
}Authorizations
API key of the application. Only valid together with the x-user-key header — the pair is an alternative to OAuth bearer authentication, never sent alongside it. The pair is granted the same permissions the operation's OAuth scopes describe.
Demo credential for trying the API from these docs: lhgfaslk21490FAScVPkdsb53F9dNkfHG4faZSG5vfjndfcfgdssdgsdHF4663
User-specific authentication key. Only valid together with the x-api-key header — the pair is an alternative to OAuth bearer authentication, never sent alongside it.
Demo credential for trying the API from these docs: eyJlYW4iOiJVbnJlZ2lzdGVyZWRBcHBsaWNhdGlvbiIsImVrIjoiOE5sZ2cwcW5EUVdROUFNWGpXT2lmOWktZnpidG5KcUlqWGJ3WHJZZkpZcldrbG90ZEhvLVBjSWhQaU8xU1ZtMW84aU1WZGZqN2xWNzFjLXFxLmcybXE1dnh4Q1hUT25xaWRUaTFlcEhmVk1fIn0_
Headers
A unique request identifier.
"16dbfae3-ff6d-44ea-ad0d-58355df69306"
Path Parameters
The unique identifier of the order.
Response
Close order information retrieved successfully.
Close-order information returned by Admin TAPI, including execution status and the positions affected by the close order.
Unique identifier of the close order.
Customer account identifier associated with the close order.
Current status of the close order. Values: 1 = RECEIVED (pending); 2 = PLACED (pending); 3 = FILLED (terminal); 4 = REJECTED (terminal); 5 = PARTIALLY_FILLED (pending); 6 = PENDING_CANCEL (pending); 7 = CANCELED (terminal); 8 = EXPIRED (terminal); 9 = CANCELED_PARTIALLY_FILLED (terminal); 10 = REJECTED_PARTIALLY_FILLED (terminal); 11 = WAITING_FOR_MARKET (pending). Terminal statuses (3, 4, 7, 8, 9, 10) mean the order can no longer execute; pending statuses (1, 2, 5, 6, 11) mean it is still being processed and should be polled again. After DELETE, poll this endpoint until the status is terminal: 7 (CANCELED) means it was cancelled with nothing executed; 9 (CANCELED_PARTIALLY_FILLED) means it was cancelled after a partial fill - read the executed units from positions[]; 3 (FILLED) means it fully executed before the cancel took effect.
Internal order-type identifier.
Internal operation-type identifier.
Identifier of the asset currency.
Identifier of the account currency.
Identifier of the instrument associated with the close order.
UTC timestamp at which the close-order request occurred.
Total proceeds calculated across the positions affected by the close order.
External operation-type identifier; zero when no external operation is associated.
Correlation token assigned to the request.
External reference identifier associated with the close order, when available.
Internal close-action type, when available.
Error code produced while processing the close order, when applicable.
Error message produced while processing the close order, when applicable.
Data associated with the external operation, when available.
Positions affected by the close order.
Show child attributes
Show child attributes