---
title: "Close the deployment's open position at the market (scope: trading:write)"
method: POST
path: "/v1/trading/deployments/{id}/close"
---

# Close the deployment's open position at the market (scope: trading:write)

`POST /v1/trading/deployments/{id}/close`

## Request

- Base URL: `https://app.texttoquant.com/api`
- URL: `https://app.texttoquant.com/api/v1/trading/deployments/{id}/close`
- Auth: one of:
  - API key in header `x-api-key`
  - HTTP bearer

Risk-reducing only. Nothing on the trading surface can open a position, place a resting order, or move funds. Rate-limited to 30 live-account actions per minute per user.

## Path parameters

- `id` string, uuid, required

## Request body

- object
  - `fraction` number: Portion to close. Omit = all of it.

## Response `200`

Success

- object
  - `success` true, required
  - `data` object, required

## Other responses

- `403`: insufficient_scope — the key lacks trading:read/trading:write; or upgrade_required — the plan has no live trading
- `404`: not_found
- `429`: rate_limited
- `503`: plan_unavailable — the plan could not be resolved; retry

---

[API](https://skmtc.dev/texttoquant/apis/texttoquant-api.md) · [All operations](https://skmtc.dev/texttoquant/apis/texttoquant-api/llms.txt) · [OpenAPI document](https://skmtc.dev/texttoquant/apis/texttoquant-api/revisions/d417fc3f4a7d?raw)
