Menu

How to add crypto swaps to your app: quote, deposit address, status
📰

How to add crypto swaps to your app: quote, deposit address, status

DEV Community: api·Plaxswap·8 days ago
#nwp6pmib
#devtoapi#devto#dev#user#address
Reading 0:00
15s threshold

We build Plaxswap, and this guide first appeared in our help center . It shows our swap API, but the flow (quote, deposit address, status) is how most non-custodial swap APIs work.

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.…

Continue reading — create a free account

Join HashtagPLUS to read full articles, follow hashtags, vote, and join the conversation.