BIT2XMR

Documentation

Integrate BIT2XMR swap functionality into your website or application

Quick Start

Get started with embedding BIT2XMR in just a few minutes

There are several ways to integrate BIT2XMR into your site. Choose the method that best fits your needs:

  • iframe Embed - Full swap interface embedded directly in your page
  • Direct Link - Simple link that opens the swap page in a new tab
  • Button Integration - Custom button that opens the swap interface

iframe Embed

Embed the full swap interface directly into your website using an iframe

The iframe method allows you to embed the complete BIT2XMR swap interface directly into your page. Users can complete the entire swap process without leaving your site. Note: The embedded page includes the navigation header and footer, so ensure your iframe height is sufficient (recommended minimum 1000px for optimal viewing).

embed.html
<iframe
  src="https://bit2xmr.com/swap"
  width="100%"
  height="1000"
  style="border: none; border-radius: 8px;"
  allow="clipboard-write"
  title="BIT2XMR Swap Interface"
></iframe>

Customization Options

  • width - Set to "100%" for responsive width, or a fixed pixel value like "600"
  • height - Recommended minimum "1000" pixels to accommodate the full interface including header and footer
  • style - Add custom CSS for border radius, shadows, etc.

Note: The iframe will inherit the full functionality including real-time exchange rates, address validation, and swap processing. Make sure your site uses HTTPS for security.

Navigation: When users complete a swap, they'll be navigated to the pending/status page within the iframe. The iframe will show the full swap flow including order tracking. Consider using a taller iframe (1200px+) if you want to show the complete flow without scrolling.

Direct Link Integration

Simple link that opens the swap page in a new window or tab

The simplest integration method. Add a link to your site that opens the BIT2XMR swap page in a new tab. Users complete the swap on our platform and return to your site.

link.html
<a href="https://bit2xmr.com/swap" target="_blank" rel="noopener noreferrer">
  Swap Bitcoin to Monero
</a>

Tip: You can style this link as a button using CSS, or use it within your existing button components.

Button Integration

Create a custom button that opens the swap interface

Create a custom button that opens the swap page. This gives you full control over styling and placement while maintaining a seamless user experience.

button.html
<button onclick="window.open('https://bit2xmr.com/swap', '_blank')">
  Swap BTC to XMR
</button>

API Reference

Access real-time exchange rates and price data

GET
https://bit2xmr.com/api/prices

Get real-time Bitcoin and Monero prices, plus the BTC to XMR exchange rate.

Response:

{
  "btc": 65000,
  "xmr": 150,
  "btcToXmr": 433.33
}

Note: The prices API updates every 30 minutes. Use this endpoint to display current rates on your site or calculate swap amounts programmatically.

Best Practices

  • Security: Always use HTTPS when embedding BIT2XMR. Never modify or intercept swap transactions.
  • Privacy: Respect user privacy. Don't track or log user swap activity. BIT2XMR doesn't require user data, and neither should your integration.
  • Responsive Design: When using iframe embed, ensure your container is responsive. Set width to 100% and use appropriate min-height values.
  • User Experience: Clearly indicate that users will be using BIT2XMR for the swap. Don't mislead users about which service they're using.
  • Error Handling: If using the API, implement proper error handling for network failures and rate limiting.

Need Help?

Have questions about integration? We're here to help.

For integration questions or technical support, check our FAQ page or contact our support team at support@bit2xmr.com. We can help you implement BIT2XMR in a way that best fits your needs.