Amounts are integer base units (wei-style) as strings. mode:"all" returns every venue so you can see what we beat.
curl -s https://dex.mk/v1/quote \
-H 'content-type: application/json' \
-d '{
"sell": { "chain": "base", "address": "0x4200000000000000000000000000000000000006", "symbol": "WETH" },
"buy": { "chain": "base", "address": "0x833589fcd6edb6e08f4c7c32d4f71b54bda02913", "symbol": "USDC" },
"amount": "100000000000000000",
"mode": "all"
}'
Pass the winning source from the quote plus your taker address. You get back EVM to/data/value (or a Solana base64 tx) and a verification block.
curl -s https://dex.mk/v1/tx \
-H 'content-type: application/json' \
-d '{
"source": "lifi",
"request": {
"sell": { "chain": "base", "address": "0x4200000000000000000000000000000000000006" },
"buy": { "chain": "base", "address": "0x833589fcd6edb6e08f4c7c32d4f71b54bda02913" },
"amount": "100000000000000000",
"taker": "0xYOUR_ADDRESS"
}
}'
No dependency needed: confirm verification.routerAllowlisted and cross-check tx.to + feeRecipient against /v1/meta. Or use the bluedex-sdk helper, which pins the router allowlist + treasury inside the package so a compromised blueDEX server cannot trick a verifying client. Sign only if ok is true.
import { verifyTx } from "bluedex-sdk";
const tx = await (await fetch("https://dex.mk/v1/tx", {
method: "POST", headers: { "content-type": "application/json" },
body: JSON.stringify({ source, request })
})).json();
const verdict = verifyTx(tx);
if (!verdict.ok) throw new Error(verdict.failures.join("; ")); // do NOT sign
// ...sign tx.to / tx.data / tx.value with your wallet
Point any MCP client at the endpoint below — Streamable HTTP, stateless, no key. Tools: get_swap_quote, build_swap_transaction, get_chart, get_meta, list_instant_assets, create_instant_shift, get_instant_status, sweep_dust, list_onramps, plan_route.
https://dex.mk/mcp
Claude Code / Claude Desktop:
claude mcp add --transport http blueDEX https://dex.mk/mcp
| method | path | what |
|---|---|---|
| POST | /v1/quote | best route across venues (+ all venues) |
| POST | /v1/tx | unsigned tx + verification block |
| GET | /v1/chart?chain=&address=&tf=1h | OHLCV candles |
| GET | /v1/tokens?chain=base | curated token lists (any address routes) |
| GET | /v1/meta | treasury, router allowlist, fees — audit us |
| GET | /v1/onramps | reputable low-KYC fiat on-ramps (human page: /fund) |
| POST | /v1/route | cheapest multi-hop route (DEX + bridge legs, all fees + custody shown) |
| POST | /v1/sweep | consolidate dust balances into one token (tiny fee, one leg) |
| GET | /v1/sweep/detect?wallet=&chain= | auto-detect sweepable dust (best-effort) |
| GET | /v1/instant/assets | instant-lane assets — Tron/USDT-TRC20, BTC, … |
| GET | /v1/instant/quote?from=&to=&amount= | indicative instant rate + min/max |
| POST | /v1/instant/create | open an instant shift (returns a deposit address) |
| GET | /v1/instant/status/:id | instant shift status |
| POST | /v1/attest | signed agent attestation |
| ALL | /mcp | MCP server (Streamable HTTP) |
| GET | /openapi.json | OpenAPI 3.1 spec |
| GET | /llms.txt | LLM-readable summary |
Consolidate a pile of tiny leftover balances into one token (default USDC) in a single call. You pass the dust list — you already know your own balances — and get a plan of unsigned, gas-positive swaps. The whole tiny fee (0.1% of the total) rides one leg; below a small floor it's free. Non-custodial: approve each leg's approvalTarget and sign.
curl -s https://dex.mk/v1/sweep \
-H 'content-type: application/json' \
-d '{
"wallet": "0xYOUR_ADDRESS",
"chain": "base",
"dust": [
{ "address": "0x4200000000000000000000000000000000000006", "amount": "5000000000000000" },
{ "address": "0x50c5725949a6f0c72e6c4a641f24049a917db0cb", "amount": "2000000000000000000" }
]
}'
Machine-actionable: { code, message, retryable }. Codes: GEO_BLOCKED · VENUE_PAUSED · NO_ROUTE · AMOUNT_TOO_SMALL · UPSTREAM_ERROR · RATE_LIMITED · PAYMENT_REQUIRED · INVALID_REQUEST · INCIDENT.