Skip to Content
developersAPI Reference

API Reference

The 7.Exchange production API is ready for swap integrations. Discover assets and providers, request quotes, lock a route, execute it, and track the resulting transaction.

Base URL
https://api.7.exchange/api/v1

Public swap integration endpoints do not require an API key unless an endpoint explicitly says otherwise. There is no key-generation flow for integrators — see Affiliate referral codes if you need swap attribution.

Quick Start

A complete swap, from quote to confirmation.

BASE="https://api.7.exchange/api/v1" # 1. Request routes QUOTE=$(curl -s "$BASE/quote" -H "Content-Type: application/json" -d '{ "srcChain": "ethereum", "srcAddress": "0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48", "dstChain": "arbitrum", "dstAddress": "0xaf88d065e77c8cC2239327C5EDb3A432268e5831", "amount": "50", "slippage": 100, "depositor": "0xYourSourceWallet", "recipient": "0xYourDestinationWallet" }') PROVIDER=$(echo "$QUOTE" | jq -r '.data[0].provider') ROUTE_ID=$(echo "$QUOTE" | jq -r '.data[0].routeId') # 2. Lock the selected route LOCK=$(curl -s "$BASE/quote/lock" -H "Content-Type: application/json" -d "{ \"srcChain\": \"ethereum\", \"srcAddress\": \"0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48\", \"dstChain\": \"arbitrum\", \"dstAddress\": \"0xaf88d065e77c8cC2239327C5EDb3A432268e5831\", \"amount\": \"50\", \"slippage\": 100, \"provider\": \"$PROVIDER\", \"routeId\": \"$ROUTE_ID\", \"depositor\": \"0xYourSourceWallet\", \"recipient\": \"0xYourDestinationWallet\" }") LOCK_ID=$(echo "$LOCK" | jq -r '.data.lockId') # 3. Execute EXEC=$(curl -s "$BASE/quote/execute" -H "Content-Type: application/json" \ -d "{\"lockId\": \"$LOCK_ID\"}") TX_ID=$(echo "$EXEC" | jq -r '.data.transaction.id') # 4. Poll until final while true; do S=$(curl -s "$BASE/transaction/status?transactionId=$TX_ID") echo "$S" | jq -r '.data.transaction.status' [ "$(echo "$S" | jq -r '.data.final')" = "true" ] && break sleep 3 done

Integration Flow

Fetch chains

GET /api/v1/swap/chains — use each chain’s key as srcChain / dstChain.

Fetch assets

GET /api/v1/swap/assets — use each asset’s address as srcAddress / dstAddress.

Fetch routing providers

GET /api/v1/swap/sources — optional; quote responses already name their provider.

Request routes

POST /api/v1/quote — returns every available route for the pair and amount.

Lock the selected route

POST /api/v1/quote/lock — returns a short-lived lockId.

Execute

POST /api/v1/quote/execute — returns a transaction.id and, for client-side routes, an exec payload.

Track (client-side execution only)

POST /api/v1/transaction/track — send the public transaction.id and the wallet or deposit hash your client received.

Poll status

GET /api/v1/transaction/status — until final is true.

Read history

GET /api/v1/transaction/history — scoped by wallet address.

Steps 1–3 are cacheable. Only refetch chains and assets periodically — both responses flag recently added entries with new: true.

Conventions

Versioning

The current API version is v1. Every versioned response includes:

X-API-Version: 1 X-Request-Id: req_...
Change typeShips inExamples
Non-breakingSame versionAdding a field, adding an enum value, adding an optional request parameter, adding metadata
BreakingNew path versionRemoving or renaming a field, changing a field type, changing required request fields, changing enum casing, changing the response envelope

Every changelog entry that affects the public API names the affected version.

Build clients that tolerate unknown fields. New fields and new enum values can appear within v1 without notice. Breaking changes are announced in #dev-announcements  before they ship.

Response envelopes

Endpoint kindShape
List endpoints{ "data": [...], "pagination": { "page", "perPage", "total", "hasMore" } }
Quote preview{ "data": [...] } — no pagination; it’s a request-scoped route set, not a paginated resource
Single-resource and actions{ "data": { ... } }
Errors{ "error": { ... } }

Beyond the envelope:

  • JSON request and response fields use camelCase.
  • Amounts are strings unless the field is explicitly a count or a basis-point number.
  • Timestamps are ISO 8601 strings.
  • Quote preview and lock return public route data and a fees object. They never return execution payloads.
  • Execute may include provider-specific quote, exec, and providerResult objects. Nested quote snapshots use fees. Use exec only for wallet execution — it is not provider tracking state.
  • Treat returned asset addresses as canonical for their chain. Compare EVM addresses case-insensitively unless you checksum them first.

Request rules

  • Send JSON bodies with Content-Type: application/json.
  • Use the chain key from /swap/chains as srcChain and dstChain.
  • Use the asset address from /swap/assets as srcAddress and dstAddress.
  • Send amount as a positive human-readable token amount string.
  • Send slippage in basis points — 100 means 1%. Valid range 0–10000 inclusive.
  • Send the real source wallet as depositor and the real destination wallet as recipient when requesting and locking quotes.
  • Use routeId from quote preview when locking; use lockId from lock when executing.

Never hardcode provider names. Use the provider key returned by the selected quote — the routing set changes as providers are added, paused, or removed.

Rate limits

Rate-limited responses return 429 with code RATE_LIMITED and these headers:

Retry-After: 30 X-RateLimit-Limit: ... X-RateLimit-Remaining: ... X-RateLimit-Reset: ...

Respect Retry-After rather than retrying on a fixed interval.

Chains

GET /api/v1/swap/chains

Lists active supported chains. Each chain includes new, which is true when the chain was added less than three days ago.

Query parameters

NameTypeDescription
pagenumberPage number. Defaults to 1.
perPagenumberResults per page. Defaults to 100, maximum 1000.
querystringSearch across name, shortname, and key.
typestringNetwork type filter: EVM, COSMOS, UTXO, or OTHER.
curl -s "https://api.7.exchange/api/v1/swap/chains?query=ethereum"
200 OK
{ "data": [ { "key": "ethereum", "name": "Ethereum", "shortname": "ETH", "chainId": 1, "image": "https://...", "type": "EVM", "active": true, "new": true } ], "pagination": { "page": 1, "perPage": 100, "total": 1, "hasMore": false } }

Assets

GET /api/v1/swap/assets

Lists supported swap assets. Use the returned address in quote and lock requests. Each asset includes new, which is true when the asset was added less than three days ago.

Query parameters

NameTypeDescription
pagenumberPage number. Defaults to 1.
perPagenumberResults per page. Defaults to 100, maximum 1000.
querystringSearch across name, symbol, and address.
chainstringChain key from GET /api/v1/swap/chains.
curl -s "https://api.7.exchange/api/v1/swap/assets?chain=ethereum&query=usdc"
200 OK
{ "data": [ { "name": "USD Coin", "symbol": "USDC", "address": "0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48", "image": "https://...", "chain": "ethereum", "isNative": false, "new": true } ], "pagination": { "page": 1, "perPage": 100, "total": 1, "hasMore": false } }

Sources

GET /api/v1/swap/sources

Lists active routing providers.

Query parameters

NameTypeDescription
pagenumberPage number. Defaults to 1.
perPagenumberResults per page. Defaults to 20, maximum 300.
typestringProvider type: BRIDGE, EXCHANGE, or SERVICE.
curl -s "https://api.7.exchange/api/v1/swap/sources?type=BRIDGE"
200 OK
{ "data": [ { "key": "ACROSS_PROTOCOL", "name": "Across", "image": "https://...", "type": "BRIDGE", "active": true } ], "pagination": { "page": 1, "perPage": 20, "total": 1, "hasMore": false } }

Get Quotes

POST /api/v1/quote

Returns available routes for the requested pair and amount.

Body

NameRequiredTypeDescription
srcChain✅stringSource chain key.
srcAddress✅stringSource asset address from the assets endpoint.
dstChain✅stringDestination chain key.
dstAddress✅stringDestination asset address from the assets endpoint.
amount✅stringPositive human-readable amount.
slippage—numberSlippage in basis points. Range 0–10000.
confidentiality—public | basicNEAR Intents execution mode. basic requests confidential handling; public is the default. Ignored by other providers.
depositor—stringSource wallet address. Recommended for accurate routes.
recipient—stringDestination wallet address. Recommended for accurate routes.
exclude—string[]Provider keys to exclude.
curl -s "https://api.7.exchange/api/v1/quote" \ -H "Content-Type: application/json" \ -d '{ "srcChain": "ethereum", "srcAddress": "0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48", "dstChain": "arbitrum", "dstAddress": "0xaf88d065e77c8cC2239327C5EDb3A432268e5831", "amount": "50", "slippage": 100, "depositor": "0xYourSourceWallet", "recipient": "0xYourDestinationWallet" }'
200 OK
{ "data": [ { "provider": "ACROSS_PROTOCOL", "routeId": "provider-route-id", "src": { "formatted": "50", "currency": "USDC", "usd": "50" }, "dst": { "formatted": "49.8", "currency": "USDC", "usd": "49.8" }, "fees": { "total": { "usd": "0.20", "formatted": "$0.20" }, "items": [ { "type": "bridge_fee", "amount": "200000", "token": { "chainId": 42161, "address": "0xaf88d065e77c8cC2239327C5EDb3A432268e5831", "symbol": "USDC", "decimals": 6 }, "amountUsd": "0.20", "description": "Bridge fee", "providerLabel": "Bridge fee", "chain": { "chainId": 42161, "name": "Arbitrum" } } ] }, "estimatedTime": 120, "steps": [ { "type": "bridge", "name": "Across", "image": "https://..." } ] } ] }

Quote objects include provider-specific route fields but never execution payloads. Preserve the returned provider key and selected routeId until lock completes.

No route available is not an error. This endpoint returns 200 with { "data": [] }. Check for an empty array before reading data[0].

Confidential NEAR Intents routes

To request confidential handling for a NEAR Intents route, set confidentiality to basic when requesting routes, select the returned NEAR_INTENTS route, and send the same value when locking it. Omit the field or set it to public for standard execution.

Quote and lock fields
{ "confidentiality": "basic", "provider": "NEAR_INTENTS" }

basic requests confidential handling within NEAR Intents. The source-chain deposit and destination-chain payout remain external-chain transactions and may be publicly visible. advanced is not currently supported by this API.

Lock Quote

POST /api/v1/quote/lock

Locks one selected provider route and returns a short-lived lockId for execution.

Body

Send the same fields used for POST /api/v1/quote, plus:

NameRequiredTypeDescription
provider✅stringProvider key from the selected quote.
depositor✅stringSource wallet address.
recipient✅stringDestination wallet address.
routeId—stringRoute ID from the selected quote. Recommended when multiple routes are returned.
referralCode—stringAffiliate referral code from your 7.Exchange referral link.

depositor and recipient are required here even though they’re optional on quote preview. When using confidentiality: "basic", send the same value used for quote preview.

curl -s "https://api.7.exchange/api/v1/quote/lock" \ -H "Content-Type: application/json" \ -d '{ "srcChain": "ethereum", "srcAddress": "0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48", "dstChain": "arbitrum", "dstAddress": "0xaf88d065e77c8cC2239327C5EDb3A432268e5831", "amount": "50", "slippage": 100, "provider": "ACROSS_PROTOCOL", "routeId": "provider-route-id", "depositor": "0xYourSourceWallet", "recipient": "0xYourDestinationWallet", "referralCode": "your-referral-code" }'

The response may include refreshed route amounts, fee data, expiry data, and provider display fields. It does not include wallet execution payloads.

200 OK
{ "data": { "provider": "ACROSS_PROTOCOL", "routeId": "provider-route-id", "lockId": "locked-quote-id", "expiresAt": "2026-06-30T00:01:00.000Z", "ttlMs": 60000, "src": { "formatted": "50", "currency": "USDC", "usd": "50" }, "dst": { "formatted": "49.8", "currency": "USDC", "usd": "49.8" }, "fees": { "total": { "usd": "0.20", "formatted": "$0.20" }, "items": [ { "type": "bridge_fee", "amount": "200000", "token": { "chainId": 42161, "address": "0xaf88d065e77c8cC2239327C5EDb3A432268e5831", "symbol": "USDC", "decimals": 6 }, "amountUsd": "0.20", "description": "Bridge fee", "providerLabel": "Bridge fee", "chain": { "chainId": 42161, "name": "Arbitrum" } } ] } } }

Locks expire. Use ttlMs / expiresAt to drive your UI, and re-lock rather than retrying execute — an expired or already-used lock returns 409 QUOTE_EXPIRED.

Execute Quote

POST /api/v1/quote/execute

Executes the locked quote. The backend reads the source chain, destination chain, amount, slippage, provider, depositor, and recipient from the server-side lock record — you only send the lockId.

Body

NameRequiredTypeDescription
lockId✅stringLocked quote ID returned by POST /api/v1/quote/lock.
referralCode—stringAffiliate referral code. If omitted, the code stored on the lock is used.
curl -s "https://api.7.exchange/api/v1/quote/execute" \ -H "Content-Type: application/json" \ -d '{ "lockId": "locked-quote-id", "referralCode": "your-referral-code" }'

The response is provider-specific. When the backend can record the swap, it includes a transaction object with public transaction data. If exec includes wallet execution data, perform the wallet action and then call POST /api/v1/transaction/track with the resulting hash.

200 OK
{ "data": { "provider": "ACROSS_PROTOCOL", "lockId": "locked-quote-id", "providerResult": { "txHash": "0xProviderOrDepositHash", "status": "PENDING" }, "quote": { "src": { "formatted": "50", "currency": "USDC", "usd": "50" }, "dst": { "formatted": "49.8", "currency": "USDC", "usd": "49.8" }, "fees": { "total": { "usd": "0.20", "formatted": "$0.20" }, "items": [ { "type": "bridge_fee", "amount": "200000", "token": { "chainId": 42161, "address": "0xaf88d065e77c8cC2239327C5EDb3A432268e5831", "symbol": "USDC", "decimals": 6 }, "amountUsd": "0.20", "description": "Bridge fee", "providerLabel": "Bridge fee" } ] }, "steps": [ { "type": "bridge", "name": "Across", "image": "https://..." } ] }, "exec": { "chainId": 1, "providerTarget": "0x...", "providerCalldata": "0x...", "value": "0", "meta": { "providerQuoteId": "provider-quote-id" } }, "transaction": { "id": "public-transaction-id", "status": "PENDING" } } }

Transaction Status

GET /api/v1/transaction/status

Returns the current public status for a transaction. Use this for polling after execute. Accepts the public transaction id returned by execute, or any known transaction hash.

Query parameters

NameTypeDescription
transactionIdstringPublic transaction ID returned as transaction.id. Required when hash is omitted.
hashstringTransaction hash lookup. Searches hash, inboundHash, and outboundHash. Required when transactionId is omitted.
curl -s "https://api.7.exchange/api/v1/transaction/status?transactionId=public-transaction-id"
200 OK
{ "data": { "transaction": { "id": "public-transaction-id", "hash": "0x...", "inboundHash": "0x...", "outboundHash": null, "provider": "ACROSS_PROTOCOL", "status": "PENDING", "srcAmount": "50", "dstAmount": "49.8", "walletAddress": "0xYourSourceWallet", "recipientWalletAddress": "0xYourDestinationWallet", "createdAt": "2026-06-30T00:00:00.000Z", "updatedAt": "2026-06-30T00:01:00.000Z", "fee": { "amount": "0.20", "amountUsd": 0.2, "currency": "USD", "details": { "total": { "usd": "0.20", "formatted": "$0.20" }, "items": [ { "type": "bridge_fee", "amount": "200000", "token": { "chainId": 42161, "address": "0xaf88d065e77c8cC2239327C5EDb3A432268e5831", "symbol": "USDC", "decimals": 6 }, "amountUsd": "0.20", "description": "Bridge fee" } ] } }, "srcAsset": { "id": 101, "symbol": "USDC", "contract": "0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48", "image": "https://...", "chain": "ethereum" }, "dstAsset": { "id": 202, "symbol": "USDC", "contract": "0xaf88d065e77c8cC2239327C5EDb3A432268e5831", "image": "https://...", "chain": "arbitrum" } }, "final": false } }

Status values

StatusfinalMeaning
PENDINGfalseIn progress. Keep polling.
SUCCESStrueCompleted.
FAILEDtrueDid not complete.
REFUNDtrueFunds returned to the depositor.

Track Transaction

POST /api/v1/transaction/track

Starts or refreshes provider status tracking for a transaction already recorded by execute. Normal execute responses start tracking automatically when enough provider context is available.

Use this endpoint only when:

  • Your client performs a wallet transaction after execute and receives a hash.
  • The user manually sends a direct deposit and your client later learns the deposit hash.
  • You want to refresh backend-owned tracking for an already recorded transaction.

Never send provider metadata — provider key, request ID, channel ID, provider quote ID, chain ID, deposit address, or deposit memo. The backend stores provider tracking context during execute and ignores client-supplied provider metadata. Never ask users or integrators to supply these values either; they are backend-owned execution context.

Body

NameRequiredTypeDescription
transactionId✅stringPublic transaction ID returned as transaction.id.
txHash—stringSource, deposit, or inbound transaction hash. TON external-message BoCs are accepted when stored provider context is sufficient to resolve them.
curl -s "https://api.7.exchange/api/v1/transaction/track" \ -H "Content-Type: application/json" \ -d '{ "transactionId": "public-transaction-id", "txHash": "0xDepositHash" }'
200 OK
{ "data": { "transaction": { "id": "public-transaction-id", "hash": "0xDepositHash", "inboundHash": "0xDepositHash", "provider": "ACROSS_PROTOCOL", "status": "PENDING" }, "final": false, "tracking": true } }

Tracking by execution mode

The backend records the provider reference and starts tracking during POST /api/v1/quote/execute. No track call is needed — poll GET /api/v1/transaction/status immediately.

Transaction History

GET /api/v1/transaction/history

Returns public transaction history. Pass wallet addresses to scope results.

Query parameters

NameTypeDescription
addressesstring | string[]Wallet address filter. Repeatable or comma-separated.
pagenumberPage number.
perPagenumberResults per page. Defaults to 20, maximum 50.
querystringSearch term.
referralCodestringExact referral code filter.
transactionIdstringPublic transaction ID filter.
statusesstring | string[]SUCCESS, PENDING, FAILED, or REFUND. Repeatable or comma-separated.
finalizedOnlybooleanWhen true, only finalized transactions are returned.
curl -s "https://api.7.exchange/api/v1/transaction/history?addresses=0xYourWallet&perPage=20"
200 OK
{ "data": [ { "id": "public-transaction-id", "status": "PENDING", "provider": "ACROSS_PROTOCOL", "hash": "0x...", "inboundHash": "0x...", "outboundHash": null, "srcAmount": "50", "dstAmount": "49.8", "amountUsd": 50, "walletAddress": "0xYourSourceWallet", "recipientWalletAddress": "0xYourDestinationWallet", "createdAt": "2026-06-30T00:00:00.000Z", "fee": { "amount": "0.20", "amountUsd": 0.2, "currency": "USD", "details": { "total": { "usd": "0.20", "formatted": "$0.20" }, "items": [ { "type": "bridge_fee", "amount": "200000", "token": { "chainId": 42161, "address": "0xaf88d065e77c8cC2239327C5EDb3A432268e5831", "symbol": "USDC", "decimals": 6 }, "amountUsd": "0.20", "description": "Bridge fee" } ] } }, "srcAsset": { "id": 101, "symbol": "USDC", "contract": "0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48", "image": "https://...", "chain": "ethereum" }, "dstAsset": { "id": 202, "symbol": "USDC", "contract": "0xaf88d065e77c8cC2239327C5EDb3A432268e5831", "image": "https://...", "chain": "arbitrum" } } ], "pagination": { "page": 1, "perPage": 20, "total": 1, "hasMore": false } }

Schemas

Quote fees object

Quote preview, lock, and nested execute quote responses return a fees object.

Legacy quote-level fee and feeBreakdown fields are not returned on public quote responses. Use fees instead.

FieldTypeDescription
totalobjectNormalized total fee summary.
itemsarrayNormalized fee line items, each with a typed category and token identity when known.

fees.total:

FieldTypeDescription
usdstringEstimated total fee value in USD.
formattedstringHuman-readable total fee value.

fees.items[]:

FieldTypeDescription
typestringOne of the fee item types.
amountstringToken amount for this item. Use token.decimals for display. May be signed for rewards or rebates.
tokenobjectToken identity: chainId, address, symbol, decimals.
amountUsdstringEstimated USD value when known.
descriptionstringHuman-readable explanation from the backend or provider.
providerLabelstringOriginal provider label, useful for debugging or display.
chainobjectChain identity: chainId, sometimes name.

Fee item types

TypeDescription
source_gasSource-chain gas or network cost.
destination_gasDestination-chain gas, outbound, or egress cost.
liquidity_feeLiquidity provider, pool, or route liquidity fee.
protocol_feeProvider or protocol service fee not more specifically classified.
bridge_feeBridge or relayer service fee for cross-chain transfer execution.
integrator_feeAffiliate, broker, or integrator fee.
swap_impactPrice impact, spread, or market-depth value impact from a swap leg.
route_lossQuote-level route value loss not exposed by the provider as a specific fee item.
messaging_feeCross-chain message delivery fee, such as a LayerZero messaging fee.
boost_feeOptional speed, priority, or boost fee.
gas_drop_feeDestination native-token gas drop sent to the recipient.
cctp_feeCircle CCTP receive, attestation, or finality fee.
transfer_feeToken or network transfer fee not captured by gas, bridge, or protocol categories.
transfer_rewardReward, rebate, or negative fee that offsets route cost.
otherProvider fee item that cannot be classified into a known category.

New fee item types can be added within v1. Render unknown types using description and providerLabel rather than dropping them — that’s what other and the fallback fields are for.

Transaction fee object

Transaction status and history responses return a recorded fee object. It may be empty when a transaction has no recorded fee details.

FieldTypeDescription
amountstring | nullRecorded fee amount when known.
amountUsdnumber | nullRecorded fee value in USD when known.
currencystring | nullCurrency or token symbol for amount.
detailsobject | array | nullRecorded fee details. When populated from a quote, items use the fees.items[] shape.

Transaction asset object

Status and history responses include srcAsset and dstAsset snapshots, recorded when execute creates the transaction.

FieldTypeDescription
idnumber | nullInternal asset ID.
symbolstring | nullToken symbol.
contractstring | nullToken contract address, or null for native assets.
imagestring | nullToken image URL.
chainstring | nullChain key.

Execute exec object

exec appears on execute responses when the selected route needs client-side wallet execution or exposes execution metadata. It is intentionally not returned by quote preview or lock.

FieldTypeDescription
chainIdnumber | nullNumeric source chain ID for wallet execution when applicable.
providerTargetstringContract, deposit, or provider target address for a wallet call.
providerCalldatastringHex calldata for EVM wallet execution.
valuestringNative token value to send, in base units.
srcTokenstringSource token address or native.
srcAmountstringSource amount in base units.
approvalTargetstringToken approval spender when an approval is required.
approvalTokenstringToken to approve when an approval is required.
approvalAmountstringApproval amount in base units.
allStepsarrayOrdered provider execution steps. If present, execute them in order.
metaobjectProvider execution metadata — providerQuoteId, deposit address, channel ID, wallet execution data. Raw provider payloads and request params are not returned.

Never send exec.meta, provider IDs, request IDs, channel IDs, provider quote IDs, chain IDs, deposit addresses, or deposit memos back to POST /api/v1/transaction/track. The backend stores provider tracking context server-side during execute.

Provider-specific objects

Some execute response fields — especially providerResult and parts of quote — are provider-specific. Read only the fields you need and tolerate additional ones.

ObjectCommon fieldsNotes
providerResulttxHash, status, requestId, channelId, depositAddress, depositMemo, executionShape depends on provider and execution mode. Never send these back to tracking.
quotesrc, dst, steps, fees, estimatedTimeStored route snapshot used for display and transaction recording.
exec.metaproviderQuoteId, selectedQuoteId, executionMode, walletExecution, depositAddress, channelIdClient wallet execution only. Raw provider payloads and original request params are stripped from public responses.

Errors

All failures use one envelope:

Error response
{ "error": { "code": "INVALID_AMOUNT", "message": "amount must be a positive number string", "field": "amount", "requestId": "req_01H...", "details": { "errors": [ { "code": "INVALID_AMOUNT", "field": "amount", "message": "amount must be a positive number string" } ] } } }

Branch on error.code, never on error.message — messages are human-facing and can change without a version bump. When multiple validation errors are found, they’re all returned in error.details.errors.

FailureStatusCode
Missing or invalid required field400VALIDATION_ERROR
Invalid amount400INVALID_AMOUNT
Invalid slippage400INVALID_SLIPPAGE
Invalid participant address400INVALID_ADDRESS
Same-chain same-asset swap400UNSUPPORTED_PAIR
Missing provider on lock400MISSING_PROVIDER
Missing lockId on execute400MISSING_LOCK_ID
Expired or already-used lock409QUOTE_EXPIRED
Provider unavailable for the selected route409 / 503PROVIDER_UNAVAILABLE
Rate limited429RATE_LIMITED
Backend error500INTERNAL_ERROR
Upstream / provider error502 / 503BAD_GATEWAY / SERVICE_UNAVAILABLE

Include error.requestId (or the X-Request-Id response header) when reporting a problem in #dev-general  — it lets us trace the exact request.

Affiliate Referral Codes

There is no API-key generation flow for integrators. To attribute swaps:

Create an account

Sign up or sign in to 7.Exchange in the webapp.

Open the affiliate dashboard

Complete the affiliate flow.

Create or copy a referral code

Your referral link contains the code.

Send it with lock and execute

Pass it as referralCode in POST /api/v1/quote/lock and POST /api/v1/quote/execute.

See the referral program for payout details.

Support

Breaking changes are announced in #dev-announcements ahead of release. If you’re running an integration in production, subscribe to that channel — it’s the only place changes are communicated before they appear in the changelog.

Last updated on