Base URL
Authentication
Every authenticated request must include your API key (a UUID) in thex-api-key header:
GET /chains and GET /source-config are public and do not require a key. A missing key returns 401 UNAUTHORIZED; an invalid key returns 403 FORBIDDEN.
Pagination
List endpoints are cursor-paginated by creation time (newest first).
Each response includes
nextCursor; pass it back as cursor for the next page. When nextCursor is null, there are no more pages.
Errors
Error shape
All API errors, plus theerror field on a swap and on a status_changed event, share one structured shape:
{ "error": { ... } } with an appropriate HTTP status. Always branch on code (a stable enum) rather than message (which may be reworded). details, when present, holds only safe, parameterized context (numbers, ids, thresholds), never raw internal exception text.
Error codes
On a swap,
error.retryable also reflects state: a dead (terminal) item always reports retryable: false, because the worker will not try it again regardless of the code.Get a deposit address
You don’t call the deposit address service to mint a deposit address. You get one from the Mayan Quote API. Request a quote withmpsDeposit: true and a destinationAddress, then read mpsDepositAddress off any eligible quote. The address is deterministic and permanent for a given recipient, and Mayan settles anything sent to it automatically.
See Deposit address on the Quote API for the request/response shape and eligibility rules.
List deposit addresses
Paginated deposit addresses that have been created for the authenticated integrator (each is minted the first time you request a quote withmpsDeposit: true for a new recipient).
List swaps
Paginated settlement status for your deposit addresses. This is the endpoint to poll for payment progress. Each item is a settlement request: Mayan sweeps the wallet’s balance oftokenAddress on chainId and delivers it to the destination.
chainIdis the Wormhole chain ID the funds are on;tokenAddressis the token being settled.amountis a best-effort snapshot for display (raw smallest-unit string, ornullfor a request-indexed settlement). The actual settled amount is the wallet’s live balance at swap time.errorisnullunless the item is failing/deferred. A non-nullerrornever means success.- See Swap Statuses for
status/phase/category/terminal, andswapTxHashfor the settlement transaction (view it on Mayan Explorer).
Request index
Trigger settlement for a token the scanner doesn’t auto-detect. Only whitelisted tokens (native + USDC on EVM; SOL/USDC/USDT/WETH/WSOL on Solana) are detected automatically. For any other token, call this with one of your deposit addresses (anmpsDepositAddress from a quote), the token, and the chain. Mayan queues a settlement and the worker sweeps the wallet’s live balance. If a settlement for that wallet+token is already active, the call is deduped.
Example
queueItemIdis the settlement id (nullwhen not queued). Track it viaGET /swapsandstatus_changedevents.- When
queuedisfalse,reasonexplains why:"already_queued"(a settlement for this wallet+token is already active; the in-flight one will sweep the new balance too),"below_token_min"(below the token’s configured minimum), or"below_min"(below the chain’s USD floor). - Returns
404 NOT_FOUNDifwalletAddressis not one of your registered deposit addresses.
Chain info
Supported chains with their block-explorer URLs. No authentication required.kind is "evm" or "svm". This lists every chain (as a destination or explorer target); to discover which source chains and tokens the scanner actually detects and settles, use GET /source-config.
Source config
The source chains and tokens the scanner auto-detects and settles, with the minimum deposit advertised per token. No authentication required. Poll this instead of hardcoding a list. The minimums here are the same ones the deposit gate enforces, so they never drift. Any token not listed can still be settled on demand viaPOST /request-index.
SOL vs. WSOL on Solana. Both are auto-detected, as two separate entries pointing at two different balances.
SOL (standard: "native", address 1111…1111) is native lamports sent to the vault address with a plain system transfer. WSOL (standard: "spl", address So1111…1112) is the wrapped-SOL SPL token held in the vault’s token account. Match the entry to what you actually send, and pass that same address to POST /request-index if you ever need to trigger one manually.A deposit below the advertised minimum is detected but not settled. You still get a
deposit_detected event with queued: false and ignoredReason: "below_token_min" (or "below_min" for the chain-level USD floor). See deposit_detected.Event replay
Fetch this integrator’s events in chronological order, used to catch up after a WebSocket disconnect. Events are retained for 30 days.
Response (ascending by time):
nextCursor until it is null. See Delivery & replay for the full pattern.