Portfolio (v2)

GET /v2/user/accounts/{server}/{accountId}/portfolio/orders

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.

Query parameters

limitnumber
offsetnumber
type'HISTORY' | 'PENDING'

Order status type.

sort'asc' | 'desc'

Sort direction for ordering the results by date.

fromstring

Filter results starting from this timestamp. UTC timestamp in milliseconds.

tostring

Filter results up to this timestamp. UTC timestamp in milliseconds.

status'FILLED' | 'PENDING' | 'CANCELED' | 'PARTIALLY_FILLED' | 'REPLACED' | 'REJECTED' | 'EXPIRED' | 'REQUEST_ADDED' | 'REQUEST_MODIFY' | 'REQUEST_CANCEL'

filter historical orders by status.PENDING, FILLED, and CANCELED statuses are available for both MT5 and v20 orders. All other statuses are applicable to MT5 orders only.

direction'LONG' | 'SHORT'

Direction of an order

Response

response

accountIdstring required
idstring required
parentIdstring
instrumentstring required
type'MARKET' | 'STOP' | 'LIMIT' | 'TAKE_PROFIT' | 'STOP_LOSS' | 'TRAILING_STOP_LOSS' | 'GUARANTEED_STOP_LOSS' | 'MARKET_IF_TOUCHED'

Current order type selected in the order ticket.

pricenumber required
quantitynumber required
executionTimenumber
expiryTimenumber
expiryType'GTC' | 'SPECIFIED' | 'DAY' nullable
  • 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.
creationTimenumber
stopLossnumber
takeProfitnumber
status'PENDING' | 'NEW' | 'PARTIALLY_FILLED' | 'FILLED' | 'CANCELED' | 'REPLACED' | 'REJECTED' | 'EXPIRED' | 'REQUEST_ADDED' | 'REQUEST_MODIFY' | 'REQUEST_CANCEL' required
direction'LONG' | 'SHORT' required
trailingStopnumber
trailingStopValuenumber
guaranteedStopLossnumber
commissionnumber
reasonstring

Example response

[
  {
    "status": "PENDING"
  }
]

Changes

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