Skip to content

Place several orders

Places up to 100 orders (configurable) in one call. batched is a literal path segment. Requires a read_write key.

  • orders is a list, each entry shaped exactly like the single POST /api/v1/orders body.
  • Each leg is placed independently, so a rejected leg does not fail the others.
  • results has one entry per order, in request order: {order} on success or {errors} on rejection.
  • A malformed body (a bad field in any leg, empty, over the limit, or orders missing or not a list) is a 400 and places nothing.
POST
/api/v1/orders/batched
Try it

Every endpoint, in one place: the full Try it.

Signing happens in your browser with WebCrypto. Your private key is never sent anywhere; Send request sends your key ID and the signature to the demo host above. Only demo hosts are offered. The key ID and private key are saved in this browser's local storage, per jurisdiction, until you click Clear saved key. Use a demo key here, never a production one.

Field Type Required Description
orders NewOrder[] yes The orders to place, each shaped exactly like the single POST /api/v1/orders body (a NewOrder). At most 100 (configurable) per request.
orders[].action buy | sell yes Which side of the book the order takes.
orders[].cancel_on_disconnect boolean,null no Cancel this order if the orders channel stops heartbeating. See the cancel_on_disconnect guide.
orders[].client_order_id string,null no Your own reference, echoed back unchanged. A free-form string, not a UUID; FIX clients routinely send ids like my-order-001.
orders[].device_id string,null no Identifier for the device placing the order.
orders[].expiration good_till_start | good_till_time | null no When the order should stop resting.
orders[].expiration_time integer,null (int64) no The moment a good_till_time order expires. Required when expiration is good_till_time. UNIX microseconds.
orders[].fill_mode normal | post_only | fill_or_kill | null no post_only makes a limit order rest only as a maker. When it would match on arrival, it is cancelled with cancellation_reason auto_matching and the response carries the cancelled order; when the first order it would match is your own, it is a 422 (match_with_self). fill_or_kill makes a limit order fill in full when it is matched, at its price or better, or not at all. The response carries it accepted before it is matched, or delayed during the in-play delay; it then becomes filled, or cancelled with cancellation_reason auto_matching, nothing filled and nothing left on the book, or rejected for a reason any order can be (match_with_self, market_liability_limit). Either is a 400 on a market order or where it is not enabled, and a 422 on a combination market. normal is the default; any other value is a 400.
orders[].market_id string (uuid) yes The market to place the order on.
orders[].order_type limit | market yes Whether the order takes a price or rests on the book.
orders[].price string,null (decimal) no Limit price in dollars, as a string: "0.42" is 42 cents. A number such as 42 is rejected, since it could mean cents or dollars. Must be strictly less than the market’s max_price, read per market. Required for limit orders. A market order ignores it but still rejects a malformed or sub-cent price with a 400; an explicit null is the same as omitting it. Must be greater than zero and a whole number of cents: at most two decimal places, not counting trailing zeros. So “0.42” and “0.4200” are the same accepted value, and “0.001” is rejected.
orders[].quantity string yes Number of contracts, greater than zero, as a decimal string: "10" and "10.00" are read the same. A number is rejected rather than converted, the same rule price follows, though for a different reason: a float arrives as a binary double, so the size that rests on the book would not always be the size that was sent. More than nine decimal places is rounded. Responses always return it as a string.
Status Description Schema
200 Success object
400 A parameter was missing or invalid. Error
401 Missing, malformed or unrecognized signature, or a timestamp outside the 30-second window. Body: {“error”:“Missing or invalid API key credentials”} Error
403 This API key does not have write access. The account behind this key is not active, for example it is pending approval or suspended. Body: {“error”:“Your account is suspended. Contact support.”}, the message naming the account’s status. With an OAuth token it can also mean the member has not accepted the current terms: error is terms_required, with a terms_url to send the member to. ForbiddenError
422 The batch was refused as a whole, for example by the location check, and nothing was placed. A leg refused on its own is reported in results, not as a 422. Error

Request:

curl --request POST \
--url 'https://demo.stxapp.io/api/v1/orders/batched' \
--header 'X-STX-ACCESS-KEY: <key-id>' \
--header 'X-STX-ACCESS-TIMESTAMP: <unix-ms>' \
--header 'X-STX-ACCESS-SIGNATURE: <base64-ed25519>' \
--header 'Content-Type: application/json' \
--data '{
"orders": [
{
"action": "buy",
"cancel_on_disconnect": null,
"client_order_id": "my-order-001",
"device_id": null,
"expiration": null,
"expiration_time": null,
"fill_mode": null,
"market_id": "e00651a3-10cb-4bc1-9e1f-c5ea1796c83b",
"order_type": "limit",
"price": "0.58",
"quantity": "100"
}
]
}'

Response 200:

{
"results": [
{
"order": {
"accepted_at": 1791644652501376,
"action": "buy",
"amount": null,
"avg_price": null,
"cancellation_reason": null,
"client_order_id": "my-order-001",
"delayed_until": null,
"device_id": null,
"expiration": null,
"expiration_time": null,
"expires_at": 1823227199999999,
"fill_mode": "normal",
"filled": "0.00",
"filled_amount": "0.0000",
"filled_percentage": 0,
"fix_order": false,
"id": "4702e9b6-211a-4805-a605-0eb0817ee9b3",
"inserted_at": 1791644652483920,
"ip_address": "203.0.113.42",
"market_id": "e00651a3-10cb-4bc1-9e1f-c5ea1796c83b",
"odds_type": null,
"odds_value": null,
"order_type": "limit",
"placed_pre_start": true,
"price": "0.5800",
"quantity": "100.00",
"rejection_reason": null,
"status": "accepted",
"time": "2026-10-10T15:04:12.483920Z",
"total_value": "0.0000"
}
},
{
"errors": [
"Invalid order fields: quantity - Fractional quantity is not allowed."
]
}
]
}
Field Type Description
results array One entry per requested order, in request order.

STX is operated by XV Exchange, LLC, a Designated Contract Market regulated by the U.S. Commodity Futures Trading Commission (CFTC). Contracts traded on STX are cleared by XV Clearing, LLC, a CFTC-registered Derivatives Clearing Organization. Trading involves substantial risk of loss and may not be appropriate for everyone. Members risk losing the cost to enter any transaction, including fees. Consider whether trading is appropriate for you in light of your experience and financial resources. Nothing on this site is investment advice or a recommendation to trade. Past performance is not indicative of future results.

© 2026 STX. All rights reserved.llms.txtllms-full.txtView as Markdown
Docs version v1.10.5