Developers
The 7.Exchange swap API is live in production. Discover assets and providers, request routes, lock and execute a quote, and track the result — all through one public REST API.
https://api.7.exchange/api/v1No API key required. Public swap integration endpoints are open. See affiliate attribution.
Make your first call
This works right now, with no setup:
curl -s "https://api.7.exchange/api/v1/swap/chains?query=ethereum"{
"data": [
{
"key": "ethereum",
"name": "Ethereum",
"shortname": "ETH",
"chainId": 1,
"type": "EVM",
"active": true
}
],
"pagination": { "page": 1, "perPage": 100, "total": 1, "hasMore": false }
}That key is what you’ll pass as srcChain and dstChain everywhere else.
How an integration works
Discover
Fetch chains and assets once and cache them. Use the chain key and asset
address from these responses as your identifiers — don’t hardcode them.
Quote
POST /quote returns every available route for a pair and amount. Each route names
its provider and carries a routeId. An empty data array means no route exists —
it’s a 200, not an error.
Lock
POST /quote/lock reserves one selected route and returns a short-lived lockId.
Locks expire; drive your UI from ttlMs.
Execute
POST /quote/execute takes only the lockId — everything else comes from the
server-side lock record. You get back a public transaction.id, and for
client-side routes an exec payload describing the wallet call to make.
Track and poll
If your client performed the wallet call, report the resulting hash to
POST /transaction/track. Then poll GET /transaction/status until final is
true.
Full details, including the four execution modes and the tracking rules, are in the API reference.
Endpoint index
Discovery
| Method | Endpoint | Purpose |
|---|---|---|
GET | /swap/chains | Supported chains |
GET | /swap/assets | Supported assets |
GET | /swap/sources | Active routing providers |
Quote and execution
| Method | Endpoint | Purpose |
|---|---|---|
POST | /quote | Available routes for a pair and amount |
POST | /quote/lock | Reserve a route, get a lockId |
POST | /quote/execute | Execute the locked quote |
Transactions
| Method | Endpoint | Purpose |
|---|---|---|
GET | /transaction/status | Current status; poll until final |
POST | /transaction/track | Report a wallet or deposit hash |
GET | /transaction/history | Public transaction history |
Affiliate attribution
There’s no API key, so swaps are attributed by referral code instead.
Create an account
Sign up or sign in to 7.Exchange in the webapp.
Complete the affiliate flow
Open the affiliate dashboard .
Copy your referral code
Create or copy a referral code.
Send it with lock and execute
Pass it as referralCode in POST /quote/lock and POST /quote/execute. If
omitted on execute, the code stored on the lock is used.
See the referral program for payout terms.
Before you go to production
- Tolerate unknown fields. New response fields and enum values can appear
within
v1without a version bump. - Branch on
error.code, noterror.message. Messages are human-facing and change. - Don’t hardcode provider names. The routing set changes as providers are added, paused, and removed.
- Respect
Retry-Afteron429rather than retrying on a fixed interval. - Keep
X-Request-Id. It’s on every response, and it’s the first thing we’ll ask for.
Coming later
The SDK and embeddable widget are in development and not yet available. The REST API is the supported integration path today — announcements ship in #dev-announcements when that changes.
Get help
Breaking changes are announced in #dev-announcements before they ship. If you’re running an integration in production, subscribe — it’s the only place changes are communicated ahead of the changelog.