Skip to content

Open Trade

Opens a new market order for the authenticated client account.

POST

https://{some_domain}/trade/open

Authorization

All requests must include a JWT token:

Authorization: <JWT_TOKEN>

The token is issued by /sign/in and must belong to the same login sent in the request body.

Copy-follower manual trading policy

For authenticated user/customer requests, an enabled copy follower's manual_trading_mode is enforced after account/order ownership checks:

  • 0 rejects all manual trade writes with HTTP 403, COPY_MANUAL_TRADING_DISABLED (Manual trading is disabled for this copy follower).
  • 1 permits writes to non-copied orders and rejects changes to copied orders with HTTP 403, COPY_COPIED_ORDER_MANUAL_FORBIDDEN (Manual changes to copied orders are disabled for this copy follower).
  • 2 permits manual writes to copied and non-copied orders.
HTTP Error Message
403 COPY_MANUAL_TRADING_DISABLED Manual trading is disabled for this copy follower
403 COPY_COPIED_ORDER_MANUAL_FORBIDDEN Manual changes to copied orders are disabled for this copy follower

This applies to opens, modifications, closes, pending-order changes, and group operations. A group operation that matches a protected copied order is rejected before any order is changed. Staff and internal requests bypass this follower policy.

Request

Content-Type: application/json

Body Parameters

Field Type Required Description
login int Yes Account login. Must match the authenticated session
cmd int Yes Market command only: 0=BUY, 1=SELL
volume int Yes Trade volume in minimal lots
symbol string Yes Trading symbol
sl double Yes Stop Loss level
tp double Yes Take Profit level
open_price double No Optional requested open price
expiration int64 No Optional expiration timestamp
comment string No Optional trade comment

Response

Success (200)

The response is an acknowledgment that the trade request was accepted into runtime processing.

{
  "accepted": true,
  "order": 1001234,
  "state": 1,
  "login": 1001,
  "symbol": "EURUSD",
  "cmd": 0,
  "volume": 100
}

Error Responses

Code Error Description
400 INVALID_DATA Validation failed or required fields are missing
401 PERMISSION_DENIED Missing or invalid authenticated session
403 PERMISSION_DENIED login does not match the authenticated session
4xx/5xx RET_* Business/runtime validation error returned by trade checks
503 LICENSE_NOT_ACTIVE A v2 runtime lease is required before this risk-increasing action is admitted

Compatibility Note

OpenTrade is market-only. Pending commands are rejected. Use POST /trade/open/pending for pending orders.