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

# Get an exchange rate

> Returns the exchange rate for a currency pair with your platform fee applied on top. Pass exactly one of source_amount or destination_amount; the other side is computed. This is an indicative rate and does not lock a quote.



## OpenAPI

````yaml /openapi/v0/openapi.json get /v0/rates
openapi: 3.0.0
info:
  title: Superbank API
  description: Superbank Developer API for Instant Settlement
  version: '1.0'
  contact: {}
servers:
  - url: https://api-sandbox.superbank.co
    description: Sandbox
security: []
tags: []
paths:
  /v0/rates:
    get:
      tags:
        - Rates
      summary: Get an exchange rate
      description: >-
        Returns the exchange rate for a currency pair with your platform fee
        applied on top. Pass exactly one of source_amount or destination_amount;
        the other side is computed. This is an indicative rate and does not lock
        a quote.
      operationId: RatesController_getRate
      parameters:
        - name: sourceCurrencyCode
          required: true
          in: query
          description: Source currency code, e.g. USDC, USDT, EURC, USD.
          schema:
            type: string
            example: USDC
        - name: sourceRail
          required: true
          in: query
          description: Source rail / chain, e.g. SOLANA, TRON, POLYGON, ETHEREUM, ACH.
          schema:
            example: SOLANA
            type: string
        - name: destinationCurrencyCode
          required: true
          in: query
          description: Destination currency code, e.g. USD, CAD, EUR, USDC.
          schema:
            type: string
            example: CAD
        - name: destinationRail
          required: true
          in: query
          description: Destination rail, e.g. ACH, RTP, DOMESTIC_WIRE, LOCAL, SOLANA.
          schema:
            example: LOCAL
            type: string
        - name: destinationCountryCode
          required: false
          in: query
          description: >-
            ISO 3166-1 alpha-2 country code of the destination. Required when
            the destination is a fiat currency.
          schema:
            example: CA
            type: string
        - name: sourceCountryCode
          required: false
          in: query
          description: >-
            ISO 3166-1 alpha-2 country code of the source. Required when the
            source is a fiat currency (on-ramp).
          schema:
            example: US
            type: string
        - name: sourceAmount
          required: false
          in: query
          description: >-
            Amount in the source currency to convert. Mutually exclusive with
            destination_amount.
          schema:
            example: 1000
            type: number
        - name: destinationAmount
          required: false
          in: query
          description: >-
            Amount in the destination currency to receive. Mutually exclusive
            with source_amount.
          schema:
            example: 1000
            type: number
      responses:
        '200':
          description: Rate retrieved successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RateResponseDto'
        '400':
          description: Invalid query parameters
        '401':
          description: Unauthorized - invalid or missing API key
      security:
        - api-key: []
components:
  schemas:
    RateResponseDto:
      type: object
      properties:
        source_currency:
          type: string
          example: USDC
        destination_currency:
          type: string
          example: CAD
        mid_market_rate:
          type: number
          description: Destination units per one source unit, before fees.
          example: 1.3788
        inverted_mid_market_rate:
          type: number
          description: Inverse of mid_market_rate.
          example: 0.7252
        effective_rate:
          type: number
          description: All-in rate the customer receives per source unit, after all fees.
          example: 1.3712
        source_amount:
          type: number
          description: Amount debited in the source currency.
          example: 1000
        destination_amount:
          type: number
          description: Amount credited in the destination currency.
          example: 1371.2
        fee:
          $ref: '#/components/schemas/RateFeeDto'
      required:
        - source_currency
        - destination_currency
        - mid_market_rate
        - inverted_mid_market_rate
        - effective_rate
        - source_amount
        - destination_amount
        - fee
    RateFeeDto:
      type: object
      properties:
        total:
          type: number
          description: Total fee in the source currency.
          example: 9.97
        currency:
          type: string
          description: Currency the fee is denominated in.
          example: USDC
      required:
        - total
        - currency
  securitySchemes:
    api-key:
      type: apiKey
      in: header
      name: X-Api-Key

````