Skip to main content
POST
/
api
/
v1
/
cpi
/
route-accounts
Get CPI account list for calling route from another program
curl --request POST \
  --url https://api.vulcx.xyz/api/v1/cpi/route-accounts \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "authority": "EJxE7RDaP5pmoVzzHRb4fufCNq3wsCgdUbJ8PCXHZNUP",
  "inputMint": "So11111111111111111111111111111111111111112",
  "outputMint": "uSd2czE61Evaf76RNbq4KPpXnkiL3irdzgLFUMe3NoG",
  "amount": "1000000000",
  "swapMode": "ExactIn",
  "slippageBps": 50
}
'
import requests

url = "https://api.vulcx.xyz/api/v1/cpi/route-accounts"

payload = {
    "authority": "EJxE7RDaP5pmoVzzHRb4fufCNq3wsCgdUbJ8PCXHZNUP",
    "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({
    authority: 'EJxE7RDaP5pmoVzzHRb4fufCNq3wsCgdUbJ8PCXHZNUP',
    inputMint: 'So11111111111111111111111111111111111111112',
    outputMint: 'uSd2czE61Evaf76RNbq4KPpXnkiL3irdzgLFUMe3NoG',
    amount: '1000000000',
    swapMode: 'ExactIn',
    slippageBps: 50
  })
};

fetch('https://api.vulcx.xyz/api/v1/cpi/route-accounts', 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/cpi/route-accounts",
  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([
    'authority' => 'EJxE7RDaP5pmoVzzHRb4fufCNq3wsCgdUbJ8PCXHZNUP',
    '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/cpi/route-accounts"

	payload := strings.NewReader("{\n  \"authority\": \"EJxE7RDaP5pmoVzzHRb4fufCNq3wsCgdUbJ8PCXHZNUP\",\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/cpi/route-accounts")
  .header("Authorization", "Bearer <token>")
  .header("Content-Type", "application/json")
  .body("{\n  \"authority\": \"EJxE7RDaP5pmoVzzHRb4fufCNq3wsCgdUbJ8PCXHZNUP\",\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/cpi/route-accounts")

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  \"authority\": \"EJxE7RDaP5pmoVzzHRb4fufCNq3wsCgdUbJ8PCXHZNUP\",\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": {
    "authority": "EJxE7RDaP5pmoVzzHRb4fufCNq3wsCgdUbJ8PCXHZNUP",
    "amountIn": "1000000000",
    "amountOut": "145320000",
    "otherAmountThreshold": "144593400",
    "feeAmount": "100005",
    "platformFeeBps": 0,
    "platformFeeAmount": "0",
    "route": [
      "<string>"
    ],
    "hopCount": 1,
    "pools": [
      "<string>"
    ],
    "routeInstruction": {
      "programId": "<string>",
      "data": "<string>",
      "accounts": [
        {
          "publicKey": "<string>",
          "isSigner": true,
          "isWritable": true
        }
      ]
    },
    "requiredTokenAccounts": [
      "<string>"
    ],
    "addressLookupTableAddresses": [
      "<string>"
    ]
  }
}
{
  "success": false,
  "error": "no route found"
}
{
  "success": false,
  "error": "no route found"
}
{
  "success": false,
  "error": "no route found"
}

Authorizations

Authorization
string
header
required

API key sent as Authorization: Bearer vulcx_.... Required on every endpoint except GET /health and GET /api/v1/tokens.

Body

application/json

Parameters for building the route instruction as a CPI target. Like InstructionsRequest, but the signer is a calling program's PDA (the on-chain authority that will invoke_signed into route) rather than a wallet.

authority
string
required

The calling program's PDA authority — owns the token accounts and signs the swap via invoke_signed inside the integrating program.

Example:

"EJxE7RDaP5pmoVzzHRb4fufCNq3wsCgdUbJ8PCXHZNUP"

inputMint
string
required
Example:

"So11111111111111111111111111111111111111112"

outputMint
string
required
Example:

"uSd2czE61Evaf76RNbq4KPpXnkiL3irdzgLFUMe3NoG"

amount
string
required

Amount in the smallest token units.

Example:

"1000000000"

swapMode
enum<string>
required
Available options:
ExactIn,
ExactOut
Example:

"ExactIn"

slippageBps
integer
default:50
Example:

50

Response

Route CPI account list built successfully.

success
boolean
Example:

true

data
object

The route instruction shaped for a CPI caller. Forward routeInstruction.accounts into your program's route CPI and sign with the PDA seeds. requiredTokenAccounts are the ATAs the authority PDA must own and fund before the CPI runs — this builder emits no ATA-create or wrap/unwrap instructions.

Last modified on July 6, 2026