---
title: "GET /v4/user/accounts/{server}/{accountId}/portfolio/positions"
method: GET
path: "/v4/user/accounts/{server}/{accountId}/portfolio/positions"
tags: ["Portfolio (v4)"]
---

# GET /v4/user/accounts/{server}/{accountId}/portfolio/positions

`GET /v4/user/accounts/{server}/{accountId}/portfolio/positions`

## 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/v4/user/accounts/{server}/{accountId}/portfolio/positions`
- Auth: HTTP bearer
- TypeScript: <https://skmtc.dev/oanda/apis/up-gateway-v1/docs/v4/user/accounts/:server/:accountId/portfolio/positions/get.ts> (a function with typed inputs; its response is checked against the schema)

## 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

## Response `200`

response

- object
  - `count` number, required
  - `limit` number, required
  - `offset` number, required
  - `data` object[]
    - `accountId` string, required
    - `id` string, required
    - `instrument` string, required
    - `commission` number, required
    - `swap` number
    - `long` object, required
      - `quantity` number
      - `avgPrice` number
      - `swap` number
    - `short` object, required
      - `quantity` number
      - `avgPrice` number
      - `swap` number

---

[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)
