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
- Get a Quote - Request and hold a quote to lock in an exchange rate
- Execute Transfer - Use the held quote to guarantee the rate
Currency Amount Format
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
- Fetch a real-time quote automatically
- Apply the current exchange rate (inclusive of fees)
- Execute the transfer immediately
- Return the transfer details with actual amounts
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 (withholdQuote: 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
The
exchangeRate is inclusive of all fees. You don’t need to calculate
fees separately.Example: Get a Held Quote
AddholdQuote: true to lock in the rate:
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:- A customer - Create using POST /customers/individuals or POST /customers/businesses
- Source account - Virtual bank account or wallet for the customer
- Destination account - External wallet or bank account
Example: Execute Transfer with Instant Quote
- Fetch a fresh quote automatically
- Validate the accounts and customer
- Initiate the transfer
- Return the transfer details with actual exchange rate applied
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.