๐Ÿš€ CryptoForge

External Integration Guide - Swap Interface

๐Ÿ“– Overview

CryptoForge allows external websites to redirect their users directly to our swap interface with pre-selected tokens. This integration enhances user experience by avoiding manual navigation.

๐Ÿ”— URL Format

The base URL for external integration is:

https://world-of-coin.com/?page=trade&tab=swap&to=[TOKEN]&from=[TOKEN]

โš™๏ธ Available Parameters

Parameter Required Description Example
page Yes Destination page (must be "trade") trade
tab Yes Tab to open (must be "swap") swap
to No Destination token (symbol or address) USDC or 0xA0b86a33E6264176FD012245D2A4eB35e52B2a
from No Source token (symbol or address) ETH or 0xA0b86a33E6417...

๐Ÿ’ก Usage Examples

1. Swap to specific token

Redirect user to buy USDC:

https://world-of-coin.com/?page=trade&tab=swap&to=USDC

2. Complete pre-configured swap

Exchange ETH for USDC:

https://world-of-coin.com/?page=trade&tab=swap&from=ETH&to=USDC

3. Using contract addresses

For lesser-known tokens:

https://world-of-coin.com/?page=trade&tab=swap&to=0xA0b86a33E6264176FD012245D2A4eB35e52B2a

๐Ÿงช Live Testing

Click the links below to test the integration:

๐Ÿ’ป JavaScript Integration

Example code to dynamically generate swap links:

function generateSwapLink(baseUrl, options = {}) { const params = new URLSearchParams({ page: 'trade', tab: 'swap' }); if (options.to) params.append('to', options.to); if (options.from) params.append('from', options.from); return `${baseUrl}?${params.toString()}`; } // Usage examples const swapToUSDC = generateSwapLink('https://world-of-coin.com', { to: 'USDC' }); const ethToUsdc = generateSwapLink('https://world-of-coin.com', { from: 'ETH', to: 'USDC' });

๐ŸŽจ HTML Integration

Simply add links to your website:

<!-- Simple button --> <a href="https://world-of-coin.com/?page=trade&tab=swap&to=USDC" target="_blank" class="swap-btn"> Swap to USDC </a> <!-- Styled button --> <a href="https://world-of-coin.com/?page=trade&tab=swap&from=ETH&to=USDC" target="_blank" style="background: #667eea; color: white; padding: 12px 24px; border-radius: 8px; text-decoration: none; display: inline-block; margin: 10px;"> ๐Ÿš€ Swap ETH โ†’ USDC </a>

โš ๏ธ Important Notes

๐Ÿ”ง Technical Support

For any technical questions or improvement suggestions, contact us:

Email: contact@cp-corporation.fr