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

# Get rates

> Returns the latest active onramp and offramp rates for the given target fiat currency. Rates already include the business fee applied to the API key.

Returns the latest active onramp and offramp rate for a fiat currency, quoted
against USD.

Both rates are returned on every call because the two directions are priced
independently — the offramp rate (crypto to fiat) is not the inverse of the
onramp rate (fiat to crypto). Read `onRampRate.rate` or `offRampRate.rate`
depending on which way the money is moving.

<Note>
  Rates returned here already include the fee configured for your business, so
  the number you display is the number your user gets. Do not apply your own
  spread on top unless you intend to charge twice.
</Note>

See [Rates](/concepts/rates) for how to quote an amount from a rate, and how
long a rate stays good for.


## OpenAPI

````yaml GET /pub/v2/rate
openapi: 3.0.0
info:
  title: Paj Public API
  description: >-
    Programmatic access to Paj's on/off ramp. Register a Nigerian bank account,

    get the on-chain address that pays it, and read the live conversion rates.


    Every request must carry an `x-api-key` header. Keys are scoped to a
    business,

    and the rates you receive already have that business's fee applied.
  version: 2.0.0
  contact: {}
servers:
  - url: https://api.paj.cash
    description: Production
security: []
tags: []
paths:
  /pub/v2/rate:
    get:
      tags:
        - Pub V2
      summary: Get on/off ramp rates for a currency
      description: >-
        Returns the latest active onramp and offramp rates for the given target
        fiat currency. Rates already include the business fee applied to the API
        key.
      operationId: PubV2Controller_getRates
      parameters:
        - name: currency
          required: true
          in: query
          description: Target fiat currency to fetch the on/off ramp rates for
          schema:
            example: NGN
            enum:
              - NGN
              - GHS
              - TZS
              - KES
              - ZAR
              - USD
            type: string
      responses:
        '200':
          description: The onramp and offramp rates for the currency
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RatesDto'
        '401':
          description: Missing or invalid API key (x-api-key header)
        '404':
          description: No active rate found for the currency
      security:
        - x-api-key: []
components:
  schemas:
    RatesDto:
      type: object
      properties:
        onRampRate:
          $ref: '#/components/schemas/RateDto'
        offRampRate:
          $ref: '#/components/schemas/RateDto'
      required:
        - onRampRate
        - offRampRate
    RateDto:
      type: object
      properties:
        rate:
          type: number
          description: Exchange rate for base to target currency
          example: 1650
        type:
          type: string
          description: Rate type, either onRamp or offRamp
          enum:
            - onRamp
            - offRamp
          example: offRamp
        id:
          type: string
          description: Rate Id
          example: 673a42e547e586bcd37fb0d7
        baseCurrency:
          type: string
          description: Base Currency, default is USD
          enum:
            - NGN
            - GHS
            - TZS
            - KES
            - ZAR
            - USD
          example: USD
        targetCurrency:
          type: string
          description: Merchant Trading currency
          example: NGN
        createdAt:
          format: date-time
          type: string
          description: Date rate was created
          example: 1785768054407
      required:
        - rate
        - type
        - id
        - baseCurrency
        - targetCurrency
        - createdAt
  securitySchemes:
    x-api-key:
      type: apiKey
      in: header
      name: x-api-key

````