# MindSwap API: complete reference for agents > MindSwap is a non-custodial cross-chain swap service with a public HTTP API, a TypeScript SDK (`@mindswap/sdk`) and an MCP server (`@mindswap/mcp`). Quote a pair, create an order from a route, the user sends the deposit, and the order pays out to the user's own address. No account is needed to swap. Generated from the OpenAPI document (https://api.mindswap.io/v1/openapi.json) and the agent guide. When they disagree with anything else, they win. ## Overview MindSwap is a non-custodial cross-chain swap service. You quote a pair, create an order from a route, the user sends the deposit, and the order pays out to the user's own address. No account is needed to swap. Ten-minute path. 1. `GET /v1/assets`: find the asset IDs (`btc:bitcoin`, `usdt:tron`). 2. `GET /v1/quotes?from=&to=&amountIn=`: pick a route. MIND's pick is in `mind`. 3. `POST /v1/orders` with the route's `routeId`, the user's payout and refund addresses, and a new `Idempotency-Key`. 4. Show `deposit` exactly. The user sends it. 5. `GET /v1/orders/{id}` every 30 to 60 seconds, or `GET /v1/orders/{id}/events` (SSE), until the order is final. **Conventions.** Amounts are decimal strings in whole units, never numbers. Basis points are integers. Every error is `{ "error": { "code", "message", "retryAfterMs"?, "details"? }, "requestId" }`: branch on `code`. **Agents.** TypeScript SDK `@mindswap/sdk`. MCP server `npx -y @mindswap/mcp`, hosted at `https://api.mindswap.io/mcp`. The whole API for a model in one read: `https://mindswap.io/llms-full.txt`. ## Authentication - `apiKey`: Your API key (`msk_live_…`), created in your MindSwap account. Never put it in a prompt, a log or a tool result. - `apiKeyBearer`: The same API key, sent as `Authorization: Bearer msk_live_…`. - `privy`: A signed-in mindswap.io session: any Bearer token that is not an `msk_` key. For the website; integrations use an API key. - `device`: The HttpOnly cookie a browser gets with its first order. Browsers only. ## Endpoints ### Catalog Assets, networks and exchange venues you can swap between. #### List tradable assets `GET /v1/assets`. Operation `listAssets`. Auth: optional (`apiKey` or `apiKeyBearer`). Without query parameters: the assets the MindSwap website lists (each with an official logo), the networks they live on and the exchange venues behind MIND routes, as typed below. Asset IDs are `:` (`usdt:tron`). One symbol on two networks is two assets, so ask the user which network they mean. `memo` says whether the asset needs a memo or destination tag (`none`, `optional`, `required`). With any query parameter: one page of the full catalog, every asset an enabled provider can swap (thousands), most popular first: `{ "assets": [...], "nextCursor": string | null, "total": number }`. Each asset has the fields below, except that `logoUri` is `null` while no official logo is stored. Pass `nextCursor` back as `cursor` until it is `null`; `total` counts every match. Cached for a minute: send `If-None-Match` with the last `ETag` to get `304`. 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. **Parameters** - `q` (query, optional): string. Text to find in the symbol, name, network or contract, case-insensitive (`usdc`). Any parameter switches to the paged full catalog. - `network` (query, optional): slug. Keep one network (`base`); `listNetworks` has them all. - `category` (query, optional): "popular" | "stablecoin" | "privacy" | "meme" | "volatile". `popular`, `stablecoin`, `privacy`, `meme` or `volatile`. - `sort` (query, optional): "rank" | "symbol". `rank` (most popular first, the default) or `symbol` (A to Z). - `limit` (query, optional): integer. Assets per page, 1 to 500 (default 100). - `cursor` (query, optional): string. The `nextCursor` of the previous page, with the same `sort`. **Response 200** (JSON) - `assets`: array of object; required - `id`: asset ID `:`; required - `symbol`: string; required, not empty - `name`: string; required, not empty - `network`: slug; required - `contract`: string | null; required - `decimals`: integer; required, 0 to 36 - `memo`: "none" | "optional" | "required"; required - `logoUri`: string matching `^https:\/\/mindswap\.io\/logos\/.*`; required - `rank`: integer; required - `categories`: array of "popular" | "stablecoin" | "privacy" | "meme" | "volatile"; required - `status`: "active" | "paused" | "delisted"; required - `networks`: array of object; required - `id`: string; required - `name`: string; required - `family`: string; required - `logoUri`: string | null; required - `confirmations`: integer | null; required - `explorerTx`: string; required - `venues`: array of object; required - `id`: slug; required - `name`: string; required, not empty - `logoUri`: string matching `^https:\/\/mindswap\.io\/logos\/.*` | null; required Example response: ```json { "assets": [ { "id": "usdt:tron", "symbol": "USDT", "name": "Tether", "network": "tron", "contract": "TR7NHqjeKQxGTCi8q8ZY4pL8otSzgjLj6t", "decimals": 6, "memo": "none", "logoUri": "https://mindswap.io/logos/1a39b918bfe816e1ccb6e5b4b2a7a4d8.svg", "rank": 3, "categories": [ "popular", "stablecoin" ], "status": "active" } ], "networks": [ { "id": "algorand", "name": "Algorand", "family": "algorand", "logoUri": "https://mindswap.io/logos/82e73dad12af039448dffcd0377f6e86.svg", "confirmations": null, "explorerTx": "https://allo.info/tx/{hash}" } ], "venues": [ { "id": "mind", "name": "MIND", "logoUri": "https://mindswap.io/logos/c33ec8c70465101c2b0083710e7178fc.svg" } ] } ``` **Errors.** 400: - `invalid_request`: An input is missing or malformed. `details` names the field. Next: Fix the field that `details` names and send again. Sending it unchanged fails the same way.. 429: - `rate_limited`: Too many requests from this caller (per IP, or per key once the key is active). Next: Wait `retryAfterMs` milliseconds, then send the same request again.. 503: - `service_paused`: MindSwap paused this briefly (new orders or this endpoint). Next: Wait `retryAfterMs`, then try again.. #### List networks `GET /v1/networks`. Operation `listNetworks`. Auth: optional (`apiKey` or `apiKeyBearer`). Every 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. **Response 200** (JSON) - `networks`: array of object; required - `id`: slug; required - `name`: string; required, not empty - `family`: string; required, not empty - `logoUri`: string matching `^https:\/\/mindswap\.io\/logos\/.*` | null; required - `assetCount`: integer; required Example response: ```json { "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 } ] } ``` **Errors.** 429: - `rate_limited`: Too many requests from this caller (per IP, or per key once the key is active). Next: Wait `retryAfterMs` milliseconds, then send the same request again.. 503: - `service_paused`: MindSwap paused this briefly (new orders or this endpoint). Next: Wait `retryAfterMs`, then try again.. #### Check whether a pair can be swapped `GET /v1/pairs`. Operation `getPair`. Auth: optional (`apiKey` or `apiKeyBearer`). Whether 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. **Parameters** - `from` (query, required): asset ID `:`. The asset to send, `:` (`btc:bitcoin`), from `listAssets`. - `to` (query, required): asset ID `:`. The asset to receive (`usdt:tron`). **Response 200** (JSON) - `from`: asset ID `:`; required - `to`: asset ID `:`; required - `available`: boolean; required - `routes`: array of object; required - `provider`: slug; required - `kind`: "private" | "exchange" | "public"; required - `rateTypes`: array of "float" | "fixed"; required, not empty Example response: ```json { "from": "btc:bitcoin", "to": "usdt:tron", "available": true, "routes": [ { "provider": "changenow", "kind": "exchange", "rateTypes": [ "float" ] }, { "provider": "fixedfloat", "kind": "exchange", "rateTypes": [ "float", "fixed" ] } ] } ``` **Errors.** 400: - `invalid_request`: An input is missing or malformed. `details` names the field. Next: Fix the field that `details` names and send again. Sending it unchanged fails the same way.. 429: - `rate_limited`: Too many requests from this caller (per IP, or per key once the key is active). Next: Wait `retryAfterMs` milliseconds, then send the same request again.. 503: - `service_paused`: MindSwap paused this briefly (new orders or this endpoint). Next: Wait `retryAfterMs`, then try again.. ### Quotes Prices for a pair and amount, one route per provider and rate type. #### Get swap quotes `GET /v1/quotes`. Operation `getQuotes`. Auth: optional (`apiKey` or `apiKeyBearer`). Every route we can run for a pair and amount, answered by a deadline with the routes that arrived. `complete: false` means some providers are still answering (`pending`): call again, or use `streamQuotes`, for the late ones. `mind` names MIND's pick for each rate type; show it first. MIND's own routes show as provider `mind`. Each route's `routeId` is a sealed token you pass to `createOrder` unchanged. It stops working at `expiresAt` (about a minute), after which you quote again. `amountOut` and `fees.totalUser` are in the receive asset. A `fixed` route locks `amountOut` for the exact deposit amount sent before the deadline. `float` and `private` routes settle at the rate when the deposit arrives. `unavailable` lists routes that could not quote and why (`below_min` and `above_max` carry the `limit`). No key needed. **Rate limits.** 120 a minute per IP (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. **Parameters** - `from` (query, required): asset ID `:`. The asset to send, `:` (`btc:bitcoin`), from `listAssets`. - `to` (query, required): asset ID `:`. The asset to receive (`usdt:tron`). - `amountIn` (query, required): decimal string. The amount to send, a decimal string in whole units of `from` (`0.01` BTC). Never a number, satoshi or wei. - `x-api-key` (header, optional): string. Optional. A business's API key (or the same key as `Authorization: Bearer msk_live_…`). With a key that has a partner fee, every route adds that fee (fees.partner, in the send asset, and in fees.totalUser), routes whose provider cannot carry it on the order are left out, and each routeId can be created only with this key. An invalid or revoked key answers 401 unauthorized. **Response 200** (JSON) - `quoteKey`: string; required - `routes`: array of object; required - `routeId`: string; required, not empty - `provider`: slug; required - `venue`: slug; required - `kind`: "private" | "exchange" | "public"; required - `rateType`: "float" | "fixed"; required - `from`: asset ID `:`; required - `to`: asset ID `:`; required - `amountIn`: decimal string; required - `amountOut`: decimal string; required - `fees`: object; required - `network`: object; required - `amount`: decimal string; required - `asset`: asset ID `:`; required - `provider`: object; required - `amount`: decimal string; required - `asset`: asset ID `:`; required - `platform`: object; required - `amount`: decimal string; required - `asset`: asset ID `:`; required - `partner`: object; optional - `amount`: decimal string; required - `asset`: asset ID `:`; required - `totalUser`: object; required - `amount`: decimal string; required - `asset`: asset ID `:`; required - `feesEstimated`: boolean; required - `etaSeconds`: integer; required - `min`: decimal string; required - `max`: decimal string | null; required - `expiresAt`: string matching `^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d:[0-5]\d(?:\.\d+)?(?:Z))$`; required - `mind`: object; required - `float`: string | null; required - `fixed`: string | null; required - `private`: string | null; required - `mindBacking`: object | null; required - `provider`: slug; required - `fallback`: boolean; required - `venueCount`: integer; required - `usd`: map of decimal string; required - `pending`: array of object; required - `provider`: slug; required - `venue`: slug; required - `unavailable`: array of object; required - `provider`: slug; required - `venue`: slug; required - `type`: "float" | "fixed" | "private"; required - `reason`: "pair_not_listed" | "type_not_supported" | "below_min" | "above_max" | "provider_down" | "timeout"; required - `limit`: decimal string | null; required - `complete`: boolean; required - `asOf`: string matching `^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d:[0-5]\d(?:\.\d+)?(?:Z))$`; required Example response: ```json { "quoteKey": "KShDNrpTrodHM6cj", "routes": [ { "routeId": "r1.k1.DMfUXFMSO0JVy6BWNJgmrvEeXjiKxbyb1NbeY7I4cf…", "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", "expiresAt": "2026-11-18T16:52:45.438Z" }, { "routeId": "r1.k1.RjcIN4Vigc6vxIxrUtGy53SntcktB1FpL8rMZM-9JL…", "provider": "changenow", "venue": "changenow", "kind": "exchange", "rateType": "float", "from": "btc:bitcoin", "to": "usdt:tron", "amountIn": "0.01", "amountOut": "614.92413", "fees": { "network": { "amount": "5.0082263", "asset": "usdt:tron" }, "provider": { "amount": "0", "asset": "usdt:tron" }, "platform": { "amount": "0", "asset": "usdt:tron" }, "totalUser": { "amount": "5.0082263", "asset": "usdt:tron" } }, "feesEstimated": true, "etaSeconds": 900, "min": "0.0001956", "max": null, "expiresAt": "2026-11-18T16:52:45.447Z" } ], "mind": { "float": null, "fixed": "r1.k1.DMfUXFMSO0JVy6BWNJgmrvEeXjiKxbyb1NbeY7I4cf…", "private": null }, "mindBacking": null, "usd": { "btc:bitcoin": "61849.882627511591962905", "usdt:tron": "1" }, "pending": [], "unavailable": [ { "provider": "swapuz", "venue": "swapuz", "type": "fixed", "reason": "provider_down", "limit": null } ], "complete": false, "asOf": "2026-11-18T16:51:46.007Z" } ``` **Errors.** 400: - `invalid_request`: An input is missing or malformed. `details` names the field. Next: Fix the field that `details` names and send again. Sending it unchanged fails the same way.. 401: - `unauthorized`: The call needs proof it did not carry: the API key that owns the resource, or for an order its payout address or `cap`. Next: 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.. 422: - `pair_unavailable`: No provider can swap this pair right now, or the pair is not listed. Next: Try another pair, or the same pair later.. 429: - `rate_limited`: Too many requests from this caller (per IP, or per key once the key is active). Next: Wait `retryAfterMs` milliseconds, then send the same request again.. 503: - `service_paused`: MindSwap paused this briefly (new orders or this endpoint). Next: Wait `retryAfterMs`, then try again.. #### Estimate each wallet of a multi-wallet swap `POST /v1/quotes/recipients`. Operation `quoteRecipients`. Auth: optional (`apiKey` or `apiKeyBearer`). For 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. **Request body** (JSON) - `routeId`: string; required, 1 to 2048 characters - `recipients`: array of object; required, 1 to 1000 items - `percent`: percent, up to 2 decimals; required - `venue`: slug | null; required Example request: ```json { "routeId": "r1.k1.h3-EUyT9VmfLOIpC62z7AJZRuTxDh6H5OY9OUG4jlf…", "recipients": [ { "percent": "60", "venue": null }, { "percent": "40", "venue": null } ] } ``` **Response 200** (JSON) - `recipients`: array of object; required - `ok`: boolean; required - `amountOut`: decimal string | null; required - `minimum`: decimal string | null; required Example response: ```json { "recipients": [ { "ok": true, "amountOut": "371.2743819", "minimum": "5.5" }, { "ok": true, "amountOut": "247.0162546", "minimum": "5.5" } ] } ``` **Errors.** 400: - `invalid_request`: An input is missing or malformed. `details` names the field. Next: Fix the field that `details` names and send again. Sending it unchanged fails the same way.. 410: - `route_expired`: The routeId is past its `expiresAt`. Nothing was created. Next: Quote again and confirm the new route with the user.. 422: - `pair_unavailable`: No provider can swap this pair right now, or the pair is not listed. Next: Try another pair, or the same pair later.. 429: - `rate_limited`: Too many requests from this caller (per IP, or per key once the key is active). Next: Wait `retryAfterMs` milliseconds, then send the same request again.. 503: - `service_paused`: MindSwap paused this briefly (new orders or this endpoint). Next: Wait `retryAfterMs`, then try again.. #### Stream quotes as late routes arrive `GET /v1/quotes/stream`. Operation `streamQuotes`. Auth: optional (`apiKey` or `apiKeyBearer`). Server-sent events. Each `snapshot` event carries the whole quote again (the shape of `getQuotes`) when a late route lands. One `done` event carries the final snapshot, and the stream closes. Replace what you show with each event; never merge. 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. **Parameters** - `from` (query, required): asset ID `:`. The asset to send, `:` (`btc:bitcoin`), from `listAssets`. - `to` (query, required): asset ID `:`. The asset to receive (`usdt:tron`). - `amountIn` (query, required): decimal string. The amount to send, a decimal string in whole units of `from` (`0.01` BTC). Never a number, satoshi or wei. - `x-api-key` (header, optional): string. Optional. A business's API key (or the same key as `Authorization: Bearer msk_live_…`). With a key that has a partner fee, every route adds that fee (fees.partner, in the send asset, and in fees.totalUser), routes whose provider cannot carry it on the order are left out, and each routeId can be created only with this key. An invalid or revoked key answers 401 unauthorized. **Response 200** (server-sent events; each `data` is) - `quoteKey`: string; required - `routes`: array of object; required - `routeId`: string; required, not empty - `provider`: slug; required - `venue`: slug; required - `kind`: "private" | "exchange" | "public"; required - `rateType`: "float" | "fixed"; required - `from`: asset ID `:`; required - `to`: asset ID `:`; required - `amountIn`: decimal string; required - `amountOut`: decimal string; required - `fees`: object; required - `network`: object; required - `amount`: decimal string; required - `asset`: asset ID `:`; required - `provider`: object; required - `amount`: decimal string; required - `asset`: asset ID `:`; required - `platform`: object; required - `amount`: decimal string; required - `asset`: asset ID `:`; required - `partner`: object; optional - `amount`: decimal string; required - `asset`: asset ID `:`; required - `totalUser`: object; required - `amount`: decimal string; required - `asset`: asset ID `:`; required - `feesEstimated`: boolean; required - `etaSeconds`: integer; required - `min`: decimal string; required - `max`: decimal string | null; required - `expiresAt`: string matching `^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d:[0-5]\d(?:\.\d+)?(?:Z))$`; required - `mind`: object; required - `float`: string | null; required - `fixed`: string | null; required - `private`: string | null; required - `mindBacking`: object | null; required - `provider`: slug; required - `fallback`: boolean; required - `venueCount`: integer; required - `usd`: map of decimal string; required - `pending`: array of object; required - `provider`: slug; required - `venue`: slug; required - `unavailable`: array of object; required - `provider`: slug; required - `venue`: slug; required - `type`: "float" | "fixed" | "private"; required - `reason`: "pair_not_listed" | "type_not_supported" | "below_min" | "above_max" | "provider_down" | "timeout"; required - `limit`: decimal string | null; required - `complete`: boolean; required - `asOf`: string matching `^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d:[0-5]\d(?:\.\d+)?(?:Z))$`; required Example response: ```json { "quoteKey": "KShDNrpTrodHM6cj", "routes": [ { "routeId": "r1.k1.DMfUXFMSO0JVy6BWNJgmrvEeXjiKxbyb1NbeY7I4cf…", "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", "expiresAt": "2026-11-18T16:52:45.438Z" }, { "routeId": "r1.k1.RjcIN4Vigc6vxIxrUtGy53SntcktB1FpL8rMZM-9JL…", "provider": "changenow", "venue": "changenow", "kind": "exchange", "rateType": "float", "from": "btc:bitcoin", "to": "usdt:tron", "amountIn": "0.01", "amountOut": "614.92413", "fees": { "network": { "amount": "5.0082263", "asset": "usdt:tron" }, "provider": { "amount": "0", "asset": "usdt:tron" }, "platform": { "amount": "0", "asset": "usdt:tron" }, "totalUser": { "amount": "5.0082263", "asset": "usdt:tron" } }, "feesEstimated": true, "etaSeconds": 900, "min": "0.0001956", "max": null, "expiresAt": "2026-11-18T16:52:45.447Z" } ], "mind": { "float": null, "fixed": "r1.k1.DMfUXFMSO0JVy6BWNJgmrvEeXjiKxbyb1NbeY7I4cf…", "private": null }, "mindBacking": null, "usd": { "btc:bitcoin": "61849.882627511591962905", "usdt:tron": "1" }, "pending": [], "unavailable": [ { "provider": "swapuz", "venue": "swapuz", "type": "fixed", "reason": "provider_down", "limit": null } ], "complete": false, "asOf": "2026-11-18T16:51:46.007Z" } ``` **Errors.** 400: - `invalid_request`: An input is missing or malformed. `details` names the field. Next: Fix the field that `details` names and send again. Sending it unchanged fails the same way.. 401: - `unauthorized`: The call needs proof it did not carry: the API key that owns the resource, or for an order its payout address or `cap`. Next: 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.. 422: - `pair_unavailable`: No provider can swap this pair right now, or the pair is not listed. Next: Try another pair, or the same pair later.. 429: - `rate_limited`: Too many requests from this caller (per IP, or per key once the key is active). Next: Wait `retryAfterMs` milliseconds, then send the same request again.. 503: - `service_paused`: MindSwap paused this briefly (new orders or this endpoint). Next: Wait `retryAfterMs`, then try again.. ### Orders Create an order from a quoted route, then follow it until it is final. #### List the orders made with this key `GET /v1/orders`. Operation `listOrders`. Auth: `apiKey` or `apiKeyBearer`. The 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. **Parameters** - `status` (query, optional): "awaiting_deposit" | "confirming" | "exchanging" | "private_routing" | "sending" | "completed" | "expired" | "refund_pending" | "refunded" | "failed" | "on_hold" | "partially_completed". Only orders in this status (`awaiting_deposit`, `completed`, …). - `limit` (query, optional): integer. Orders per page, 1 to 100. - `cursor` (query, optional): string. `nextCursor` from the previous page. **Response 200** (JSON) - `orders`: array of object; required - `id`: order ID `MS-XXXXXX`; required - `version`: integer; required - `type`: "float" | "fixed" | "private"; required - `pickedBy`: "mind" | "user"; required - `route`: object; required - `provider`: slug; required - `venue`: slug; required - `kind`: "private" | "exchange" | "public"; required - `rateType`: "float" | "fixed"; required - `from`: asset ID `:`; required - `to`: asset ID `:`; required - `amountIn`: decimal string; required - `amountOut`: decimal string; required - `fees`: object; required - `network`: object; required - `amount`: decimal string; required - `asset`: asset ID `:`; required - `provider`: object; required - `amount`: decimal string; required - `asset`: asset ID `:`; required - `platform`: object; required - `amount`: decimal string; required - `asset`: asset ID `:`; required - `partner`: object; optional - `amount`: decimal string; required - `asset`: asset ID `:`; required - `totalUser`: object; required - `amount`: decimal string; required - `asset`: asset ID `:`; required - `feesEstimated`: boolean; required - `etaSeconds`: integer; required - `min`: decimal string; required - `max`: decimal string | null; required - `payout`: object; required - `address`: string; required, 1 to 128 characters - `memo`: string | null; required, 1 to 64 characters - `refund`: object | null; required - `address`: string; required, 1 to 128 characters - `memo`: string | null; required, 1 to 64 characters - `deposit`: object; required - `address`: string; required, 1 to 128 characters - `memo`: string | null; required, 1 to 64 characters - `amount`: decimal string; required - `expiresAt`: string matching `^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d:[0-5]\d(?:\.\d+)?(?:Z))$`; required - `expiresSource`: "provider" | "estimate"; required, default "provider" - `received`: decimal string | null; optional - `status`: "awaiting_deposit" | "confirming" | "exchanging" | "private_routing" | "sending" | "completed" | "expired" | "refund_pending" | "refunded" | "failed" | "on_hold" | "partially_completed"; required - `steps`: array of object; required - `status`: "awaiting_deposit" | "confirming" | "exchanging" | "private_routing" | "sending" | "completed" | "expired" | "refund_pending" | "refunded" | "failed" | "on_hold" | "partially_completed"; required - `at`: string matching `^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d:[0-5]\d(?:\.\d+)?(?:Z))$`; required - `amountOut`: decimal string; required - `refunded`: object | null; required - `amount`: object; required - `amount`: decimal string; required - `asset`: asset ID `:`; required - `fee`: object | null; required - `amount`: decimal string; required - `asset`: asset ID `:`; required - `recipients`: array of object | null; required - `address`: string; required - `memo`: string | null; required - `percent`: decimal string; required - `venue`: slug | null; required - `delayMinutes`: integer; required - `amount`: decimal string | null; required - `state`: "pending" | "scheduled" | "sending" | "sent" | "failed"; required - `scheduledAt`: string matching `^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d:[0-5]\d(?:\.\d+)?(?:Z))$` | null; required - `tx`: object | null; required - `kind`: "deposit" | "payout" | "refund"; required - `hash`: string; required, not empty - `confirmations`: integer | null; required - `required`: integer | null; required - `explorerUrl`: string; required - `reason`: string | null; required, at most 280 characters - `usd`: map of decimal string; required - `notices`: array of object; required - `kind`: "amount_adjusted" | "fixed_overpay" | "slow_confirmations" | "multiple_deposits" | "late_deposit" | "slow_processing" | "scheduled" | "refund_reason" | "delayed_update"; required - `createdAt`: string matching `^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d:[0-5]\d(?:\.\d+)?(?:Z))$`; required - `detail`: string | null; required, at most 280 characters - `txs`: array of object; required - `kind`: "deposit" | "payout" | "refund"; required - `hash`: string; required, not empty - `confirmations`: integer | null; required - `required`: integer | null; required - `explorerUrl`: string; required - `issue`: object | null; required - `id`: string; required - `kind`: "refund" | "not_received" | "wrong_network" | "wrong_amount" | "other"; required - `state`: "received" | "in_progress" | "needs_info" | "resolved"; required - `timeline`: array of object; required - `at`: string matching `^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d:[0-5]\d(?:\.\d+)?(?:Z))$`; required - `text`: string; required - `nextUpdateBy`: string matching `^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d:[0-5]\d(?:\.\d+)?(?:Z))$` | null; required - `action`: object | null; required - `kind`: "provide" | "choose"; required - `field`: "depositTxHash" | "refundAddress" | "refundMemo" | null; required - `points`: object | null; required - `amount`: integer; required - `credited`: boolean; required - `viewer`: object; required - `role`: "device" | "proof" | "account" | "api_key"; required - `canClaim`: boolean; required - `owned`: boolean; required - `createdAt`: string matching `^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d:[0-5]\d(?:\.\d+)?(?:Z))$`; required - `updatedAt`: string matching `^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d:[0-5]\d(?:\.\d+)?(?:Z))$`; required - `nextCursor`: string | null; required Example response: ```json { "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 } ``` **Errors.** 400: - `invalid_request`: An input is missing or malformed. `details` names the field. Next: Fix the field that `details` names and send again. Sending it unchanged fails the same way.. 401: - `unauthorized`: The call needs proof it did not carry: the API key that owns the resource, or for an order its payout address or `cap`. Next: 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.. 429: - `rate_limited`: Too many requests from this caller (per IP, or per key once the key is active). Next: Wait `retryAfterMs` milliseconds, then send the same request again.. 503: - `service_paused`: MindSwap paused this briefly (new orders or this endpoint). Next: Wait `retryAfterMs`, then try again.. #### Create a swap order `POST /v1/orders`. Operation `createOrder`. Auth: optional (`device`, `privy`, `apiKey` or `apiKeyBearer`). Creates the order at the provider behind the quoted route and answers with the deposit instructions. Show them exactly. The user sends exactly `deposit.amount` of the send asset, on its network, to `deposit.address`, with `deposit.memo` when it is not null, before `deposit.expiresAt`. `expiresSource: provider` means the provider enforces that deadline; `estimate` means the time is our estimate. Send `routeId` and `pickedBy` from the quote unchanged (`pickedBy: mind` when the user kept MIND's pick). A fixed route needs a `refund` address. Never guess, invent or reuse an address. For several payout wallets, send `recipients` and `payout: null` (see `quoteRecipients`). **Idempotency.** `Idempotency-Key` is required. Use one new key per swap the user confirms, and store it before you call. A retry with the same key and body returns the same order and never makes a second one. **Money safety.** `create_in_doubt` (502): the provider may or may not have made the order. Never retry it, and never create another order for the same swap. Tell the user not to send funds and to contact support with the `requestId`. `quote_moved` (409): no order was made because the rate changed; `details.freshRoute` is the new route to show the user. `route_expired` (410): quote again. **Auth.** With an API key (`x-api-key: msk_live_…` or `Authorization: Bearer msk_live_…`) you read the order later with the same key, and `listOrders` lists it. Without a key, a browser gets a device cookie, and a server follows the order with `trackOrder` (order ID plus payout address). **Rate limits.** 20 a minute per IP (bursts up to 10). Over a limit the answer is `429 rate_limited` with `retryAfterMs` and a `Retry-After` header. Wait that long, then call again. **Parameters** - `Idempotency-Key` (header, required): string matching `^[\x21-\x7e]{8,64}$`. One key per order the user means to make, 8 to 64 printable ASCII characters (a UUID). A retry with the same key and body returns the original order or error, never a second order; the same key with another body answers idempotency_mismatch. - `Accept-Language` (header, optional): string. The end user's language, a BCP 47 tag ("en-US"); the first tag is used. The provider behind MIND float and private routes and the exchange-venue rows refuses an order without it and X-Client-Timezone (provider_rejected). Send the real user's own; never a made-up value. - `X-Client-Timezone` (header, optional): string. The end user's IANA time zone ("Europe/Berlin"). Needed with Accept-Language for the same providers. **Request body** (JSON) - `routeId`: string; required, 1 to 2048 characters - `pickedBy`: "mind" | "user"; required - `payout`: object | null; required - `address`: string; required, 1 to 128 characters - `memo`: string | null; required, 1 to 64 characters - `refund`: object | null; required - `address`: string; required, 1 to 128 characters - `memo`: string | null; required, 1 to 64 characters - `ref`: string | null; required, at most 20 characters - `recipients`: array of object | null; optional, 1 to 1000 items - `address`: string; required, 1 to 128 characters - `memo`: string | null; required, 1 to 64 characters - `percent`: percent, up to 2 decimals; required - `venue`: slug | null; required - `delayMinutes`: integer; required, 0 to 1440 Example request: ```json { "routeId": "r1.k1.DMfUXFMSO0JVy6BWNJgmrvEeXjiKxbyb1NbeY7I4cf…", "pickedBy": "mind", "payout": { "address": "T9yD14Nj9j7xAB4dbGeiX9h8unkKHxuWwb", "memo": null }, "refund": { "address": "bc1qw508d6qejxtdg4y5r3zarvary0c5xw7kv8f3t4", "memo": null }, "ref": null } ``` **Response 201** (JSON) - `id`: order ID `MS-XXXXXX`; required - `version`: integer; required - `type`: "float" | "fixed" | "private"; required - `pickedBy`: "mind" | "user"; required - `route`: object; required - `provider`: slug; required - `venue`: slug; required - `kind`: "private" | "exchange" | "public"; required - `rateType`: "float" | "fixed"; required - `from`: asset ID `:`; required - `to`: asset ID `:`; required - `amountIn`: decimal string; required - `amountOut`: decimal string; required - `fees`: object; required - `network`: object; required - `amount`: decimal string; required - `asset`: asset ID `:`; required - `provider`: object; required - `amount`: decimal string; required - `asset`: asset ID `:`; required - `platform`: object; required - `amount`: decimal string; required - `asset`: asset ID `:`; required - `partner`: object; optional - `amount`: decimal string; required - `asset`: asset ID `:`; required - `totalUser`: object; required - `amount`: decimal string; required - `asset`: asset ID `:`; required - `feesEstimated`: boolean; required - `etaSeconds`: integer; required - `min`: decimal string; required - `max`: decimal string | null; required - `payout`: object; required - `address`: string; required, 1 to 128 characters - `memo`: string | null; required, 1 to 64 characters - `refund`: object | null; required - `address`: string; required, 1 to 128 characters - `memo`: string | null; required, 1 to 64 characters - `deposit`: object; required - `address`: string; required, 1 to 128 characters - `memo`: string | null; required, 1 to 64 characters - `amount`: decimal string; required - `expiresAt`: string matching `^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d:[0-5]\d(?:\.\d+)?(?:Z))$`; required - `expiresSource`: "provider" | "estimate"; required, default "provider" - `received`: decimal string | null; optional - `status`: "awaiting_deposit" | "confirming" | "exchanging" | "private_routing" | "sending" | "completed" | "expired" | "refund_pending" | "refunded" | "failed" | "on_hold" | "partially_completed"; required - `steps`: array of object; required - `status`: "awaiting_deposit" | "confirming" | "exchanging" | "private_routing" | "sending" | "completed" | "expired" | "refund_pending" | "refunded" | "failed" | "on_hold" | "partially_completed"; required - `at`: string matching `^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d:[0-5]\d(?:\.\d+)?(?:Z))$`; required - `amountOut`: decimal string; required - `refunded`: object | null; required - `amount`: object; required - `amount`: decimal string; required - `asset`: asset ID `:`; required - `fee`: object | null; required - `amount`: decimal string; required - `asset`: asset ID `:`; required - `recipients`: array of object | null; required - `address`: string; required - `memo`: string | null; required - `percent`: decimal string; required - `venue`: slug | null; required - `delayMinutes`: integer; required - `amount`: decimal string | null; required - `state`: "pending" | "scheduled" | "sending" | "sent" | "failed"; required - `scheduledAt`: string matching `^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d:[0-5]\d(?:\.\d+)?(?:Z))$` | null; required - `tx`: object | null; required - `kind`: "deposit" | "payout" | "refund"; required - `hash`: string; required, not empty - `confirmations`: integer | null; required - `required`: integer | null; required - `explorerUrl`: string; required - `reason`: string | null; required, at most 280 characters - `usd`: map of decimal string; required - `notices`: array of object; required - `kind`: "amount_adjusted" | "fixed_overpay" | "slow_confirmations" | "multiple_deposits" | "late_deposit" | "slow_processing" | "scheduled" | "refund_reason" | "delayed_update"; required - `createdAt`: string matching `^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d:[0-5]\d(?:\.\d+)?(?:Z))$`; required - `detail`: string | null; required, at most 280 characters - `txs`: array of object; required - `kind`: "deposit" | "payout" | "refund"; required - `hash`: string; required, not empty - `confirmations`: integer | null; required - `required`: integer | null; required - `explorerUrl`: string; required - `issue`: object | null; required - `id`: string; required - `kind`: "refund" | "not_received" | "wrong_network" | "wrong_amount" | "other"; required - `state`: "received" | "in_progress" | "needs_info" | "resolved"; required - `timeline`: array of object; required - `at`: string matching `^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d:[0-5]\d(?:\.\d+)?(?:Z))$`; required - `text`: string; required - `nextUpdateBy`: string matching `^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d:[0-5]\d(?:\.\d+)?(?:Z))$` | null; required - `action`: object | null; required - `kind`: "provide" | "choose"; required - `field`: "depositTxHash" | "refundAddress" | "refundMemo" | null; required - `points`: object | null; required - `amount`: integer; required - `credited`: boolean; required - `viewer`: object; required - `role`: "device" | "proof" | "account" | "api_key"; required - `canClaim`: boolean; required - `owned`: boolean; required - `createdAt`: string matching `^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d:[0-5]\d(?:\.\d+)?(?:Z))$`; required - `updatedAt`: string matching `^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d:[0-5]\d(?:\.\d+)?(?:Z))$`; required Example response: ```json { "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" } ``` **Errors.** 400: - `invalid_request`: An input is missing or malformed. `details` names the field. Next: Fix the field that `details` names and send again. Sending it unchanged fails the same way.. 401: - `unauthorized`: The call needs proof it did not carry: the API key that owns the resource, or for an order its payout address or `cap`. Next: 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.. 409: - `quote_moved`: The rate changed or the route stopped running before the order was made. Nothing was created. `details.route` is the fresh route, when one exists. Next: 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. - `create_in_progress`: An order with this idempotency key is still being created. Next: Wait `retryAfterMs`, then send the same request with the same key. It returns that order and never makes a second one.. 410: - `route_expired`: The routeId is past its `expiresAt`. Nothing was created. Next: Quote again and confirm the new route with the user.. 422: - `pair_unavailable`: No provider can swap this pair right now, or the pair is not listed. Next: Try another pair, or the same pair later. - `amount_out_of_range`: The amount is outside what the provider accepts right now. Nothing was created. Next: Quote again and pick an amount within the route's `min` and `max`. - `address_invalid`: A payout or refund address is not valid on its network. `details.field` says which, when it was checked. Next: Ask the user for that address again. Never correct, guess or invent it. - `memo_required`: The address needs a memo (destination tag) on this network. Next: Ask the user for the memo and send it with the address. - `recipient_below_min`: In a multi-wallet order, a wallet's share is below its exchange's minimum payout. `details.below[].index` lists them. Next: Raise those shares or remove those wallets, then create again. - `idempotency_mismatch`: This idempotency key was already used with other inputs. Next: To retry, send exactly the original inputs with the same key. For a new swap the user confirmed, use a new key.. 429: - `rate_limited`: Too many requests from this caller (per IP, or per key once the key is active). Next: Wait `retryAfterMs` milliseconds, then send the same request again. - `too_many_open_orders`: This caller already has as many unpaid orders open as it may (the limit is in the message). Nothing was created and no provider was asked. Next: Pay one of the open orders, or wait until one expires, then create again. Do not retry in a loop: the answer stays the same until an order is paid or expires.. 502: - `create_in_doubt`: The provider may or may not have made the order, and MindSwap cannot tell which. Next: STOP. Do not create again for this swap, with any key, and tell the user not to send funds. Contact MindSwap support with `requestId`. - `provider_rejected`: The provider refused the order. Nothing was created and nothing is owed. "This route needs browser details" means the end user's language and time zone were missing. Next: Quote again and pick another route. Send the end user's own language and time zone (Accept-Language, X-Client-Timezone) with the create.. 503: - `provider_busy`: The provider behind this route had no capacity for a new order within about 10 seconds. Nothing was created. Next: Wait `retryAfterMs`, then send the same request again with the same idempotency key, or pick another route. - `service_paused`: MindSwap paused this briefly (new orders or this endpoint). Next: Wait `retryAfterMs`, then try again.. #### Read a swap order `GET /v1/orders/{id}`. Operation `getOrder`. Auth: optional (`device`, `privy`, `apiKey` or `apiKeyBearer`). The order as it is now. Poll every 30 to 60 seconds until `status` is `completed`, `partially_completed`, `expired`, `refunded` or `failed`, or use `streamOrderEvents`. `deposit.received` is what the provider reports as arrived. It is null until something arrives, and stays null when the provider does not say. Never tell the user that `deposit.amount` arrived: that is only what the order asked for. `amountOut` is the settled amount once known. `recipients` lists every wallet of a multi-wallet order with its `state` and payout `tx`. `issue` is the open problem report, if any. **Auth.** Any one proof opens the order: the API key that created it, the creating browser, a `cap` from `trackOrder`, or the payout address in the `x-payout-address` header. A missing order and a wrong proof both answer `404 not_found`. **Rate limits.** 120 a minute per IP (bursts up to 40); 60 a minute per order (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. **Parameters** - `id` (path, required): string. The order ID as created (`MS-7HK2PQ`). - `cap` (query, optional): string. The read-only `cap` from `trackOrder`, valid 24 hours. One way to prove access without a key. **Response 200** (JSON) - `id`: order ID `MS-XXXXXX`; required - `version`: integer; required - `type`: "float" | "fixed" | "private"; required - `pickedBy`: "mind" | "user"; required - `route`: object; required - `provider`: slug; required - `venue`: slug; required - `kind`: "private" | "exchange" | "public"; required - `rateType`: "float" | "fixed"; required - `from`: asset ID `:`; required - `to`: asset ID `:`; required - `amountIn`: decimal string; required - `amountOut`: decimal string; required - `fees`: object; required - `network`: object; required - `amount`: decimal string; required - `asset`: asset ID `:`; required - `provider`: object; required - `amount`: decimal string; required - `asset`: asset ID `:`; required - `platform`: object; required - `amount`: decimal string; required - `asset`: asset ID `:`; required - `partner`: object; optional - `amount`: decimal string; required - `asset`: asset ID `:`; required - `totalUser`: object; required - `amount`: decimal string; required - `asset`: asset ID `:`; required - `feesEstimated`: boolean; required - `etaSeconds`: integer; required - `min`: decimal string; required - `max`: decimal string | null; required - `payout`: object; required - `address`: string; required, 1 to 128 characters - `memo`: string | null; required, 1 to 64 characters - `refund`: object | null; required - `address`: string; required, 1 to 128 characters - `memo`: string | null; required, 1 to 64 characters - `deposit`: object; required - `address`: string; required, 1 to 128 characters - `memo`: string | null; required, 1 to 64 characters - `amount`: decimal string; required - `expiresAt`: string matching `^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d:[0-5]\d(?:\.\d+)?(?:Z))$`; required - `expiresSource`: "provider" | "estimate"; required, default "provider" - `received`: decimal string | null; optional - `status`: "awaiting_deposit" | "confirming" | "exchanging" | "private_routing" | "sending" | "completed" | "expired" | "refund_pending" | "refunded" | "failed" | "on_hold" | "partially_completed"; required - `steps`: array of object; required - `status`: "awaiting_deposit" | "confirming" | "exchanging" | "private_routing" | "sending" | "completed" | "expired" | "refund_pending" | "refunded" | "failed" | "on_hold" | "partially_completed"; required - `at`: string matching `^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d:[0-5]\d(?:\.\d+)?(?:Z))$`; required - `amountOut`: decimal string; required - `refunded`: object | null; required - `amount`: object; required - `amount`: decimal string; required - `asset`: asset ID `:`; required - `fee`: object | null; required - `amount`: decimal string; required - `asset`: asset ID `:`; required - `recipients`: array of object | null; required - `address`: string; required - `memo`: string | null; required - `percent`: decimal string; required - `venue`: slug | null; required - `delayMinutes`: integer; required - `amount`: decimal string | null; required - `state`: "pending" | "scheduled" | "sending" | "sent" | "failed"; required - `scheduledAt`: string matching `^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d:[0-5]\d(?:\.\d+)?(?:Z))$` | null; required - `tx`: object | null; required - `kind`: "deposit" | "payout" | "refund"; required - `hash`: string; required, not empty - `confirmations`: integer | null; required - `required`: integer | null; required - `explorerUrl`: string; required - `reason`: string | null; required, at most 280 characters - `usd`: map of decimal string; required - `notices`: array of object; required - `kind`: "amount_adjusted" | "fixed_overpay" | "slow_confirmations" | "multiple_deposits" | "late_deposit" | "slow_processing" | "scheduled" | "refund_reason" | "delayed_update"; required - `createdAt`: string matching `^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d:[0-5]\d(?:\.\d+)?(?:Z))$`; required - `detail`: string | null; required, at most 280 characters - `txs`: array of object; required - `kind`: "deposit" | "payout" | "refund"; required - `hash`: string; required, not empty - `confirmations`: integer | null; required - `required`: integer | null; required - `explorerUrl`: string; required - `issue`: object | null; required - `id`: string; required - `kind`: "refund" | "not_received" | "wrong_network" | "wrong_amount" | "other"; required - `state`: "received" | "in_progress" | "needs_info" | "resolved"; required - `timeline`: array of object; required - `at`: string matching `^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d:[0-5]\d(?:\.\d+)?(?:Z))$`; required - `text`: string; required - `nextUpdateBy`: string matching `^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d:[0-5]\d(?:\.\d+)?(?:Z))$` | null; required - `action`: object | null; required - `kind`: "provide" | "choose"; required - `field`: "depositTxHash" | "refundAddress" | "refundMemo" | null; required - `points`: object | null; required - `amount`: integer; required - `credited`: boolean; required - `viewer`: object; required - `role`: "device" | "proof" | "account" | "api_key"; required - `canClaim`: boolean; required - `owned`: boolean; required - `createdAt`: string matching `^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d:[0-5]\d(?:\.\d+)?(?:Z))$`; required - `updatedAt`: string matching `^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d:[0-5]\d(?:\.\d+)?(?:Z))$`; required Example response: ```json { "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" } ``` **Errors.** 401: - `unauthorized`: The call needs proof it did not carry: the API key that owns the resource, or for an order its payout address or `cap`. Next: 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.. 404: - `not_found`: Nothing matches this ID with this proof. A wrong order ID and a wrong payout address answer the same. Next: Check the order ID and the payout address with the user. Do not guess: attempts are limited per order.. 429: - `rate_limited`: Too many requests from this caller (per IP, or per key once the key is active). Next: Wait `retryAfterMs` milliseconds, then send the same request again.. 503: - `service_paused`: MindSwap paused this briefly (new orders or this endpoint). Next: Wait `retryAfterMs`, then try again.. #### Stream live updates of an order `GET /v1/orders/{id}/events`. Operation `streamOrderEvents`. Auth: optional (`device`, `privy`, `apiKey` or `apiKeyBearer`). Server-sent events. The first `order` event is the current view, and each change sends the whole view again: drop any event whose `version` is not newer than the one shown. `heartbeat` carries the current version every 15 seconds. `end` closes the stream once the order can no longer change. To resume after a drop, send the last event's `id` back unchanged as `Last-Event-ID`. **Auth.** Any one proof opens the order: the API key that created it, the creating browser, a `cap` from `trackOrder`, or the payout address in the `x-payout-address` header. A missing order and a wrong proof both answer `404 not_found`. **Rate limits.** 60 a minute per IP (bursts up to 20); 30 a minute per order (bursts up to 10). Over a limit the answer is `429 rate_limited` with `retryAfterMs` and a `Retry-After` header. Wait that long, then call again. **Parameters** - `id` (path, required): string. The order ID as created (`MS-7HK2PQ`). - `cap` (query, optional): string. The read-only `cap` from `trackOrder`, valid 24 hours. One way to prove access without a key. - `Last-Event-ID` (header, optional): string. Resume: the `id` of the last event this client received, sent back unchanged (opaque). The stream then skips what the client already has. **Response 200** (server-sent events; each `data` is) - variant 1: - `type`: "order"; required - `order`: object; required - `id`: order ID `MS-XXXXXX`; required - `version`: integer; required - `type`: "float" | "fixed" | "private"; required - `pickedBy`: "mind" | "user"; required - `route`: object; required - `provider`: slug; required - `venue`: slug; required - `kind`: "private" | "exchange" | "public"; required - `rateType`: "float" | "fixed"; required - `from`: asset ID `:`; required - `to`: asset ID `:`; required - `amountIn`: decimal string; required - `amountOut`: decimal string; required - `fees`: object; required - `network`: object; required - `amount`: decimal string; required - `asset`: asset ID `:`; required - `provider`: object; required - `amount`: decimal string; required - `asset`: asset ID `:`; required - `platform`: object; required - `amount`: decimal string; required - `asset`: asset ID `:`; required - `partner`: object; optional - `amount`: decimal string; required - `asset`: asset ID `:`; required - `totalUser`: object; required - `amount`: decimal string; required - `asset`: asset ID `:`; required - `feesEstimated`: boolean; required - `etaSeconds`: integer; required - `min`: decimal string; required - `max`: decimal string | null; required - `payout`: object; required - `address`: string; required, 1 to 128 characters - `memo`: string | null; required, 1 to 64 characters - `refund`: object | null; required - `address`: string; required, 1 to 128 characters - `memo`: string | null; required, 1 to 64 characters - `deposit`: object; required - `address`: string; required, 1 to 128 characters - `memo`: string | null; required, 1 to 64 characters - `amount`: decimal string; required - `expiresAt`: string matching `^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d:[0-5]\d(?:\.\d+)?(?:Z))$`; required - `expiresSource`: "provider" | "estimate"; required, default "provider" - `received`: decimal string | null; optional - `status`: "awaiting_deposit" | "confirming" | "exchanging" | "private_routing" | "sending" | "completed" | "expired" | "refund_pending" | "refunded" | "failed" | "on_hold" | "partially_completed"; required - `steps`: array of object; required - `status`: "awaiting_deposit" | "confirming" | "exchanging" | "private_routing" | "sending" | "completed" | "expired" | "refund_pending" | "refunded" | "failed" | "on_hold" | "partially_completed"; required - `at`: string matching `^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d:[0-5]\d(?:\.\d+)?(?:Z))$`; required - `amountOut`: decimal string; required - `refunded`: object | null; required - `amount`: object; required - `amount`: decimal string; required - `asset`: asset ID `:`; required - `fee`: object | null; required - `amount`: decimal string; required - `asset`: asset ID `:`; required - `recipients`: array of object | null; required - `address`: string; required - `memo`: string | null; required - `percent`: decimal string; required - `venue`: slug | null; required - `delayMinutes`: integer; required - `amount`: decimal string | null; required - `state`: "pending" | "scheduled" | "sending" | "sent" | "failed"; required - `scheduledAt`: string matching `^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d:[0-5]\d(?:\.\d+)?(?:Z))$` | null; required - `tx`: object | null; required - `kind`: "deposit" | "payout" | "refund"; required - `hash`: string; required, not empty - `confirmations`: integer | null; required - `required`: integer | null; required - `explorerUrl`: string; required - `reason`: string | null; required, at most 280 characters - `usd`: map of decimal string; required - `notices`: array of object; required - `kind`: "amount_adjusted" | "fixed_overpay" | "slow_confirmations" | "multiple_deposits" | "late_deposit" | "slow_processing" | "scheduled" | "refund_reason" | "delayed_update"; required - `createdAt`: string matching `^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d:[0-5]\d(?:\.\d+)?(?:Z))$`; required - `detail`: string | null; required, at most 280 characters - `txs`: array of object; required - `kind`: "deposit" | "payout" | "refund"; required - `hash`: string; required, not empty - `confirmations`: integer | null; required - `required`: integer | null; required - `explorerUrl`: string; required - `issue`: object | null; required - `id`: string; required - `kind`: "refund" | "not_received" | "wrong_network" | "wrong_amount" | "other"; required - `state`: "received" | "in_progress" | "needs_info" | "resolved"; required - `timeline`: array of object; required - `at`: string matching `^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d:[0-5]\d(?:\.\d+)?(?:Z))$`; required - `text`: string; required - `nextUpdateBy`: string matching `^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d:[0-5]\d(?:\.\d+)?(?:Z))$` | null; required - `action`: object | null; required - `kind`: "provide" | "choose"; required - `field`: "depositTxHash" | "refundAddress" | "refundMemo" | null; required - `points`: object | null; required - `amount`: integer; required - `credited`: boolean; required - `viewer`: object; required - `role`: "device" | "proof" | "account" | "api_key"; required - `canClaim`: boolean; required - `owned`: boolean; required - `createdAt`: string matching `^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d:[0-5]\d(?:\.\d+)?(?:Z))$`; required - `updatedAt`: string matching `^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d:[0-5]\d(?:\.\d+)?(?:Z))$`; required - variant 2: - `type`: "heartbeat"; required - `version`: integer; required - variant 3: - `type`: "end"; required Example response: ```json { "type": "order", "order": { "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" } } ``` **Errors.** 401: - `unauthorized`: The call needs proof it did not carry: the API key that owns the resource, or for an order its payout address or `cap`. Next: 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.. 404: - `not_found`: Nothing matches this ID with this proof. A wrong order ID and a wrong payout address answer the same. Next: Check the order ID and the payout address with the user. Do not guess: attempts are limited per order.. 429: - `rate_limited`: Too many requests from this caller (per IP, or per key once the key is active). Next: Wait `retryAfterMs` milliseconds, then send the same request again.. 503: - `service_paused`: MindSwap paused this briefly (new orders or this endpoint). Next: Wait `retryAfterMs`, then try again.. #### Track a swap order by ID and payout address `POST /v1/orders/track`. Operation `trackOrder`. Auth: optional (`apiKey` or `apiKeyBearer`). Opens an order with its ID and payout address, the proof anyone who made the order holds. Answers the order and a `cap`: read-only access to `getOrder` and `streamOrderEvents` for 24 hours (`?cap=`). A missing order and a wrong address both answer `404 not_found`. No key needed. **Rate limits.** 30 a minute per IP (bursts up to 10). Over a limit the answer is `429 rate_limited` with `retryAfterMs` and a `Retry-After` header. Wait that long, then call again. **Request body** (JSON) - `orderId`: string; required, 1 to 16 characters - `payoutAddress`: string; required, 1 to 128 characters Example request: ```json { "orderId": "MS-7HK2PQ", "payoutAddress": "T9yD14Nj9j7xAB4dbGeiX9h8unkKHxuWwb" } ``` **Response 200** (JSON) - `order`: object; required - `id`: order ID `MS-XXXXXX`; required - `version`: integer; required - `type`: "float" | "fixed" | "private"; required - `pickedBy`: "mind" | "user"; required - `route`: object; required - `provider`: slug; required - `venue`: slug; required - `kind`: "private" | "exchange" | "public"; required - `rateType`: "float" | "fixed"; required - `from`: asset ID `:`; required - `to`: asset ID `:`; required - `amountIn`: decimal string; required - `amountOut`: decimal string; required - `fees`: object; required - `network`: object; required - `amount`: decimal string; required - `asset`: asset ID `:`; required - `provider`: object; required - `amount`: decimal string; required - `asset`: asset ID `:`; required - `platform`: object; required - `amount`: decimal string; required - `asset`: asset ID `:`; required - `partner`: object; optional - `amount`: decimal string; required - `asset`: asset ID `:`; required - `totalUser`: object; required - `amount`: decimal string; required - `asset`: asset ID `:`; required - `feesEstimated`: boolean; required - `etaSeconds`: integer; required - `min`: decimal string; required - `max`: decimal string | null; required - `payout`: object; required - `address`: string; required, 1 to 128 characters - `memo`: string | null; required, 1 to 64 characters - `refund`: object | null; required - `address`: string; required, 1 to 128 characters - `memo`: string | null; required, 1 to 64 characters - `deposit`: object; required - `address`: string; required, 1 to 128 characters - `memo`: string | null; required, 1 to 64 characters - `amount`: decimal string; required - `expiresAt`: string matching `^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d:[0-5]\d(?:\.\d+)?(?:Z))$`; required - `expiresSource`: "provider" | "estimate"; required, default "provider" - `received`: decimal string | null; optional - `status`: "awaiting_deposit" | "confirming" | "exchanging" | "private_routing" | "sending" | "completed" | "expired" | "refund_pending" | "refunded" | "failed" | "on_hold" | "partially_completed"; required - `steps`: array of object; required - `status`: "awaiting_deposit" | "confirming" | "exchanging" | "private_routing" | "sending" | "completed" | "expired" | "refund_pending" | "refunded" | "failed" | "on_hold" | "partially_completed"; required - `at`: string matching `^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d:[0-5]\d(?:\.\d+)?(?:Z))$`; required - `amountOut`: decimal string; required - `refunded`: object | null; required - `amount`: object; required - `amount`: decimal string; required - `asset`: asset ID `:`; required - `fee`: object | null; required - `amount`: decimal string; required - `asset`: asset ID `:`; required - `recipients`: array of object | null; required - `address`: string; required - `memo`: string | null; required - `percent`: decimal string; required - `venue`: slug | null; required - `delayMinutes`: integer; required - `amount`: decimal string | null; required - `state`: "pending" | "scheduled" | "sending" | "sent" | "failed"; required - `scheduledAt`: string matching `^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d:[0-5]\d(?:\.\d+)?(?:Z))$` | null; required - `tx`: object | null; required - `kind`: "deposit" | "payout" | "refund"; required - `hash`: string; required, not empty - `confirmations`: integer | null; required - `required`: integer | null; required - `explorerUrl`: string; required - `reason`: string | null; required, at most 280 characters - `usd`: map of decimal string; required - `notices`: array of object; required - `kind`: "amount_adjusted" | "fixed_overpay" | "slow_confirmations" | "multiple_deposits" | "late_deposit" | "slow_processing" | "scheduled" | "refund_reason" | "delayed_update"; required - `createdAt`: string matching `^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d:[0-5]\d(?:\.\d+)?(?:Z))$`; required - `detail`: string | null; required, at most 280 characters - `txs`: array of object; required - `kind`: "deposit" | "payout" | "refund"; required - `hash`: string; required, not empty - `confirmations`: integer | null; required - `required`: integer | null; required - `explorerUrl`: string; required - `issue`: object | null; required - `id`: string; required - `kind`: "refund" | "not_received" | "wrong_network" | "wrong_amount" | "other"; required - `state`: "received" | "in_progress" | "needs_info" | "resolved"; required - `timeline`: array of object; required - `at`: string matching `^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d:[0-5]\d(?:\.\d+)?(?:Z))$`; required - `text`: string; required - `nextUpdateBy`: string matching `^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d:[0-5]\d(?:\.\d+)?(?:Z))$` | null; required - `action`: object | null; required - `kind`: "provide" | "choose"; required - `field`: "depositTxHash" | "refundAddress" | "refundMemo" | null; required - `points`: object | null; required - `amount`: integer; required - `credited`: boolean; required - `viewer`: object; required - `role`: "device" | "proof" | "account" | "api_key"; required - `canClaim`: boolean; required - `owned`: boolean; required - `createdAt`: string matching `^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d:[0-5]\d(?:\.\d+)?(?:Z))$`; required - `updatedAt`: string matching `^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d:[0-5]\d(?:\.\d+)?(?:Z))$`; required - `cap`: string | null; required Example response: ```json { "order": { "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": "proof", "canClaim": false, "owned": false }, "createdAt": "2026-11-18T16:52:30.000Z", "updatedAt": "2026-11-18T16:52:30.000Z" }, "cap": "1795107150.Yx0bQk3…" } ``` **Errors.** 400: - `invalid_request`: An input is missing or malformed. `details` names the field. Next: Fix the field that `details` names and send again. Sending it unchanged fails the same way.. 404: - `not_found`: Nothing matches this ID with this proof. A wrong order ID and a wrong payout address answer the same. Next: Check the order ID and the payout address with the user. Do not guess: attempts are limited per order.. 429: - `rate_limited`: Too many requests from this caller (per IP, or per key once the key is active). Next: Wait `retryAfterMs` milliseconds, then send the same request again.. 503: - `service_paused`: MindSwap paused this briefly (new orders or this endpoint). Next: Wait `retryAfterMs`, then try again.. ### Issues Report a problem with an order and follow its resolution. #### Report a problem with a swap order `POST /v1/orders/{id}/issues`. Operation `reportIssue`. Auth: optional (`apiKey` or `apiKeyBearer`). One flow for every provider: the payout did not arrive (`not_received`), the deposit went to the wrong network (`wrong_network`) or was the wrong amount (`wrong_amount`), the user wants a refund (`refund`, with `refundAddress`), or anything else (`other`). Each order has one open issue, and another report adds to it. Follow the issue through `getOrder` (`order.issue`). Its `state` moves from `received` to `in_progress` to `resolved`; `needs_info` means `action` names what to send next. `nextUpdateBy` is our promise of the next update. No key needed. **Proof.** The same as `getOrder`, or the payout address in the body (`payoutAddress`). **Rate limits.** 10 a minute per IP (bursts up to 5); 6 a minute per order (bursts up to 10). Over a limit the answer is `429 rate_limited` with `retryAfterMs` and a `Retry-After` header. Wait that long, then call again. **Parameters** - `id` (path, required): string. The order ID as created (`MS-7HK2PQ`). - `cap` (query, optional): string. The read-only `cap` from `trackOrder`, valid 24 hours. One way to prove access without a key. **Request body** (JSON) - `kind`: "refund" | "not_received" | "wrong_network" | "wrong_amount" | "other"; required - `refundAddress`: string; optional, not empty - `refundMemo`: string; optional, 1 to 128 characters - `depositTxHash`: string; optional, not empty - `email`: string matching `^(?:[A-Za-z0-9_'+\-]+\.)*[A-Za-z0-9_'+\-]*[A-Za-z0-9_+-]@(?:[A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$`; optional - `details`: string; optional, at most 4000 characters - `payoutAddress`: string; optional, not empty Example request: ```json { "kind": "not_received", "payoutAddress": "T9yD14Nj9j7xAB4dbGeiX9h8unkKHxuWwb", "details": "The order says completed but nothing reached my wallet." } ``` **Response 200** (JSON) - `id`: string; required - `kind`: "refund" | "not_received" | "wrong_network" | "wrong_amount" | "other"; required - `state`: "received" | "in_progress" | "needs_info" | "resolved"; required - `timeline`: array of object; required - `at`: string matching `^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d:[0-5]\d(?:\.\d+)?(?:Z))$`; required - `text`: string; required - `nextUpdateBy`: string matching `^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d:[0-5]\d(?:\.\d+)?(?:Z))$` | null; required - `action`: object | null; required - `kind`: "provide" | "choose"; required - `field`: "depositTxHash" | "refundAddress" | "refundMemo" | null; required Example response: ```json { "id": "0b7e3c9a-5d2f-4f6e-9a41-2c8d7e1f3b65", "kind": "not_received", "state": "received", "timeline": [ { "at": "2026-11-18T18:05:12.000Z", "text": "We received your request." } ], "nextUpdateBy": "2026-11-19T18:05:12.000Z", "action": null } ``` **Errors.** 400: - `invalid_request`: An input is missing or malformed. `details` names the field. Next: Fix the field that `details` names and send again. Sending it unchanged fails the same way.. 401: - `unauthorized`: The call needs proof it did not carry: the API key that owns the resource, or for an order its payout address or `cap`. Next: 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.. 404: - `not_found`: Nothing matches this ID with this proof. A wrong order ID and a wrong payout address answer the same. Next: Check the order ID and the payout address with the user. Do not guess: attempts are limited per order.. 422: - `address_invalid`: A payout or refund address is not valid on its network. `details.field` says which, when it was checked. Next: Ask the user for that address again. Never correct, guess or invent it.. 429: - `rate_limited`: Too many requests from this caller (per IP, or per key once the key is active). Next: Wait `retryAfterMs` milliseconds, then send the same request again.. 503: - `service_paused`: MindSwap paused this briefly (new orders or this endpoint). Next: Wait `retryAfterMs`, then try again.. ### Rewards The points program and its cashback tiers. #### Points program and cashback tiers `GET /v1/rewards/program`. Operation `rewardsProgramGet`. Auth: optional (`apiKey` or `apiKeyBearer`). The 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. **Response 200** (JSON) - `pointsPerUsd`: integer; required - `buybackBps`: integer; required, 0 to 10000 - `tiers`: array of object; required, not empty - `tier`: integer; required - `minPoints`: integer; required - `cashbackBps`: integer; required, 0 to 10000 - `referralBps`: integer; required, 0 to 10000 Example response: ```json { "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 } ] } ``` **Errors.** 429: - `rate_limited`: Too many requests from this caller (per IP, or per key once the key is active). Next: Wait `retryAfterMs` milliseconds, then send the same request again.. 503: - `service_paused`: MindSwap paused this briefly (new orders or this endpoint). Next: Wait `retryAfterMs`, then try again.. ### Keys Your API key's own traffic and limit. #### Read your key's partner fee earnings `GET /v1/partner/earnings`. Operation `getPartnerEarnings`. Auth: `apiKey` or `apiKeyBearer`. The 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. **Response 200** (JSON) - `keyId`: string matching `^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$`; required - `currency`: "USDT"; required - `partnerFeeBps`: integer; required, 0 to 300 - `credited`: decimal string; required - `pending`: decimal string; required - `completedOrders`: integer; required - `openOrders`: integer; required Example response: ```json { "keyId": "0b9f3c52-6d1e-4a7b-9c8d-2e5f1a4b7c90", "currency": "USDT", "partnerFeeBps": 100, "credited": "45", "pending": "12.5", "completedOrders": 3, "openOrders": 1 } ``` **Errors.** 401: - `unauthorized`: The call needs proof it did not carry: the API key that owns the resource, or for an order its payout address or `cap`. Next: 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.. 429: - `rate_limited`: Too many requests from this caller (per IP, or per key once the key is active). Next: Wait `retryAfterMs` milliseconds, then send the same request again.. 503: - `service_paused`: MindSwap paused this briefly (new orders or this endpoint). Next: Wait `retryAfterMs`, then try again.. #### Read this API key's usage `GET /v1/usage`. Operation `getUsage`. Auth: `apiKey` or `apiKeyBearer`. The 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. **Parameters** - `window` (query, optional): "24h" | "7d". `24h` (hourly buckets, the default) or `7d` (daily buckets). **Response 200** (JSON) - `window`: "24h" | "7d"; required - `buckets`: array of object; required - `requests`: integer; required - `errors`: integer; required - `rateLimited`: integer; required - `start`: string matching `^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d:[0-5]\d(?:\.\d+)?(?:Z))$`; required - `totals`: object; required - `requests`: integer; required - `errors`: integer; required - `rateLimited`: integer; required - `lastUsedAt`: string matching `^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d:[0-5]\d(?:\.\d+)?(?:Z))$` | null; required - `limit`: object | null; required - `perMinute`: integer; required - `burst`: integer; required Example response: ```json { "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 } } ``` **Errors.** 400: - `invalid_request`: An input is missing or malformed. `details` names the field. Next: Fix the field that `details` names and send again. Sending it unchanged fails the same way.. 401: - `unauthorized`: The call needs proof it did not carry: the API key that owns the resource, or for an order its payout address or `cap`. Next: 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.. 429: - `rate_limited`: Too many requests from this caller (per IP, or per key once the key is active). Next: Wait `retryAfterMs` milliseconds, then send the same request again.. 503: - `service_paused`: MindSwap paused this briefly (new orders or this endpoint). Next: Wait `retryAfterMs`, then try again.. ## Errors Every error has the same body. Branch on `error.code`, never on `message`. `requestId` is what support needs. ```json { "error": { "code": "rate_limited", "message": "Too many requests", "retryAfterMs": 4000 }, "requestId": "f58736c7-…" } ``` | Code | HTTP | Returned by | | --- | --- | --- | | `address_invalid` | 422 | createOrder, reportIssue | | `amount_out_of_range` | 422 | createOrder | | `cap` | 401 | listOrders, listOrders, createOrder, createOrder, getOrder, getOrder, streamOrderEvents, streamOrderEvents, reportIssue, reportIssue, getPartnerEarnings, getPartnerEarnings, getQuotes, getQuotes, streamQuotes, streamQuotes, getUsage, getUsage | | `create_in_doubt` | 502 | createOrder | | `create_in_progress` | 409 | createOrder | | `details` | 400 | listAssets, listAssets, listOrders, listOrders, createOrder, createOrder, reportIssue, reportIssue, trackOrder, trackOrder, getPair, getPair, getQuotes, getQuotes, quoteRecipients, quoteRecipients, streamQuotes, streamQuotes, getUsage, getUsage | | `idempotency_mismatch` | 422 | createOrder | | `invalid_request` | 400 | listAssets, listOrders, createOrder, reportIssue, trackOrder, getPair, getQuotes, quoteRecipients, streamQuotes, getUsage | | `max` | 422 | createOrder | | `memo_required` | 422 | createOrder | | `min` | 422 | createOrder | | `msk_live_` | 401 | listOrders, createOrder, getOrder, streamOrderEvents, reportIssue, getPartnerEarnings, getQuotes, streamQuotes, getUsage | | `not_found` | 404 | getOrder, streamOrderEvents, reportIssue, trackOrder | | `pair_unavailable` | 422 | createOrder, getQuotes, quoteRecipients, streamQuotes | | `provider_busy` | 503 | createOrder | | `provider_rejected` | 502 | createOrder | | `quote_moved` | 409 | createOrder | | `rate_limited` | 429 | listAssets, listNetworks, listOrders, createOrder, getOrder, streamOrderEvents, reportIssue, trackOrder, getPair, getPartnerEarnings, getQuotes, quoteRecipients, streamQuotes, rewardsProgramGet, getUsage | | `recipient_below_min` | 422 | createOrder | | `route_expired` | 410 | createOrder, quoteRecipients | | `service_paused` | 503 | listAssets, listNetworks, listOrders, createOrder, getOrder, streamOrderEvents, reportIssue, trackOrder, getPair, getPartnerEarnings, getQuotes, quoteRecipients, streamQuotes, rewardsProgramGet, getUsage | | `too_many_open_orders` | 429 | createOrder | | `unauthorized` | 401 | listOrders, createOrder, getOrder, streamOrderEvents, reportIssue, getPartnerEarnings, getQuotes, streamQuotes, getUsage | Any endpoint can also answer `internal` (500). ## Agent guide This guide is for anyone who builds an agent or an app that swaps crypto through MindSwap: an assistant, a checkout bot, a trading tool. The user sends a deposit and receives the payout at their own address. MindSwap never holds their funds. A swap needs no API key and no account. There are three ways in, and all three use the same public API: | Channel | Use it when | Get it | | --- | --- | --- | | MCP server | Your agent speaks MCP | `npx -y @mindswap/mcp`, or hosted at `https://api.mindswap.io/mcp` | | TypeScript SDK | You write the code yourself | `npm install @mindswap/sdk` | | HTTP API | Any other language | `https://api.mindswap.io/v1`, described by `https://api.mindswap.io/openapi.json` | ### Swap in under 10 minutes #### Over MCP Add the server to your client. Nothing else is needed: no key and no install step. ```json { "mcpServers": { "mindswap": { "command": "npx", "args": ["-y", "@mindswap/mcp"] } } } ``` That works in Claude Desktop, Cursor and every client that reads `mcpServers`. In Claude Code, run `claude mcp add mindswap -- npx -y @mindswap/mcp`. For the hosted server, use `{ "type": "http", "url": "https://api.mindswap.io/mcp" }`, or in Claude Code run `claude mcp add --transport http mindswap https://api.mindswap.io/mcp`. Then ask the agent: "Swap 0.01 BTC to USDT on Tron". It calls `get_quote`, asks the user to confirm and give their Tron address, calls `create_order`, shows the deposit instructions, and follows the order with `wait_for_order`. #### With the SDK ```sh npm install @mindswap/sdk ``` Save this as `swap.mjs` and run `node swap.mjs `: ```js import { MindSwap } from '@mindswap/sdk' const ms = new MindSwap() // no API key needed; MINDSWAP_API_KEY is used when set const swap = await ms.swap({ from: 'btc:bitcoin', // the user sends BTC on Bitcoin to: 'usdt:tron', // and receives USDT on Tron amountIn: '0.01', // whole BTC, as a string payoutAddress: process.argv[2] ?? '', // the user's own Tron address, never a guess }) console.log(swap.instructions) // show this to the user: what to send, where, and by when const order = await swap.wait({ onUpdate: (o) => console.log('status:', o.status) }) console.log(`Order ${order.id} ended as ${order.status}`) ``` `swap()` quotes, takes MIND's route (our recommended pick), creates the order with one idempotency key, and returns the instructions to show the user. `wait()` resolves when the order is final. ### Rules that keep the user's money safe - **Amounts** are decimal strings in whole units of the asset: `"0.05"` BTC. Never a number, satoshi or wei. - **Asset IDs** are `:` in lower case: `usdt:tron`. One symbol on two networks is two assets, so ask the user which network they mean. - **Addresses** come from the user. Never guess, invent, reuse or correct one. A fixed-rate route also needs a refund address on the send network. - **Deposit instructions** are shown exactly. The user sends exactly that amount, of that asset, on that network, to that address, with the memo when there is one, before the deadline. - **`create_in_doubt`**: the provider may or may not have made the order. Never create it again, tell the user not to send funds, and contact support with the `requestId`. - **Retries are safe only with the same idempotency key.** The SDK reuses one key on every automatic retry. The MCP server derives its key from `intentId` and the inputs: - The same `intentId` with the same inputs returns the same order. Use this to retry. - A new `intentId` is a new order, even for an identical swap. Never reuse an `intentId` for a second confirmation: the user would get the first order's instructions again and pay that order twice. - **`quote_moved`**: no order was made because the rate changed. Show the fresh route to the user. If they accept, create with its `routeId`. - **Float and private routes do not guarantee `amountOut`.** The rate settles when the deposit arrives. A fixed route locks `amountOut` for the exact deposit amount, sent before the deadline. - **Rate limits**: wait `retryAfterMs`, then call again. ### The flow, step by step 1. **Find the assets.** `list_assets` or `assets(query)` searches every asset any provider can swap, most popular first. `list_networks` or `networks()` gives the network codes. `check_pair` or `pairs({ from, to })` says whether any provider lists a pair, without an amount. 2. **Quote.** `get_quote` or `quote()`. MIND, the first route, is our recommended pick. Show the user `amountOut` and `fees.totalUser`. A route's `routeId` stops working at its `expiresAt`, after which you quote again. 3. **Confirm with the user.** They confirm the route and give a payout address, and a refund address for a fixed route. 4. **Create.** `create_order` or `createOrder()`, with the route's `routeId` and `pickedBy` unchanged (MCP also takes `rateType` and a new `intentId`). `swap()` does steps 2 to 4 in one call. - **Multi-wallet** (several payout wallets, HTTP and SDK only): only a float route of MIND or one of its exchange venues. Send `recipients` (1 to 1000: `address`, `memo`, `percent` with up to 2 decimals, `venue` or null for MIND, `delayMinutes` 0 to 1440) and `payout: null`. The percents must add up to exactly 100. `POST /v1/quotes/recipients` gives each wallet's estimate and its exchange's minimum payout first. A wallet under its minimum answers `recipient_below_min`. These orders take no refund address, and their deposit deadline is an estimate. 5. **Show the deposit instructions.** `order.depositInstructions.summary` (MCP), `swap.instructions` or `depositInstructions(order)` (SDK). - `expiresSource: "provider"`: the provider enforces the deadline. A deposit that arrives later may be refunded or lost. - `expiresSource: "estimate"`: the provider gives no deadline, so this is our estimate. The user should still send before it. 6. **Follow the status.** `wait_for_order` returns when the status changes or the order is final. In the SDK, use `swap.wait()`, `swap.updates()` or `orderEvents()`. Without a key, the payout address is the proof that opens the order: `payoutAddress` in MCP, `{ payoutAddress }` in the SDK, the `X-Payout-Address` header over HTTP. - `deposit.received` is the amount the provider reports as arrived. It stays null until something arrives. Never tell the user that `deposit.amount` arrived: that is only what the order asked for. - A multi-wallet order lists every wallet in `recipients` with its `state`. `partially_completed` means some wallets were paid and the others failed. Report an issue for the failed share. 7. **Problems.** If the payout does not arrive, the deposit was late, on the wrong network or in the wrong amount, or the user wants a refund, use `report_issue` or `reportIssue()`. The proof is the payout address. Each order has one open issue, and another report adds to it. Follow it in `order.issue`. ### End-user headers The provider behind MIND float and private routes and the exchange-venue rows refuses an order unless the create carries the end user's language and time zone. Without them, the create answers `provider_rejected` ("This route needs browser details we did not receive"). - `Accept-Language`: a BCP 47 tag, for example `en-US`. - `X-Client-Timezone`: an IANA zone, for example `Europe/Berlin`. The SDK and the local MCP server send their own machine's values from `Intl`, because they run where the user is. The hosted MCP server's machine is not the user's, so it sends only what the agent passes in `create_order` (`endUserLanguage`, `endUserTimeZone`). A server that creates orders for many users passes each user's own with `{ endUser: { language, timeZone } }`. Never send a made-up value. ### API keys Swaps need no key. A key is for a business or agent that wants its own limit, its own data and a partner fee. - Create a key in your MindSwap account. Keys look like `msk_live_…`. Send one as `x-api-key`, or as `Authorization: Bearer msk_live_…`. - A key works as soon as it is created, on the anonymous per-IP limits. It can create and read its own orders at once. - It becomes active when an order made with any of the account's keys completes, or when the account already owns a completed order. - An active key gets one limit, whatever the account: 1200 requests a minute, burst 200, counted per key. It replaces the per-IP limits for that key. - Without a key (or before activation), the per-IP limits apply, for example 20 creates, 120 quotes and 30 tracking calls a minute. - Every rate-limited answer is `429 rate_limited` with `retryAfterMs` and a `Retry-After` header. Keyed answers also carry `RateLimit-Limit`, `RateLimit-Remaining` and `RateLimit-Reset`. - Read your usage with `GET /v1/usage?window=24h|7d` (`usage()`, `get_usage`): the key's requests, errors and rate-limited calls per hour or day, and its limit. The limit is null while the key is inactive. - Read your orders with `GET /v1/orders?status=&limit=&cursor=` (`orders()`, `list_my_orders`): the orders created with the key, newest first. - Never put a key in a prompt, a log or a tool result. The SDK and the MCP server never return it. ### Partner fee A business may add its own fee to the orders made with its key. It is the only pricing there is: no volume plans and no tiers. - Set `partnerFeeBps` on a key in your account, from 0 to 300 basis points (0 to 3 %). The default is 0. A key with a fee is a business key: its orders earn the partner fee and no points, cashback or referral share. Setting the fee back to 0 makes it a personal key again. A change applies to orders created after it. - Quotes made with that key carry `fees.partner` (in the send asset) on every route, and `fees.totalUser` includes it. A route whose provider cannot carry the exact total fee on that order is left out of the key's quotes. The fee is never dropped silently and never rounded up. - The fee is charged through each provider's per-order fee field and credited to your account's USDT balance when the order completes. You withdraw it through the normal payout flow. - `GET /v1/partner/earnings` (`partnerEarnings()`, `get_partner_earnings`) answers `{ keyId, partnerFeeBps, currency: "USDT", credited, pending, completedOrders, openOrders }`. `pending` is the fee on open orders at quote value, an estimate. ### MCP tools | Tool | Inputs | Returns | | --- | --- | --- | | `list_networks` | none | Every network: `id`, `name`, `family`, `assetCount`. | | `list_assets` | `search`, `network`, `limit` (1-500), `cursor` | Asset IDs most popular first, with `memo` ("required" means `create_order` needs `payoutMemo`). | | `check_pair` | `from`, `to` | `available` and the providers that list the pair. | | `get_quote` | `from`, `to`, `amountIn`, `maxRoutes`, `waitMs` | Routes, MIND first, each with `routeId`, `rateType`, `pickedBy`, `amountOut`, `fees`, `min`, `max`, `expiresAt`. | | `create_order` | `routeId`, `rateType`, `pickedBy`, `payoutAddress`, `payoutMemo`, `refundAddress`, `refundMemo`, `intentId`, `endUserLanguage`, `endUserTimeZone` | The order with `depositInstructions` and `nextSteps`. | | `wait_for_order` | `orderId`, `payoutAddress` or `cap`, `knownStatus`, `timeoutSeconds` (5-300) | The order, `changed`, `timedOut`. | | `get_order` | `orderId`, `payoutAddress` or `cap` | The order and `nextSteps`. | | `track_order` | `orderId`, `payoutAddress` | The order and a 24 h read-only `cap`. | | `report_issue` | `orderId`, `kind`, `payoutAddress` or `cap`, `depositTxHash`, `refundAddress`, `refundMemo`, `email`, `details` | The issue: `state`, `timeline`, `nextUpdateBy`, `action`. | | `list_my_orders` | `status`, `limit`, `cursor` | Key only. The key's orders. | | `get_usage` | `window` | Key only. The key's traffic and limit. | | `get_partner_earnings` | none | Key only. The partner fee earned. | The key-only tools are listed only when the server holds a key, so an agent without one never sees a tool it cannot use. A failed call returns `isError: true` with `{ "error": { code, message, nextStep, retryAfterMs, requestId, details } }`. `nextStep` comes from the error catalog below. Running it yourself: `npx -y @mindswap/mcp` (stdio) or `npx -y @mindswap/mcp --http` (streamable HTTP on `127.0.0.1:8787/mcp`). In HTTP mode each request sends its own `x-api-key`, and the server never uses a key from its environment. The Host header must be on `MCP_ALLOWED_HOSTS`, and a request with an Origin header must come from `MCP_ALLOWED_ORIGINS` (default none). Each client IP gets 120 requests a minute (burst 40), and a body over 64 KiB answers 413. The package README lists every variable. ### SDK methods | Method | Endpoint | Notes | | --- | --- | --- | | `swap(input, { idempotencyKey?, endUser? })` | quote, then `POST /v1/orders` | The whole swap. Returns `order`, `route`, `instructions`, `idempotencyKey`, `wait()`, `updates()`. | | `assets()` | `GET /v1/assets` | The assets the website lists, with networks and venues. Cached with ETag. | | `assets(query)`, `allAssets(query)` | `GET /v1/assets?q=&network=&category=&sort=&limit=&cursor=` | The full catalog, page by page. | | `networks()` | `GET /v1/networks` | Every network with a swappable asset. | | `pairs({ from, to })` | `GET /v1/pairs` | Whether a pair has routes, from the catalog alone. | | `quote(req)`, `quoteStream(req)` | `GET /v1/quotes`, `/v1/quotes/stream` | Every route; the stream adds late routes. | | `createOrder(input, opts)` | `POST /v1/orders` | Create from a picked route. Works without a key. | | `getOrder(id, { payoutAddress?, cap? })` | `GET /v1/orders/{id}` | One read. | | `trackOrder(id, payoutAddress)` | `POST /v1/orders/track` | Any order. Returns `{ order, cap }`. | | `orderEvents(id, { payoutAddress?, cap?, lastEventId? })` | `GET /v1/orders/{id}/events` | Live updates over SSE. Resumes after a drop. | | `reportIssue(id, issue, { cap? })` | `POST /v1/orders/{id}/issues` | A problem with an order. | | `orders(query)`, `allOrders(query)` | `GET /v1/orders` | Key only. The key's orders. | | `usage({ window })` | `GET /v1/usage` | Key only. | | `partnerEarnings()` | `GET /v1/partner/earnings` | Key only. | An endpoint the server does not have yet throws `NotAvailableError` (`not_available`). The MCP tools fall back where they can: `list_networks` and `list_assets` read the website's catalog instead. Every error carries `code`, `nextStep`, `retryAfterMs` and `requestId`. The SDK README has the details on retries and crash recovery. ### Errors Every error answer is `{ "error": { "code", "message", "retryAfterMs"?, "details"? }, "requestId" }`. Branch on `code`. | Code | HTTP | Meaning | What to do | | --- | --- | --- | --- | | `invalid_request` | 400 | An input is missing or malformed. `details` names the field. | Fix the field that `details` names and send again. Sending it unchanged fails the same way. | | `unauthorized` | 401 | The call needs proof it did not carry: the API key that owns the resource, or for an order its payout address or `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. | | `not_found` | 404 | Nothing matches this ID with this proof. A wrong order ID and a wrong payout address answer the same. | Check the order ID and the payout address with the user. Do not guess: attempts are limited per order. | | `rate_limited` | 429 | Too many requests from this caller (per IP, or per key once the key is active). | Wait `retryAfterMs` milliseconds, then send the same request again. | | `route_expired` | 410 | The routeId is past its `expiresAt`. Nothing was created. | Quote again and confirm the new route with the user. | | `quote_moved` | 409 | The rate changed or the route stopped running before the order was made. Nothing was created. `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. | | `pair_unavailable` | 422 | No provider can swap this pair right now, or the pair is not listed. | Try another pair, or the same pair later. | | `amount_out_of_range` | 422 | The amount is outside what the provider accepts right now. Nothing was created. | Quote again and pick an amount within the route's `min` and `max`. | | `address_invalid` | 422 | A payout or refund address is not valid on its network. `details.field` says which, when it was checked. | Ask the user for that address again. Never correct, guess or invent it. | | `memo_required` | 422 | The address needs a memo (destination tag) on this network. | Ask the user for the memo and send it with the address. | | `recipient_below_min` | 422 | In a multi-wallet order, a wallet's share is below its exchange's minimum payout. `details.below[].index` lists them. | Raise those shares or remove those wallets, then create again. | | `idempotency_mismatch` | 422 | This idempotency key was already used with other inputs. | To retry, send exactly the original inputs with the same key. For a new swap the user confirmed, use a new key. | | `create_in_progress` | 409 | An order with this idempotency key is still being created. | Wait `retryAfterMs`, then send the same request with the same key. It returns that order and never makes a second one. | | `create_in_doubt` | 502 | The provider may or may not have made the order, and MindSwap cannot tell which. | STOP. Do not create again for this swap, with any key, and tell the user not to send funds. Contact MindSwap support with `requestId`. | | `provider_rejected` | 502 | The provider refused the order. Nothing was created and nothing is owed. "This route needs browser details" means the end user's language and time zone were missing. | Quote again and pick another route. Send the end user's own language and time zone (Accept-Language, X-Client-Timezone) with the create. | | `order_not_claimable` | 409 | This order cannot be added to this account. | Tell the user. Retrying does not help. | | `already_claimed` | 409 | The order already belongs to a MindSwap account. | Sign in to that account to see it. | | `duplicate` | 409 | That item already exists. | Use the existing one. Do not create it again. | | `stale_version` | 412 | The item changed after you read it. | Read it again, apply the change to the fresh copy, and send again. | | `wallet_linked_elsewhere` | 409 | This wallet is linked to another MindSwap account. | Unlink it from the other account first, or use another wallet. | | `has_open_balance` | 409 | The account still holds a balance or an open payout. | Withdraw the balance and let open payouts finish first. | | `payout_below_minimum` | 422 | The withdrawal is below the minimum payout. | Wait until the balance reaches the minimum, then withdraw. | | `insufficient_balance` | 409 | The balance is lower than the amount asked for. | Ask for at most the available balance. | | `payout_open` | 409 | A payout is already in progress for this account. | Wait until it finishes, then try again. | | `payouts_frozen` | 503 | Payouts are paused for a check. Balances are safe. | Try again later. | | `key_revoked` | 409 | This API key was revoked, or rotated with a grace period, so its settings no longer change. Its replacement holds them. | Change the setting on the key that replaced it, or create a new key. | | `too_many_open_orders` | 429 | This caller already has as many unpaid orders open as it may (the limit is in the message). Nothing was created and no provider was asked. | Pay one of the open orders, or wait until one expires, then create again. Do not retry in a loop: the answer stays the same until an order is paid or expires. | | `provider_busy` | 503 | The provider behind this route had no capacity for a new order within about 10 seconds. Nothing was created. | Wait `retryAfterMs`, then send the same request again with the same idempotency key, or pick another route. | | `service_paused` | 503 | MindSwap paused this briefly (new orders or this endpoint). | Wait `retryAfterMs`, then try again. | | `internal` | 500 | An unexpected error on the MindSwap side. | Try again once a little later. A create may only be resent with the same idempotency key. If it repeats, contact support with `requestId`. | | `network_error` | none | No answer arrived: DNS, a reset connection, or no network. | Try again. A create resent with the same idempotency key never makes a second order. Before resending an issue report, read the order and check `order.issue`. | | `timeout` | none | No answer arrived in time. | Try again. A create resent with the same idempotency key never makes a second order. Before resending an issue report, read the order and check `order.issue`. | | `bad_response` | none | The answer was not MindSwap API JSON (a proxy page, or a stream cut short). | Try again later. If it repeats, check the base URL. | | `not_available` | none | This endpoint is not on this MindSwap server yet. | Use the fallback the method describes, or try again after the next API release. |