---
title: "Get Account Gain/Loss"
method: GET
path: "/v1/accounts/{account_id}/gainloss"
tags: ["Accounts"]
---

# Get Account Gain/Loss

`GET /v1/accounts/{account_id}/gainloss`

## Request

- Base URL: `https://api.tradier.com`
- URL: `https://api.tradier.com/v1/accounts/{account_id}/gainloss`
- Auth: HTTP bearer
- TypeScript: <https://skmtc.dev/tradier/apis/tradier-brokerage-api/docs/v1/accounts/:account_id/gainloss/get.ts> (a function with typed inputs; its response is checked against the schema)

Get cost basis and gain/loss information for an account. This includes information for all closed positions. Cost basis information is updated through a nightly batch reconciliation process with our clearing firm

## Path parameters

- `account_id` string, required

## Query parameters

- `page` integer
- `limit` integer
- `sortBy` 'closeDate' | 'openDate'
- `sort` 'asc' | 'desc'

## Headers

- `Accept` 'application/json', required

## Response `200`

Account gain/loss information

- GainLossResponse
  - `gainloss` object
    - `closed_position` ClosedPosition[]: List of closed positions
      - `close_date` string, date-time: The date the position was closed
      - `cost` number, float: The cost basis of the position
      - `gain_loss` number, float: The gain or loss amount
      - `gain_loss_percent` number, float: The gain or loss percentage
      - `open_date` string, date-time: The date the position was opened
      - `proceeds` number, float: The proceeds from the closed position
      - `quantity` number, float: The quantity of the security
      - `symbol` string: The security symbol
      - `term` integer: The holding period in days
    - `page` integer: Current page number
    - `total_pages` integer: Total number of pages
    - `total_positions` integer: Total number of positions

## Other responses

- `401`: Authentication required or invalid credentials
- `403`: Access denied to the requested resource
- `404`: The requested resource was not found

---

[API](https://skmtc.dev/tradier/apis/tradier-brokerage-api.md) - [All operations](https://skmtc.dev/tradier/apis/tradier-brokerage-api/llms.txt) - [OpenAPI document](https://skmtc.dev/tradier/apis/tradier-brokerage-api/revisions/3cda47abe673?raw)
