dLocal Exchange Rates API

Retrieve real-time FX rates between settlement currencies and local currencies before creating a payment or payout.

dLocal Exchange Rates API is one of 9 APIs that dLocal publishes on the APIs.io network, described by a machine-readable OpenAPI specification.

Tagged areas include FX and ExchangeRates. The published artifact set on APIs.io includes API documentation, an OpenAPI specification, and sample payloads.

OpenAPI Specification

d-local-exchange-rates-api-openapi.yml Raw ↑
openapi: 3.0.3
info:
  title: dLocal Exchange Rates API
  version: '2.1'
  description: |
    Retrieve real-time exchange rates between settlement currencies and
    local currencies. Use this before creating a payment or payout to
    preview the conversion rate.
servers:
  - url: https://api.dlocal.com
    description: Production
  - url: https://sandbox.dlocal.com
    description: Sandbox
tags:
  - name: ExchangeRates
    description: Retrieve real-time FX rates.
paths:
  /exchange-rates:
    get:
      tags: [ExchangeRates]
      operationId: getExchangeRate
      summary: Get An Exchange Rate
      parameters:
        - name: from_currency
          in: query
          required: true
          schema: { type: string, example: USD }
        - name: to_currency
          in: query
          required: true
          schema: { type: string, example: BRL }
        - name: country
          in: query
          required: false
          schema: { type: string }
      responses:
        '200':
          description: Exchange rate returned
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ExchangeRate'
components:
  schemas:
    ExchangeRate:
      type: object
      properties:
        from_currency: { type: string }
        to_currency: { type: string }
        rate: { type: number }
        inverse_rate: { type: number }
        country: { type: string }
        updated_at: { type: string, format: date-time }
  securitySchemes:
    dLocalSignature:
      type: apiKey
      in: header
      name: Authorization
security:
  - dLocalSignature: []