Skip to content

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/coins lists the coins and their ids.
  • POST /api/v1/dex/routes returns the routes for an amount, with what your user receives, the least they receive, the fees and the time. Send pay: "send" and your user's payout address in toAccount.
  • POST /api/v1/dex/build with 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/status follows the swap by that address until it shows SUCCESS, REFUNDED or FAILED.

What you need

  • A partner key, sent in the x-api-key header. Get one on the partner page.
  • Your user's IP address in the x-user-ip header, 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 says refundNeeded.

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.

Did this not answer your question?

Send us your order number, swap page link or transaction id, and tell us what happened.

Contact support

Using Plaxswap means you accept our terms and privacy notice, recorded with your IP address and browser details. Extra cookies are optional.