curl --request POST \
--url https://api.vaults.fyi/alpha/transactions/intent/getQuote \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"userAddress": "<string>",
"inputPosition": {
"address": "<string>",
"amount": "<string>"
},
"outputPosition": {
"address": "<string>"
},
"feeToken": {
"address": "<string>"
}
}
'import requests
url = "https://api.vaults.fyi/alpha/transactions/intent/getQuote"
payload = {
"userAddress": "<string>",
"inputPosition": {
"address": "<string>",
"amount": "<string>"
},
"outputPosition": { "address": "<string>" },
"feeToken": { "address": "<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({
userAddress: '<string>',
inputPosition: {address: '<string>', amount: '<string>'},
outputPosition: {address: '<string>'},
feeToken: {address: '<string>'}
})
};
fetch('https://api.vaults.fyi/alpha/transactions/intent/getQuote', 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.vaults.fyi/alpha/transactions/intent/getQuote",
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([
'userAddress' => '<string>',
'inputPosition' => [
'address' => '<string>',
'amount' => '<string>'
],
'outputPosition' => [
'address' => '<string>'
],
'feeToken' => [
'address' => '<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.vaults.fyi/alpha/transactions/intent/getQuote"
payload := strings.NewReader("{\n \"userAddress\": \"<string>\",\n \"inputPosition\": {\n \"address\": \"<string>\",\n \"amount\": \"<string>\"\n },\n \"outputPosition\": {\n \"address\": \"<string>\"\n },\n \"feeToken\": {\n \"address\": \"<string>\"\n }\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.vaults.fyi/alpha/transactions/intent/getQuote")
.header("x-api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"userAddress\": \"<string>\",\n \"inputPosition\": {\n \"address\": \"<string>\",\n \"amount\": \"<string>\"\n },\n \"outputPosition\": {\n \"address\": \"<string>\"\n },\n \"feeToken\": {\n \"address\": \"<string>\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.vaults.fyi/alpha/transactions/intent/getQuote")
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 \"userAddress\": \"<string>\",\n \"inputPosition\": {\n \"address\": \"<string>\",\n \"amount\": \"<string>\"\n },\n \"outputPosition\": {\n \"address\": \"<string>\"\n },\n \"feeToken\": {\n \"address\": \"<string>\"\n }\n}"
response = http.request(request)
puts response.read_body{
"payloadToSign": {
"domain": {
"name": "<string>",
"chainId": 123,
"verifyingContract": "<string>",
"version": "<string>"
},
"types": {},
"message": {},
"primaryType": "<string>"
},
"fees": [
{
"token": {
"address": "<string>",
"decimals": 123
},
"amount": "<string>"
}
],
"totalCost": [
{
"address": "<string>",
"decimals": 123,
"amount": "<string>"
}
],
"receivedPosition": {
"address": "<string>",
"decimals": 123,
"amount": "<string>"
},
"receivedAssetValue": {
"address": "<string>",
"decimals": 123,
"amount": "<string>"
},
"setupTransactions": {},
"expirationTimestamp": 123,
"originalQuote": "<unknown>"
}{
"statusCode": 123,
"error": "Bad Request",
"message": "<string>",
"errorId": "<string>"
}{
"error": "Unauthorized",
"message": "An API key is required to access this service. Sign up at https://portal.vaults.fyi/signup to generate a key. We offer a Pay-As-You-Go plan so you only pay for what you use, with no commitments.",
"errorId": "<string>"
}{
"x402Version": 123,
"resource": {
"url": "<string>",
"description": "<string>",
"mimeType": "<string>",
"serviceName": "<string>",
"tags": [
"<string>"
],
"iconUrl": "<string>"
},
"error": "<string>",
"accepts": [
{
"scheme": "exact",
"network": "<string>",
"amount": "<string>",
"payTo": "<string>",
"maxTimeoutSeconds": 123,
"asset": "<string>",
"extra": {
"name": "<string>",
"version": "<string>"
}
}
],
"extensions": {}
}{
"error": "Forbidden",
"message": "This API key has exhausted its available credits. To resume service, please visit https://portal.vaults.fyi/signup to top-up your credits",
"errorId": "<string>"
}{
"error": "Not Found",
"message": "<string>"
}{
"message": "<string>",
"errorId": "<string>"
}{
"statusCode": 123,
"error": "Unprocessable Entity",
"message": "<string>",
"errorId": "<string>"
}{
"error": "Internal Server Error",
"message": "<string>",
"errorId": "<string>"
}{
"statusCode": 123,
"error": "Service Unavailable",
"message": "<string>",
"errorId": "<string>"
}Create transaction intent quote
Get transaction intent quote for cross-chain or same-chain position changes. Returns EIP-712 payload for signing and fee breakdown.
curl --request POST \
--url https://api.vaults.fyi/alpha/transactions/intent/getQuote \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"userAddress": "<string>",
"inputPosition": {
"address": "<string>",
"amount": "<string>"
},
"outputPosition": {
"address": "<string>"
},
"feeToken": {
"address": "<string>"
}
}
'import requests
url = "https://api.vaults.fyi/alpha/transactions/intent/getQuote"
payload = {
"userAddress": "<string>",
"inputPosition": {
"address": "<string>",
"amount": "<string>"
},
"outputPosition": { "address": "<string>" },
"feeToken": { "address": "<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({
userAddress: '<string>',
inputPosition: {address: '<string>', amount: '<string>'},
outputPosition: {address: '<string>'},
feeToken: {address: '<string>'}
})
};
fetch('https://api.vaults.fyi/alpha/transactions/intent/getQuote', 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.vaults.fyi/alpha/transactions/intent/getQuote",
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([
'userAddress' => '<string>',
'inputPosition' => [
'address' => '<string>',
'amount' => '<string>'
],
'outputPosition' => [
'address' => '<string>'
],
'feeToken' => [
'address' => '<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.vaults.fyi/alpha/transactions/intent/getQuote"
payload := strings.NewReader("{\n \"userAddress\": \"<string>\",\n \"inputPosition\": {\n \"address\": \"<string>\",\n \"amount\": \"<string>\"\n },\n \"outputPosition\": {\n \"address\": \"<string>\"\n },\n \"feeToken\": {\n \"address\": \"<string>\"\n }\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.vaults.fyi/alpha/transactions/intent/getQuote")
.header("x-api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"userAddress\": \"<string>\",\n \"inputPosition\": {\n \"address\": \"<string>\",\n \"amount\": \"<string>\"\n },\n \"outputPosition\": {\n \"address\": \"<string>\"\n },\n \"feeToken\": {\n \"address\": \"<string>\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.vaults.fyi/alpha/transactions/intent/getQuote")
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 \"userAddress\": \"<string>\",\n \"inputPosition\": {\n \"address\": \"<string>\",\n \"amount\": \"<string>\"\n },\n \"outputPosition\": {\n \"address\": \"<string>\"\n },\n \"feeToken\": {\n \"address\": \"<string>\"\n }\n}"
response = http.request(request)
puts response.read_body{
"payloadToSign": {
"domain": {
"name": "<string>",
"chainId": 123,
"verifyingContract": "<string>",
"version": "<string>"
},
"types": {},
"message": {},
"primaryType": "<string>"
},
"fees": [
{
"token": {
"address": "<string>",
"decimals": 123
},
"amount": "<string>"
}
],
"totalCost": [
{
"address": "<string>",
"decimals": 123,
"amount": "<string>"
}
],
"receivedPosition": {
"address": "<string>",
"decimals": 123,
"amount": "<string>"
},
"receivedAssetValue": {
"address": "<string>",
"decimals": 123,
"amount": "<string>"
},
"setupTransactions": {},
"expirationTimestamp": 123,
"originalQuote": "<unknown>"
}{
"statusCode": 123,
"error": "Bad Request",
"message": "<string>",
"errorId": "<string>"
}{
"error": "Unauthorized",
"message": "An API key is required to access this service. Sign up at https://portal.vaults.fyi/signup to generate a key. We offer a Pay-As-You-Go plan so you only pay for what you use, with no commitments.",
"errorId": "<string>"
}{
"x402Version": 123,
"resource": {
"url": "<string>",
"description": "<string>",
"mimeType": "<string>",
"serviceName": "<string>",
"tags": [
"<string>"
],
"iconUrl": "<string>"
},
"error": "<string>",
"accepts": [
{
"scheme": "exact",
"network": "<string>",
"amount": "<string>",
"payTo": "<string>",
"maxTimeoutSeconds": 123,
"asset": "<string>",
"extra": {
"name": "<string>",
"version": "<string>"
}
}
],
"extensions": {}
}{
"error": "Forbidden",
"message": "This API key has exhausted its available credits. To resume service, please visit https://portal.vaults.fyi/signup to top-up your credits",
"errorId": "<string>"
}{
"error": "Not Found",
"message": "<string>"
}{
"message": "<string>",
"errorId": "<string>"
}{
"statusCode": 123,
"error": "Unprocessable Entity",
"message": "<string>",
"errorId": "<string>"
}{
"error": "Internal Server Error",
"message": "<string>",
"errorId": "<string>"
}{
"statusCode": 123,
"error": "Service Unavailable",
"message": "<string>",
"errorId": "<string>"
}Authorizations
Body
User wallet address
^0x[a-fA-F0-9]{40}$Input position details
Show child attributes
Show child attributes
Output position details
Show child attributes
Show child attributes
Fee token details
Show child attributes
Show child attributes
Provider name
biconomy, rhinestone Response
Default Response
EIP-712 payload for user to sign
Show child attributes
Show child attributes
Breakdown of all fees
Show child attributes
Show child attributes
Total cost including all fees
Show child attributes
Show child attributes
Position that will be received
Show child attributes
Show child attributes
Underlying asset value of the received position
Show child attributes
Show child attributes
Transactions that need to be executed before the intent execution. Grouped by chain ID.
Show child attributes
Show child attributes
Timestamp when the quote expires
Original quote data from the intent service

