> ## Documentation Index
> Fetch the complete documentation index at: https://docs.simmer.markets/llms.txt
> Use this file to discover all available pages before exploring further.

# Batch Trades

> Execute multiple trades in a single request with PARALLEL execution.

Trades are executed concurrently using asyncio.gather() for maximum speed.
This is NOT atomic - failures don't rollback other trades.

Parameters:
- trades: List of trade items (max 30, supports 26-leg NegRisk arb)
- venue: "sim" or "polymarket" (default: sim)
- source: Optional source tag for all trades (e.g., "sdk:copytrading")
- dry_run: If true, validate and calculate without executing (default: false)
           Returns estimated shares, price, and cost for each trade.

Deprecated: venue="sandbox"/"simmer" are deprecated, use venue="sim" instead.

Requires API key in Authorization header (rate limited: 30/minute).



## OpenAPI

````yaml /openapi.json post /api/sdk/trades/batch
openapi: 3.1.0
info:
  title: Simmer API
  description: Agent-native trading infrastructure for prediction markets.
  version: 1.0.0
servers:
  - url: https://api.simmer.markets
security: []
paths:
  /api/sdk/trades/batch:
    post:
      tags:
        - sdk-trade
      summary: Batch Trades
      description: >-
        Execute multiple trades in a single request with PARALLEL execution.


        Trades are executed concurrently using asyncio.gather() for maximum
        speed.

        This is NOT atomic - failures don't rollback other trades.


        Parameters:

        - trades: List of trade items (max 30, supports 26-leg NegRisk arb)

        - venue: "sim" or "polymarket" (default: sim)

        - source: Optional source tag for all trades (e.g., "sdk:copytrading")

        - dry_run: If true, validate and calculate without executing (default:
        false)
                   Returns estimated shares, price, and cost for each trade.

        Deprecated: venue="sandbox"/"simmer" are deprecated, use venue="sim"
        instead.


        Requires API key in Authorization header (rate limited: 30/minute).
      operationId: api_sdk_batch_trades_api_sdk_trades_batch_post
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/SDKBatchTradeRequest'
        required: true
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SDKBatchTradeResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
components:
  schemas:
    SDKBatchTradeRequest:
      properties:
        trades:
          items:
            $ref: '#/components/schemas/SDKBatchTradeItem'
          type: array
          title: Trades
        venue:
          type: string
          enum:
            - sim
            - simmer
            - sandbox
            - polymarket
          title: Venue
          default: sim
        source:
          anyOf:
            - type: string
            - type: 'null'
          title: Source
        dry_run:
          type: boolean
          title: Dry Run
          default: false
        atomic:
          type: boolean
          title: Atomic
          default: false
        max_slippage:
          type: number
          title: Max Slippage
          default: 0.02
      type: object
      required:
        - trades
      title: SDKBatchTradeRequest
      description: Request to execute multiple trades.
    SDKBatchTradeResponse:
      properties:
        success:
          type: boolean
          title: Success
        results:
          items:
            $ref: '#/components/schemas/SDKBatchTradeResult'
          type: array
          title: Results
        total_cost:
          type: number
          title: Total Cost
        failed_count:
          type: integer
          title: Failed Count
        warnings:
          items:
            type: string
          type: array
          title: Warnings
          default: []
        execution_time_ms:
          anyOf:
            - type: integer
            - type: 'null'
          title: Execution Time Ms
        dry_run:
          type: boolean
          title: Dry Run
          default: false
      type: object
      required:
        - success
        - results
        - total_cost
        - failed_count
      title: SDKBatchTradeResponse
      description: Response from batch trade execution.
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    SDKBatchTradeItem:
      properties:
        market_id:
          type: string
          title: Market Id
        side:
          type: string
          enum:
            - 'yes'
            - 'no'
          title: Side
        amount:
          type: number
          title: Amount
      type: object
      required:
        - market_id
        - side
        - amount
      title: SDKBatchTradeItem
      description: Single trade item in a batch.
    SDKBatchTradeResult:
      properties:
        market_id:
          type: string
          title: Market Id
        success:
          type: boolean
          title: Success
        trade_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Trade Id
        error:
          anyOf:
            - type: string
            - type: 'null'
          title: Error
        cost:
          type: number
          title: Cost
          default: 0
        shares:
          anyOf:
            - type: number
            - type: 'null'
          title: Shares
        price:
          anyOf:
            - type: number
            - type: 'null'
          title: Price
        dry_run_price:
          anyOf:
            - type: number
            - type: 'null'
          title: Dry Run Price
        slippage:
          anyOf:
            - type: number
            - type: 'null'
          title: Slippage
        aborted:
          type: boolean
          title: Aborted
          default: false
      type: object
      required:
        - market_id
        - success
      title: SDKBatchTradeResult
      description: Result of a single trade in a batch.
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
        input:
          title: Input
        ctx:
          type: object
          title: Context
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError

````