Build transactions

Build exact-input swap transactions without broadcasting them.

Recommended unsigned flow

Omit wallets.privateKey. The response contains unsignedTransactions; sign every entry locally, then submit the signed values through /swap/api/v1/transaction with type: "submit".

If wallets.privateKey is supplied, the response contains signed transactions in result. Avoid this mode unless your backend can handle private keys securely.

Supported routes

ChainExchanges/routes
SolanaPump.fun, PumpAMM, Raydium CLMM/CPMM, Jupiter
EthereumUniswap V2/V3
BaseUniswap V2/V3
BSCFourmeme, PancakeSwap V2

Only exact-input swaps are supported. Route availability can vary by deployment configuration.

Jupiter

Jupiter supports Solana only, returns exactly one unsigned transaction, does not support tax or buildAndSubmit, and ignores MEV settings. Sign the returned transaction without modifying its message. When submitting, return the unchanged requestId and lastValidBlockHeight; the order is bound to the API credential and cannot be replayed after successful execution.

Recent Requests
Log in to see full request history
TimeStatusUser Agent
Retrieving recent requests…
LoadingLoading…
Body Params

Create the plaintext JSON described below, then encrypt it. The private key is optional and should normally be omitted.

The HTTP body is encrypted text. Before encryption, create this JSON object:

Decrypted JSON fieldRequiredDescription
chainYessol, eth, bsc, or base
exchangeYespump, pump.fun, pumpamm, raydium, jupiter, uniswap, fourmeme, or pancakeswap; see compatibility table below
typeYesexactIn; exact-output builds are not supported
sideYesbuy or sell
swap.exactInAmountYesHuman-readable input-token amount, supplied as a string
swap.slippageNoMaximum slippage percentage, supplied as a string
swap.minOutAmountNoMinimum human-readable output-token amount
swap.exactOutAmountReservedExact-output is unsupported; omit or set numeric zero
swap.maxInAmountReservedExact-output is unsupported; omit or set numeric zero
wallets.addressYesWallet public address
wallets.idNoYour wallet identifier
wallets.privateKeyNoOmit to receive unsignedTransactions; include only for server-side signing
poolAddressRoute-specificRequired for direct pool routes; omit for Jupiter
baseTokenRoute-specificBase token address or mint
quoteTokenRoute-specificQuote token address or mint; required for a requested Jupiter pair
sltpNoUp to 10 stop-loss/take-profit entries with curvePercent, duration, percentInAmount, profitPercent, and slippage
settingNoSupports antiMev, antiMevProvider, mevPriorityFee, mevTip, priorityFee, and wrappedNative
tax.receiverAddressTax onlyFee recipient address
tax.typeTax onlyOnly percent is supported
tax.valueTax onlyPercentage string from 0.01 through 10

Exchange options

ChainValues
Solanapump (or alias pump.fun), pumpamm, raydium, jupiter
Ethereumuniswap
Baseuniswap
BSCfourmeme, pancakeswap

setting options

FieldType/defaultDescription
antiMevboolean, falseEnable protected submission
antiMevProviderenum, optionalChoose from the provider table below; omit to use the configured chain default
mevPriorityFeenumeric stringProvider priority fee in the chain native token
mevTipnumeric stringProvider tip in the chain native token
priorityFeenumeric stringStandard priority fee in the chain native token
wrappedNativeboolean, falseRequest wrapped-native-token behavior where supported

antiMevProvider options

Set setting.antiMev to true, then optionally select one of these exact values:

ChainantiMevProvider values
Solanajito, nextblock, temporal, cbase, zeroslot, bloxroute
BSCbloxroute
EthereumNot supported
BaseNot supported

Jupiter ignores anti-MEV settings because it handles landing.

Recommended plaintext example:

{
  "chain": "sol",
  "exchange": "raydium",
  "poolAddress": "POOL_ADDRESS",
  "baseToken": "TOKEN_MINT",
  "type": "exactIn",
  "side": "buy",
  "swap": {
    "exactInAmount": "1",
    "slippage": "1"
  },
  "wallets": {
    "address": "YOUR_WALLET_ADDRESS",
    "id": "wallet_1"
  },
  "setting": {
    "priorityFee": "0.0001"
  }
}

Stringify this object, encrypt it as AES-256-GCM using 12-byte nonce || ciphertext || 16-byte tag, encode it with unpadded Base64URL, and send that string as the text/plain body. The ReadMe Node.js sample performs these steps.

Responses

Language
Credentials
Header
URL
LoadingLoading…
Response
Choose an example:
application/json