---
title: "GET /v2/user/accounts/{server}/{accountId}/portfolio/orders"
method: GET
path: "/v2/user/accounts/{server}/{accountId}/portfolio/orders"
tags: ["Portfolio (v2)"]
deprecated: true
---

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

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

## Request

- Base URL: `https://trading-api.oanda.com` (the document declares no server; this is the origin it was published from)
- URL: `https://trading-api.oanda.com/v2/user/accounts/{server}/{accountId}/portfolio/orders`
- Auth: HTTP bearer
- TypeScript: <https://skmtc.dev/oanda/apis/up-gateway-v1/docs/v2/user/accounts/:server/:accountId/portfolio/orders/get.ts> (a function with typed inputs; its response is checked against the schema)

> **Deprecated.**

## Path parameters

- `server` 'oanda' | 'oanda-demo' | 'otms' | 'v20' | 'v20-demo' | 'oj' | 'oj-demo' | 'opt' | 'ftmo-1', required
- `accountId` string, required

## Query parameters

- `limit` number
- `offset` number
- `type` 'HISTORY' | 'PENDING'
- `sort` 'asc' | 'desc'
- `from` string
- `to` string
- `status` 'FILLED' | 'PENDING' | 'CANCELED' | 'PARTIALLY_FILLED' | 'REPLACED' | 'REJECTED' | 'EXPIRED' | 'REQUEST_ADDED' | 'REQUEST_MODIFY' | 'REQUEST_CANCEL'
- `direction` 'LONG' | 'SHORT'

## Response `200`

response

- object[]
  - `accountId` string, required
  - `id` string, required
  - `parentId` string
  - `instrument` string, 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.
  - `price` number, required
  - `quantity` number, required
  - `executionTime` number
  - `expiryTime` number
  - `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.
  - `creationTime` number
  - `stopLoss` number
  - `takeProfit` number
  - `status` 'PENDING' | 'NEW' | 'PARTIALLY_FILLED' | 'FILLED' | 'CANCELED' | 'REPLACED' | 'REJECTED' | 'EXPIRED' | 'REQUEST_ADDED' | 'REQUEST_MODIFY' | 'REQUEST_CANCEL', required
  - `direction` 'LONG' | 'SHORT', required
  - `trailingStop` number
  - `trailingStopValue` number
  - `guaranteedStopLoss` number
  - `commission` number
  - `reason` string

---

[API](https://skmtc.dev/oanda/apis/up-gateway-v1.md) - [All operations](https://skmtc.dev/oanda/apis/up-gateway-v1/llms.txt) - [OpenAPI document](https://skmtc.dev/oanda/apis/up-gateway-v1/revisions/395d645513bf?raw)
