Skip to content
UNHEDGED / DOCS

Search documentation

Browse docs or start typing to find a topic

↑ ↓ to navigate Enter to open Esc to close

Batch Place Orders

POST https://api.unhedged.gg/api/v1/orders/batch

Places 1–32 orders on one ORDER_BOOK market. Legs may fill; Market type is rejected before any leg runs. Returns 201 when all legs succeed, or 400 with results in request order when a committed batch contains failures. Successful legs remain committed. Each failed leg has a string err; a committed zero-fill InternalCancel also includes its order. Inspect every result before retrying any leg. Counts as one write against the place/replace rate budget. The example shows a mixed HTTP 400 response with selected order fields.

Configure request

Request

Security · Bearer token

Send your API key in the Authorization header. Required scope order:place.

Rate limit · 120 req/min · 60 per market

Request body

marketId string
Required
Shared market ID. Must be type ORDER_BOOK and status ACTIVE.
orders array
Required
1–32 place legs. Same fields as Place Order except marketId, but type is Limit | StopLoss | TakeProfit only (Market not allowed). Optional postOnly on Limit legs. Legs may fill against the book and against earlier legs in the batch.
Authorization
Bearer token Authorization: Bearer ak_your_key_here
Body application/json
curl -X POST https://api.unhedged.gg/api/v1/orders/batch \
  -H "Authorization: Bearer ak_your_key_here" \
  -H "Content-Type: application/json" \
  -d '{
  "marketId": "clx...",
  "orders": [
    { "outcome": "YES", "side": "bid", "type": "Limit", "price": "0.40", "quantity": "5.00" },
    { "outcome": "YES", "side": "bid", "type": "Limit", "price": "0.45", "quantity": "5.00", "postOnly": true }
  ]
}'
Response
{
  "error": "One or more orders in the batch failed",
  "results": [
    {
      "order": {
        "id": "213",
        "status": "Placed",
        "price": "0.40",
        "quantity": "5.00",
        "cum_quantity": "0.00"
      }
    },