# Place Batch Orders

<EndpointPage
  breadcrumbs={[
    { label: "REST APIs", href: "/rest-api/rest-api" },
    { label: "Prediction Markets", href: "/rest-api/rest-api#prediction-markets" },
    { label: "Order Management", href: "/rest-api/prediction-markets/order-management" },
    { label: "Place Batch Orders" },
  ]}
  title="Place Batch Orders"
  method="POST"
  url="https://api.gemini.com/v1/prediction-markets/order/batch"
  description="Place 1 to 20 prediction market orders in one authenticated request. The batch is synchronous and non-atomic: up-front validation rejects the entire batch, while exchange submission errors are returned per entry and do not stop later entries."
  example={{
    request: {
      method: "POST",
      url: "https://api.gemini.com/v1/prediction-markets/order/batch",
      headers: [
        { name: "X-GEMINI-APIKEY", value: "<string>" },
        { name: "X-GEMINI-PAYLOAD", value: "<string>" },
        { name: "X-GEMINI-SIGNATURE", value: "<string>" },
      ],
      body: {
        orders: [
          {
            symbol: "GEMI-FEDJAN26-DN25",
            orderType: "limit",
            side: "buy",
            quantity: "100",
            price: "0.65",
            outcome: "yes",
            timeInForce: "good-til-cancel",
          },
          {
            symbol: "GEMI-FEDJAN26-DN25",
            orderType: "limit",
            side: "sell",
            quantity: "50",
            price: "0.35",
            outcome: "no",
            timeInForce: "good-til-cancel",
          },
        ],
      },
    },
  }}
  sections={[
    {
      heading: "Terms",
      children: (
        <p style={{ margin: 0 }}>Before sending a Prediction Markets order, check <a href="/rest-api/prediction-markets/terms/get-terms-status" style={{ color: "inherit", textDecorationLine: "underline" }}>Get Terms Status</a>. If the latest terms are not accepted, display <a href="/rest-api/prediction-markets/terms/get-terms" style={{ color: "inherit", textDecorationLine: "underline" }}>Get Terms</a> and call <a href="/rest-api/prediction-markets/terms/accept-terms" style={{ color: "inherit", textDecorationLine: "underline" }}>Accept Terms</a>, then retry the batch.</p>
      ),
    },
    {
      heading: "Roles",
      children: (
        <>
          <p style={{ margin: "0 0 2px" }}>The API key you use to access this endpoint must have the Trader role assigned. See <a href="https://docs.gemini.com/roles#roles" style={{ color: "inherit", textDecorationLine: "underline" }}>Roles</a> for more information.</p>
          <p style={{ margin: 0 }}>The OAuth scope must have <InlineBadge>orders:create</InlineBadge> assigned to access this endpoint. See <a href="/authentication/oauth#oauth-scopes" style={{ color: "inherit", textDecorationLine: "underline" }}>OAuth Scopes</a> for more information.</p>
        </>
      ),
    },
    {
      heading: "Batch Behavior",
      children: (
        <ul style={{ margin: 0, paddingLeft: 20 }}>
          <li>The complete <code>{`{"orders":[...]}`}</code> payload is encoded and signed once.</li>
          <li>Gemini validates the batch size and every order before submitting anything. Any up-front validation, account, terms, or risk failure rejects the entire request.</li>
          <li>After validation, orders are submitted sequentially and results remain aligned with request order.</li>
          <li>An exchange rejection such as <code>InsufficientFunds</code> is returned in that entry's result. Other valid entries continue to be submitted.</li>
        </ul>
      ),
    },
    {
      heading: "Headers",
      children: <PMSpecHeaders />,
    },
    {
      heading: "Request Body",
      children: <PMSpecParams operationId="placeOrderBatch" />,
    },
    {
      heading: "Responses",
      children: <PMSpecResponses operationId="placeOrderBatch" />,
    },
  ]}
/>

<PageNavigation
  prev={{ label: "Place Order", href: "/rest-api/prediction-markets/order-management/place-order" }}
  next={{ label: "Cancel Order", href: "/rest-api/prediction-markets/order-management/cancel-order" }}
/>
