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

# Get FX Quote

This endpoint generates a secure currency exchange quote, locking in the FX rate, validity time frame, and a unique token for payment processing. By default, quotes refresh every 60 seconds, but custom frequencies from one minute to one day are available upon request to match your operational needs.
\
&#x20;**Supported use cases:**\
&#x20; \- **Payin (DCC)** : lock the rate before collecting a payment from your user.\
&#x20; \- **Payout (DCC)** : lock the rate before sending a payment to a beneficiary.\
&#x20; \- **Bulk Exchange** : lock the rate before converting funds between your own accounts.\
&#x20;  For a full explanation of when and why to use each option, see [FX Overview](https://docs.localpayment.com/docs/fx-overview.md).


## OpenAPI

````yaml openapi/localpayment.json GET /api/fx/currency-exchange/{type}
openapi: 3.1.0
info:
  version: '1.0'
  title: Localpayment
  contact:
    name: Support
    url: mailto:support@localpayment.com
servers:
  - url: https://api.stage.localpayment.com
    description: Stage
security:
  - token: []
paths:
  /api/fx/currency-exchange/{type}:
    get:
      summary: Get FX Quote
      operationId: currency-exchange-quote
      parameters:
        - name: Authorization
          in: header
          description: >-
            Bearer access token for authentication. This token is obtained from
            the [Get Access Token](/reference/get-token) or [Refresh Access
            Token](/reference/refresh-token) endpoints.
          required: true
          schema:
            type: string
        - name: sourceCurrency
          in: query
          description: >-
            Currency you want to convert **from**. [Currency
            codes](/reference/currency-codes). Stablecoins USDC and USDT are
            supported.
          required: true
          schema:
            type: string
            examples:
              - ARS
        - name: quoteCurrency
          in: query
          description: >-
            Currency you want to convert **to**. [Currency
            codes](/reference/currency-codes).
          required: true
          schema:
            type: string
            examples:
              - USD
        - name: accountNumber
          in: query
          description: >-
            Your Localpayment account that holds the **source currency** (the
            account to be debited). Must be different from `quoteAccountNumber`.
          required: true
          schema:
            type: string
            examples:
              - '{{accountNumber}}'
        - name: quoteAccountNumber
          in: query
          description: >-
            Your Localpayment account that holds the **target currency** (the
            account to be credited). Must be different from `accountNumber`.
          required: true
          schema:
            type: string
        - name: type
          in: path
          description: Transaction type.
          required: true
          schema:
            type: string
            enum:
              - payin
              - payout
              - CurrencyExchange
            examples:
              - payin
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                anyOf:
                  - type: object
                    properties:
                      exchangeRateToken:
                        type: string
                        description: >-
                          Token used to track and guarantee the FX rate in a
                          payment request.
                      transactionType:
                        type: string
                        enum:
                          - PayIn
                          - PayOut
                        description: Transaction type.
                      accountNumber:
                        type: string
                        description: Localpayment account number.
                      sourceCurrency:
                        type: string
                        enum:
                          - ARS
                          - BOB
                          - BRL
                          - CLP
                          - COP
                          - CRC
                          - DOP
                          - USD
                          - GTQ
                          - MXN
                          - PYG
                          - PEN
                          - UYU
                          - USDC
                          - USDT
                        description: '[Source currency](/reference/currency-codes).'
                      creationDate:
                        type: string
                        description: Creation date.
                      expirationDate:
                        type: string
                        description: Expiration date.
                      quotes:
                        type: array
                        description: Quotation information.
                        items:
                          type: object
                          properties:
                            paymentMethodCode:
                              type: string
                              description: >-
                                [Payment method
                                code](/reference/get-available-payment-methods).
                            rate:
                              type: number
                              description: Quote rate.
                            quoteCurrency:
                              type: string
                              enum:
                                - ARS
                                - BOB
                                - BRL
                                - CLP
                                - COP
                                - CRC
                                - DOP
                                - USD
                                - GTQ
                                - MXN
                                - PYG
                                - PEN
                                - UYU
                                - USDC
                                - USDT
                              description: Quoted [currency](/reference/currency-codes).
                    required:
                      - exchangeRateToken
                      - transactionType
                      - accountNumber
                      - sourceCurrency
                      - creationDate
                      - expirationDate
                      - quotes
                  - type: object
                    properties:
                      Status:
                        type: integer
                        description: Error code.
                      Message:
                        type: string
                        description: Additional error information.
                      TraceId:
                        type: string
                        description: Error tracking id.
                    required:
                      - Status
                      - Message
                      - TraceId
                x-examples:
                  Example 1:
                    exchangeRateToken: 978898c8-9162-4af0-a833-07959fe50d44
                    transactionType: PayIn
                    accountNumber: '{{sourceAccountNumber}}'
                    sourceCurrency: ARS
                    creationDate: '2024-12-27T21:20:39.4379138+00:00'
                    expirationDate: '2024-12-28T05:20:39.4379138+00:00'
                    quotes:
                      - paymentMethodCode: '1005'
                        rate: 0.0008369108482392735
                        quoteCurrency: USD
                      - paymentMethodCode: '1023'
                        rate: 0.0008369108482392735
                        quoteCurrency: USD
                      - paymentMethodCode: '1000'
                        rate: 0.0008369108482392735
                        quoteCurrency: USD
                      - paymentMethodCode: '1004'
                        rate: 0.0008369108482392735
                        quoteCurrency: USD
                      - paymentMethodCode: '1002'
                        rate: 0.0008369108482392735
                        quoteCurrency: USD
                  Stablecoin (USDT):
                    accountNumber: '{{sourceAccountNumber}}'
                    creationDate: '2026-01-15T21:03:06.2722727Z'
                    exchangeRateToken: b4eb8276-8edc-43e6-937d-97ecd98ea902
                    expirationDate: '2026-01-15T21:14:06.2722727Z'
                    quotes:
                      - paymentMethodCode: null
                        quoteAccountNumber: '{{quoteAccountNumber}}'
                        quoteCurrency: USD
                        rate: 1
                    sourceCurrency: USDT
                    transactionType: CurrencyExchange
              examples:
                200 - Currency Exchange Quote.:
                  value:
                    exchangeRateToken: 5c3q89a7-f1bc-4ba5-a3b5-411ba0d144ca
                    transactionType: PayIn
                    accountNumber: '{{sourceAccountNumber}}'
                    sourceCurrency: ARS
                    creationDate: '2024-12-27T21:33:32.6513692+00:00'
                    expirationDate: '2024-12-28T05:33:32.6513692+00:00'
                    quotes:
                      - paymentMethodCode: '1005'
                        rate: 0.0008369108482392735
                        quoteCurrency: USD
                      - paymentMethodCode: '1023'
                        rate: 0.0008369108482392735
                        quoteCurrency: USD
                      - paymentMethodCode: '1000'
                        rate: 0.0008369108482392735
                        quoteCurrency: USD
                      - paymentMethodCode: '1004'
                        rate: 0.0008369108482392735
                        quoteCurrency: USD
                      - paymentMethodCode: '1002'
                        rate: 0.0008369108482392735
                        quoteCurrency: USD
                404 - currency error.:
                  value:
                    Status: 404
                    Message: >-
                      Source currency is neither the local nor the account
                      currency for this
                    TraceId: 2a8f37c4-9f60-4436-bd16-d00c9d4ebe00
                403 - Source and quote currencies must be different.:
                  value:
                    Status: 403
                    Message: Source and quote currencies must be different
                    TraceId: 4a1fca4f-a57a-4503-a3c4-71cc5ce7af55
                404 - The quote currency does not exist:
                  value:
                    Status: 404
                    Message: The quote currency does not exist
                    TraceId: 46c82280-9a22-49cf5-bc7-e6da676e0594
                404 -The source currency does not exist.:
                  value:
                    Status: 404
                    Message: The source currency does not exist
                    TraceId: 90f599a3-c0ac-46aa-b4ee-edacb538d80b
                404 - This account doesn't have a PayOut configuration for this.:
                  value:
                    Status: 404
                    Message: This account doesn't have a PayOut configuration for this
                    TraceId: 080d56d1-496b-4661-87ac-75175ef55b31
                200 - FX Quote Stablecoin (USDT).:
                  value:
                    accountNumber: '{{sourceAccountNumber}}'
                    creationDate: '2026-01-15T21:03:06.2722727Z'
                    exchangeRateToken: b4eb8276-8edc-43e6-937d-97ecd98ea902
                    expirationDate: '2026-01-15T21:14:06.2722727Z'
                    quotes:
                      - paymentMethodCode: null
                        quoteAccountNumber: '{{quoteAccountNumber}}'
                        quoteCurrency: USD
                        rate: 1
                    sourceCurrency: USDT
                    transactionType: CurrencyExchange
        '401':
          description: Unauthorized.
          content:
            application/json:
              schema:
                type: object
                properties:
                  detail:
                    type: string
                    description: Additional information of the response.
                  code:
                    type: string
                    description: Status code.
                  messages:
                    type: array
                    description: Message list.
                    items:
                      type: object
                      properties:
                        token_class:
                          type: string
                          description: Token class.
                        token_type:
                          type: string
                          description: Token type.
                        message:
                          type: string
                          description: Message with additional information.
                x-examples:
                  Example 1:
                    detail: Given token not valid for any token type
                    code: token_not_valid
                    messages:
                      - token_class: AccessToken
                        token_type: access
                        message: Token is invalid or expired
              examples:
                401 - Token is invalid or expired:
                  value:
                    detail: Given token not valid for any token type
                    code: token_not_valid
                    messages:
                      - token_class: AccessToken
                        token_type: access
                        message: Token is invalid or expired
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                type: object
                properties:
                  detail:
                    type: string
                    description: |
                      Additional information of the response.
                required:
                  - detail
                x-examples:
                  Example 1:
                    detail: You do not have permission to perform this action.
              examples:
                403 - You do not have permission to perform this action.:
                  value:
                    detail: You do not have permission to perform this action.
      security:
        - token: []
      servers:
        - url: https://api.stage.localpayment.com
          description: Stage
components:
  securitySchemes:
    token:
      type: http
      scheme: bearer

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.