Endpoint Details
- Method:
POST
- URL:
/api/v0/transfers/stablecoin-conversion
- Content-Type:
application/json
Authentication
This endpoint requires API key authentication using both:x-client-key
: Your application’s client keyx-client-secret
: Your application’s client secret
Request Body
Parameters
Parameter | Type | Required | Description |
---|---|---|---|
sourceWalletId | string | Yes | The ID of your source wallet |
destinationWalletId | string | Yes | The ID of your destination wallet |
sourceNetwork | string | Yes | Source blockchain network |
destinationNetwork | string | Yes | Destination blockchain network |
sourceCurrency | string | Yes | Source stablecoin currency |
destinationCurrency | string | Yes | Destination stablecoin currency |
amount | number | Yes | Amount to convert |
Supported Networks
- Ethereum (
ethereum
) - Solana (
solana
) - Base (
base
) - Polygon (
polygon
) - Arbitrum (
arbitrum
) - Optimism (
optimism
) - Avalanche C-Chain (
avalanche_c_chain
)
Supported Stablecoins
- USDC (
usdc
) - Available on all networks - EURC (
eurc
) - Available on Ethereum, Solana - USDT (
usdt
) - Available on Ethereum, Polygon, Avalanche
Conversion Types
Convert USDC from Ethereum to USDC on Solana
- Fastest conversion type
- Minimal fees
- No currency exchange rate risk
Response
Success Response (201 Created)
Response Fields
Field | Type | Description |
---|---|---|
id | string | Unique conversion identifier |
state | string | Conversion state (processing, completed, failed) |
conversion_type | string | Type of conversion being performed |
source | object | Source wallet and transaction details |
destination | object | Destination wallet and estimated amounts |
exchange_rate | object | Current exchange rate information |
fees | object | Breakdown of all fees |
estimated_completion | string | Estimated completion timestamp |
transaction_hashes | object | Blockchain transaction hashes (when available) |
Conversion Process
1. Rate Quote and Validation
When you submit a conversion request:- System validates wallet ownership and balances
- Retrieves current exchange rates (if needed)
- Calculates all fees and estimated amounts
- Reserves funds from source wallet
2. Cross-Chain Execution
For cross-chain conversions:- Initiates withdrawal from source network
- Routes through Devdraft’s liquidity pools
- Executes currency conversion (if needed)
- Deposits to destination network
3. Completion and Settlement
Once conversion completes:- Funds appear in destination wallet
- Transaction hashes are recorded
- Conversion receipt is generated
- State is updated to
completed
Conversion States
State | Description | Next Action |
---|---|---|
processing | Conversion is being executed | Monitor for completion |
completed | Conversion successful | Check destination wallet |
failed | Conversion failed | Check failure reason, retry |
refunded | Failed conversion, funds returned to source | Funds back in source wallet |
Fee Structure
Network Fees
Network Fees
- Source network fee: Gas/transaction fee on source blockchain
- Destination network fee: Gas/transaction fee on destination blockchain
- Variable by network: Ethereum fees higher than Solana
Conversion Fees
Conversion Fees
- Same currency conversions: 0.1% - 0.3%
- Cross-currency conversions: 0.3% - 0.8%
- Based on liquidity: Lower fees for high-liquidity pairs
Developer Fees
Developer Fees
- Standard rate: 0.8% of conversion amount
- Calculated on source amount: Before other fees
- Transparent pricing: No hidden fees
Exchange Rates
Exchange rates are fetched in real-time from multiple sources:
- Major cryptocurrency exchanges
- DeFi liquidity pools
- Aggregated pricing feeds
- Updated every 30 seconds
Example Requests
Error Responses
Advanced Features
Batch Conversions
Batch Conversions
- Convert multiple amounts in a single request
- Optimize fees across multiple conversions
- Atomic execution for related conversions
Scheduled Conversions
Scheduled Conversions
- Set future execution times
- Dollar-cost averaging strategies
- Automated recurring conversions
Rate Alerts
Rate Alerts
- Set target exchange rates
- Automatic execution when rates hit
- SMS and email notifications
Liquidity Management
Liquidity Management
- Automatic rebalancing between networks
- Optimize for lowest fees
- Smart routing through best liquidity pools
Use Cases
Portfolio Rebalancing
Automatically rebalance stablecoin holdings across networks
Arbitrage Opportunities
Take advantage of price differences between networks
Gas Optimization
Move funds to networks with lower transaction fees
Multi-Currency Treasury
Manage treasury across different stablecoins and networks
Cross-Border Payments
Convert currencies for international transactions
DeFi Strategy Execution
Position funds across networks for DeFi opportunities
Best Practices
1
Monitor Network Conditions
Check gas prices and network congestion before conversions
2
Consider Timing
Execute conversions during low-traffic periods for better rates
3
Use Rate Protection
Lock in favorable rates for time-sensitive conversions
4
Batch When Possible
Combine multiple conversions to reduce overall fees
5
Monitor Completion
Use webhooks to track conversion progress automatically
Related Endpoints
GET /api/v0/wallets
- List your Devdraft walletsGET /api/v0/transfers/{id}
- Check conversion statusGET /api/v0/exchange-rates
- Get current exchange ratesPOST /api/v0/transfers/direct-wallet
- Create wallet-to-wallet transfer