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

# Get current exchange rates from cache



## OpenAPI

````yaml /api-reference/openapi.json get /api/v2/rates
openapi: 3.1.0
info:
  title: PawPayments API
  description: >-
    Public REST API for the PawPayments crypto payment gateway.


    All `/api/v2/*` endpoints require an `x-api-key` header issued in the
    merchant dashboard. Responses are wrapped in `{"ok": true, "result": ...}`
    on success and `{"ok": false, "error": {code, message, details?}}` on
    failure.
  version: 2.0.0
servers:
  - url: https://api.pawpayments.com
    description: Production
security:
  - ApiKeyAuth: []
tags:
  - name: Catalog
  - name: Merchant
  - name: Invoices
  - name: Payouts
  - name: Notifications
  - name: Permanent addresses
paths:
  /api/v2/rates:
    get:
      tags:
        - Catalog
      summary: Get current exchange rates from cache
      operationId: get__api_v2_rates
      parameters:
        - name: base
          in: query
          schema:
            default: USD
            description: Fiat base for rates. Must be one of the supported fiats.
            title: Base
            type: string
          required: false
          description: Fiat base for rates. Must be one of the supported fiats.
        - name: assets
          in: query
          schema:
            anyOf:
              - type: string
              - type: 'null'
            default: null
            description: >-
              Comma-separated list of asset keys to filter, e.g.
              `btc,usdt_tron`.
            title: Assets
          required: false
          description: Comma-separated list of asset keys to filter, e.g. `btc,usdt_tron`.
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RatesEnvelope.d4a12ff'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorEnvelope.d4a12ff'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorEnvelope.d4a12ff'
        '422':
          description: Unprocessable Content
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorEnvelope.d4a12ff'
components:
  schemas:
    RatesEnvelope.d4a12ff:
      properties:
        ok:
          const: true
          title: Ok
          type: boolean
        result:
          $ref: '#/components/schemas/RatesEnvelope.d4a12ff.Rates'
      required:
        - ok
        - result
      title: RatesEnvelope
      type: object
    ErrorEnvelope.d4a12ff:
      example:
        error:
          code: VALIDATION_ERROR
          details:
            - field: amount
              message: Field required
          message: Validation failed
        ok: false
      properties:
        ok:
          const: false
          title: Ok
          type: boolean
        error:
          $ref: '#/components/schemas/ErrorEnvelope.d4a12ff.ErrorBody'
      required:
        - ok
        - error
      title: ErrorEnvelope
      type: object
    RatesEnvelope.d4a12ff.Rates:
      example:
        base: USD
        rates:
          btc: '67432.10'
          eth: '3521.40'
          usdt: '1.0001'
      properties:
        base:
          description: Fiat base (uppercase ISO 4217).
          title: Base
          type: string
        rates:
          additionalProperties:
            anyOf:
              - type: string
              - type: 'null'
          description: Map of lowercase symbol -> price string in `base`.
          title: Rates
          type: object
      required:
        - base
        - rates
      title: Rates
      type: object
    ErrorEnvelope.d4a12ff.ErrorBody:
      properties:
        code:
          description: Machine-readable error code (e.g. NOT_FOUND, VALIDATION_ERROR).
          title: Code
          type: string
        message:
          title: Message
          type: string
        details:
          anyOf:
            - {}
            - type: 'null'
          default: null
          description: >-
            Optional context. For VALIDATION_ERROR contains a list of {field,
            message}.
          title: Details
      required:
        - code
        - message
      title: ErrorBody
      type: object
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      name: x-api-key
      in: header

````