Trading (v4)

PUT /v4/user/accounts/{server}/{accountId}/execution/orders/{id}

Request

Path parameters

server'oanda' | 'oanda-demo' | 'otms' | 'v20' | 'v20-demo' | 'oj' | 'oj-demo' | 'opt' | 'ftmo-1' required

Account trading server.

accountIdstring required

The user's account identifier.

idstring required

Resource Id

Request body

instrumentstring required
pricenumber
orderType'MARKET' | 'MARKET_IF_TOUCHED' | 'STOP' | 'LIMIT' required
direction'LONG' | 'SHORT' required
expiryTimenumber

UTC timestamp in milliseconds

expiryType'GTC' | 'SPECIFIED' | 'DAY' | 'SPECIFIED_DAY'
  • GTC: Good 'Til Canceled. The order remains active until canceled. Default value. - DAY: The order is active for the current trading day only. - SPECIFIED: The order expires at the time specified in expiryTime. The expiryTime field is required for this type. - SPECIFIED_DAY: The order expires at the specified day or the nearest trading time, as given in expiryTime. The expiryTime field is required for this type.
stopLossnumber
stopLossType'NORMAL' | 'GUARANTEED'

Avaliable only for v20-* based accounts

takeProfitnumber
trailingStopnumber

Trailing Stop distance value

priceBoundnumber

Avaliable only for v20-* based accounts

quantitynumber
fillType'FOK' | 'IOC' | 'RETURN'

For v20-* based accounts FOK and IOC is used for MARKET orders, for STOP/LIMIT order only RETURN.

modifyType'EDIT' | 'CLOSE_AND_CREATE'

Response

OK

Changes

No recorded changes to this operation across all 1 revision of this API.