Submits a declarative swap transaction for processing
curl --request POST \
--url https://quote-api.dflow.net/submit-intent \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"quoteResponse": {
"feeBudget": 1,
"inAmount": "<string>",
"inputMint": "<string>",
"minOutAmount": "<string>",
"otherAmountThreshold": "<string>",
"outAmount": "<string>",
"outputMint": "<string>",
"priceImpactPct": "<string>",
"slippageBps": 1,
"lastValidBlockHeight": 1,
"openTransaction": "<string>",
"platformFee": {
"amount": "<string>",
"feeAccount": "<string>",
"feeBps": 1,
"segmenterFeeAmount": "<string>",
"segmenterFeePct": 1
}
},
"signedOpenTransaction": "<string>"
}
'import requests
url = "https://quote-api.dflow.net/submit-intent"
payload = {
"quoteResponse": {
"feeBudget": 1,
"inAmount": "<string>",
"inputMint": "<string>",
"minOutAmount": "<string>",
"otherAmountThreshold": "<string>",
"outAmount": "<string>",
"outputMint": "<string>",
"priceImpactPct": "<string>",
"slippageBps": 1,
"lastValidBlockHeight": 1,
"openTransaction": "<string>",
"platformFee": {
"amount": "<string>",
"feeAccount": "<string>",
"feeBps": 1,
"segmenterFeeAmount": "<string>",
"segmenterFeePct": 1
}
},
"signedOpenTransaction": "<string>"
}
headers = {
"x-api-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'x-api-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
quoteResponse: {
feeBudget: 1,
inAmount: '<string>',
inputMint: '<string>',
minOutAmount: '<string>',
otherAmountThreshold: '<string>',
outAmount: '<string>',
outputMint: '<string>',
priceImpactPct: '<string>',
slippageBps: 1,
lastValidBlockHeight: 1,
openTransaction: '<string>',
platformFee: {
amount: '<string>',
feeAccount: '<string>',
feeBps: 1,
segmenterFeeAmount: '<string>',
segmenterFeePct: 1
}
},
signedOpenTransaction: '<string>'
})
};
fetch('https://quote-api.dflow.net/submit-intent', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://quote-api.dflow.net/submit-intent",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'quoteResponse' => [
'feeBudget' => 1,
'inAmount' => '<string>',
'inputMint' => '<string>',
'minOutAmount' => '<string>',
'otherAmountThreshold' => '<string>',
'outAmount' => '<string>',
'outputMint' => '<string>',
'priceImpactPct' => '<string>',
'slippageBps' => 1,
'lastValidBlockHeight' => 1,
'openTransaction' => '<string>',
'platformFee' => [
'amount' => '<string>',
'feeAccount' => '<string>',
'feeBps' => 1,
'segmenterFeeAmount' => '<string>',
'segmenterFeePct' => 1
]
],
'signedOpenTransaction' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"x-api-key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://quote-api.dflow.net/submit-intent"
payload := strings.NewReader("{\n \"quoteResponse\": {\n \"feeBudget\": 1,\n \"inAmount\": \"<string>\",\n \"inputMint\": \"<string>\",\n \"minOutAmount\": \"<string>\",\n \"otherAmountThreshold\": \"<string>\",\n \"outAmount\": \"<string>\",\n \"outputMint\": \"<string>\",\n \"priceImpactPct\": \"<string>\",\n \"slippageBps\": 1,\n \"lastValidBlockHeight\": 1,\n \"openTransaction\": \"<string>\",\n \"platformFee\": {\n \"amount\": \"<string>\",\n \"feeAccount\": \"<string>\",\n \"feeBps\": 1,\n \"segmenterFeeAmount\": \"<string>\",\n \"segmenterFeePct\": 1\n }\n },\n \"signedOpenTransaction\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-api-key", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://quote-api.dflow.net/submit-intent")
.header("x-api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"quoteResponse\": {\n \"feeBudget\": 1,\n \"inAmount\": \"<string>\",\n \"inputMint\": \"<string>\",\n \"minOutAmount\": \"<string>\",\n \"otherAmountThreshold\": \"<string>\",\n \"outAmount\": \"<string>\",\n \"outputMint\": \"<string>\",\n \"priceImpactPct\": \"<string>\",\n \"slippageBps\": 1,\n \"lastValidBlockHeight\": 1,\n \"openTransaction\": \"<string>\",\n \"platformFee\": {\n \"amount\": \"<string>\",\n \"feeAccount\": \"<string>\",\n \"feeBps\": 1,\n \"segmenterFeeAmount\": \"<string>\",\n \"segmenterFeePct\": 1\n }\n },\n \"signedOpenTransaction\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://quote-api.dflow.net/submit-intent")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-api-key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"quoteResponse\": {\n \"feeBudget\": 1,\n \"inAmount\": \"<string>\",\n \"inputMint\": \"<string>\",\n \"minOutAmount\": \"<string>\",\n \"otherAmountThreshold\": \"<string>\",\n \"outAmount\": \"<string>\",\n \"outputMint\": \"<string>\",\n \"priceImpactPct\": \"<string>\",\n \"slippageBps\": 1,\n \"lastValidBlockHeight\": 1,\n \"openTransaction\": \"<string>\",\n \"platformFee\": {\n \"amount\": \"<string>\",\n \"feeAccount\": \"<string>\",\n \"feeBps\": 1,\n \"segmenterFeeAmount\": \"<string>\",\n \"segmenterFeePct\": 1\n }\n },\n \"signedOpenTransaction\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"openTransactionSignature": "<string>",
"orderAddress": "<string>",
"programId": "<string>"
}{
"code": "<enum<string>>",
"msg": "<string>"
}Declarative
Submit Intent Swap
API reference for POST /submit-intent
POST
/
submit-intent
Submits a declarative swap transaction for processing
curl --request POST \
--url https://quote-api.dflow.net/submit-intent \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"quoteResponse": {
"feeBudget": 1,
"inAmount": "<string>",
"inputMint": "<string>",
"minOutAmount": "<string>",
"otherAmountThreshold": "<string>",
"outAmount": "<string>",
"outputMint": "<string>",
"priceImpactPct": "<string>",
"slippageBps": 1,
"lastValidBlockHeight": 1,
"openTransaction": "<string>",
"platformFee": {
"amount": "<string>",
"feeAccount": "<string>",
"feeBps": 1,
"segmenterFeeAmount": "<string>",
"segmenterFeePct": 1
}
},
"signedOpenTransaction": "<string>"
}
'import requests
url = "https://quote-api.dflow.net/submit-intent"
payload = {
"quoteResponse": {
"feeBudget": 1,
"inAmount": "<string>",
"inputMint": "<string>",
"minOutAmount": "<string>",
"otherAmountThreshold": "<string>",
"outAmount": "<string>",
"outputMint": "<string>",
"priceImpactPct": "<string>",
"slippageBps": 1,
"lastValidBlockHeight": 1,
"openTransaction": "<string>",
"platformFee": {
"amount": "<string>",
"feeAccount": "<string>",
"feeBps": 1,
"segmenterFeeAmount": "<string>",
"segmenterFeePct": 1
}
},
"signedOpenTransaction": "<string>"
}
headers = {
"x-api-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'x-api-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
quoteResponse: {
feeBudget: 1,
inAmount: '<string>',
inputMint: '<string>',
minOutAmount: '<string>',
otherAmountThreshold: '<string>',
outAmount: '<string>',
outputMint: '<string>',
priceImpactPct: '<string>',
slippageBps: 1,
lastValidBlockHeight: 1,
openTransaction: '<string>',
platformFee: {
amount: '<string>',
feeAccount: '<string>',
feeBps: 1,
segmenterFeeAmount: '<string>',
segmenterFeePct: 1
}
},
signedOpenTransaction: '<string>'
})
};
fetch('https://quote-api.dflow.net/submit-intent', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://quote-api.dflow.net/submit-intent",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'quoteResponse' => [
'feeBudget' => 1,
'inAmount' => '<string>',
'inputMint' => '<string>',
'minOutAmount' => '<string>',
'otherAmountThreshold' => '<string>',
'outAmount' => '<string>',
'outputMint' => '<string>',
'priceImpactPct' => '<string>',
'slippageBps' => 1,
'lastValidBlockHeight' => 1,
'openTransaction' => '<string>',
'platformFee' => [
'amount' => '<string>',
'feeAccount' => '<string>',
'feeBps' => 1,
'segmenterFeeAmount' => '<string>',
'segmenterFeePct' => 1
]
],
'signedOpenTransaction' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"x-api-key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://quote-api.dflow.net/submit-intent"
payload := strings.NewReader("{\n \"quoteResponse\": {\n \"feeBudget\": 1,\n \"inAmount\": \"<string>\",\n \"inputMint\": \"<string>\",\n \"minOutAmount\": \"<string>\",\n \"otherAmountThreshold\": \"<string>\",\n \"outAmount\": \"<string>\",\n \"outputMint\": \"<string>\",\n \"priceImpactPct\": \"<string>\",\n \"slippageBps\": 1,\n \"lastValidBlockHeight\": 1,\n \"openTransaction\": \"<string>\",\n \"platformFee\": {\n \"amount\": \"<string>\",\n \"feeAccount\": \"<string>\",\n \"feeBps\": 1,\n \"segmenterFeeAmount\": \"<string>\",\n \"segmenterFeePct\": 1\n }\n },\n \"signedOpenTransaction\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-api-key", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://quote-api.dflow.net/submit-intent")
.header("x-api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"quoteResponse\": {\n \"feeBudget\": 1,\n \"inAmount\": \"<string>\",\n \"inputMint\": \"<string>\",\n \"minOutAmount\": \"<string>\",\n \"otherAmountThreshold\": \"<string>\",\n \"outAmount\": \"<string>\",\n \"outputMint\": \"<string>\",\n \"priceImpactPct\": \"<string>\",\n \"slippageBps\": 1,\n \"lastValidBlockHeight\": 1,\n \"openTransaction\": \"<string>\",\n \"platformFee\": {\n \"amount\": \"<string>\",\n \"feeAccount\": \"<string>\",\n \"feeBps\": 1,\n \"segmenterFeeAmount\": \"<string>\",\n \"segmenterFeePct\": 1\n }\n },\n \"signedOpenTransaction\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://quote-api.dflow.net/submit-intent")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-api-key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"quoteResponse\": {\n \"feeBudget\": 1,\n \"inAmount\": \"<string>\",\n \"inputMint\": \"<string>\",\n \"minOutAmount\": \"<string>\",\n \"otherAmountThreshold\": \"<string>\",\n \"outAmount\": \"<string>\",\n \"outputMint\": \"<string>\",\n \"priceImpactPct\": \"<string>\",\n \"slippageBps\": 1,\n \"lastValidBlockHeight\": 1,\n \"openTransaction\": \"<string>\",\n \"platformFee\": {\n \"amount\": \"<string>\",\n \"feeAccount\": \"<string>\",\n \"feeBps\": 1,\n \"segmenterFeeAmount\": \"<string>\",\n \"segmenterFeePct\": 1\n }\n },\n \"signedOpenTransaction\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"openTransactionSignature": "<string>",
"orderAddress": "<string>",
"programId": "<string>"
}{
"code": "<enum<string>>",
"msg": "<string>"
}Most builders use
GET /order, which returns a fully constructed transaction in one call. POST /submit-intent is the second step of the opt-in intent flow for builders who need stronger sandwich resistance on standard SPL pairs: pair it with GET /intent. Token-2022 mints are not supported on this flow; use GET /order for those.Authorizations
API key for authentication. Contact hello@dflow.net to obtain an API key.
Body
application/json
⌘I