Coinastr Public API — Crypto & XMR Swap Integration

Integrate instant crypto exchange into your product. Set your own margin, control your earnings, and let us handle the liquidity.

View Endpoints ↓ Request API Key →

Who uses the Coinastr API?

💱

Crypto Services

Add a full exchange to your wallet, DeFi app, or platform with a few API calls.

📊

Aggregators

Pull live rates and swap quotes for your price comparison or data product.

💳

Wallets

Let your users swap assets in-app — your brand, our liquidity.

💸

Payment Systems

Accept any crypto and auto-convert to your settlement coin.

🪙

Coin Websites

Display live swap quotes and an exchange button on your coin project page.

💰

Set Your Margin

Add any % markup for your users. We process swaps — you keep the difference.

Fast
Sub-second rate responses
🔧
Simple REST
JSON — works in any language
💰
Set Margin
Any % markup on top of base rate
🌐
1500+ Coins
Full asset and network coverage

API Endpoints

Base URL:

https://coinastr.com/api/v1
🔑 Authentication: Include your API key as a query parameter ?api_key=YOUR_KEY or header X-API-Key: YOUR_KEY. Request an API key →
GET /api/v1/coins List Supported Coins 🌐 Public

Returns all supported cryptocurrencies with symbols, names, networks, and minimum amounts.

Example Response
{
  "coins": [
    {
      "symbol": "BTC",
      "name": "Bitcoin",
      "networks": ["BTC"],
      "min_amount": "0.0001",
      "icon": "₿",
      "color": "#f7931a"
    },
    {
      "symbol": "ETH",
      "name": "Ethereum",
      "networks": ["ERC20"],
      "min_amount": "0.01",
      "icon": "Ξ",
      "color": "#627EEA"
    }
  ],
  "count": 1500
}
GET /api/v1/rate Get Exchange Rate 🔑 Auth required

Returns the current exchange rate between two coins including your markup. Use this to display quotes to your users.

Parameters
from string required Source coin symbol (e.g. BTC)
to string required Target coin symbol (e.g. ETH)
amount float optional Source amount to price (default: 1)
markup_pct float optional Your additional fee % added on top of base (0–20, default: 0)
api_key string required Your API key
Example Response
{
  "from": "BTC",
  "to": "ETH",
  "from_amount": 1,
  "to_amount": 18.4321,
  "rate": 18.4321,
  "base_fee_pct": 5,
  "your_markup_pct": 0,
  "total_fee_pct": 5,
  "exchange": "kucoin",
  "rate_type": "floating",
  "valid_for_seconds": 30
}
POST /api/v1/swap/create Create Swap 🔑 Auth required

Initiates a swap. Returns a deposit address your user sends funds to. Track the swap using the returned swap_id.

Parameters
from_coin string required Source coin symbol (e.g. BTC)
to_coin string required Target coin symbol (e.g. ETH)
amount float required Amount the user will send
dest_address string required User's receiving wallet address
dest_memo string optional Memo/tag for destination (required for XRP, XLM, ATOM etc.)
from_chain string optional Deposit network (e.g. ERC20, TRC20, BNB)
to_chain string optional Receiving network
rate_type string optional "floating" (default) or "fixed"
markup_pct float optional Your fee markup on top of base (0–20%)
ref_id string optional Your internal reference ID for this transaction
api_key string required Your API key
Example Response
{
  "swap_id": "A1B2C3D4E5F6G7H8",
  "deposit_address": "bc1qxy2kgdygjrsqtzq2n0yrf2493p83kkfjhx0wlh",
  "deposit_memo": null,
  "deposit_network": "Bitcoin (BTC)",
  "send_amount": 0.05,
  "receive_amount": 0.9216,
  "from_coin": "BTC",
  "to_coin": "ETH",
  "rate_type": "floating",
  "fee_pct": 5,
  "expires_at": "2025-01-01T12:30:00Z",
  "track_url": "https://coinastr.com/track.php?id=A1B2C3D4E5F6G7H8"
}
GET /api/v1/swap/status Get Swap Status 🔑 Auth required

Poll this to show real-time swap progress in your UI. Poll every 15–30 seconds while status is pending/detected/processing.

Parameters
swap_id string required The swap_id returned from /swap/create
api_key string required Your API key
Example Response
{
  "swap_id": "A1B2C3D4E5F6G7H8",
  "status": "complete",
  "status_label": "Completed",
  "from_coin": "BTC",
  "to_coin": "ETH",
  "send_amount": 0.05,
  "receive_amount": 0.9189,
  "dest_address": "0xabc...",
  "tx_in_hash": "abc123def456...",
  "tx_out_hash": "789ghi012jkl...",
  "created_at": "2025-01-01T12:25:00Z",
  "completed_at": "2025-01-01T12:28:43Z"
}

Error Codes

200 OK Request succeeded
400 Bad Request Missing or invalid parameters — check the error message field
401 Unauthorized Invalid, expired, or missing API key
422 Unprocessable Amount below minimum or above maximum allowed
429 Rate Limited Too many requests — max 60/minute per API key
500 Server Error Internal error — safe to retry after 5 seconds

Rate Limits & Notes

  • ⚡ Rate limit: 60 requests/minute per API key. Headers X-RateLimit-Remaining and X-RateLimit-Reset are returned on each response.
  • 🔄 For swap status polling, use 15–30 second intervals — do not poll faster than every 5 seconds.
  • 📦 All responses are JSON with a top-level error field on failures.
  • 🔐 Never expose your API key in client-side JavaScript — proxy requests through your backend server.

Ready to integrate?

API access is available for verified partners. Contact us to get credentials and access to our sandbox environment for testing.

Request API Access →