GhostSwap Partners API
Build crypto-to-crypto swap flows into your product with a single Bearer-authenticated REST API. Server-to-server, idempotent, rate-limited, with a polled status lifecycle. No signing keys to manage — GhostSwap handles liquidity routing on your behalf.
Quickstart →
Five steps from credential to live swap. cURL + JavaScript.
Authentication →
How to issue, rotate, and protect your API credentials.
Swaps API →
Create, list, and inspect swaps. Idempotent by default.
End-to-end guide →
Full walkthrough: quote → validate → create → poll.
What you get
- One Bearer token, one base URL. No JSON-RPC. No upstream key management.
- Idempotent swap creation. Safe to retry. We deduplicate on
(credential, Idempotency-Key)for 24 hours. - Per-credential rate limits — 30 RPS design target with
Retry-Afteron 429s. Middleware is rolling out; see Rate limits for current enforcement status. We absorb upstream limits so your traffic stays smooth. - Real-time-ish status polling. Background workers update swap status every 30s upstream; you poll us at any cadence.
- Per-organization attribution. Every swap is tagged with your
org_idso commission tracking is automatic.
How a swap works
- Your server calls
POST /v1/quoteswith the pair and amount. We return the user-facing receive amount. - Your server calls
POST /v1/addresses/validateto check the user's payout wallet. - Your server calls
POST /v1/swapswith anIdempotency-Key. We return a deposit address. - You display the deposit address to your user. They send the funds on chain.
- Your server polls
GET /v1/swaps/:iduntil the status is terminal. - On
finished, you credit your user. We've already credited your commission ledger.
Two ways to integrate
| Mode | Best for | Where it lives |
|---|---|---|
| API (this doc) | Wallets, exchanges, fintech apps that own the user UI | Your server |
| Hosted widget (coming) | Marketing sites, landing pages, no-code partners | iframe on your site |
The API is what's available today. Widgets are on the roadmap.
Need help?
Email support@ghostswap.io. For AML/KYC holds on individual swaps, the user should email security@ghostswap.io directly — these are routed to our compliance team.