Home About Markets FAQ API Support
🔌 Developer API

Build with SwiftSwap

Integrate real-time exchange rates, create order flows, and embed instant crypto swaps into your product with our REST API.

99.9%
API Uptime
<50ms
Avg Response
1,000
Free Req/Day
70+
Supported Coins

Introduction

The SwiftSwap API is a RESTful API that allows you to integrate cryptocurrency exchange functionality into your applications. All endpoints return JSON and use standard HTTP response codes.

Base URL:

Base URL
https://api.swiftswap.net/v1

Quick Example

JavaScript
const response = await fetch('https://api.swiftswap.net/v1/rate?from=BTC&to=ETH&amount=0.1', {
  headers: {
    'X-API-Key': 'your_api_key_here'
  }
});
const data = await response.json();
console.log(data);
// → { from: "BTC", to: "ETH", rate: 18.94, estimated: 1.894, fee: 0.01 }

Authentication

All API requests require an API key passed in the X-API-Key header. Get your free key by registering at SwiftSwap.

cURL
curl -X GET "https://api.swiftswap.net/v1/rate?from=BTC&to=ETH&amount=1" \
  -H "X-API-Key: sk_live_xxxxxxxxxxxxxxxxxxxx" \
  -H "Content-Type: application/json"

Rate Limits

Free tier: 1,000 requests/day · Pro: 50,000/day · Enterprise: Unlimited. Rate limit headers are included in every response:

Response Headers
X-RateLimit-Limit: 1000
X-RateLimit-Remaining: 947
X-RateLimit-Reset: 1704067200

Error Handling

The API uses standard HTTP status codes. Errors include a JSON body with a code and message.

Error Response
{
  "error": {
    "code": "AMOUNT_TOO_LOW",
    "message": "Amount is below the minimum of 0.0001 BTC",
    "min_amount": 0.0001
  }
}
CodeStatusDescription
200OKRequest successful
400Bad RequestInvalid parameters or amount too low
401UnauthorizedMissing or invalid API key
429Too Many RequestsRate limit exceeded
503Service UnavailablePair temporarily unavailable

Get Exchange Rate

GET/rate
Returns the current exchange rate and estimated output for a given pair and amount.
ParameterTypeRequiredDescription
fromstringrequiredSource currency symbol (e.g. BTC)
tostringrequiredTarget currency symbol (e.g. ETH)
amountnumberrequiredAmount to exchange
typestringoptional"fixed" or "float" (default: float)
Response
{
  "from": "BTC",
  "to": "ETH",
  "amount": 0.1,
  "rate": 18.94312,
  "estimated": 1.87843,
  "fee": 0.00943,
  "fee_pct": 0.4,
  "type": "float",
  "expires_at": null
}

Get Available Pairs

GET/pairs
Returns all supported currency pairs and their minimum/maximum amounts.
ParameterTypeRequiredDescription
fromstringoptionalFilter pairs by source currency
Response
{
  "pairs": [
    {
      "from": "BTC", "to": "ETH",
      "min": 0.0001, "max": 10,
      "available": true
    }
    // ... more pairs
  ],
  "total": 4892
}

Create Order

POST/order
Creates a new exchange order. Returns a deposit address and order ID to track the exchange.
ParameterTypeRequiredDescription
fromstringrequiredSource currency symbol
tostringrequiredTarget currency symbol
amountnumberrequiredAmount to send
recipientstringrequiredRecipient wallet address
typestringoptional"fixed" or "float"
refundstringoptionalRefund address (recommended)
JavaScript
const order = await fetch('https://api.swiftswap.net/v1/order', {
  method: 'POST',
  headers: {
    'X-API-Key': 'your_key',
    'Content-Type': 'application/json'
  },
  body: JSON.stringify({
    from: 'BTC', to: 'ETH', amount: 0.1,
    recipient: '0xYourEthAddress...',
    type: 'float'
  })
});
const { order_id, deposit_address, expires_at } = await order.json();

Order Status

GET/order/:id
Returns the current status and details of an order.
Response
{
  "id": "ss_a1b2c3d4e5",
  "status": "confirming",
  // statuses: waiting | confirming | exchanging | sending | done | failed
  "from": "BTC", "to": "ETH",
  "amount_sent": 0.1,
  "amount_received": 1.8784,
  "deposit_address": "bc1qxy...",
  "tx_from": "abc123...",
  "tx_to": null,
  "created_at": "2026-03-08T12:00:00Z"
}

JavaScript Widget

Embed the full SwiftSwap exchange widget into any webpage in seconds. No backend needed.

HTML
<!-- Add to your HTML -->
<div id="swiftswap-widget"></div>
<script src="https://cdn.swiftswap.net/widget.js"></script>
<script>
  SwiftSwap.init({
    container: '#swiftswap-widget',
    apiKey: 'your_api_key',
    defaultFrom: 'BTC',
    defaultTo: 'ETH',
    theme: 'dark'
  });
</script>

API Pricing

Start for free, scale as you grow. All plans include full API access.

Free
$0 / month
Perfect for testing and small projects
  • 1,000 requests / day
  • All endpoints
  • Rate data access
  • Community support
Enterprise
Custom
For high-volume platforms
  • Unlimited requests
  • Dedicated infrastructure
  • SLA guarantee
  • White-label widget
  • Dedicated account manager
or sign in with email

No account? Sign Up