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

# Batch orders

`POST /orders`

## 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`
- Auth: none declared

Send one order to several accounts at once (at most 20 legs).

Every leg inherits ``defaults`` and may override any of it, including with a
falsy value (``slippage: 0`` means zero). Fields are snake_case: ``symbol``,
``operation`` (buy, sell, buyLimit, sellLimit, buyStop, sellStop,
buyStopLimit, sellStopLimit), ``volume``, ``price``, ``slippage``,
``stop_loss``, ``take_profit``, ``stop_limit_price``, ``expiration``,
``comment``, ``expert_id`` and, on the leg, ``account_id``. ``results``
mirrors ``orders`` one for one.

Leg ``status``: ``filled`` (the broker accepted), ``rejected`` (the broker
refused; ``retcode`` says why), ``invalid`` (the terminal refused the
request), ``unavailable`` (terminal up but not trading), ``unreachable`` (no
terminal), ``timeout`` (**unknown**: it may have executed, including when the
broker's reply was lost; reconcile or replay with the same
``Idempotency-Key``, never blind-retry).

Validation is all-or-nothing, execution is not. Errors: 400
``invalid_batch`` / ``unknown_account`` / ``unreachable_account`` (with
``require_reachable``), 401, 403 (read-only key), 409
``idempotency_in_flight``, 422 ``idempotency_key_reused``, 429
``rate_limited`` (60 batches a minute per organisation, with
``Retry-After``), 503 ``idempotency_unavailable``. ``Idempotency-Key`` (at
most 128 characters) replays the stored response for 15 minutes with
``idempotent_replay: true``; each leg also carries its own derived key, so a
retry never double-fills a leg that already executed. Every leg is in its
account's audit trail.

## 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)
