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

# Bulk Upsert Group Instruments

> Apply one partial patch to many symbols in a single transaction.

All-or-nothing: an unknown symbol or a non-tradable-with-open-positions
violation rolls the whole batch back (the get_session ctx aborts on the
raised HTTPException), so the client never sees a partial apply.



## OpenAPI

````yaml /openapi.json put /groups/{group_id}/instruments/bulk
openapi: 3.1.0
info:
  title: Slate API
  version: 1.0.0
  description: Trading infrastructure API.
servers:
  - url: https://api.{your-broker}.slate-labs.com
    variables:
      your-broker:
        default: broker
security: []
tags:
  - name: Authentication
  - name: API Tokens
  - name: Customers
  - name: Accounts
  - name: Orders
  - name: Instruments & Groups
  - name: Transactions
  - name: Payments
  - name: Transfers
  - name: Risk
  - name: Workflow & CRM
  - name: Messaging
  - name: Integrations
  - name: Webhooks
  - name: Compliance
  - name: Promo codes
  - name: Reporting
  - name: Audit
  - name: Fraud & moderation
  - name: Broker settings
  - name: Users
  - name: Roles & Teams
  - name: Streams (SSE)
  - name: Simulator
  - name: Observability
  - name: Prop trading
paths:
  /groups/{group_id}/instruments/bulk:
    put:
      tags:
        - Instruments & Groups
      summary: Bulk Upsert Group Instruments
      description: |-
        Apply one partial patch to many symbols in a single transaction.

        All-or-nothing: an unknown symbol or a non-tradable-with-open-positions
        violation rolls the whole batch back (the get_session ctx aborts on the
        raised HTTPException), so the client never sees a partial apply.
      operationId: bulk_upsert_group_instruments_groups__group_id__instruments_bulk_put
      parameters:
        - name: group_id
          in: path
          required: true
          schema:
            type: string
            format: uuid
            title: Group Id
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/GroupInstrumentBulkUpsertRequest'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/GroupInstrumentResponse'
                title: >-
                  Response Bulk Upsert Group Instruments Groups  Group Id 
                  Instruments Bulk Put
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
components:
  schemas:
    GroupInstrumentBulkUpsertRequest:
      properties:
        symbols:
          items:
            type: string
          type: array
          maxItems: 2000
          minItems: 1
          title: Symbols
        patch:
          $ref: '#/components/schemas/GroupInstrumentUpsertRequest'
      type: object
      required:
        - symbols
        - patch
      title: GroupInstrumentBulkUpsertRequest
      description: >-
        Apply ONE partial patch to MANY symbols in a single transaction.


        `patch` reuses the per-symbol validation (ranges, commission pairing,

        min<=max, enum checks). `symbols` is the set of broker-instrument
        symbols

        to apply it to. Empty `symbols` is rejected — a no-op bulk write is
        almost

        certainly a frontend bug, and we want the 422 to surface it.
    GroupInstrumentResponse:
      properties:
        id:
          type: string
          format: uuid
          title: Id
        group_id:
          type: string
          format: uuid
          title: Group Id
        instrument_id:
          type: string
          format: uuid
          title: Instrument Id
        symbol:
          type: string
          title: Symbol
        tradeability:
          anyOf:
            - type: string
            - type: 'null'
          title: Tradeability
        spread:
          anyOf:
            - type: number
            - type: 'null'
          title: Spread
        margin_rate:
          anyOf:
            - type: number
            - type: 'null'
          title: Margin Rate
        swap_type:
          anyOf:
            - type: string
            - type: 'null'
          title: Swap Type
        swap_long:
          anyOf:
            - type: number
            - type: 'null'
          title: Swap Long
        swap_short:
          anyOf:
            - type: number
            - type: 'null'
          title: Swap Short
        commission_type:
          anyOf:
            - type: string
            - type: 'null'
          title: Commission Type
        commission_value:
          anyOf:
            - type: number
            - type: 'null'
          title: Commission Value
        min_lot:
          anyOf:
            - type: number
            - type: 'null'
          title: Min Lot
        max_lot:
          anyOf:
            - type: number
            - type: 'null'
          title: Max Lot
        lot_step:
          anyOf:
            - type: number
            - type: 'null'
          title: Lot Step
        max_symbol_exposure:
          anyOf:
            - type: number
            - type: 'null'
          title: Max Symbol Exposure
      type: object
      required:
        - id
        - group_id
        - instrument_id
        - symbol
        - tradeability
        - spread
        - margin_rate
        - swap_type
        - swap_long
        - swap_short
        - commission_type
        - commission_value
        - min_lot
        - max_lot
        - lot_step
      title: GroupInstrumentResponse
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    GroupInstrumentUpsertRequest:
      properties:
        tradeability:
          anyOf:
            - type: string
            - type: 'null'
          title: Tradeability
        spread:
          anyOf:
            - type: number
              maximum: 100
              minimum: 0
            - type: 'null'
          title: Spread
        margin_rate:
          anyOf:
            - type: number
              maximum: 1
              minimum: 0.001
            - type: 'null'
          title: Margin Rate
        swap_type:
          anyOf:
            - type: string
            - type: 'null'
          title: Swap Type
        swap_long:
          anyOf:
            - type: number
              maximum: 50
              minimum: -50
            - type: 'null'
          title: Swap Long
        swap_short:
          anyOf:
            - type: number
              maximum: 50
              minimum: -50
            - type: 'null'
          title: Swap Short
        commission_type:
          anyOf:
            - type: string
            - type: 'null'
          title: Commission Type
        commission_value:
          anyOf:
            - type: number
              maximum: 50
              minimum: 0
            - type: 'null'
          title: Commission Value
        min_lot:
          anyOf:
            - type: number
              maximum: 1000
              minimum: 0.001
            - type: 'null'
          title: Min Lot
        max_lot:
          anyOf:
            - type: number
              maximum: 10000
              minimum: 0.001
            - type: 'null'
          title: Max Lot
        lot_step:
          anyOf:
            - type: number
              maximum: 100
              minimum: 0.001
            - type: 'null'
          title: Lot Step
        max_symbol_exposure:
          anyOf:
            - type: number
              minimum: 0
            - type: 'null'
          title: Max Symbol Exposure
      type: object
      title: GroupInstrumentUpsertRequest
      description: >-
        All override fields are optional. group_instruments is the sole source
        of

        commercial terms — there is no fallback to instruments master.

        Safety limits enforced on all numeric overrides.
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError

````