COINS
Loading coins
NEWS
Loading news
← All Build APIs

SWAP API / DEVELOPER BETA

Solana swap API for bots and wallets

Add token swaps to your app. Get an order, let the user sign, then relay the signed transaction.

Built for wallet apps, telegram bot interfaces and trading dashboards.

YOUR APP / POWERED BY ATTN
SWAP PREVIEWIllustration
You pay1.00 SOL
Illustrative output150.00 USDC
Fees visible in the quoteWallet signs next

See the swap before signing.

GET /api/swap/order
Interactive illustration · sample values, no live quote or transaction.

A quote you can inspect

Input and output amounts, route information and returned fee fields, before the user signs.

The wallet stays in control

Add a taker address to request an unsigned order. The client signs; ATTN receives only signed transaction bytes.

An execution response

Send signedTransaction, requestId and taker to POST /api/swap/execute. Handle the returned result before updating your UI.

MAKE A REAL REQUEST

See the quote before writing code.

Live beta demo. Availability depends on the configured providers and their rate limits.

Quote only. No wallet connection or signature required.

INTEGRATE

GET /api/swap/order

cURL · Request example
curl "https://www.attn.money/api/swap/order?inputMint=So11111111111111111111111111111111111111112&outputMint=EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v&amount=10000000"

Query parameters

Request parameters
ParameterRequiredMeaning
inputMintRequiredBase58 mint address of the token being sold.
outputMintRequiredBase58 mint address of the token being bought.
amountRequiredPositive integer string in input-token base units. 0.01 SOL = 10000000 lamports.
takerOptional for quotesConnected wallet address. Needed when requesting a transaction for that wallet.
slippageBpsOptionalInteger basis points. Pass a deliberate tolerance; 100 bps = 1%.

HANDLE THE RESPONSE

Use the fields. Keep the context.

order.inAmount / order.outAmount
Quoted amounts in the respective token base units.
order.requestId
Keep with the order and use for execution.
order.transaction
Unsigned transaction when the provider returns one for the supplied taker.
order.feeBps / order.platformFee
Inspect the actual returned fee fields before displaying or signing the order.
feeApplied
The relay reports whether its configured referral was applied. This is not a settlement receipt.
400 · Invalid input

Check addresses, amounts and request fields before retrying.

429 · Rate limited

Back off and retry within your confirmed API limits.

Provider failure

Handle non-success responses explicitly. Never present missing data as a completed check or swap.

THE INTEGRATION

Before you integrate

See where the quote ends and wallet approval begins.

Illustrated preview
No live transaction
Show the quote and its costs, ask the user to approve in their wallet, then relay the signed order.
Does the quote demo move funds?

No. It requests a quote without a taker or wallet signature. It never calls the execution endpoint.

Why use ATTN instead of integrating Jupiter directly?

Use ATTN when you want token checks, a consistent request flow and integration help in one place. Direct Jupiter is a valid choice if you only need routing. ATTN does not claim better prices than the underlying router.

When do swap fees generate revenue?

Only after an eligible swap executes with the intended fee configuration. Referral accounts and fee-token accounts must be configured and settlement verified; a quote alone earns nothing.

PILOT ACCESS

Start small. Confirm the costs.

Proposed managed-swap pilot: a disclosed 0.5% referral fee on eligible executed volume. Network costs and quote-specific charges remain visible in the order. Production fees must be confirmed during onboarding.

Paid access is not self-serve yet. Request a confirmed pilot before paying or sending production traffic.