MindSwap API
The same API mindswap.io runs on. Amounts are decimal strings, never numbers.
Authentication
Send your key as x-api-key, or as Authorization: Bearer msk_live_…. Call from your server: the API only accepts browsers on mindswap.io.
cap from tracking (read-only, 24 h).A new key works at once. Until your account's first completed order it gets the per-IP limits, then 1,200 calls a minute.
List assets
No keyEvery asset you can swap, with its networks and venues. Cached for 60 s: send If-None-Match with the ETag and an unchanged list answers 304.
curl https://api.mindswap.io/v1/assets{
"assets": [{
"id": "btc:bitcoin",
"symbol": "BTC",
"name": "Bitcoin",
"network": "bitcoin",
"contract": null,
"decimals": 8,
"memo": "none",
"status": "active"
}, …],
"networks": [ … ],
"venues": [ … ]
}Response
- assets
- Asset[]Each asset's
id(symbol:network), symbol, name, network, decimals, memo rule and status. - networks
- Network[]Each network's name, confirmations and explorer link.
- venues
- Venue[]The
id, name and logo of each venue a route can run on.
Get quotes
No keyEvery route we can run for this amount, answered by a deadline, grouped by order type with MIND's pick first. Routes that arrive late come through the stream.
Query
- fromRequired
- asset IDThe asset you send,
symbol:networkin lower case, for examplebtc:bitcoin. - toRequired
- asset IDThe asset you receive, for example
eth:ethereum. - amountInRequired
- decimalHow much you send, in whole units as a string:
"0.1"BTC, never satoshi.
curl https://api.mindswap.io/v1/quotes \
--get \
-d from=btc:bitcoin \
-d to=eth:ethereum \
-d amountIn=0.1{
"routes": [{
"routeId": "r1.k1.Zk3v…",
"kind": "exchange",
"rateType": "fixed",
"amountIn": "0.1",
"amountOut": "3.5324",
"fees": { "totalUser": {
"amount": "0.0283",
"asset": "eth:ethereum"
} },
"expiresAt": "2026-11-17T14:15:00Z"
}],
"mind": {
"float": "r1.k1.Hn8w…",
"fixed": "r1.k1.Zk3v…",
"private": null
},
"complete": true
}Response
- routes
- Route[]Each priced route. Pass its
routeIdto create an order beforeexpiresAt. - mind
- objectThe
routeIdMIND picks for float, fixed and private, or null. - complete
- booleanFalse while late routes are still coming. Use the stream to get them.
Stream quotes
No keyThe same query as Get quotes, as server-sent events. A snapshot event carries the whole answer again each time a late route lands, then done carries the final one. Replace what you show with each event; never merge.
curl -N https://api.mindswap.io/v1/quotes/stream \
--get \
-d from=btc:bitcoin \
-d to=eth:ethereum \
-d amountIn=0.1event: snapshot
data: { "routes": [ … ], "mind": { … }, "complete": false }
event: done
data: { "routes": [ … ], "mind": { … }, "complete": true }Create an order
Key optionalTurns a quoted route into an order and returns where the user sends the deposit. Never retried blindly: one Idempotency-Key per swap the user confirms.
Headers
- Idempotency-KeyRequired
- string8 to 64 printable characters, for example a UUID. A retry with the same key and body returns the first answer, never a second order.
- Accept-LanguageOptional
- stringThe end user's language, for example
en-US. MIND float and private routes, and some exchange routes, refuse an order without it. - X-Client-TimezoneOptional
- stringThe end user's IANA time zone, for example
Europe/Berlin. Never a made-up value.
Body
- routeIdRequired
- stringFrom a quote, unchanged. It stops working at the route's
expiresAt. - pickedByRequired
- enum
mindwhen you take MIND's pick, otherwiseuser. - payoutRequired
- address
{ address, memo }. Set memo when the asset needs one, else null. - refundRequired
- address | nullWhere a refund goes. Required for fixed routes; send it for every order.
- refRequired
- string | nullAn affiliate code, up to 20 characters. Send null when you have none.
curl https://api.mindswap.io/v1/orders \
-H "x-api-key: $MINDSWAP_API_KEY" \
-H "Idempotency-Key: $IDEMPOTENCY_KEY" \
-H "Accept-Language: en-US" \
-H "X-Client-Timezone: Europe/Berlin" \
-H "content-type: application/json" \
-d @- <<JSON
{
"routeId": "$ROUTE_ID",
"pickedBy": "mind",
"payout": { "address": "$PAYOUT_ADDRESS", "memo": null },
"refund": { "address": "$REFUND_ADDRESS", "memo": null },
"ref": null
}
JSON{
"id": "MS-7HK2PQ",
"type": "fixed",
"status": "awaiting_deposit",
"deposit": {
"address": "bc1q9h7garjv5p2m8u0kq4ksd2d6e0q3t5xw8yz2hf4n",
"memo": null,
"amount": "0.1",
"expiresAt": "2026-11-17T14:30:00Z",
"expiresSource": "provider"
}
}Read an order
Key or capThe order as the user sees it: status, deposit instructions, every step so far and the transactions.
Query
- capOptional
- stringFrom Track an order: read-only access for 24 h. Not needed with the key that created the order.
curl https://api.mindswap.io/v1/orders/$ORDER_ID \
-H "x-api-key: $MINDSWAP_API_KEY"{
"id": "MS-7HK2PQ",
"version": 0,
"type": "fixed",
"status": "awaiting_deposit",
"deposit": { "address": "bc1q9h7g…", "amount": "0.1", … },
"amountOut": "3.5324",
"steps": [{ "status": "awaiting_deposit", "at": "2026-11-17T14:00:00Z" }],
…
}Response
- status
- enum
awaiting_deposit,confirming,exchanging,private_routing,sending,completed,expired,refund_pending,refunded,failed,on_holdorpartially_completed. - deposit
- DepositWhere and how much to send, and until when:
address,memo,amount,expiresAt. - steps
- Step[]Every status the order entered, oldest first.
- version
- integerGoes up by one on every change. Drop any view that is not newer than the one you show.
Order events
Key or capServer-sent events. The first event is the current order and each change sends the whole order again; a heartbeat comes every 15 s, and end closes the stream once the order can no longer change.
Query and headers
- capOptional
- stringFrom Track an order. Not needed with the key that created the order.
- Last-Event-IDOptional
- stringThe
idof the last event you received, sent back unchanged. The stream skips what you already have.
curl -N https://api.mindswap.io/v1/orders/$ORDER_ID/events \
--get \
-d cap=$CAPid: 0.0
data: { "type": "order", "order": { "id": "MS-7HK2PQ", "version": 0, … } }
data: { "type": "heartbeat", "version": 0 }Track an order
No keyOpens any order from any device with its ID and payout address. A missing order and a wrong address both answer 404 not_found.
Body
- orderIdRequired
- stringThe order ID, for example
MS-7HK2PQ. - payoutAddressRequired
- stringThe address the order pays out to, exactly as it was given.
curl https://api.mindswap.io/v1/orders/track \
-H "content-type: application/json" \
-d @- <<JSON
{ "orderId": "$ORDER_ID", "payoutAddress": "$PAYOUT_ADDRESS" }
JSON{
"order": { "id": "MS-7HK2PQ", "status": "awaiting_deposit", … },
"cap": "1795022983.Z4Pq…"
}Response
- order
- OrderViewThe same order as Read an order.
- cap
- string | nullRead-only access for 24 h. Pass it as
?cap=to read the order and its events.
Report a problem
No keyOne flow for every route. Prove the order the same way as tracking: its payout address, a cap, or the key that created it.
Body
- kindRequired
- enum
refund,not_received,wrong_network,wrong_amountorother. - payoutAddressOptional
- stringThe order's payout address, as proof. Leave it out when you send
?cap=or the key. - detailsOptional
- stringWhat happened, in the user's words. Up to 4,000 characters.
- depositTxHashOptional
- stringThe deposit transaction, when the user has it.
- refundAddressOptional
- stringWhere to send a refund, with
refundMemowhen the network needs one.
curl https://api.mindswap.io/v1/orders/$ORDER_ID/issues \
-H "content-type: application/json" \
-d @- <<JSON
{
"kind": "not_received",
"payoutAddress": "$PAYOUT_ADDRESS",
"details": "Sent the deposit two hours ago. Nothing arrived yet."
}
JSON{
"id": "7e33efd4-931e-4272-ada0-8a5261568ca5",
"kind": "not_received",
"state": "received",
"timeline": [{ "at": "2026-11-17T17:23:40Z", "text": "We received your request." }],
"nextUpdateBy": "2026-11-18T05:23:40Z",
"action": null
}Response
- state
- enum
received,in_progress,needs_infoorresolved. - timeline
- object[]What happened so far, in plain words, oldest first.
- nextUpdateBy
- string | nullWhen we answer next at the latest. Null once resolved.
List networks
No keyEvery network with at least one swappable asset, most assets first, with how many assets each has. Use an `id` as the `network` filter of `listAssets`. `family` is the address format MindSwap checks (`evm`, `bitcoin`, `solana`, ...). `logoUri` is `null` while no official logo is stored. Cached for a minute with an `ETag`. No key needed. **Rate limits.** 120 a minute per IP (bursts up to 60). Over a limit the answer is `429 rate_limited` with `retryAfterMs` and a `Retry-After` header. Wait that long, then call again.
curl https://api.mindswap.io/v1/networks{
"networks": [
{
"id": "ethereum",
"name": "Ethereum",
"family": "evm",
"logoUri": "https://mindswap.io/logos/db6927db9f5dbf556d647ade68d2d1d0.svg",
"assetCount": 618
},
{
"id": "bnb-chain",
"name": "BNB Smart Chain",
"family": "evm",
"logoUri": "https://mindswap.io/logos/97d00b983d6baf023e6b4a8e5d700394.svg",
"assetCount": 401
}
]
}Response
- networks
- object[]
List the orders made with this key
API keyThe orders created with the calling API key, newest first, a page at a time. Pass `nextCursor` back as `cursor` for the next page; it is null on the last page. Each order is the same view `getOrder` answers. **Auth.** An API key; the list holds only that key's own orders. **Rate limits.** 120 a minute per API key (bursts up to 30). Over a limit the answer is `429 rate_limited` with `retryAfterMs` and a `Retry-After` header. Wait that long, then call again.
Query
- statusOptional
- enumOnly orders in this status (`awaiting_deposit`, `completed`, …).
- limitOptional
- numberOrders per page, 1 to 100.
- cursorOptional
- string`nextCursor` from the previous page.
curl https://api.mindswap.io/v1/orders \
-H "x-api-key: $MINDSWAP_API_KEY"{
"orders": [
{
"id": "MS-7HK2PQ",
"version": 1,
"type": "fixed",
"pickedBy": "mind",
"route": {
"provider": "fixedfloat",
"venue": "mind",
"kind": "exchange",
"rateType": "fixed",
"from": "btc:bitcoin",
"to": "usdt:tron",
"amountIn": "0.01",
"amountOut": "618.368",
"fees": {
"network": {
"amount": "0.75919",
"asset": "usdt:tron"
},
"provider": {
"amount": "0",
"asset": "usdt:tron"
},
"platform": {
"amount": "0",
"asset": "usdt:tron"
},
"totalUser": {
"amount": "0.75919",
"asset": "usdt:tron"
}
},
"feesEstimated": true,
"etaSeconds": 1200,
"min": "0.0001599",
"max": "0.2422837"
},
"payout": {
"address": "T9yD14Nj9j7xAB4dbGeiX9h8unkKHxuWwb",
"memo": null
},
"refund": {
"address": "bc1qw508d6qejxtdg4y5r3zarvary0c5xw7kv8f3t4",
"memo": null
},
"deposit": {
"address": "bc1qw508d6qejxtdg4y5r3zarvary0c5xw7kv8f3t4",
"memo": null,
"amount": "0.01",
"expiresAt": "2026-11-18T17:12:30.000Z",
"expiresSource": "provider",
"received": null
},
"status": "awaiting_deposit",
"steps": [
{
"status": "awaiting_deposit",
"at": "2026-11-18T16:52:30.000Z"
}
],
"amountOut": "618.368",
"refunded": null,
"recipients": null,
"usd": {
"btc:bitcoin": "61849.88",
"usdt:tron": "1"
},
"notices": [],
"txs": [],
"issue": null,
"points": null,
"viewer": {
"role": "api_key",
"canClaim": false,
"owned": false
},
"createdAt": "2026-11-18T16:52:30.000Z",
"updatedAt": "2026-11-18T16:52:30.000Z"
}
],
"nextCursor": null
}Response
- orders
- object[]
- nextCursor
- any
Check whether a pair can be swapped
No keyWhether any enabled provider can swap `from` into `to`, and which: one route per provider and kind (`exchange`, `private`, `public`) with the rate types it offers for these two assets. MIND routes show as provider `mind`. Answered from the catalog alone, so no provider is asked and nothing is priced: min, max and amounts come only from `getQuotes`. A pair nobody serves answers `available: false` with no routes. No key needed. **Rate limits.** 600 a minute per IP (bursts up to 120). Over a limit the answer is `429 rate_limited` with `retryAfterMs` and a `Retry-After` header. Wait that long, then call again.
Query
- fromRequired
- stringThe asset to send, `<symbol>:<network>` (`btc:bitcoin`), from `listAssets`.
- toRequired
- stringThe asset to receive (`usdt:tron`).
curl https://api.mindswap.io/v1/pairs{
"from": "btc:bitcoin",
"to": "usdt:tron",
"available": true,
"routes": [
{
"provider": "changenow",
"kind": "exchange",
"rateTypes": [
"float"
]
},
{
"provider": "fixedfloat",
"kind": "exchange",
"rateTypes": [
"float",
"fixed"
]
}
]
}Response
- from
- string
- to
- string
- available
- boolean
- routes
- object[]
Read your key's partner fee earnings
API keyThe partner fee set on the calling key (0 to 300 basis points, set on mindswap.io/app/api) and what it has earned. `credited` is what completed orders added to the account's USDT balance, withdrawn through payouts. `pending` is the fee on open orders at their quoted value, an estimate that becomes `credited` only when the order completes. Needs the API key. **Rate limits.** 60 a minute per API key (bursts up to 20). Over a limit the answer is `429 rate_limited` with `retryAfterMs` and a `Retry-After` header. Wait that long, then call again.
curl https://api.mindswap.io/v1/partner/earnings \
-H "x-api-key: $MINDSWAP_API_KEY"{
"keyId": "0b9f3c52-6d1e-4a7b-9c8d-2e5f1a4b7c90",
"currency": "USDT",
"partnerFeeBps": 100,
"credited": "45",
"pending": "12.5",
"completedOrders": 3,
"openOrders": 1
}Response
- keyId
- string
- currency
- string
- partnerFeeBps
- number
- credited
- string
- pending
- string
- completedOrders
- number
- openOrders
- number
Estimate each wallet of a multi-wallet swap
No keyFor a multi-wallet order (the output split over 1 to 1000 payout wallets): what each wallet would receive and the smallest payout its exchange allows. Only a `float` route of MIND or one of its exchange venues takes several wallets. Send each wallet's `percent` (up to 2 decimals, all adding up to exactly 100) and `venue` (null for MIND), in the order you will send them to `createOrder`. `ok: false` marks a wallet its venue cannot pay out; `createOrder` would answer `recipient_below_min`. Read only: no order is made. No key needed. **Rate limits.** 60 a minute per IP (bursts up to 20). Over a limit the answer is `429 rate_limited` with `retryAfterMs` and a `Retry-After` header. Wait that long, then call again.
Body
- routeIdRequired
- string
- recipientsRequired
- object[]
curl -X POST https://api.mindswap.io/v1/quotes/recipients \
-H "content-type: application/json" \
-d '{"routeId":"r1.k1.h3-EUyT9VmfLOIpC62z7AJZRuTxDh6H5OY9OUG4jlf…","recipients":[{"percent":"60","venue":null},{"percent":"40","venue":null}]}'{
"recipients": [
{
"ok": true,
"amountOut": "371.2743819",
"minimum": "5.5"
},
{
"ok": true,
"amountOut": "247.0162546",
"minimum": "5.5"
}
]
}Response
- recipients
- object[]
Points program and cashback tiers
No keyThe points program: `pointsPerUsd` points per US dollar of completed volume, and the tiers by points with their cashback and referral shares in basis points (1500 = 15 %). Orders made with a commercial API key earn no points. No key needed. **Rate limits.** 120 a minute per IP (bursts up to 40). Over a limit the answer is `429 rate_limited` with `retryAfterMs` and a `Retry-After` header. Wait that long, then call again.
curl https://api.mindswap.io/v1/rewards/program{
"pointsPerUsd": 100,
"buybackBps": 4000,
"tiers": [
{
"tier": 1,
"minPoints": 0,
"cashbackBps": 1500,
"referralBps": 1000
},
{
"tier": 2,
"minPoints": 10000000,
"cashbackBps": 2500,
"referralBps": 2500
},
{
"tier": 3,
"minPoints": 50000000,
"cashbackBps": 3500,
"referralBps": 3500
},
{
"tier": 4,
"minPoints": 100000000,
"cashbackBps": 5000,
"referralBps": 5000
}
]
}Response
- pointsPerUsd
- number
- buybackBps
- number
- tiers
- object[]
Read this API key's usage
API keyThe calling key's own traffic: requests, errors (4xx and 5xx except 429) and rate-limited answers, per hour for `24h` or per UTC day for `7d`, oldest first. The last bucket is still running. `limit` is the key's own bucket (`perMinute`, `burst`); it is null while the key is inactive and the anonymous per-IP limits apply. A key becomes active when an order made with any of the account's keys completes. **Auth.** An API key. **Rate limits.** 120 a minute per API key (bursts up to 30). Over a limit the answer is `429 rate_limited` with `retryAfterMs` and a `Retry-After` header. Wait that long, then call again.
Query
- windowOptional
- enum`24h` (hourly buckets, the default) or `7d` (daily buckets).
curl https://api.mindswap.io/v1/usage \
-H "x-api-key: $MINDSWAP_API_KEY"{
"window": "24h",
"buckets": [
{
"start": "2026-11-18T16:00:00.000Z",
"requests": 412,
"errors": 3,
"rateLimited": 0
},
{
"start": "2026-11-18T17:00:00.000Z",
"requests": 128,
"errors": 0,
"rateLimited": 2
}
],
"totals": {
"requests": 540,
"errors": 3,
"rateLimited": 2
},
"lastUsedAt": "2026-11-18T17:41:09.000Z",
"limit": {
"perMinute": 1200,
"burst": 200
}
}Response
- window
- enumOne of 24h, 7d.
- buckets
- object[]
- totals
- object
- lastUsedAt
- date-time | null
- limit
- object | null
Errors
Every error has the same shape. Branch on code, show message, and quote requestId to support.
Any call
details names the field.Fix the field that details names and send again. Sending it unchanged fails the same way.cap.For an order, send its payout address (or the cap from tracking). Swaps never need an API key. For an endpoint that reads your key (orders list, usage, partner earnings), send a valid msk_live_ key.retryAfterMs milliseconds, then send the same request again.retryAfterMs, then try again.requestId.Quotes
expiresAt. Nothing was created.Quote again and confirm the new route with the user.details.route is the fresh route, when one exists.Show the fresh route to the user. If they accept, create with its routeId and a new idempotency key (the old key is bound to the old route). If there is no fresh route, quote again.min and max.Creating an order
details.field says which, when it was checked.Ask the user for that address again. Never correct, guess or invent it.details.below[].index lists them.Raise those shares or remove those wallets, then create again.retryAfterMs, then send the same request with the same key. It returns that order and never makes a second one.requestId.retryAfterMs, then send the same request again with the same idempotency key, or pick another route.Account and keys
Payouts
Rate limits
One limit for every key, counted per key. Until your account completes its first order, a key gets the per-IP limits below. A limit you hit answers 429 rate_limited with retryAfterMs.
Webhooks
Not live yetSigned POSTs to your endpoint are planned. Until they launch, follow each order live with GET /v1/orders/{id}/events.
- order.deposit_detected
- order.completed
- order.refunded
Code examples
One swap, from quote to deposit instructions. Run it on your server with MINDSWAP_API_KEY, PAYOUT_ADDRESS and REFUND_ADDRESS set.
const api = 'https://api.mindswap.io/v1'
const headers = { 'x-api-key': process.env.MINDSWAP_API_KEY }
// 1. Quote: MIND's fixed pick for 0.1 BTC to ETH
const quote = await fetch(`${api}/quotes?from=btc:bitcoin&to=eth:ethereum&amountIn=0.1`, { headers })
.then((r) => r.json())
if (!quote.mind.fixed) throw new Error('No fixed route for this pair right now')
// 2. Create, once per confirmation. Keep the key: a retry with it never makes a second order.
const order = await fetch(`${api}/orders`, {
method: 'POST',
headers: { ...headers, 'content-type': 'application/json', 'idempotency-key': crypto.randomUUID() },
body: JSON.stringify({
routeId: quote.mind.fixed,
pickedBy: 'mind',
payout: { address: process.env.PAYOUT_ADDRESS, memo: null },
refund: { address: process.env.REFUND_ADDRESS, memo: null },
ref: null,
}),
}).then((r) => r.json())
if (order.error) throw new Error(`${order.error.code}: ${order.error.message}`)
// 3. Deposit instructions
console.log(`Send ${order.deposit.amount} BTC to ${order.deposit.address}`)