> ## 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.

# Lock aggregator swap rate



## OpenAPI

````yaml /openapi.json post /exchange/fx/rate/{id}/lock
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/fx/rate/{id}/lock:
    post:
      tags:
        - Swaps
      summary: Lock aggregator swap rate
      operationId: Exchange.Web.SwapController.lock_aggregator_rate
      parameters:
        - description: Aggregator rate ID
          in: path
          name: id
          required: true
          schema:
            type: string
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SwapRateResponse'
          description: SwapRate
        '404':
          $ref: '#/components/responses/not_found'
      callbacks: {}
components:
  schemas:
    SwapRateResponse:
      description: Response schema for a swap rate
      properties:
        data:
          $ref: '#/components/schemas/SwapRate'
      title: SwapRateResponse
      type: object
    SwapRate:
      description: Response schema for swap rate
      example:
        rate: 1500
        symbol: USD-NGN
        ttl: 10
        type: buy
      properties:
        rate:
          description: Rate price
          type: string
        symbol:
          description: Currency pair
          type: string
        ttl:
          description: How long this rate will last, in seconds
          type: integer
        type:
          description: Swap type
          enum:
            - sell
            - buy
          type: string
      title: SwapRate
      type: object
  responses:
    not_found:
      content:
        application/json:
          schema:
            type: string
      description: Not Found

````