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

# Get Fiat to Fiat Exchange Rate

> An integrator can use this endpoint to get the exchange rate between two fiat currencies

An integrator can use this endpoint to get the exchange rate between two fiat currencies.


## OpenAPI

````yaml POST /api/v3/rate/fiat
openapi: 3.0.0
info:
  title: KOTANI PAY API PLATFORM
  description: ''
  version: '3.0'
  contact: {}
servers:
  - url: https://sandbox-api.kotanipay.com
security: []
tags: []
paths:
  /api/v3/rate/fiat:
    post:
      tags:
        - RATES
      summary: Get Fiat to Fiat exchange rate
      description: >-
        An integrator can use this endpoint to get the exchange rate between two
        fiat currencies
      operationId: RateController_getFiatToFiatRate_api/v3
      parameters: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/FiatRateRequestDto'
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                properties:
                  success:
                    type: boolean
                    example: true
                  message:
                    type: string
                    example: Available exchange rate.
                  data:
                    $ref: '#/components/schemas/FiatToFiatRateResponseDto'
                    type: object
        '401':
          description: ''
          content:
            application/json:
              schema:
                properties:
                  success:
                    type: boolean
                    example: false
                  message:
                    type: string
                    example: Invalid API Key
                  data:
                    type: object
                    example: {}
      security:
        - JWT: []
components:
  schemas:
    FiatRateRequestDto:
      type: object
      properties:
        from:
          type: string
          description: The fiat currency the customer pays in.
          example: KES
        to:
          type: string
          description: The fiat currency to pay out in.
          example: EUR
        amount:
          type: number
          description: >-
            How much to convert, in the `from` currency. Fees are quoted on both
            legs of a fiat-to-fiat transfer.
          example: 10000
      required:
        - from
        - to
        - amount
    FiatToFiatRateResponseDto:
      type: object
      properties:
        from:
          type: string
          description: The currency being converted from — the one you hold.
          example: USD
        to:
          type: string
          description: The currency being converted to — the one you want.
          example: KES
        value:
          type: string
          description: >-
            How many units of `to` one unit of `from` buys. Multiply your `from`
            amount by this to get the `to` amount: 10 USD at 130.5 is 1305 KES.
            Divide to go the other way. Rates move, so re-read this before
            quoting a customer rather than caching it.
          example: '130.5'
        depositAmount:
          type: number
          description: >-
            What you collect from the payer, in the `from` currency, before the
            collection fee.
          example: '10000'
        withdrawalAmount:
          type: number
          description: >-
            What is paid out in the `to` currency, before the payout fee. This
            is depositAmount converted at `value`.
          example: '76'
        depositTransactionAmount:
          type: number
          description: >-
            The collection side after its fee is applied — the fee-adjusted
            amount on the deposit leg.
          example: '10250'
        withdrawalTransactionAmount:
          type: number
          description: >-
            The payout side after its fee is applied — what the recipient
            actually receives.
          example: '74'
        depositFee:
          type: number
          description: >-
            Fee on the collection leg, in the `from` currency. A fiat-to-fiat
            transfer is charged on both legs, so expect two fees.
          example: '250'
        withdrawalFee:
          type: number
          description: Fee on the payout leg, in the `to` currency.
          example: '2'
      required:
        - from
        - to
        - value
        - depositAmount
        - withdrawalAmount
        - depositTransactionAmount
        - withdrawalTransactionAmount
        - depositFee
        - withdrawalFee
  securitySchemes:
    JWT:
      scheme: bearer
      bearerFormat: JWT
      type: http

````