Skip to main content

Overview

The Infinite API provides flexible options for executing currency conversions: Option 1: Direct Transfer (Recommended for simple flows)
  • Create a transfer with amounts and currencies
  • The API automatically fetches a real-time quote and executes immediately
  • Simplest approach for most use cases
Option 2: Quote + Transfer (For locked-in rates)
  1. Get a Quote - Request and hold a quote to lock in an exchange rate
  2. Execute Transfer - Use the held quote to guarantee the rate
This guide covers both approaches with practical examples.

Currency Amount Format

All amounts in the API are in the smallest unit (unscaled) - Fiat currencies: cents (e.g., $100.00 = 10000 cents) - Crypto currencies: base units (e.g., 1 USDC = 1000000, 1 BTC = 100000000 satoshi) This ensures precision and avoids floating-point errors.

Decimal Places by Currency

Converting Between Decimal and Smallest Unit

To convert from decimal amounts to smallest unit for API requests:

Option 1: Direct Transfer (No Quote Required)

The simplest way to create a transfer is to specify amounts and currencies directly. The API will automatically fetch the current exchange rate and execute the transfer.

Example: Direct USD to USDC Conversion

The API will:
  1. Fetch a real-time quote automatically
  2. Apply the current exchange rate (inclusive of fees)
  3. Execute the transfer immediately
  4. Return the transfer details with actual amounts
Use this approach when you don’t need to show the user the exact exchange rate before execution, or when you’re executing transfers programmatically.

Option 2: Quote First (For Locked-in Rates)

If you need to show users the exact exchange rate before they confirm, or lock in a rate for a multi-step flow, use the two-step quote + transfer process.

Step 1: Get a Quote

Request a quote to get the current exchange rate and expected destination amount.

Quote Types

Instant Quotes (default): Get immediate pricing. Use for display purposes. Held Quotes (with holdQuote: true): Lock in a rate for up to 5 minutes. Required if you want to reference the quote in a transfer.

Example: Get an Instant Quote

Response:
The exchangeRate is inclusive of all fees. You don’t need to calculate fees separately.

Example: Get a Held Quote

Add holdQuote: true to lock in the rate:
Response includes quote ID and expiration:

Quote Expiration

  • Held quotes expire after 5 minutes
  • Instant quotes should be used immediately as rates fluctuate
  • Expired quotes cannot be used for transfers

Step 2: Execute a Transfer

Once you have a quote, use it to create a transfer.

Prerequisites

Before creating a transfer, ensure you have:
  1. A customer - Create using POST /customers/individuals or POST /customers/businesses
  2. Source account - Virtual bank account or wallet for the customer
  3. Destination account - External wallet or bank account
See the Accounts guide for details on creating accounts.

Example: Execute Transfer with Instant Quote

The API will:
  1. Fetch a fresh quote automatically
  2. Validate the accounts and customer
  3. Initiate the transfer
  4. Return the transfer details with actual exchange rate applied
Response:

Example: Execute Transfer with Held Quote

If you created a held quote, reference it in the transfer:
When using a held quote, the exchange rate from the quote is guaranteed. You still need to provide the full transfer details.

Same-asset cross-chain

To move USDC or USDT between chains without converting the asset, use the same currency on both legs and different rails. Settlement is at par. See Same-asset bridging.