Broker API HubMenu

eToro API GET /api/v2/trading/info/demo/orders:lookup

GET/api/v2/trading/info/demo/orders:lookupversion v2Trading (Demo)

Returns the status of one demo order and every position it opened or closed. Look it up by orderId or by the referenceId you sent as x-request-id.

Risk warning: CFDs and spread bets are complex instruments and come with a high risk of losing money rapidly due to leverage. You can lose money on these products, and each provider publishes its own loss figure under FCA rules. You should consider whether you understand how they work and whether you can afford to take the high risk of losing your money. Automated and API trading can amplify losses through bugs, connectivity failures and runaway orders.

Independent and unofficialapi-portal.etoro.comchecked

The colon in orders:lookup is part of the path as eToro writes it. status.id runs from 1 Received to 12 PendingTriggeredRate. Shared quota of 60 requests per 60 seconds with the older demo order and close order info calls. Method, path and parameters, with their required flags, were re-read on eToro's reference page for this call on 12 Oct 2026 and agree with this record; the mock reply was not compared field by field.

Parameters

NameInTypeDescription
x-request-idrequiredheaderstring (uuid)A fresh UUID for every request.
orderIdqueryintegerNumeric order ID. Mutually exclusive with referenceId.
referenceIdquerystringThe x-request-id you sent with the order. Mutually exclusive with orderId.

Authentication headers

NameTypeDescription
x-api-keyrequiredstringYour public API key, which identifies the application. Sent with x-user-key; eToro's reference says an OAuth 2.0 bearer token can be used instead of the key pair, not alongside it. Placeholder only: never paste a real key into this site.
x-user-keyrequiredstringYour user key from Settings > Trading > API Key Management. Each key is tied to one environment (Demo or Real) and to Read or Write permission. Placeholder only.

Request

Written from the method, path and parameters recorded on this page. No demo host is recorded as a plain address for this API, so the samples read the base address from an environment variable. Not executed against a live or demo account. Credentials are read from environment variables on your own machine and are never entered on this site. The request builder writes these same snippets, from the same record.

Python
# Set ETORO_BASE_URL, ETORO_API_KEY, ETORO_USER_KEY as environment variables first. Never paste real values into code.
# No demo host is recorded as a plain address for this API, so the base address is read from ETORO_BASE_URL.
# Replace each {placeholder}, "..." and 0 with a real value before running.
# Optional and not shown: query parameters orderId, referenceId.
import os
import requests

BASE_URL = os.environ["ETORO_BASE_URL"]
headers = {
    "x-api-key": os.environ["ETORO_API_KEY"],
    "x-user-key": os.environ["ETORO_USER_KEY"],
    "x-request-id": "...",
}
resp = requests.get(BASE_URL + "/api/v2/trading/info/demo/orders:lookup", headers=headers, timeout=10)
resp.raise_for_status()
print(resp.json())
JavaScript
// Set ETORO_BASE_URL, ETORO_API_KEY, ETORO_USER_KEY as environment variables first. Never paste real values into code.
// No demo host is recorded as a plain address for this API, so the base address is read from ETORO_BASE_URL.
// Replace each {placeholder}, "..." and 0 with a real value before running.
// Optional and not shown: query parameters orderId, referenceId.
// Run as a module, for example a .mjs file, on a Node version that has fetch built in.
const BASE_URL = process.env.ETORO_BASE_URL;
const res = await fetch(BASE_URL + "/api/v2/trading/info/demo/orders:lookup", {
  method: "GET",
  headers: {
    "x-api-key": process.env.ETORO_API_KEY,
    "x-user-key": process.env.ETORO_USER_KEY,
    "x-request-id": "...",
  },
});
if (!res.ok) throw new Error(`HTTP ${res.status}`);
console.log(await res.json());
curl
# Set ETORO_BASE_URL, ETORO_API_KEY, ETORO_USER_KEY as environment variables first. Never paste real values into code.
# No demo host is recorded as a plain address for this API, so the base address is read from ETORO_BASE_URL.
# Replace each {placeholder}, "..." and 0 with a real value before running.
# Optional and not shown: query parameters orderId, referenceId.
curl -X GET "$ETORO_BASE_URL/api/v2/trading/info/demo/orders:lookup" \
  -H "x-api-key: $ETORO_API_KEY" \
  -H "x-user-key: $ETORO_USER_KEY" \
  -H "x-request-id: ..."

Response

A mock response. The values are invented, so check field names against the official reference.

{
  "_mock": true,
  "accountId": 1000001,
  "gcid": 1000002,
  "portfolioId": 1,
  "orderId": 900001,
  "action": "open",
  "transaction": "buy",
  "type": "mkt",
  "etoroOrderTypeId": 17,
  "status": {
    "id": 3,
    "name": "Filled",
    "errorCode": 0,
    "errorMessage": null
  },
  "asset": {
    "symbol": "MOCK",
    "instrumentId": 999001,
    "currency": "USD",
    "settlementType": "cfd",
    "leverage": 1,
    "side": "long"
  },
  "orderCurrency": "usd",
  "requestedAmount": 100,
  "requestedUnits": null,
  "totalCosts": 0,
  "positionExecutions": [
    {
      "positionId": 900100,
      "state": "open",
      "investedAmountCurrency": 100,
      "remainingUnits": 1,
      "openingData": {
        "openTime": "2000-01-01T00:00:00Z",
        "orderId": 900001,
        "executionTime": "2000-01-01T00:00:01Z",
        "units": 1,
        "avgPrice": 100,
        "fees": 0,
        "taxes": 0
      }
    }
  ],
  "requestTime": "2000-01-01T00:00:00Z",
  "lastUpdate": "2000-01-01T00:00:01Z",
  "requestType": "byAmount"
}

Response schema, HTTP 200

Every field this site's OpenAPI file for eToro declares for this response.

FieldTypeDescription
accountIdintegerNot recorded
gcidintegerNot recorded
portfolioIdintegerNot recorded
orderIdintegerNot recorded
actionstringNot recorded
transactionstringNot recorded
typestringNot recorded
etoroOrderTypeIdintegerNot recorded
statusobjectNot recorded
idintegerNot recorded
namestringNot recorded
errorCodeintegerNot recorded
errorMessagestring, nullableNot recorded
assetobjectNot recorded
symbolstringNot recorded
instrumentIdintegerNot recorded
currencystringNot recorded
settlementTypestringNot recorded
leverageintegerNot recorded
sidestringNot recorded
orderCurrencystringNot recorded
requestedAmountintegerNot recorded
requestedUnitsstring, nullableNot recorded
totalCostsintegerNot recorded
positionExecutionsarray of objectsNot recorded
positionIdintegerNot recorded
statestringNot recorded
investedAmountCurrencyintegerNot recorded
remainingUnitsintegerNot recorded
openingDataobjectNot recorded
openTimestringNot recorded
orderIdintegerNot recorded
executionTimestringNot recorded
unitsintegerNot recorded
avgPricenumberNot recorded
feesintegerNot recorded
taxesintegerNot recorded
requestTimestringNot recorded
lastUpdatestringNot recorded
requestTypestringNot recorded

Unverifiedno source opened This schema is not sourced to a page of the provider's own that we opened, so check field names against the official reference.

Limits that apply at eToro

LimitValueScopeSource
Headline limit60/min reads per keyuserapi-portal.etoro.comchecked

eToro API errors you may meet

All eToro API error codes, including 10 more not listed here.