curl --request POST \
--url https://quote-api.dflow.net/swap \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"quoteResponse": {
"contextSlot": 1,
"inAmount": "<string>",
"inputMint": "<string>",
"minOutAmount": "<string>",
"otherAmountThreshold": "<string>",
"outAmount": "<string>",
"outputMint": "<string>",
"priceImpactPct": "<string>",
"routePlan": [
{
"data": "<string>",
"inAmount": "<string>",
"inputMint": "<string>",
"inputMintDecimals": 1,
"marketKey": "<string>",
"outAmount": "<string>",
"outputMint": "<string>",
"outputMintDecimals": 1,
"venue": "<string>"
}
],
"slippageBps": 1,
"forJitoBundle": true,
"outTransferFee": "<string>",
"platformFee": {
"amount": "<string>",
"feeBps": 1
},
"requestId": "<string>",
"routingSlot": 1,
"simulatedComputeUnits": 1,
"skipPumpfunCashbackClaim": true
},
"userPublicKey": "<string>",
"computeUnitPriceMicroLamports": 1,
"destinationTokenAccount": {
"associatedTokenAccount": {
"owner": "<string>"
}
},
"dynamicComputeUnitLimit": true,
"feeAccount": "<string>",
"includeJitoSandwichMitigationAccount": true,
"outputCloseAuthority": "<string>",
"perLegSlippage": true,
"prioritizationFeeLamports": {
"autoMultiplier": 1
},
"sponsor": "<string>",
"sponsorExec": true,
"wrapAndUnwrapSol": true
}
'{
"computeUnitLimit": 1,
"lastValidBlockHeight": 1,
"prioritizationFeeLamports": 1,
"swapTransaction": "<string>",
"prioritizationType": {
"computeBudget": {
"microLamports": 1,
"estimatedMicroLamports": 1
}
}
}Create Swap
API reference for POST /swap
curl --request POST \
--url https://quote-api.dflow.net/swap \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"quoteResponse": {
"contextSlot": 1,
"inAmount": "<string>",
"inputMint": "<string>",
"minOutAmount": "<string>",
"otherAmountThreshold": "<string>",
"outAmount": "<string>",
"outputMint": "<string>",
"priceImpactPct": "<string>",
"routePlan": [
{
"data": "<string>",
"inAmount": "<string>",
"inputMint": "<string>",
"inputMintDecimals": 1,
"marketKey": "<string>",
"outAmount": "<string>",
"outputMint": "<string>",
"outputMintDecimals": 1,
"venue": "<string>"
}
],
"slippageBps": 1,
"forJitoBundle": true,
"outTransferFee": "<string>",
"platformFee": {
"amount": "<string>",
"feeBps": 1
},
"requestId": "<string>",
"routingSlot": 1,
"simulatedComputeUnits": 1,
"skipPumpfunCashbackClaim": true
},
"userPublicKey": "<string>",
"computeUnitPriceMicroLamports": 1,
"destinationTokenAccount": {
"associatedTokenAccount": {
"owner": "<string>"
}
},
"dynamicComputeUnitLimit": true,
"feeAccount": "<string>",
"includeJitoSandwichMitigationAccount": true,
"outputCloseAuthority": "<string>",
"perLegSlippage": true,
"prioritizationFeeLamports": {
"autoMultiplier": 1
},
"sponsor": "<string>",
"sponsorExec": true,
"wrapAndUnwrapSol": true
}
'{
"computeUnitLimit": 1,
"lastValidBlockHeight": 1,
"prioritizationFeeLamports": 1,
"swapTransaction": "<string>",
"prioritizationType": {
"computeBudget": {
"microLamports": 1,
"estimatedMicroLamports": 1
}
}
}Documentation Index
Fetch the complete documentation index at: https://pond.dflow.net/llms.txt
Use this file to discover all available pages before exploring further.
/order endpoint for new
integrations. This endpoint is still available but /order is the preferred
approach. For a code example, see the
Spot Quickstart.Authorizations
API key for authentication. Contact hello@dflow.net to obtain an API key.
Body
The response from the quote endpoint
Show child attributes
Show child attributes
Base58-encoded address of the swapper's wallet
Compute unit price in micro-lamports. Mutually exclusive with prioritizationFeeLamports.
x >= 0If the fee account isn't a referral token account derived from the seeds
["referral_ata", referral_account, mint] and the Referral program ID
REFER4ZgmyYx9c6He5XfaTMiGfdLwRnkV4RPp9t9iF3, this should be unspecified. If specified, the
transaction will create the fee_account if it doesn't already exist. The user pays for the
creation of the fee account. Ignored if fee_account is unspecified.
Show child attributes
Show child attributes
The account that will receive the output token. If not specified, the user's associated token account for the output mint will be used. Allowed values are:
- A base58-encoded address, which specifies the address of the destination token account or, if the output is native SOL, the destination wallet. If the output isn't native SOL, the specified account must exist before the swap executes, or else the swap will fail.
- An object which specifies the owner of the destination token account. In this case, the
owner's associated token account for the output mint will be used as the destination token
account. Note that this cannot be used if the output is native SOL. The object contains
the following:
associatedTokenAccount- objectowner- base58-encoded address of the owner of the destination token account
- Option 1
- Option 2
Show child attributes
Show child attributes
If true, the server will simulate the transaction to determine its compute unit limit. If unspecified or false, the transaction will use the default compute unit limit.
Base58-encoded address of the token account that will receive the platform fee if a platform fee applies to the swap. If specified, this account's mint must match the fee mint for the swap.
If specified, the transaction will include a Jito sandwich mitigation account in the swap instruction. Allowed values are:
true- uses the default Jito sandwich mitigation accountfalse- does not include the account- A base58-encoded account address - uses the specified account
If unspecified, the account is not included. See https://docs.jito.wtf/lowlatencytxnsend/#sandwich-mitigation for more details.
Base58-encoded address of the close authority to assign to the output token account. If specified, the swap instruction will idempotently initialize the output token account and set its close authority to the specified address. The action is a no-op if the output token account already exists at execution time.
Cannot be used when the output mint is SOL (wrapped or native). Cannot be used with
destinationTokenAccount.
If true or unspecified, per-leg slippage checks are enabled. If false, per-leg slippage checks are disabled.
Positive slippage fee parameters. If specified, then the swap will pay some or all positive slippage to the specified account.
Show child attributes
Show child attributes
Prioritization fee in lamports. Mutually exclusive with computeUnitPriceMicroLamports.
If both computeUnitPriceMicroLamports and prioritizationFeeLamports are unspecified, the
default of prioritizationFeeLamports="auto" will be used.
Allowed values are:
- a u32 which specifies the lamports
- the string value "auto", where the server determines the fee automatically, capped at 0.005 SOL
- the string value "disabled", where the server leaves the prioritization fee unspecified
- an object containing the following
priorityLevelWithMaxLamports- objectpriorityLevel- string, eithermedium,high, orveryHighmaxLamports- integer, a cap on the prioritization fee
- an object containing the following
autoMultiplier- a u32 which specifies how much to multiply the automatically determined fee by. The total prioritization fee will be capped at 0.005 SOL.
Show child attributes
Show child attributes
Base58-encoded address of the sponsor's wallet. If specified, the sponsor will pay the transaction fee and for token account creation, and both the user and the sponsor must sign the swap transaction. This can be used to implement gasless swaps.
If true, the sponsor will be the executor of the swap for sponsored swaps. If false, the user will be the executor of the swap for sponsored swaps. Default is true.
If false, the transaction will use wrapped SOL
Response
Imperative swap transaction
Compute unit limit assigned to the transaction
x >= 0The last block height at which the transaction is valid
x >= 0Prioritization fee in lamports
x >= 0Base64-encoded swap transaction. The user must sign before sending it to Solana.
Prioritization fee type for the transaction
Show child attributes
Show child attributes