Skip to main content
GET
/
api
/
v1
/
trading
/
info
/
demo
/
orders
/
{orderId}
Get Order Information and Position Details for Demo Account
curl --request GET \
  --url https://public-api.etoro.com/api/v1/trading/info/demo/orders/{orderId} \
  --header 'x-api-key: <x-api-key>' \
  --header 'x-request-id: <x-request-id>' \
  --header 'x-user-key: <x-user-key>'
{
  "token": "550e8400-e29b-41d4-a716-446655440000",
  "orderID": 123456789,
  "cid": 987654321,
  "statusID": 1,
  "orderType": 1,
  "openActionType": 1,
  "errorCode": null,
  "errorMessage": null,
  "instrumentID": 67890,
  "amount": 1000,
  "units": 10.5,
  "requestOccurred": "2024-01-15T10:30:00Z",
  "positions": [
    {
      "positionID": 9876543210,
      "orderType": 1,
      "occurred": "2024-01-15T10:30:15Z",
      "rate": 1.2345,
      "units": 10.5,
      "conversionRate": 1,
      "amount": 1000,
      "isOpen": true
    }
  ]
}

Headers

x-request-id
string<uuid>
required

A unique request identifier.

Example:

"54b4ea95-99fa-4dfb-994a-2c77e29ac3c9"

x-api-key
string<password>
required

API key for authentication.

Example:

"lhgfaslk21490FAScVPkdsb53F9dNkfHG4faZSG5vfjndfcfgdssdgsdHF4663"

x-user-key
string<password>
required

User-specific authentication key.

Example:

"eyJlYW4iOiJVbnJlZ2lzdGVyZWRBcHBsaWNhdGlvbiIsImVrIjoiOE5sZ2cwcW5EUVdROUFNWGpXT2lmOWktZnpidG5KcUlqWGJ3WHJZZkpZcldrbG90ZEhvLVBjSWhQaU8xU1ZtMW84aU1WZGZqN2xWNzFjLXFxLmcybXE1dnh4Q1hUT25xaWRUaTFlcEhmVk1fIn0_"

Path Parameters

orderId
integer<int64>
required

The unique identifier of the order for opening a position. This is the OrderID that was returned when the order was initially created.

Response

Successfully retrieved order information and associated position details.

Comprehensive order information response containing order details and all positions opened from this order.

orderID
integer<int64>
required

The unique identifier of the order. This is the same OrderID that was provided in the request path parameter.

Example:

123456789

cid
integer<int64>
required

Customer ID (CID) associated with the order. This identifies the user account that created the order.

Example:

987654321

statusID
integer
required

Current status of the order. Common values: 0 = Pending, 1 = Executed, 2 = Cancelled, 3 = Rejected, 4 = Partially Executed. The exact meaning of status codes may vary based on order type and system configuration.

Example:

1

orderType
integer
required

Type of the order. Common values: 1 = Market Order, 2 = Limit Order, 3 = Stop Order. The exact order types depend on the trading system configuration.

Example:

1

instrumentID
integer
required

The unique identifier of the financial instrument that the order was placed for. This corresponds to the instrument being traded (e.g., stock, currency pair, commodity).

Example:

67890

requestOccurred
string<date-time>
required

The timestamp when the order request was initially created and submitted to the system. This is in ISO 8601 format (UTC).

Example:

"2024-01-15T10:30:00Z"

token
string

Tracking token for the request, used for correlation and debugging purposes. This token is generated by the system and can be used to track the request through various system components.

Example:

"550e8400-e29b-41d4-a716-446655440000"

openActionType
integer

The action type that triggered the order creation. This indicates the reason or context for opening the position, such as manual trade, copy trading, automated strategy, etc.

Example:

1

errorCode
integer<nullable>

Error code if the order execution failed or encountered an error. This field is null if the order was successful. Error codes are system-specific and should be referenced against the system's error code documentation.

Example:

null

errorMessage
string<nullable>

Human-readable error message describing any error that occurred during order processing. This field is null if the order was successful. Provides additional context beyond the errorCode.

Example:

null

amount
number<decimal>

The USD amount that was requested to be invested in the position. This represents the monetary value allocated to the order.

Example:

1000

units
number<decimal>

The number of units that were requested to be traded. If the order was placed by units rather than amount, this value represents the requested quantity.

Example:

10.5

positions
object[]

List of all positions that were opened as a result of this order. Each position in this array represents a successfully executed position created from the order. This array is empty if the order has not yet been executed or if execution failed.