Using the API
Quote swaps, get a one-time deposit address for your user and follow the swap, with an optional commission paid to your own wallet.
Updated
The swap API is JSON over HTTPS. Your app quotes a swap, gets a one-time deposit address from the route, and follows the swap until the new coin reaches your user's wallet. Plaxswap compares NEAR Intents and Relay for these swaps and never holds the coins. Rates float: there are no fixed quotes. Each request is shown on the developers page, and the machine-readable reference is at /api/v1/openapi.json.
The four calls
GET /api/v1/dex/coinslists the coins and their ids.POST /api/v1/dex/routesreturns the routes for an amount, with what your user receives, the least they receive, the fees and the time. Sendpay: "send"and your user's payout address intoAccount.POST /api/v1/dex/buildwith a route id returns the deposit address and the exact amount to send. A route id is valid for 2 minutes.GET /api/v1/dex/statusfollows the swap by that address until it showsSUCCESS,REFUNDEDorFAILED.
What you need
- A partner key, sent in the
x-api-keyheader. Get one on the partner page. - Your user's IP address in the
x-user-ipheader, so the country rules apply to your user and not to your server. Swaps are refused in sanctioned countries. - Your user's refund address on the sending network, sent as
account, when the routes answer saysrefundNeeded.
Your commission
Add commissionBps, up to 2%, and commissionTo, your EVM wallet. The route pays the commission straight to that wallet: on Relay you claim it at relay.link, and on NEAR Intents you withdraw it at near-intents.org, where NEAR keeps half of it. Your users see the commission inside the quote.
The older order API
New orders through the order API, with order tokens and order webhooks, have been closed since 2 November 2026. The swap API above replaces it. To take payments on your own site, the payment gateway API has its own keys and signed webhooks.
Requests are rate limited per IP address (your user's, with a partner key). Errors come back as JSON with a code and a plain message, listed on the developers page.