Get raw swap instructions
curl --request POST \
--url https://api.vulcx.xyz/api/v1/instructions \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"userWallet": "9WzDXwBbmkg8ZTbNMqUxvQRAyrZzDsGYdLVL9zYtAWWM",
"inputMint": "So11111111111111111111111111111111111111112",
"outputMint": "uSd2czE61Evaf76RNbq4KPpXnkiL3irdzgLFUMe3NoG",
"amount": "1000000000",
"swapMode": "ExactIn",
"slippageBps": 50
}
'import requests
url = "https://api.vulcx.xyz/api/v1/instructions"
payload = {
"userWallet": "9WzDXwBbmkg8ZTbNMqUxvQRAyrZzDsGYdLVL9zYtAWWM",
"inputMint": "So11111111111111111111111111111111111111112",
"outputMint": "uSd2czE61Evaf76RNbq4KPpXnkiL3irdzgLFUMe3NoG",
"amount": "1000000000",
"swapMode": "ExactIn",
"slippageBps": 50
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
userWallet: '9WzDXwBbmkg8ZTbNMqUxvQRAyrZzDsGYdLVL9zYtAWWM',
inputMint: 'So11111111111111111111111111111111111111112',
outputMint: 'uSd2czE61Evaf76RNbq4KPpXnkiL3irdzgLFUMe3NoG',
amount: '1000000000',
swapMode: 'ExactIn',
slippageBps: 50
})
};
fetch('https://api.vulcx.xyz/api/v1/instructions', 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.vulcx.xyz/api/v1/instructions",
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([
'userWallet' => '9WzDXwBbmkg8ZTbNMqUxvQRAyrZzDsGYdLVL9zYtAWWM',
'inputMint' => 'So11111111111111111111111111111111111111112',
'outputMint' => 'uSd2czE61Evaf76RNbq4KPpXnkiL3irdzgLFUMe3NoG',
'amount' => '1000000000',
'swapMode' => 'ExactIn',
'slippageBps' => 50
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$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.vulcx.xyz/api/v1/instructions"
payload := strings.NewReader("{\n \"userWallet\": \"9WzDXwBbmkg8ZTbNMqUxvQRAyrZzDsGYdLVL9zYtAWWM\",\n \"inputMint\": \"So11111111111111111111111111111111111111112\",\n \"outputMint\": \"uSd2czE61Evaf76RNbq4KPpXnkiL3irdzgLFUMe3NoG\",\n \"amount\": \"1000000000\",\n \"swapMode\": \"ExactIn\",\n \"slippageBps\": 50\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
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.vulcx.xyz/api/v1/instructions")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"userWallet\": \"9WzDXwBbmkg8ZTbNMqUxvQRAyrZzDsGYdLVL9zYtAWWM\",\n \"inputMint\": \"So11111111111111111111111111111111111111112\",\n \"outputMint\": \"uSd2czE61Evaf76RNbq4KPpXnkiL3irdzgLFUMe3NoG\",\n \"amount\": \"1000000000\",\n \"swapMode\": \"ExactIn\",\n \"slippageBps\": 50\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.vulcx.xyz/api/v1/instructions")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"userWallet\": \"9WzDXwBbmkg8ZTbNMqUxvQRAyrZzDsGYdLVL9zYtAWWM\",\n \"inputMint\": \"So11111111111111111111111111111111111111112\",\n \"outputMint\": \"uSd2czE61Evaf76RNbq4KPpXnkiL3irdzgLFUMe3NoG\",\n \"amount\": \"1000000000\",\n \"swapMode\": \"ExactIn\",\n \"slippageBps\": 50\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"data": {
"amountIn": "1000000000",
"amountOut": "145320000",
"otherAmountThreshold": "144593400",
"feeAmount": "100005",
"route": [
"<string>"
],
"hopCount": 1,
"pools": [
"<string>"
],
"instructions": [
{
"programId": "<string>",
"data": "<string>",
"accounts": [
{
"publicKey": "<string>",
"isSigner": true,
"isWritable": true
}
]
}
],
"addressLookupTableAddresses": [
"<string>"
]
}
}{
"success": false,
"error": "no route found"
}{
"success": false,
"error": "no route found"
}{
"success": false,
"error": "no route found"
}Endpoints
Get Instructions
POST /api/v1/instructions — Get raw instructions for custom transaction composition.
POST
/
api
/
v1
/
instructions
Get raw swap instructions
curl --request POST \
--url https://api.vulcx.xyz/api/v1/instructions \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"userWallet": "9WzDXwBbmkg8ZTbNMqUxvQRAyrZzDsGYdLVL9zYtAWWM",
"inputMint": "So11111111111111111111111111111111111111112",
"outputMint": "uSd2czE61Evaf76RNbq4KPpXnkiL3irdzgLFUMe3NoG",
"amount": "1000000000",
"swapMode": "ExactIn",
"slippageBps": 50
}
'import requests
url = "https://api.vulcx.xyz/api/v1/instructions"
payload = {
"userWallet": "9WzDXwBbmkg8ZTbNMqUxvQRAyrZzDsGYdLVL9zYtAWWM",
"inputMint": "So11111111111111111111111111111111111111112",
"outputMint": "uSd2czE61Evaf76RNbq4KPpXnkiL3irdzgLFUMe3NoG",
"amount": "1000000000",
"swapMode": "ExactIn",
"slippageBps": 50
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
userWallet: '9WzDXwBbmkg8ZTbNMqUxvQRAyrZzDsGYdLVL9zYtAWWM',
inputMint: 'So11111111111111111111111111111111111111112',
outputMint: 'uSd2czE61Evaf76RNbq4KPpXnkiL3irdzgLFUMe3NoG',
amount: '1000000000',
swapMode: 'ExactIn',
slippageBps: 50
})
};
fetch('https://api.vulcx.xyz/api/v1/instructions', 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.vulcx.xyz/api/v1/instructions",
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([
'userWallet' => '9WzDXwBbmkg8ZTbNMqUxvQRAyrZzDsGYdLVL9zYtAWWM',
'inputMint' => 'So11111111111111111111111111111111111111112',
'outputMint' => 'uSd2czE61Evaf76RNbq4KPpXnkiL3irdzgLFUMe3NoG',
'amount' => '1000000000',
'swapMode' => 'ExactIn',
'slippageBps' => 50
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$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.vulcx.xyz/api/v1/instructions"
payload := strings.NewReader("{\n \"userWallet\": \"9WzDXwBbmkg8ZTbNMqUxvQRAyrZzDsGYdLVL9zYtAWWM\",\n \"inputMint\": \"So11111111111111111111111111111111111111112\",\n \"outputMint\": \"uSd2czE61Evaf76RNbq4KPpXnkiL3irdzgLFUMe3NoG\",\n \"amount\": \"1000000000\",\n \"swapMode\": \"ExactIn\",\n \"slippageBps\": 50\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
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.vulcx.xyz/api/v1/instructions")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"userWallet\": \"9WzDXwBbmkg8ZTbNMqUxvQRAyrZzDsGYdLVL9zYtAWWM\",\n \"inputMint\": \"So11111111111111111111111111111111111111112\",\n \"outputMint\": \"uSd2czE61Evaf76RNbq4KPpXnkiL3irdzgLFUMe3NoG\",\n \"amount\": \"1000000000\",\n \"swapMode\": \"ExactIn\",\n \"slippageBps\": 50\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.vulcx.xyz/api/v1/instructions")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"userWallet\": \"9WzDXwBbmkg8ZTbNMqUxvQRAyrZzDsGYdLVL9zYtAWWM\",\n \"inputMint\": \"So11111111111111111111111111111111111111112\",\n \"outputMint\": \"uSd2czE61Evaf76RNbq4KPpXnkiL3irdzgLFUMe3NoG\",\n \"amount\": \"1000000000\",\n \"swapMode\": \"ExactIn\",\n \"slippageBps\": 50\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"data": {
"amountIn": "1000000000",
"amountOut": "145320000",
"otherAmountThreshold": "144593400",
"feeAmount": "100005",
"route": [
"<string>"
],
"hopCount": 1,
"pools": [
"<string>"
],
"instructions": [
{
"programId": "<string>",
"data": "<string>",
"accounts": [
{
"publicKey": "<string>",
"isSigner": true,
"isWritable": true
}
]
}
],
"addressLookupTableAddresses": [
"<string>"
]
}
}{
"success": false,
"error": "no route found"
}{
"success": false,
"error": "no route found"
}{
"success": false,
"error": "no route found"
}Authorizations
ApiKeyHeaderApiKeyQuery
API key sent as Authorization: Bearer vulcx_.... Required on every endpoint except GET /health and GET /api/v1/tokens.
Body
application/json
Parameters for getting raw swap instructions. Same as SwapRequest without skipSimulation.
User's wallet address (signer).
Example:
"9WzDXwBbmkg8ZTbNMqUxvQRAyrZzDsGYdLVL9zYtAWWM"
Example:
"So11111111111111111111111111111111111111112"
Example:
"uSd2czE61Evaf76RNbq4KPpXnkiL3irdzgLFUMe3NoG"
Example:
"1000000000"
Available options:
ExactIn, ExactOut Example:
"ExactIn"
Example:
50
Last modified on July 5, 2026
Related topics
Get InstructionsExecuting SwapsSwap Overviewsdk.instructions()Vulcx API reference — quote, swap & instructions⌘I