Get Trade By Orders List
GetTradeByOrders¶
Description:
Returns detailed trade information for a list of order IDs.
The response uses a structure + rows format for efficient table rendering.
Access Control¶
🛡️ Access Level Required:
SESSION_USER,SESSION_MANAGER,SESSION_ADMIN,SESSION_DEALER
Endpoint¶
GET /trades/orders/
Request Parameters¶
| Name | Type | Required | Description |
|---|---|---|---|
| orders | array | Yes | List of trade order IDs (int) |
Request Example¶
{
"orders": [1001234, 1001235, 1002001],
"__access": {
"type": 1,
"id": 7
}
}
Response Format¶
The response contains:
structure: array of column namesrows: array of trade rows (arrays aligned with structure)
Structure Fields¶
| Field | Description |
|---|---|
| order | Trade order ID |
| login | Account login |
| cmd | Trade command (BUY/SELL/etc.) |
| state | Trade state |
| symbol | Trading symbol |
| reason | Reason code |
| volume | Volume in minimal lots |
| open_time | Open timestamp |
| close_time | Close timestamp |
| open_price | Open price |
| close_price | Close price |
| sl | Stop Loss |
| tp | Take Profit |
| profit | Profit/Loss |
| commission | Commission |
| storage | Swap/Storage |
| comment | Trade comment |
| digits | Price precision digits |
| expiration | Expiration timestamp |
Example Response¶
{
"structure": [
"order","login","cmd","state","symbol","reason","volume","open_time","close_time",
"open_price","close_price","sl","tp","profit","commission","storage","comment",
"digits","expiration"
],
"rows": [
[1001234,123456,0,1,"EURUSD",2,1000,1712000000,0,1.1010,0,1.0900,1.1200,0,-2.5,-1.2,"bulk query",5,0],
[1001235,123456,1,2,"GBPUSD",2,500,1712100000,1712103600,1.2500,1.2550,1.2400,1.2600,250.0,-1.5,-0.8,"closed",5,0]
]
}
Error Responses¶
Validation Error¶
{
"error": "INVALID_DATA",
"message": "orders is required"
}
Retrieval Error¶
{
"error": "TRADE_NOT_FOUND",
"message": "One or more orders not found"
}