---
title: "Batch close"
method: POST
path: "/orders/close"
tags: ["fxsocket-batch"]
---

# Batch close

`POST /orders/close`

## Request

- Base URL: `https://api.tickwire.io` (the document declares no server; this is the origin it was published from)
- URL: `https://api.tickwire.io/orders/close`
- Auth: none declared

Close by selector (or explicit tickets) across several accounts at once
(at most 20 accounts, 20 orders each; more come back ``skipped``).

Each account entry is a selector (``symbol`` required, ``*`` for all, typed
literally; ``symbol_match`` ``exact`` or ``base`` to accept broker suffixes
like ``.sd`` / ``m``; ``side`` long, short or any; ``kind`` position
(default), pending or any; ``magic``) or an explicit ``tickets`` list, never
both. ``volume`` closes part of each matched position. Accounts run
concurrently; the tickets of one account run in sequence.

Account ``status``: closed, partial, failed, nothing_matched (not an error),
unavailable / unreachable / invalid (the lookup failed, so nothing is
known), timeout (orders may have closed). Ticket ``status``: closed,
rejected, invalid, unavailable, unreachable, timeout (may have closed),
skipped (never sent). A ticket that was already gone counts as ``closed``
with a message saying so. Errors and ``Idempotency-Key`` work as on
``POST /v1/orders``.

## Headers

- `X-API-Key` string, nullable
- `Authorization` string, nullable
- `auth-token` string, nullable

## Response `200`

Successful Response

- unknown

## Other responses

- `422`: Validation Error

---

[API](https://skmtc.dev/tickwire/apis/tickwire-control-plane.md) · [All operations](https://skmtc.dev/tickwire/apis/tickwire-control-plane/llms.txt) · [OpenAPI document](https://skmtc.dev/tickwire/apis/tickwire-control-plane/revisions/a4d1386fa23e?raw)
