MinerSwap API

Plug crypto swaps into your app, Discord or Telegram bot, shop or wallet. Same routes and fees as the website, one simple REST API.

36 coins0.5% flat feeLive statusJSON
Get an API key
curl https://minerautoswap.fr/api/v1/rate?from=LTC&to=SOL&amount=2.5 \
  -H "X-API-Key: msk_..."

{
  "amountIn": "2.5",
  "amountOutEstimate": "1.4358",
  "valueEur": "155.28",
  "feeBps": 50
}

Getting started

Base URL: https://minerautoswap.fr/api/v1. All requests and responses use JSON.

  1. Create a free account, then open Account → API and create a key.
  2. Check the estimated output with GET /rate.
  3. Create the swap with POST /swaps. You get a deposit address.
  4. Your user sends the coins to that address. Poll GET /swaps/{id} until the status is SUCCESS.

Swaps made with your key count toward your account volume, level and stats, exactly like swaps made on the website.

Authentication

Send your key in the X-API-Key header (or Authorization: Bearer msk_…). Keys start with msk_.

X-API-Key: msk_4f1c…

Keep your key secret: call the API from your server, not from a public web page. If a key leaks, revoke it from your account and create a new one. A key is shown only once when you create it.

Rate limits

60 requests per minute per key, and up to 10 new swaps per minute. Above that you get a 429 response; wait a few seconds and retry.

List assets

GET/api/v1/assets

Every coin and network you can swap right now. Use symbol and network (or the combined id) in other requests.

{
  "assets": [
    { "symbol": "BTC",  "network": "btc",  "id": "BTC-BTC",   "name": "Bitcoin", "decimals": 8 },
    { "symbol": "USDT", "network": "tron", "id": "USDT-TRON", "name": "Tether",  "decimals": 6 }
  ]
}

Estimate a rate

GET/api/v1/rate?from=LTC&to=SOL&amount=2.5
QueryDescription
fromrequiredAsset you send, e.g. LTC or USDT TRON.
torequiredAsset you receive.
amountrequiredAmount of the from asset.

Indicative market estimate after the 0.5% fee. It doesn't reserve anything: the firm amount comes with the swap.

Create a swap

POST/api/v1/swaps
FieldDescription
fromrequiredAsset sent: "LTC", "USDT TRON" or {"symbol":"USDT","network":"tron"}.
torequiredAsset received, same format.
amountrequiredAmount of from, e.g. "2.5". You can also send a euro amount like "150 EUR".
recipientrequiredWallet that receives the to asset.
refundTorequiredWallet on the from network used if the swap can't complete.
privatetrue for a private swap: not listed publicly and not linked to your account.
referenceYour own order ID (max 80 chars), returned as-is.
curl -X POST https://minerautoswap.fr/api/v1/swaps \
  -H "X-API-Key: $MINERSWAP_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "from": "LTC",
    "to": "SOL",
    "amount": "2.5",
    "recipient": "7xKXtg2CW87d97TXJSDpbD5jBkheTqA83TZRuJosgAsU",
    "refundTo": "ltc1qg82tg8hzxw0cn2xzt7f2v0sh8ksl5x6y9a9k3d"
  }'

Response 201

{
  "id": "7f3a9c21-5b2e-4c11-9a2b-0d7e3c4f5a61",
  "status": "PENDING_DEPOSIT",
  "from": { "symbol": "LTC", "network": "ltc", "id": "LTC-LTC" },
  "to": { "symbol": "SOL", "network": "sol", "id": "SOL-SOL" },
  "amountIn": "2.5",
  "amountOutEstimate": "1.4358",
  "feeBps": 50,
  "depositAddress": "ltc1q…",
  "depositMemo": null,
  "expiresAt": "2026-10-07T14:20:00.000Z",
  "trackUrl": "https://minerautoswap.fr/status.html?id=7f3a9c21-…"
}

⚠️ If depositMemo is not null, the user must include it with the deposit (XRP, XLM, TON…), otherwise the funds can't be matched. Deposits after expiresAt are refunded to refundTo.

Get a swap

GET/api/v1/swaps/{id}

Returns the same object with the latest status, the timeline of each step and the payout txid once sent. Polling every 10–30 seconds is plenty.

List your swaps

GET/api/v1/swaps?limit=20

Your most recent swaps (up to 100), newest first. Private swaps are not listed, since they aren't linked to your account; keep their id to follow them.

Statuses

PENDING_DEPOSIT
Waiting for the user's deposit.
KNOWN_DEPOSIT_TX
Deposit seen on-chain.
CONFIRMING_DEPOSIT
Waiting for confirmations.
PROCESSING
The swap is being executed.
SENDING_TO_CLIENT
Payout on its way.
SUCCESS
Done. txid is the payout transaction.
INCOMPLETE_DEPOSIT
Less than the quoted amount was sent.
REFUNDED · FAILED · EXPIRED · CANCELED
Final, no payout.

Errors

Errors return a non-2xx status with a readable message and a stable code:

{ "error": "Receiving wallet is not a valid SOL address.", "code": "invalid_request" }
HTTPCode
400invalid_request, invalid_amount, missing_wallet
401missing_api_key, invalid_api_key
404not_found
429rate_limited
503price_unavailable

Full example

Create a swap and wait until it completes (Node.js 18+):

const API = "https://minerautoswap.fr/api/v1";
const headers = { "X-API-Key": process.env.MINERSWAP_KEY, "Content-Type": "application/json" };

const swap = await (await fetch(`${API}/swaps`, {
  method: "POST", headers,
  body: JSON.stringify({ from: "USDT TRON", to: "BTC", amount: "100", recipient: "bc1q…", refundTo: "T…" })
})).json();
if (swap.error) throw new Error(swap.error);
console.log(`Send ${swap.amountIn} USDT (TRON) to ${swap.depositAddress}`);

const FINAL = ["SUCCESS", "REFUNDED", "FAILED", "EXPIRED", "CANCELED", "INCOMPLETE_DEPOSIT"];
let current = swap;
while (!FINAL.includes(current.status)) {
  await new Promise((r) => setTimeout(r, 15000));
  current = await (await fetch(`${API}/swaps/${swap.id}`, { headers })).json();
  console.log(current.status);
}
console.log("Payout tx:", current.txid);

Questions or higher limits? Contact us or ask on Discord.