Skip to content

Updated 10 Nov 2026

Crypto swap API documentation

Quote and create swaps from your own app or site. Payouts go straight to your user's address. You can add your own commission on top of the rate. On the swap form's decentralized routes (/api/v1/dex), a commission also needs commissionTo, the EVM wallet the route pays it to.

OpenAPI 3.1 reference/api/v1/openapi.json

Every endpoint, request and response field, error and webhook, in a format API tools and code generators read.

Taking payments on your website? Use the payment gatewayCreate a payment, send your customer to our checkout, get a signed webhook. Quickstart, webhooks, code samples and test mode.

Overview

JSON over HTTPS. Coin amounts are decimal strings in coin units ("0.015"), never floats. US dollar values are numbers. Times are ISO 8601 strings in UTC. A coin on a particular network is a method, with an id such as btc, eth-base or usdt-tron: use those ids for from and to.

Sandbox

A build running in sim mode is the sandbox: every chain is simulated and no real coins move. The same endpoints work, plus two developer helpers that only exist outside mainnet: POST /api/dev/deposit sends a test deposit to an order (with a clean, high_risk or sanctioned scenario) and POST /api/dev/mine mines blocks so it confirms. GET /api/v1/meta tells you which mode you are talking to.

Move a sandbox order through every step
BASE=http://localhost:4200
curl -s -X POST "$BASE/api/dev/deposit" -H "content-type: application/json" \
  -d '{"orderId":"ORDER_ID","scenario":"clean"}'
curl -s -X POST "$BASE/api/dev/mine" -H "content-type: application/json" -d '{"blocks":3}'

Authentication

Partner requests carry an API key in the x-api-key header (Authorization: Bearer also works). Keys look like pxk_<prefix>_<secret> and are shown only once: get one on the partner page (it works at once, within starter limits we can raise). Requests without a key are treated as a regular visitor with no commission. A wrong or switched-off key gets 401 invalid_api_key.

End-user IP

Country rules apply to the person swapping, not to your server. With an API key, every request that prices or creates something must send that person's public IP address in x-user-ip. Requests without it fail with user_ip_required, and private or reserved addresses with user_ip_invalid. If you know the person's country (for example from Cloudflare's CF-IPCountry), send it too, as two letters in x-user-country: we use it when we cannot place the IP address ourselves. You vouch for it as for the IP address.

Rate limits

Limits count requests per IP address (your end user's, with an API key). Going over returns HTTP 429 with the code rate_limited. Endpoints not listed here have no fixed limit, but cache /api/v1/coins: it changes rarely.

EndpointLimit
GET /api/v1/pair120 per minute
GET /api/v1/prices/history120 per minute
POST /api/v1/quotes20 per minute
POST /api/v1/orders10 per minute
POST /api/v1/orders/{id}/aml10 per IP address and minute
POST /api/v1/orders/{id}/aml/documents20 per IP address and minute
POST /api/v1/kyc/{id}/submit10 per minute
POST /api/v1/payment-links10 per minute without an API key, 60 with one
GET /api/v1/payment-links/{id}120 per minute
POST /api/v1/payment-links/{id}/quote20 per minute
POST /api/v1/payment-links/{id}/orders10 per minute
GET /api/v1/payment-links/{id}/payments60 per minute
POST /api/v1/payment-links/{id}/cancel60 per minute
GET /api/v1/alerts60 per minute
POST /api/v1/alerts10 per 10 minutes
GET /api/v1/alerts/{id}60 per minute
DELETE /api/v1/alerts/{id}30 per minute
GET /api/v1/telegram60 per minute
POST /api/v1/telegram/webapp30 per 10 minutes
GET /api/v1/account120 per minute
POST /api/v1/account10 per minute
POST /api/v1/account/restore10 per minute, 30 per hour
POST /api/v1/account/key10 per minute
POST /api/v1/account/forget20 per minute
GET /api/v1/account/orders120 per minute
POST /api/v1/account/orders/{id}/access30 per minute
GET /api/v1/account/addresses120 per minute
POST /api/v1/account/addresses30 per minute
PATCH /api/v1/account/addresses/{id}30 per minute
DELETE /api/v1/account/addresses/{id}30 per minute
GET /api/v1/account/referrals120 per minute
GET /api/v1/account/withdrawals120 per minute
POST /api/v1/account/withdrawals5 per minute
GET /api/v1/partner60 per minute
POST /api/v1/partner/signup3 per hour
GET /api/v1/partner/orders60 per minute
GET /api/v1/partner/withdrawals60 per minute
POST /api/v1/partner/withdrawals5 per minute
POST /api/v1/consent20 per minute
POST /api/v1/support20 tries per 10 minutes, 5 new requests per hour
GET /api/v1/support/{id}60 per minute
POST /api/v1/support/{id}/messages10 per 10 minutes
POST /api/v1/assistantset by Plaxswap (20 per 10 minutes by default)
POST /api/v1/assistant/event20 per 10 minutes
POST /api/v1/merchant/security/approve10 approvals per minute per merchant, plus persisted five-attempt/five-minute lock
GET /api/v1/merchant/swaps300 requests a minute per key (Admin can change it)
POST /api/v1/merchant/swaps300 requests a minute per key (Admin can change it)
POST /api/v1/merchant/swaps/quote300 requests a minute per key (Admin can change it)
POST /api/v1/merchant/swaps/cancel300 requests a minute per key (Admin can change it)
PATCH /api/v1/merchant/swaps/preferences300 requests a minute per key (Admin can change it)
GET /api/v1/payments300 requests a minute per key (Admin can change it)
POST /api/v1/payments300 requests a minute per key (Admin can change it)
GET /api/v1/payments/{id}300 requests a minute per key (Admin can change it)
POST /api/v1/payments/{id}/cancel300 requests a minute per key (Admin can change it)
POST /api/v1/payments/{id}/simulate300 requests a minute per key (Admin can change it)
GET /api/v1/gateway/coins60 per minute per IP address
GET /api/v1/merchant300 requests a minute per key (Admin can change it)
PATCH /api/v1/merchant300 requests a minute per key (Admin can change it)
POST /api/v1/merchant/keys300 requests a minute per key (Admin can change it)
PATCH /api/v1/merchant/keys/{id}300 requests a minute per key (Admin can change it)
POST /api/v1/merchant/webhook-secret300 requests a minute per key (Admin can change it)
GET /api/v1/merchant/webhooks300 requests a minute per key (Admin can change it)
POST /api/v1/merchant/webhooks/test300 requests a minute per key (Admin can change it)
POST /api/v1/merchant/webhooks/{id}/resend300 requests a minute per key (Admin can change it)
POST /api/v1/merchants/signup10 per hour per IP address
GET /api/v1/checkout/{id}240 per minute
POST /api/v1/checkout/{id}/quote15 per minute
POST /api/v1/checkout/{id}/pay10 per minute
POST /api/v1/checkout/{id}/simulate20 per minute

Two more limits protect the service: at most 10 new orders per device per hour (velocity_limit), and at most 6 open live streams per IP address (too_many_streams).

Swap API flow

This is the way to run swaps from your app or site today. The user sends coins to a one-time deposit address and the new coin goes straight to their own wallet. Plaxswap compares NEAR Intents and Relay for these deposit swaps and never holds the coins: the deposit address belongs to the route. Rates float; there are no fixed rates.

1. Coins

GET /api/v1/dex/coins lists the coins and their ids (add ?list=v2 for about 200 more popular coins). Cache it for a minute or more.

2. Routes

Ask for routes with the amount to send and pay set to send. toAccount is the user's payout address. When the answer has refundNeeded: true, ask again with account, the user's own address on the sending network, where a failed swap is refunded. For your commission, add commissionBps (0 to 200) and commissionTo, your EVM wallet.

Routes for 0.01 BTC to ETH
curl -s "$BASE/api/v1/dex/routes" \
  -H "content-type: application/json" \
  -H "x-api-key: $PX_KEY" \
  -H "x-user-ip: 203.0.113.7" \
  -d '{"from":"btc","to":"eth","amount":"0.01","pay":"send",
       "toAccount":"0xUSER_PAYOUT_ADDRESS","account":"bc1qUSER_REFUND_ADDRESS",
       "commissionBps":50,"commissionTo":"0xYOUR_WALLET"}'

Each route has an id, the provider, toAmount, toAmountMin (the least the user gets), providerFeePct, plaxswapFeePct, partnerFeePct and seconds, the expected time. Best first. Plaxswap's fee is at most 0.3% and is already inside toAmount. A route id is valid for 2 minutes.

3. Deposit address

POST /api/v1/dex/build with {"routeId": "…"} returns kind: "deposit" with depositAddress, memo (when the network needs one), amount, toAmountMin, provider and track. Show the address and the exact amount to the user. An expired route id gets 409 quote_expired: ask for routes again.

4. Status

GET /api/v1/dex/status?depositAddress=TRACK&provider=near (or provider=relay), with the track value from step 3. status moves through PENDING_DEPOSIT, KNOWN_DEPOSIT_TX and PROCESSING to SUCCESS, REFUNDED or FAILED; txs.in and txs.out hold the transaction hashes.

Swaps are refused in sanctioned countries (403 country_blocked), and payout, refund and commission addresses on the sanctions list are refused before any deposit address exists.

Endpoints

Service

Mode, coins, status and policies. No authentication.

MethodPathWhat it does
GET/api/v1/metaService mode, the caller's country rules and time limits
GET/api/v1/coinsCoins, networks and methods (a coin on a network)
GET/api/v1/statusPrice feed, queues and network health
GET/api/v1/reservesBalances held against payouts owed
GET/api/v1/statsSwap counts, volume and median time to payout
GET/api/v1/recentThe latest completed swaps, without addresses
GET/api/v1/compliance/policyCountry rules, limits, review deadline and travel-rule threshold
GET/api/v1/telegramWhether the Telegram bot is set up, its links and commands
POST/api/v1/telegram/webappFollow an order in the Telegram chat that opened the swap screen
POST/api/v1/consentAccept the terms of service and privacy notice (the site's banner)
GET/api/v1/openapi.jsonThis document

Swaps

Prices, quotes and new orders, and the website swap form's decentralized routes (/api/v1/dex). An API key is optional and adds your commission; on swap-form routes the commission also needs commissionTo.

MethodPathWhat it does
GET/api/v1/dex/coinsThe swap form's coins
POST/api/v1/dex/routesDecentralized routes for a pair and amount, best first
POST/api/v1/dex/buildThe transaction for the customer's wallet, or a Relay or NEAR Intents deposit address
GET/api/v1/dex/statusProgress of a swap paid to a one-time deposit address (NEAR Intents or Relay)
GET/api/v1/dex/depositWho holds a one-time deposit address, and how to pay it (for its page on another device)
GET/api/v1/dex/txWhether a swap sent from the customer's wallet is confirmed
POST/api/v1/dex/submitThe customer's signatures for a gasless swap; 0x sends it
POST/api/v1/wallet-pushOpt in to private incoming-payment notifications
DELETE/api/v1/wallet-pushRemove a device notification registration and its queued notices
POST/api/v1/wallet-push/testSend a test notification to an opted-in registered device
POST/api/v1/wallet-push/pricesSync a device's instant price alerts
POST/api/v1/wallet-swap-feeVerify a company platform-fee receipt
POST/api/v1/dex/doneA wallet swap the browser saw confirmed
GET/api/v1/dex/gasWhether the gas sent for a swap has reached the customer's wallet
GET/api/v1/dex/gaslessWhether 0x has sent and confirmed a gasless swap
GET/api/v1/dex/bridgeWhether a swap between networks has arrived
GET/api/v1/pairRate, limits and fees for a pair, with an estimate when amount is given
GET/api/v1/prices/marketsEvery coin the wallets carry, with price, day's change and a week's line
GET/api/v1/prices/historyOne coin priced in another over a range (the home page chart)
POST/api/v1/quotesLock a price for a fixed-rate swap (switched off now: returns fixed_unavailable)
POST/api/v1/ordersCreate an order (variable rate; fixed-rate orders are switched off now)

Orders

Reading and changing an order. Changes need the order token.

MethodPathWhat it does
GET/api/v1/orders/{id}An order, its deposits and its history
GET/api/v1/orders/{id}/streamLive updates for an order (server-sent events)
POST/api/v1/orders/{id}/refund-addressSet or change the refund address
POST/api/v1/orders/{id}/cancelCancel an order before any deposit
POST/api/v1/orders/{id}/kycStart identity verification for an order
GET/api/v1/orders/{id}/amlWhat we asked for during an AML review
POST/api/v1/orders/{id}/amlAnswer an AML request
POST/api/v1/orders/{id}/aml/documentsSend a document for an AML review
POST/api/v1/orders/{id}/travel-ruleSay who owns an exchange payout address
GET/api/v1/kyc/{id}An identity verification session

"Pay me exactly X of coin Y": links that anyone can pay with any supported coin.

MethodPathWhat it does
GET/api/v1/payment-links/coinsSupported payment-link coins and networks
POST/api/v1/payment-links/{id}/route-quotePreview an exact-output provider payment
POST/api/v1/payment-links/{id}/route-payStart the previewed provider payment
POST/api/v1/payment-links/{id}/route-previewPrice of paying the link with a coin, shown before any address is made
POST/api/v1/payment-links/{id}/wallet-quotePrice paying the link from a wallet (a same-network swap to the link's address)
POST/api/v1/payment-links/{id}/wallet-buildThe transactions to sign for a started wallet payment
POST/api/v1/payment-links/{id}/wallet-doneReport the wallet payment's transaction
GET/api/v1/payment-links/{id}/route-payments/{paymentId}Payment status for the browser that started it
POST/api/v1/payment-linksCreate a payment link
GET/api/v1/payment-links/{id}A payment link (public view)
POST/api/v1/payment-links/{id}/quoteWhat a payer would send, in the coin they choose
POST/api/v1/payment-links/{id}/ordersStart a payment: create the fixed-rate order that pays the link
GET/api/v1/payment-links/{id}/paymentsEvery payment of a link (creator only)
POST/api/v1/payment-links/{id}/cancelClose a link to new payments (creator only)

Price alerts

One Telegram message when a rate crosses a number.

MethodPathWhat it does
GET/api/v1/alertsThe alerts with these ids
POST/api/v1/alertsCreate a price alert, delivered on Telegram
GET/api/v1/alerts/{id}One price alert
DELETE/api/v1/alerts/{id}Cancel a price alert

Plaxcoin

The PLXC token page (/plaxcoin): live chain figures, quotes for trades the visitor's own wallet sends, wallet history, the airdrop, Telegram alerts and optional accounts. Writes from the page need a wallet signature or x-px-plxc: 1.

MethodPathWhat it does
GET/api/v1/plaxcoin/statsPLXC price, pool, time locks and supply, read from BNB Chain
GET/api/v1/plaxcoin/tradesEvery pool trade and PLXC transfer, daily totals and the price series
GET/api/v1/plaxcoin/scanToken safety checks (PLXC, or any BNB Chain token by address)
GET/api/v1/plaxcoin/quoteQuote a PLXC buy or sell, or a USDT/BNB swap, with the box limits
GET/api/v1/plaxcoin/walletA wallet's BNB, USDT and PLXC, router approvals and BNB needed for fees
GET/api/v1/plaxcoin/historyA wallet's PLXC history from the chain
GET/api/v1/plaxcoin/txWhether a transaction is pending, done or failed
GET/api/v1/plaxcoin/airdropAirdrop rules, totals and whether this visitor may join
GET/api/v1/plaxcoin/holderThe lower swap fee rule for PLXC holders, and whether a wallet qualifies (?address=)
GET/api/v1/plaxcoin/cashbackSwap cashback rules and paid weeks, or one wallet's cashback (?address=)
GET/api/v1/plaxcoin/airdrop/statusA wallet's airdrop sign-up and friends
POST/api/v1/plaxcoin/airdrop/challengeThe text a wallet signs to join the airdrop
POST/api/v1/plaxcoin/airdrop/joinJoin the airdrop with a wallet signature
GET/api/v1/plaxcoin/alertsWhether a wallet has Telegram alerts
POST/api/v1/plaxcoin/alertsTurn Telegram alerts on or off with a wallet signature
GET/api/v1/plaxcoin/meThe signed-in Plaxcoin account and the sign-in options
POST/api/v1/plaxcoin/meSign out, two-factor sign-in and linked wallets
GET/api/v1/plaxcoin/auth/{provider}/startStart signing in with Google, Telegram, Apple or Discord
GET/api/v1/plaxcoin/auth/{provider}/callbackThe return trip from Apple or Discord

Accounts

Optional accounts with no sign-up: order history, address book, referrals. The account key lives in an HttpOnly cookie; writes need x-px-account: 1.

MethodPathWhat it does
GET/api/v1/accountThis browser's account, if it has one
POST/api/v1/accountCreate an account for this browser (or return the one it has)
POST/api/v1/account/restoreUse an account in this browser, with its account key
POST/api/v1/account/keyShow the account key this browser holds, to back it up
POST/api/v1/account/forgetRemove the account key from this browser
GET/api/v1/account/ordersThis account's orders, newest first
POST/api/v1/account/orders/{id}/accessAn order key for one of this account's orders
GET/api/v1/account/addressesSaved payout addresses (the address book)
POST/api/v1/account/addressesSave a payout address
PATCH/api/v1/account/addresses/{id}Change a saved address
DELETE/api/v1/account/addresses/{id}Delete a saved address
GET/api/v1/account/referralsReferral link, referred volume, earnings and withdrawals
GET/api/v1/account/withdrawalsThis account's referral withdrawals, newest first
POST/api/v1/account/withdrawalsWithdraw every available referral earning as one stablecoin payout

Partner portal

Your volume, commission, webhook deliveries and withdrawals. Needs your API key.

MethodPathWhat it does
GET/api/v1/partnerYour volume, commission, recent orders, webhook deliveries and withdrawals
POST/api/v1/partner/signupGet a partner API key
GET/api/v1/partner/ordersOrders made with your API key, newest first, 25 per page
GET/api/v1/partner/withdrawalsYour commission withdrawals
POST/api/v1/partner/withdrawalsWithdraw all available commission as one stablecoin payout

Support

Support requests without an account, read on a private page.

MethodPathWhat it does
POST/api/v1/supportOpen a support request
GET/api/v1/support/{id}A support request and its messages
POST/api/v1/support/{id}/messagesWrite again on a support request
POST/api/v1/assistantAsk the help chat
POST/api/v1/assistant/eventCount a help chat action or rate an answer

Payment gateway

Accept crypto on your website: create a payment, send the payer to the hosted checkout, get a signed webhook. Needs your merchant key (pxs_live_... or pxs_test_...). Guide: /developers/payments.

MethodPathWhat it does
GET/api/v1/merchant/swapsOwner wallet conversion history and auto-conversion policy
POST/api/v1/merchant/swapsConfirm a quoted wallet conversion batch
POST/api/v1/merchant/swaps/quotePreview a merchant balance swap or consolidation
POST/api/v1/merchant/swaps/cancelCancel an unstarted wallet conversion
PATCH/api/v1/merchant/swaps/preferencesSet or revoke auto-conversion consent
GET/api/v1/paymentsList your payments
POST/api/v1/paymentsCreate a payment
GET/api/v1/payments/{id}A payment as it stands now
POST/api/v1/payments/{id}/cancelCancel a payment nothing was paid to
POST/api/v1/payments/{id}/simulateTest mode: act out a payment's outcome
GET/api/v1/gateway/coinsCoins you can receive, and what payers can pay each with

Merchant account

Sign up, your account's settings, keys and webhook deliveries.

MethodPathWhat it does
GET/api/v1/merchant/overviewFiltered settled income, coin prices and orders
GET/api/v1/merchant/securityAuthenticator status and recovery-code count
POST/api/v1/merchant/securityEnroll or recover a mandatory merchant authenticator
POST/api/v1/merchant/security/approveApprove one exact account or withdrawal request with TOTP
GET/api/v1/merchant/walletBalances, ledger activity and withdrawals
POST/api/v1/merchant/onboardingComplete business profile
POST/api/v1/merchant/withdrawals/quotePreview a withdrawal and its fees
POST/api/v1/merchant/withdrawalsConfirm the exact withdrawal preview
POST/api/v1/merchants/lockLock an account from a security email
GET/api/v1/merchant/addressesSaved withdrawal addresses
POST/api/v1/merchant/addressesAdd a withdrawal address
GET/api/v1/merchant/security/devicesSigned-in devices
POST/api/v1/merchant/security/devicesSign a device or every other device out
GET/api/v1/merchant/security/passkeysSaved passkeys
POST/api/v1/merchant/security/passkeysPasskey options or removal
POST/api/v1/merchant/passkeysSave a passkey
POST/api/v1/merchant/anti-phishingSet the anti-phishing code
GET/api/v1/merchant/marketsPrices for the wallet's coins
GET/api/v1/merchant/receiveCoins the wallet can receive
POST/api/v1/merchant/receiveGet or make a deposit address
GET/api/v1/merchant/kycBusiness verification
POST/api/v1/merchant/kycSend business verification
DELETE/api/v1/merchant/addresses/{id}Remove a withdrawal address
GET/api/v1/merchant/payments/{id}/refundRefund panel of an overpaid payment
POST/api/v1/merchant/payments/{id}/refundStart a refund of the extra
POST/api/v1/merchant/payments/{id}/refund/quotePreview sending a refund
POST/api/v1/merchant/payments/{id}/refund/sendSend a refund
POST/api/v1/merchant/payments/{id}/refund/cancelCancel a refund not sent yet
POST/api/v1/merchant/payments/{id}/refund/manualRecord a refund sent from your own wallet
GET/api/v1/merchant/notificationsNotification inbox and channel preferences
PATCH/api/v1/merchant/notificationsMark inbox items read or change opted-in channels
POST/api/v1/merchant/notifications/telegramA one-time Telegram link that turns Telegram alerts on
GET/api/v1/merchantYour merchant account
PATCH/api/v1/merchantChange your account's settings
POST/api/v1/merchant/keysCreate another key
PATCH/api/v1/merchant/keys/{id}Switch a key on or off
POST/api/v1/merchant/webhook-secretA new webhook signing secret
GET/api/v1/merchant/webhooksRecent webhook deliveries
POST/api/v1/merchant/webhooks/testSend a signed ping webhook
POST/api/v1/merchant/webhooks/{id}/resendSend a webhook again
POST/api/v1/merchants/signupLegacy signup endpoint (retired)

Checkout

What the hosted checkout page calls. No key; the payer's browser.

MethodPathWhat it does
GET/api/v1/checkout/{id}The hosted checkout's view of a payment
POST/api/v1/checkout/{id}/quoteHow much to send with one coin
POST/api/v1/checkout/{id}/payPay with a coin
POST/api/v1/checkout/{id}/simulateTest mode: the checkout's outcome buttons

Sandbox

Only where developer tools are on.

MethodPathWhat it does
POST/api/v1/kyc/{id}/submitSubmit the mock identity check (sandbox only)

Request and response fields are in the OpenAPI document. The TypeScript types live in src/lib/api-types.ts in this project.

Fixed-rate flow

Closed to new orders since 2 Nov 2026. POST /api/v1/quotes and POST /api/v1/orders return 410 orders_closed: swaps now go through the decentralized swap API (/api/v1/dex), and payment links pay through a direct route. The steps below describe the closed order API.

Lock the price first, then create the order within the quote's lifetime. The user must send exactly depositAmount, and receives exactly settleAmount: network fees are already taken off. You can quote by the amount sent (depositAmount) or by the amount received (settleAmount), not both.

1. Get a quote
curl -s "$BASE/api/v1/quotes" \
  -H "content-type: application/json" \
  -H "x-api-key: $PX_KEY" \
  -H "x-user-ip: 203.0.113.7" \
  -d '{"from":"btc","to":"usdt-tron","depositAmount":"0.005"}'
Response
{
  "id": "q_zp4h32n4f18gsz53",
  "from": "btc",
  "to": "usdt-tron",
  "depositAmount": "0.005",
  "settleAmount": "407.417394",
  "rate": "81831.8587259",
  "expiresAt": "2026-10-13T15:58:54.958Z",
  "fees": {
    "receiveFeeUsd": 0.3, "sendFeeUsd": 1.44, "totalNetworkFeesUsd": 1.74,
    "sendFeeInSettle": "1.441572", "networkFeesInSettle": "1.741899",
    "spreadBps": 180, "commissionBps": 0,
    "spreadParts": { "tierBps": 150, "fixedBps": 30, "volatilityBps": 0, "surchargeBps": 0, "nudgeBps": 0, "minEarningsBps": 0 }
  }
}
2. Create the order
curl -s "$BASE/api/v1/orders" \
  -H "content-type: application/json" \
  -H "x-api-key: $PX_KEY" \
  -H "x-user-ip: 203.0.113.7" \
  -d '{
    "type": "fixed",
    "quoteId": "q_zp4h32n4f18gsz53",
    "settleAddress": "TR7NHqjeKQxGTCi8q8ZY4pL8otSzgjLj6t",
    "refundAddress": "bc1qar0srrr7xfkvy5l643lydnw9re59gtzzwf5mdq",
    "payoutDestination": "self_hosted",
    "acceptTerms": true
  }'

The response holds order (show order.depositAddress, order.depositMemo when set, and order.expectedDeposit) and orderToken. When depositAddress is null, the user must verify their identity first: start it with POST /api/v1/orders/:id/kyc.

Variable-rate flow

Closed to new orders since 2 Nov 2026, like the fixed-rate flow above. No quote. Create the order with from and to. The user can send any amount between order.depositMin and order.depositMax; the rate is set when each deposit confirms. GET /api/v1/pair with an amount gives an estimate to show beforehand.

bash
curl -s "$BASE/api/v1/orders" \
  -H "content-type: application/json" \
  -H "x-api-key: $PX_KEY" \
  -H "x-user-ip: 203.0.113.7" \
  -d '{"type":"variable","from":"eth","to":"sol","settleAddress":"EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v","acceptTerms":true}'

Payouts to an exchange account: send "payoutDestination": "exchange". If the swap can reach the travel-rule threshold, also send beneficiary: { name, vaspName }, the account holder's full name and the exchange's name. See the compliance policy for the threshold.

Order token

orderToken is returned once, when the order is created. Store it with the order. Send it as x-order-token to set a refund address, cancel, start identity verification or send travel-rule details. Anyone with the order id can read the order, with addresses shortened; the token holder (or the partner whose key created the order) sees them in full and can change the order.

Order statuses

StatusMeaning
waitingNo deposit has arrived yet.
pendingDeposit seen. Waiting for network confirmations.
processingDeposit confirmed. Pricing and checks are running.
reviewHeld for a compliance check.
settlingPayout broadcast. Waiting for it to confirm.
settledPayout confirmed.
refundNeeds a refund address, or is queued for a refund.
refundingRefund broadcast. Waiting for it to confirm.
refundedRefund confirmed.
frozenBlocked by a sanctions match or a legal hold.
failedCannot be paid out or returned.
expiredNo deposit arrived before the deadline.
cancelledCancelled before any deposit.
multipleDeposits with different outcomes. See each one.

Follow an order with the event stream (GET /api/v1/orders/:id/stream, an order event with the full order on connect and on every change), by polling GET /api/v1/orders/:id every few seconds, or with webhooks. When a deposit leaves the normal path, deposit.reason names why and deposit.reasonText explains it in plain English. Reviews with manualDecision: true have no automatic refund deadline: a person decides.

A payment link says pay me exactly 25 USDT on Tron at this address. Whoever pays can use any coin we support: they get a fixed-rate quote for exactly that amount, and their payment is a normal fixed-rate swap whose payout goes to the link's address. The payer pays our spread and the network fees; the recipient gets the stated amount. Links created with your API key belong to you and send payment_link.* webhooks.

Create a link
curl -s -X POST "$BASE/api/v1/payment-links" \
  -H "content-type: application/json" \
  -H "x-api-key: $PX_KEY" \
  -H "x-user-ip: 203.0.113.7" \
  -d '{
    "title": "Invoice 1042",
    "settleMethodId": "usdt-tron",
    "settleAmount": "25",
    "settleAddress": "TBFQ4wTTgtsK4SvFuBNVCbhHJPbWdxE9zN",
    "expiresIn": "7d",
    "payoutDestination": "self_hosted"
  }'

The response has link, payUrl (share it) and manageToken with manageUrl (shown once: keep them private). One-payment links (the default) take one payment at a time and are paid once it settles; reusable links ("reusable": true) take any number of full payments. Expiry: 1h, 24h, 7d, 30d or never.

Pay a link: price it in the payer's coin, then create the order
curl -s -X POST "$BASE/api/v1/payment-links/pl_pztpm3f8c04ez2/quote" \
  -H "content-type: application/json" -d '{"from":"btc"}'

curl -s -X POST "$BASE/api/v1/payment-links/pl_pztpm3f8c04ez2/orders" \
  -H "content-type: application/json" \
  -d '{"from":"btc","quoteId":"q_h9tga45ztbr27xdk","refundAddress":"bc1q...","acceptTerms":true}'
See payments or close the link (creator only)
curl -s "$BASE/api/v1/payment-links/pl_pztpm3f8c04ez2/payments" -H "x-link-token: $MANAGE_TOKEN"
curl -s -X POST "$BASE/api/v1/payment-links/pl_pztpm3f8c04ez2/cancel" -H "x-link-token: $MANAGE_TOKEN"

GET /api/v1/payment-links/:id is public (no secrets, no payer details). Its availability says whether a payment can start now and, if not, why: paid, expired, cancelled, payment_open (someone else has an open order, with retryAfter), payment_in_progress or unavailable. Every payer goes through the same country rules, limits and screening as any other order.

Webhooks

Set a webhook URL on your partner account. We POST JSON to it for these events. Each body is { "event", "createdAt", "data" }.

Orders

Orders created with your API key.

  • order.createdAn order was created with your API key.
  • order.expiredThe order closed before a deposit arrived.
  • order.cancelledThe order was cancelled before any deposit.

Deposits

Each deposit on those orders, as it moves through the steps.

  • deposit.detectedA deposit was seen on the network and is waiting for confirmations.
  • deposit.confirmedThe deposit has its confirmations; pricing and checks run next.
  • deposit.reviewThe deposit is held for a check (reason and deadline in the order).
  • deposit.settlingThe payout was sent and is waiting for the network.
  • deposit.settledThe payout is confirmed. The swap is complete.
  • deposit.refundThe deposit will be returned (it may need a refund address).
  • deposit.refundingThe refund was sent and is waiting for the network.
  • deposit.refundedThe refund is confirmed.
  • deposit.frozenThe deposit is frozen under a sanctions match or a legal hold.
  • deposit.failedThe deposit could not be paid out or returned (for example, too small to send back).

Payment links

Links created with your API key.

  • payment_link.paidA one-payment link created with your API key was paid. Sent once.
  • payment_link.expiredAn open link created with your API key passed its expiry. Sent once.

Commission withdrawals

Payouts of the commission you earned.

  • withdrawal.sentA commission withdrawal to your payout address was broadcast.
  • withdrawal.completedA commission withdrawal is confirmed on the network.
Order and deposit events
{
  "event": "deposit.settled",
  "createdAt": "2026-10-13T15:40:02.114Z",
  "data": { "orderId": "82mvk6s12m9sz0", "depositId": "d_ac88wy833k5h8tb4", "message": "Sent 0.0033 ETH to your address." }
}
payment_link.paid
{
  "event": "payment_link.paid",
  "createdAt": "2026-10-13T20:02:30.101Z",
  "data": {
    "linkId": "pl_pztpm3f8c04ez2", "status": "paid", "title": "Invoice 1042",
    "settleMethodId": "usdt-tron", "settleAmount": "25", "amountReceived": "25.000112",
    "orderId": "d29k7x4wbq5psa", "depositId": "d_f9wvve7nksmtjwc0",
    "settleTxid": "634b39ce...", "paidAt": "2026-10-13T20:02:25.573Z"
  }
}

Every request carries x-px-signature: t=<unix seconds>,v1=<hex>, where v1 is the HMAC-SHA256 of t + "." + body using your webhook secret. Check it against the raw body before you parse it, and reject old timestamps. Answer with any 2xx status within 8 seconds; failed deliveries are retried with growing gaps, up to 10 attempts over several hours, so the same event can arrive twice. Use the ids to ignore repeats.

Verify a webhook (Node.js)
import { createHmac, timingSafeEqual } from "node:crypto";

export function verifyPlaxswapSignature(rawBody, header, secret, toleranceSeconds = 300) {
  const parts = Object.fromEntries(header.split(",").map((part) => part.split("=")));
  const t = Number(parts.t);
  if (!t || Math.abs(Date.now() / 1000 - t) > toleranceSeconds) return false;
  const expected = createHmac("sha256", secret).update(`${t}.${rawBody}`).digest();
  const given = Buffer.from(parts.v1 ?? "", "hex");
  return given.length === expected.length && timingSafeEqual(given, expected);
}

Embeddable widget

Put a small swap box on your own site. It shows two coins, an amount and the live order rate. There is no address field in it: Continue opens the swap form in a new tab with the pair and amount filled in, where your visitor adds their address and sees each route's own rate and fee (a 0.3% Plaxswap fee plus the route's fee), which can differ from the widget's. Pass your referral code with ref; swaps on the swap form do not earn referral commission yet.

URL: /widget?from=btc&to=eth&amount=0.01&theme=auto&ref=CODE. from and to take method ids or coins, theme is light, dark or auto (follows your visitor's system setting). A frame of about 400 by 460 pixels fits it.

Optional

Leave empty for an example amount.

Optional

Passed on to the swap page. Swaps on the swap form do not earn referral commission yet.

At least 420. The width fits the space it is given, up to 400.

Theme
Embed code
<iframe
  src="https://plaxswap.com/widget?from=btc&amp;to=eth&amp;amount=0.01"
  title="Crypto swap"
  width="400" height="460"
  style="border:0;border-radius:20px;max-width:100%"
  loading="lazy"
  sandbox="allow-scripts allow-same-origin allow-popups allow-popups-to-escape-sandbox"
></iframe>
<p style="margin:6px 0 0;font:12px/1.4 system-ui,sans-serif"><a href="https://plaxswap.com/">Powered by Plaxswap</a></p>

The frame only shows coins, an amount and the live order rate. There is no address field in it, and nothing is created there: Continue opens the swap form in a new tab, where your visitor adds their address and sees each route's own rate and fee. The sandbox attribute keeps the frame away from your page.

Live preview

Errors

Errors use HTTP status codes and a JSON body: { "error": { "code", "message", "details" } }. The message is plain English and safe to show to your user. Codes you will see most:

CodeHTTPMeaning
bad_request400A field is missing or malformed. The message says which.
invalid_address400The payout or refund address failed its format or checksum check.
invalid_memo400The memo, tag or comment is not valid for that network.
travel_rule_required400An exchange payout over the threshold needs the account holder's name.
user_ip_required400A request with an API key did not send x-user-ip.
user_ip_invalid400x-user-ip is not a public IP address.
invalid_api_key401The API key is wrong or switched off.
forbidden403The order token (x-order-token) or link token (x-link-token) is missing or wrong.
address_not_allowed403The address failed sanctions or risk screening.
private_pilot403Real-money swaps are a private test and not open to the public yet.
not_found404No order, quote, link or alert with that id.
fixed_unavailable409Fixed rates are switched off at the moment. Create a variable-rate order instead.
quote_expired409The quote ran out. Request a new one.
coin_unavailable409Deposits or payouts for that coin are paused.
limit_exceeded409The caller's remaining limit without verification is below the pair minimum.
refund_address_locked409A deposit is being checked, so the refund address cannot change now.
rate_limited429Too many requests from this IP address in the time window.
velocity_limit429Too many orders from one device in the last hour.
too_many_streams429Too many open live streams from one IP address. Poll instead.
jurisdiction_blocked451Swaps are not offered in the end user's country.
service_paused503New swaps are paused for now. Open orders still complete.

The full list for each endpoint is in the OpenAPI document.

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