---
title: "Close a position. [Deprecated, use POST /order with execInst: 'Close']"
method: POST
path: "/order/closePosition"
tags: ["Order"]
---

# Close a position. [Deprecated, use POST /order with execInst: 'Close']

`POST /order/closePosition`

If no `price` is specified, a market order will be submitted to close the whole of your position. This will also close all other open orders in this symbol.

## Response `200`

Request was successful

- Order — Placement, Cancellation, Amending, and History
  - `orderID` string, guid, required
  - `clOrdID` string
  - `clOrdLinkID` string
  - `account` integer
  - `symbol` string
  - `side` string
  - `orderQty` integer
  - `price` number, double
  - `displayQty` integer
  - `stopPx` number, double
  - `pegOffsetValue` number, double
  - `pegPriceType` string
  - `currency` string
  - `settlCurrency` string
  - `ordType` string
  - `timeInForce` string
  - `execInst` string
  - `contingencyType` string
  - `ordStatus` string
  - `triggered` string
  - `workingIndicator` boolean
  - `ordRejReason` string
  - `leavesQty` integer
  - `cumQty` integer
  - `avgPx` number, double
  - `text` string
  - `transactTime` string, date-time
  - `timestamp` string, date-time

## Other responses

- `400` — Parameter Error
- `401` — Unauthorized
- `403` — Access Denied
- `404` — Not Found

---

[API](https://skmtc.dev/bitmex/apis/bitmex-api.md) · [All operations](https://skmtc.dev/bitmex/apis/bitmex-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/bitmex/bitmex-api/revisions/04c6a16ffd27/schema)
