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

# Create a quote

> Creates one or more quotes for the given source/destination parameters. Returns quotes sorted in the following order:

  - Ascending of `sourceAmount` if your quote is based on `destinationAmount`.

  - Descending of `destinationAmount` if your quote is based on `sourceAmount`.




## OpenAPI

````yaml openapi/cpn-ofi.yaml post /v1/cpn/quotes
openapi: 3.0.3
info:
  description: CPN OFI REST API
  title: CPN OFI
  version: '1.0'
  license:
    name: Proprietary
    url: https://www.circle.com/legal
servers:
  - url: https://api.circle.com
security:
  - BearerAuth: []
tags:
  - name: Configurations
    description: Manage OFI configurations and settings
  - name: Quotes
    description: Handle quote-related operations
  - name: Payments
    description: Create and manage payment operations
  - name: Transactions
    description: Handle transaction-related operations
  - name: Requests for Information
    description: Manage Requests for Information (RFIs)
  - name: Support Tickets
    description: Manage support ticket operations
paths:
  /v1/cpn/quotes:
    post:
      tags:
        - Quotes
      summary: Create a quote
      description: >
        Creates one or more quotes for the given source/destination parameters.
        Returns quotes sorted in the following order:

          - Ascending of `sourceAmount` if your quote is based on `destinationAmount`.

          - Descending of `destinationAmount` if your quote is based on `sourceAmount`.
      operationId: createQuotes
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateQuotes'
      responses:
        '201':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/QuotesResponse'
          description: Quotes created successfully
          headers:
            X-Request-Id:
              $ref: '#/components/headers/XRequestId'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/NotAuthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
      security:
        - BearerAuth: []
components:
  schemas:
    CreateQuotes:
      type: object
      description: Request body for creating payment quotes with exchange rates and fees
      properties:
        paymentMethodType:
          $ref: '#/components/schemas/PaymentMethodType'
        senderCountry:
          $ref: '#/components/schemas/Country'
        sourceAmount:
          type: object
          properties:
            amount:
              type: string
              example: '10'
            currency:
              $ref: '#/components/schemas/CryptoCurrency'
          description: >-
            The crypto source amount. This field is an object containing the
            currency code and the amount. This field is required; however, if
            your query is based on the `destinationAmount`, leave the `amount`
            field blank and only populate the `currency` field.
        destinationCountry:
          $ref: '#/components/schemas/Country'
        destinationAmount:
          type: object
          properties:
            amount:
              type: string
              example: ''
            currency:
              $ref: '#/components/schemas/FiatCurrency'
          description: >-
            The amount of fiat currency to be delivered to the destination. This
            field is an object containing the currency code and the amount. This
            field is required; however, if your query is based on the
            `sourceAmount`, leave the `amount` field blank and only populate the
            `currency` field.
        blockchain:
          $ref: '#/components/schemas/Blockchain'
        senderType:
          $ref: '#/components/schemas/SenderRecipientType'
        recipientType:
          $ref: '#/components/schemas/SenderRecipientType'
        quoteOptions:
          $ref: '#/components/schemas/QuoteOptions'
        transactionVersion:
          $ref: '#/components/schemas/TransactionVersion'
      required:
        - blockchain
        - destinationAmount
        - destinationCountry
        - recipientType
        - senderCountry
        - senderType
        - sourceAmount
    QuotesResponse:
      title: QuotesResponse
      type: object
      required:
        - data
      properties:
        data:
          type: array
          description: >-
            Array of quotes containing all the necessary information for
            payments
          items:
            $ref: '#/components/schemas/Quote'
    PaymentMethodType:
      type: string
      description: The method used for the payment (e.g., PIX, WIRE, CHATS)
      enum:
        - AANI
        - ACH-BANK-TRANSFER
        - BANK-TRANSFER
        - CHATS
        - CIPS
        - FAST
        - FEDWIRE
        - FPS
        - FTS
        - IMPS
        - INSTAPAY
        - NEFT
        - NEQUI
        - PESONET
        - PIX
        - RTGS
        - SD-ACH
        - SEPA
        - SPEI
        - SPID
        - WIRE
      example: SPEI
    Country:
      type: string
      description: >-
        ISO 3166-1 alpha-2 two-letter country code supported by the Circle
        Payment Network
      enum:
        - AT
        - BE
        - BG
        - BR
        - CH
        - CN
        - CO
        - CY
        - CZ
        - DE
        - DK
        - EE
        - ES
        - FI
        - FR
        - GB
        - GR
        - HK
        - HR
        - HU
        - IE
        - IN
        - IT
        - LI
        - LT
        - LU
        - MT
        - MX
        - NG
        - NL
        - 'NO'
        - PL
        - PT
        - RO
        - SE
        - SI
        - SK
        - US
      example: MX
    CryptoCurrency:
      type: string
      description: Supported cryptocurrencies
      enum:
        - USDC
      example: USDC
    FiatCurrency:
      type: string
      description: Supported fiat currencies
      enum:
        - BRL
        - CNY
        - COP
        - EUR
        - GBP
        - HKD
        - INR
        - MXN
        - NGN
        - USD
      example: MXN
    Blockchain:
      type: string
      description: Supported blockchain networks
      enum:
        - SOL
        - MATIC
        - ETH
        - ARC
        - SOL-DEVNET
        - MATIC-AMOY
        - ETH-SEPOLIA
        - ARC-TESTNET
      example: ETH-SEPOLIA
    SenderRecipientType:
      type: string
      description: Type of entity sending or receiving the payment
      enum:
        - BUSINESS
        - INDIVIDUAL
      example: BUSINESS
    QuoteOptions:
      type: object
      description: Additional information for the OFI to provide a more precise quote
      properties:
        isFirstParty:
          type: boolean
          description: >
            Whether the sender and recipient are the same entity. Some BFIs may
            provide discounts for first party payments.
    TransactionVersion:
      type: string
      description: The version of the transaction. If not provided, defaults to VERSION_1.
      enum:
        - VERSION_1
        - VERSION_2
      example: VERSION_2
    Quote:
      type: object
      description: >-
        A quote containing all the necessary information for a cryptocurrency
        payment transaction, including source and destination amounts, fees,
        exchange rates, and relevant timing information.
      required:
        - type
        - id
        - paymentMethodType
        - blockchain
        - senderCountry
        - destinationCountry
        - createDate
        - quoteExpireDate
        - cryptoFundsSettlementExpireDate
        - sourceAmount
        - destinationAmount
        - fiatSettlementTime
        - exchangeRate
        - fees
        - senderType
        - recipientType
        - certificate
        - quoteOptions
        - transactionVersion
      properties:
        type:
          type: string
          description: Resource type identifier
          readOnly: true
          enum:
            - quote
          example: quote
        id:
          $ref: '#/components/schemas/Id'
        paymentMethodType:
          $ref: '#/components/schemas/PaymentMethodType'
        blockchain:
          $ref: '#/components/schemas/Blockchain'
        senderCountry:
          $ref: '#/components/schemas/Country'
        destinationCountry:
          $ref: '#/components/schemas/Country'
        createDate:
          $ref: '#/components/schemas/CreateDate'
        quoteExpireDate:
          $ref: '#/components/schemas/ExpireDate'
        cryptoFundsSettlementExpireDate:
          $ref: '#/components/schemas/ExpireDate'
        sourceAmount:
          $ref: '#/components/schemas/CryptoMoney'
          example:
            amount: '10.000000'
            currency: USDC
        destinationAmount:
          $ref: '#/components/schemas/FiatMoney'
          example:
            amount: '183.24'
            currency: MXN
        fiatSettlementTime:
          $ref: '#/components/schemas/ArrivalTime'
        exchangeRate:
          $ref: '#/components/schemas/ExchangeRate'
          example:
            pair: USDC/MXN
            rate: '18.324000'
        rawExchangeRate:
          $ref: '#/components/schemas/ExchangeRate'
          description: >-
            The raw exchange rate between `sourceAmount` and
            `destinationAmount`, exclusive of fees.
          example:
            pair: USDC/MXN
            rate: '18.778689'
        fees:
          $ref: '#/components/schemas/PaymentFees'
          example:
            breakdown:
              - type: BFI_TRANSACTION_FEE
                amount:
                  amount: '0.240000'
                  currency: USDC
            totalAmount:
              amount: '0.240000'
              currency: USDC
        senderType:
          $ref: '#/components/schemas/SenderRecipientType'
        recipientType:
          $ref: '#/components/schemas/SenderRecipientType'
        certificate:
          $ref: '#/components/schemas/Certificate'
        quoteOptions:
          $ref: '#/components/schemas/QuoteOptions'
        transactionVersion:
          $ref: '#/components/schemas/TransactionVersion'
    XRequestId:
      type: string
      description: >-
        A unique identifier, which can be helpful for identifying a request when
        communicating with Circle support.
      example: 2adba88e-9d63-44bc-b975-9b6ae3440dde
    ErrorCode:
      title: ErrorCode
      type: integer
      description: Code that corresponds to the error.
      enum:
        - -1
        - 0
        - 1
        - 2
        - 3
        - 290000
        - 290001
        - 290100
        - 290101
        - 290102
        - 290103
        - 290200
        - 290201
        - 290202
        - 290203
        - 290204
        - 290205
        - 290206
        - 290211
        - 290300
        - 290301
        - 290302
        - 290303
        - 290304
        - 290305
        - 290306
        - 290307
        - 290308
        - 290309
        - 290310
        - 290311
        - 290312
        - 290313
        - 290314
        - 290315
        - 290316
        - 290317
        - 290318
        - 290319
        - 290320
        - 290321
        - 290322
        - 290323
        - 290324
        - 290325
        - 290327
        - 290328
        - 290329
        - 290330
        - 290331
        - 290332
        - 290333
        - 290338
        - 290339
        - 290340
        - 290341
        - 290349
        - 290352
        - 290400
        - 290401
        - 290500
        - 290502
        - 290503
        - 290600
        - 290601
        - 290602
        - 290603
        - 290604
        - 290605
        - 290606
      x-enum-descriptions:
        - Unknown error
        - Success
        - API parameter missing
        - API parameter invalid
        - Forbidden
        - >-
          Parameters of request do not match the tenancy environment associated
          with request
        - A request with this idempotency key has already been processed.
        - Amount provided is outside our supported limits
        - No bfis available to create requested quote
        - Parameters of request do not match any supported payment routes
        - Route does not support the requested use case
        - Quote not found with provided id
        - Quote already used by another payment
        - Quote past timestamp at which it expires
        - Blockchain for sender address does not blockchain requested in quote
        - Provided wallet address is on sanctioned lists
        - Pending RFI verification
        - RFI rejected
        - Payment use case does not match the quote.
        - Payment already has an associated active or completed transaction
        - Blockchain is not supported by CPN
        - Blockchain is not supported for V2 transactions
        - Submitting a transaction not in submittable status
        - Payment not in correct status for processing a onchain transfer
        - The payment is not found
        - The transaction is not found
        - A signed transaction for the transaction has already been submitted
        - The payment is expired
        - >-
          The signed transaction is expired. Solana has a concept of recent
          blockhash in a transaction that expires after 150 blocks (~1 min)
        - >-
          The nonce in the signed transaction is lower than the current wallet
          nonce
        - The signed transaction payload does not match the payment
        - The sender's wallet balance is insufficient
        - The fee payer wallet lacks enough gas
        - >-
          The CPN Payment ID provided in the signed data (e.g., in the Solana
          memo or EIP-712 structure) does not match the expected value
        - >-
          The gas price in the signed transaction is below network thresholds.
          The fee must exceed the estimated high fee to ensure prompt
          confirmation
        - >-
          When resubmitting (e.g., for acceleration), the wallet address to sign
          the raw transaction or nonce does not match the original submission
        - >-
          The full node used by CPN is currently unavailable or returns an
          unexpected error during transaction validation
        - The Payment Ref ID has already been used on-chain
        - >-
          For EVM chains, the gas limit in the signed transaction is
          insufficient to cover the execution costs. For Solana, the allocated
          compute budget falls short of the transaction's requirements,
          preventing successful execution
        - >-
          The nonce has already been used with the same sender in another signed
          transaction submission for a CPN payment. The OFI must use a unique
          nonce
        - The signature in the transaction is invalid
        - Provided wallet address is on sanctioned lists
        - The blockchain is not supported by CPN
        - The cross-chain is not supported by CPN yet
        - Completed transaction exist. No need to accelerate
        - The signed transaction cannot be decoded or is invalid
        - The Solana account specified for transaction is not found
        - The targetted transaction for action is expired
        - >-
          Please sign existing transaction or wait for signed transaction to be
          broadcast
        - No broadcasted transaction to be accelerated
        - The Solana account specified for transaction is invalid
        - >-
          Another transaction for the same CPN payment has already been
          submitted and is being broadcasted
        - >-
          A signature for the transaction has already been submitted and
          accepted.
        - >-
          The submitted signature cannot be verified against the typed data to
          be signed. This typically indicates that the signature signed with the
          wrong private key, or the typed data gets manipulated before signing.
        - >-
          The ERC-20 allowance granted to the Permit2 contract is insufficient
          to cover the total required token amount for the payment, including
          both the payment amount and associated fees.
        - >-
          The Permit2 nonce included in the typed data for the sender has
          already been used.
        - >-
          Blockchain is not supported for V1 transactions; use
          transactionVersion=VERSION_2.
        - >-
          The signed transaction was submitted after the onchain settlement
          cutoff.
        - RFI is past timestamp at which it expires
        - RFI cannot be submitted in current status
        - >-
          The decryption process failed, possibly due to an invalid key or
          corrupted data
        - >-
          The JWE compact payload is not formatted correctly or is missing
          required components
        - >-
          The JWE compact payload was not encrypted with a supported encryption
          algorithm
        - Ticket reference ID is required for escalation tickets
        - Original ticket not found with provided reference ID
        - Issue type is not allowed for this origin
        - Payment not found with provided ID
        - Failed to create Circle Salesforce support ticket
        - Failed to create a BFI support ticket
        - Support ticket not found with provided ID
    DescriptiveError:
      title: DescriptiveError
      type: object
      required:
        - error
        - message
      properties:
        error:
          $ref: '#/components/schemas/DescriptiveErrorType'
        location:
          type: string
          nullable: true
          description: The key or path where the error occurred
        message:
          type: string
          description: Detailed description of the error
    Id:
      type: string
      format: uuid
      description: System-generated unique identifier of the resource.
      example: c4d1da72-111e-4d52-bdbf-2e74a2d803d5
    CreateDate:
      type: string
      format: date-time
      description: Date and time when the resource was created
      example: '2023-01-01T12:04:05Z'
    ExpireDate:
      type: string
      format: date-time
      description: Date and time when the resource expires
      example: '2023-01-01T12:04:05Z'
    CryptoMoney:
      type: object
      description: >-
        Represents an amount of cryptocurrency, including both the numerical
        amount and the specific cryptocurrency type.
      properties:
        amount:
          type: string
          example: '110.270000'
        currency:
          $ref: '#/components/schemas/CryptoCurrency'
      example:
        amount: '110.270000'
        currency: USDC
    FiatMoney:
      type: object
      description: >-
        Represents an amount of money in a specific fiat currency, including
        both the numerical amount and the currency type.
      properties:
        amount:
          type: string
          example: '183.24'
        currency:
          $ref: '#/components/schemas/FiatCurrency'
    ArrivalTime:
      type: object
      description: >-
        Estimated time range for when funds will arrive at their destination
        after a transfer is initiated. The time varies depending on the fiat
        payment method used (e.g., ACH, SEPA, Wire). The time is represented as
        a range with minimum and maximum values in the specified unit.
      properties:
        max:
          type: string
          example: '3'
        min:
          type: string
          example: '1'
        unit:
          type: string
          enum:
            - MINUTES
            - HOURS
            - DAYS
            - WEEKS
          example: DAYS
    ExchangeRate:
      type: object
      properties:
        pair:
          type: string
          description: The currency pair in format cryptoCurrency/localFiatCurrency
          example: USDC/MXN
        rate:
          type: string
          description: The exchange rate between source and destination currencies
          example: '18.324000'
    PaymentFees:
      type: object
      description: >-
        A collection of fees associated with a payment transaction, including
        both individual fee breakdowns and the total amount.
      properties:
        breakdown:
          type: array
          description: >-
            Detailed breakdown of individual fees that make up the total payment
            fees.
          items:
            $ref: '#/components/schemas/PaymentFee'
        totalAmount:
          $ref: '#/components/schemas/CryptoMoney'
    Certificate:
      type: object
      properties:
        id:
          $ref: '#/components/schemas/Id'
        certPem:
          type: string
          format: base64
          description: Base64 encoded certificate in PEM format
          example: LS0tLS1CRUdJT...
        domain:
          type: string
          description: >-
            BFI domain which is available in the CommonName attribute of the
            cert
          example: api.circle.com
        jwk:
          $ref: '#/components/schemas/JWK'
    DescriptiveErrorType:
      title: DescriptiveErrorType
      type: string
      enum:
        - MISSING_OR_INVALID_FIELD
      description: Type of descriptive error
    PaymentFee:
      type: object
      description: >-
        Represents a fee associated with a payment transaction, including the
        fee amount and type.
      properties:
        amount:
          $ref: '#/components/schemas/CryptoMoney'
        type:
          description: The type of fee being charged for the transaction.
          type: string
          enum:
            - TAX_FEE
            - BFI_TRANSACTION_FEE
          example: BFI_TRANSACTION_FEE
      example:
        amount:
          amount: '0.240000'
          currency: USDC
        type: BFI_TRANSACTION_FEE
    JWK:
      type: object
      description: The public key for the BFI defined in RFC 7517
      properties:
        crv:
          type: string
          description: The curve used for the EC key
          example: P-256
        kid:
          type: string
          description: Key ID
          example: '263521881931753643998528753619816524468853605762'
        kty:
          type: string
          description: Key type
          example: EC
        x:
          type: string
          description: X coordinate for the EC public key
          example: KnxBe8fb2mL_Ve9-tqjGSkGgE9f0yohMkAvH_InaFtE
        'y':
          type: string
          description: Y coordinate for the EC public key
          example: D41cVUpiKcey4LJKNFtUtmVHDWRmhjZapPLfryX5b1o
  headers:
    XRequestId:
      description: >
        Circle-generated universally unique identifier (UUID v4). Useful for
        identifying a specific request when communicating with Circle Support.
      schema:
        $ref: '#/components/schemas/XRequestId'
  responses:
    BadRequest:
      content:
        application/json:
          schema:
            type: object
            title: BadRequestResponse
            required:
              - code
              - message
            properties:
              code:
                $ref: '#/components/schemas/ErrorCode'
              message:
                type: string
                description: Human-readable message that describes the error.
                example: Unknown error occurred
              errors:
                type: array
                description: Array of detailed error descriptions
                items:
                  $ref: '#/components/schemas/DescriptiveError'
            example:
              code: 400
              message: Bad request.
      description: Request cannot be processed due to a client error.
      headers:
        X-Request-Id:
          $ref: '#/components/headers/XRequestId'
    NotAuthorized:
      content:
        application/json:
          schema:
            type: object
            title: NotAuthorizedResponse
            required:
              - code
              - message
            properties:
              code:
                $ref: '#/components/schemas/ErrorCode'
              message:
                type: string
                description: Human-readable message that describes the error.
                example: Unknown error occurred
              errors:
                type: array
                description: Array of detailed error descriptions
                items:
                  $ref: '#/components/schemas/DescriptiveError'
            example:
              code: 401
              message: Malformed authorization.
      description: >-
        Request has not been applied because it lacks valid authentication
        credentials.
      headers:
        X-Request-Id:
          $ref: '#/components/headers/XRequestId'
    Forbidden:
      content:
        application/json:
          schema:
            type: object
            title: ForbiddenResponse
            required:
              - code
              - message
            properties:
              code:
                $ref: '#/components/schemas/ErrorCode'
              message:
                type: string
                description: Human-readable message that describes the error.
                example: Unknown error occurred
              errors:
                type: array
                description: Array of detailed error descriptions
                items:
                  $ref: '#/components/schemas/DescriptiveError'
            example:
              code: 3
              message: Forbidden
      description: >-
        Request provides authentication, but the authenticated user does not
        have permission to access this resource.
      headers:
        X-Request-Id:
          $ref: '#/components/headers/XRequestId'
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer
      bearerFormat: PREFIX:ID:SECRET
      description: >-
        Circle's API Keys are formatted in the following structure
        "PREFIX:ID:SECRET". All three parts are requred to make a successful
        request.

````