curl --request POST \
--url https://api.jup.ag/swap/v2/jupiterz/execute \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"requestId": "629bddf3-0038-43a6-8956-f5433d6b1191",
"quoteId": "59db3e19-c7b0-4753-a8aa-206701004498",
"transaction": "<string>"
}
'import requests
url = "https://api.jup.ag/swap/v2/jupiterz/execute"
payload = {
"requestId": "629bddf3-0038-43a6-8956-f5433d6b1191",
"quoteId": "59db3e19-c7b0-4753-a8aa-206701004498",
"transaction": "<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({
requestId: '629bddf3-0038-43a6-8956-f5433d6b1191',
quoteId: '59db3e19-c7b0-4753-a8aa-206701004498',
transaction: '<string>'
})
};
fetch('https://api.jup.ag/swap/v2/jupiterz/execute', 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://api.jup.ag/swap/v2/jupiterz/execute",
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([
'requestId' => '629bddf3-0038-43a6-8956-f5433d6b1191',
'quoteId' => '59db3e19-c7b0-4753-a8aa-206701004498',
'transaction' => '<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://api.jup.ag/swap/v2/jupiterz/execute"
payload := strings.NewReader("{\n \"requestId\": \"629bddf3-0038-43a6-8956-f5433d6b1191\",\n \"quoteId\": \"59db3e19-c7b0-4753-a8aa-206701004498\",\n \"transaction\": \"<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://api.jup.ag/swap/v2/jupiterz/execute")
.header("x-api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"requestId\": \"629bddf3-0038-43a6-8956-f5433d6b1191\",\n \"quoteId\": \"59db3e19-c7b0-4753-a8aa-206701004498\",\n \"transaction\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.jup.ag/swap/v2/jupiterz/execute")
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 \"requestId\": \"629bddf3-0038-43a6-8956-f5433d6b1191\",\n \"quoteId\": \"59db3e19-c7b0-4753-a8aa-206701004498\",\n \"transaction\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"quoteId": "59db3e19-c7b0-4753-a8aa-206701004498",
"state": "confirmed",
"signature": "<string>"
}{
"error": "59db3e19-c7b0-4753-a8aa-206701004498",
"errorCode": "QUOTE_EXPIRED"
}{
"error": "No quote found",
"errorCode": "NO_QUOTE_FOUND"
}{
"error": "No quote found",
"errorCode": "NO_QUOTE_FOUND"
}{
"error": "No quote found",
"errorCode": "NO_QUOTE_FOUND"
}Execute Order
Submit a taker-signed transaction for the market maker to fill
curl --request POST \
--url https://api.jup.ag/swap/v2/jupiterz/execute \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"requestId": "629bddf3-0038-43a6-8956-f5433d6b1191",
"quoteId": "59db3e19-c7b0-4753-a8aa-206701004498",
"transaction": "<string>"
}
'import requests
url = "https://api.jup.ag/swap/v2/jupiterz/execute"
payload = {
"requestId": "629bddf3-0038-43a6-8956-f5433d6b1191",
"quoteId": "59db3e19-c7b0-4753-a8aa-206701004498",
"transaction": "<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({
requestId: '629bddf3-0038-43a6-8956-f5433d6b1191',
quoteId: '59db3e19-c7b0-4753-a8aa-206701004498',
transaction: '<string>'
})
};
fetch('https://api.jup.ag/swap/v2/jupiterz/execute', 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://api.jup.ag/swap/v2/jupiterz/execute",
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([
'requestId' => '629bddf3-0038-43a6-8956-f5433d6b1191',
'quoteId' => '59db3e19-c7b0-4753-a8aa-206701004498',
'transaction' => '<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://api.jup.ag/swap/v2/jupiterz/execute"
payload := strings.NewReader("{\n \"requestId\": \"629bddf3-0038-43a6-8956-f5433d6b1191\",\n \"quoteId\": \"59db3e19-c7b0-4753-a8aa-206701004498\",\n \"transaction\": \"<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://api.jup.ag/swap/v2/jupiterz/execute")
.header("x-api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"requestId\": \"629bddf3-0038-43a6-8956-f5433d6b1191\",\n \"quoteId\": \"59db3e19-c7b0-4753-a8aa-206701004498\",\n \"transaction\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.jup.ag/swap/v2/jupiterz/execute")
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 \"requestId\": \"629bddf3-0038-43a6-8956-f5433d6b1191\",\n \"quoteId\": \"59db3e19-c7b0-4753-a8aa-206701004498\",\n \"transaction\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"quoteId": "59db3e19-c7b0-4753-a8aa-206701004498",
"state": "confirmed",
"signature": "<string>"
}{
"error": "59db3e19-c7b0-4753-a8aa-206701004498",
"errorCode": "QUOTE_EXPIRED"
}{
"error": "No quote found",
"errorCode": "NO_QUOTE_FOUND"
}{
"error": "No quote found",
"errorCode": "NO_QUOTE_FOUND"
}{
"error": "No quote found",
"errorCode": "NO_QUOTE_FOUND"
}Authorizations
Get API key via https://developers.jup.ag/portal
Body
requestId from the order response, unchanged
"629bddf3-0038-43a6-8956-f5433d6b1191"
quoteId from the order response, unchanged
"59db3e19-c7b0-4753-a8aa-206701004498"
The order's transaction, signed by the taker and re-encoded as base64.
Sign the transaction as-is: rebuilding it, reordering instructions, or changing
amounts invalidates it
Response
Swap processed. Check state in the body, not just the HTTP status
Echo of the quote ID
"59db3e19-c7b0-4753-a8aa-206701004498"
Outcome of the swap.
confirmed: the swap landed on-chain (terminal).
accepted: the market maker accepted and submitted the swap, on-chain
confirmation is pending. Call /execute again with the same body to re-check.
rejected: the market maker declined to fill.
invalid: the transaction did not pass validation.
failed: network error or timeout reaching the market maker
confirmed, accepted, rejected, invalid, failed "confirmed"
Transaction signature, present once the fill is known
Was this page helpful?
