---
title: "Changes to Close an account position or cancel a pending order"
method: DELETE
path: "/rest/api/v1/accounts/{accountId}/positions/{positionId}"
---

# Changes to Close an account position or cancel a pending order

`DELETE /rest/api/v1/accounts/{accountId}/positions/{positionId}`

> Every recorded change to this operation, newest first.

## Timeline

Changed in 2 of 18 revisions.

- **2026-08-10** `5c1371d2c0b2`: 1 info
- **2025-02-07** `f3a76dd2ff82`: 1 breaking, 1 info

## Changes

- **2026-08-10** `5c1371d2c0b2`: 1 info
  - added the new optional `query` request parameter `pendingOnly`
- **2025-02-07** `f3a76dd2ff82`: 1 breaking, 1 info
  - removed the success response with the status `200`
  - added the success response with the status `204`

---

[Operation](https://skmtc.dev/metacopier/apis/metacopier-api/docs/rest/api/v1/accounts/:accountId/positions/:positionId/delete.md) - [API](https://skmtc.dev/metacopier/apis/metacopier-api.md) - [Page](https://skmtc.dev/metacopier/apis/metacopier-api/changes/rest/api/v1/accounts/:accountId/positions/:positionId/delete)
