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

# Update a swap configuration



## OpenAPI

````yaml /openapi.json patch /exchange/swap-configurations/{id}
openapi: 3.0.0
info:
  title: Juicyway API
  version: 1.0.0
servers: []
security: []
tags:
  - description: Payment APIs
    name: payments
  - description: Payouts APIs
    name: payouts
  - description: Exchange APIs
    name: exchange
  - description: Wallets APIs
    name: wallets
paths:
  /exchange/swap-configurations/{id}:
    patch:
      tags:
        - exchange
      summary: Update a swap configuration
      operationId: Exchange.Web.SwapConfigurationController.update
      parameters:
        - description: Id
          example: b207fc34-25d7-439b-802d-158aff4b4bb5
          in: path
          name: id
          required: true
          schema:
            type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UpdateSwapConfigurationParams'
        description: swap configuration update params
        required: true
      responses:
        '201':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SwapConfigurationResponse'
          description: SwapConfiguration
        '422':
          $ref: '#/components/responses/unprocessable_entity'
      callbacks: {}
components:
  schemas:
    UpdateSwapConfigurationParams:
      example:
        symbol: USD-NGN
        ttl: 10
        type: buy
      properties:
        symbol:
          description: Currency pair
          type: string
        ttl:
          description: Price TTL, in seconds
          nullable: true
          type: integer
        type:
          description: Order type
          enum:
            - sell
            - buy
          type: string
      title: UpdateSwapConfigurationParams
      type: object
    SwapConfigurationResponse:
      description: Response schema for a single swap configuration
      properties:
        data:
          $ref: '#/components/schemas/SwapConfiguration'
      title: SwapConfigurationResponse
      type: object
    SwapConfiguration:
      description: Response schema for a single swap configuration
      properties:
        id:
          description: Id
          type: string
        order_type:
          description: Order type
          enum:
            - sell
            - buy
          type: string
        symbol:
          description: Currency pair
          type: string
        ttl:
          description: Price TTL, in seconds
          nullable: true
          type: integer
      title: SwapConfiguration
      type: object
  responses:
    unprocessable_entity:
      content:
        application/json:
          schema:
            type: object
      description: Unprocessable Entity

````