Seat types
Three seats. Three ways to work.
Every account you add uses one seat. The seat type decides how fast you see the account, and what you may do with it: trade it live, hand it an order and collect the fill shortly after, or read it without the right to change anything.
What each seat can do
| Trade | Execution | Monitor | |
|---|---|---|---|
| Price and data | Live, over REST and WebSocket. | Read over REST. No WebSocket stream. | The last snapshot, marked cached: true. |
| Read status, positions, history | Yes, live. | Yes, over REST. | Yes, from the snapshot, with capturedAt. |
| Place an order | Sent to the broker on the call. | Accepted with 202 and filled in the next window. | Refused with 403 READ_ONLY. |
| Close or change an order | On the call. | On the call while the window is open, otherwise 503 WINDOW_CLOSED. | Refused with 403 READ_ONLY. |
| How you learn the result | The response, plus position and history reads. | Poll GET /v2/orders/{orderRef} until it is done or failed. | The next snapshot. |
| Good for | Responsive trading and live dashboards. | Strategies that can wait a few minutes for a fill. | Reporting, oversight and audit views. |
Seats are counted per kind. GET /v2/usage reports the total with seats and seatsUsed, and each kind on its own.
curl https://api.socketrade.com/v2/usage -H "X-API-Key: $SOCKETRADE_KEY"
{ "seats": 3, "seatsUsed": 1,
"monitorSeats": 2, "monitorUsed": 1,
"execSeats": 1, "execUsed": 0 }Queued execution
On an execution seat an order is not filled during the call. OrderSend is accepted immediately with 202 and a reference. The order is filled in the next execution window, usually within a few minutes.
curl -X POST https://api.socketrade.com/v2/acc_.../OrderSend \
-H "X-API-Key: $SOCKETRADE_KEY" \
-H "Content-Type: application/json" \
-d '{ "symbol": "EURUSD", "operation": 0, "volume": 0.01,
"price": 0, "sl": 0, "tp": 0, "deviation": 10, "magic": 0 }'
202 Accepted
{ "queued": true, "orderRef": "ord_..." }Poll the reference until the status is done or failed. A waiting order reports pending. A done order carries the fill result, so record the reference alongside your own order id and the two stay tied together.
curl https://api.socketrade.com/v2/orders/ord_... -H "X-API-Key: $SOCKETRADE_KEY"
{ "status": "pending" }
{ "status": "done" }
{ "status": "failed" }Between windows
Close and modify requests are only taken while a window is open. In between, they come back with 503 and the code WINDOW_CLOSED, together with retryAfterSeconds: wait that many seconds, then send the same request again with the same ticket.
503 Service Unavailable
{ "code": "WINDOW_CLOSED", "retryAfterSeconds": 42 }Monitor data is a snapshot
Status, positions and history on a monitor seat come from the last snapshot taken for that account. Each response says so with cached: true, and gives capturedAt as unix seconds, so you can show the age of the numbers instead of implying they are live.
curl https://api.socketrade.com/v2/acc_.../positions -H "X-API-Key: $SOCKETRADE_KEY"
{ "cached": true, "capturedAt": 1767225600,
"positions": [ ... ] }A monitor seat is read only. OrderSend comes back with 403 and the code READ_ONLY, which means the request was understood and refused, not that anything went wrong.
curl -X POST https://api.socketrade.com/v2/acc_.../OrderSend \
-H "X-API-Key: $SOCKETRADE_KEY" \
-H "Content-Type: application/json" \
-d '{ "symbol": "EURUSD", "operation": 0, "volume": 0.01 }'
403 Forbidden
{ "code": "READ_ONLY" }