---
title: "Close multiple orders"
method: POST
path: "/v2/orders/close_many/"
tags: ["Orders"]
---

# Close multiple orders

`POST /v2/orders/close_many/`

## Request

- Base URL: `https://magicmarkets.com` (the document declares no server; this is the origin it was published from)
- URL: `https://magicmarkets.com/v2/orders/close_many/`
- Auth: API key in header `X-Api-Key`

Close multiple orders synchronously. Maximum 500 order IDs per request.

## Request body

- object
  - `order_ids` integer[], required

## Response `200`

Close results. `closed` and `not_found` are each a list of order-id lists (grouped by the upstream batch); already-closed and unknown ids both land in `not_found`.

- object
  - `status` 'ok'
  - `data` object
    - `closed` array[]
      - integer[]
    - `not_found` array[]
      - integer[]

## Other responses

- `401`: Authentication failed - API key missing, malformed, or rejected.
- `403`: Authorization failed - the key is valid but cannot perform this action.
- `429`: Rate limit hit. Honour the `Retry-After` header.
- `500`: Unexpected internal error. Quote `data[1]` (the token) when contacting support.

---

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