Build bridge transactions
curl --request POST \
--url https://api.soroswap.finance/bridge/build \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"quote": {
"sourceChain": "<string>",
"destinationChain": "<string>",
"amountIn": "<string>",
"amountOut": "<string>",
"amount": "<string>"
},
"sender": "<string>",
"recipient": "<string>"
}
'import requests
url = "https://api.soroswap.finance/bridge/build"
payload = {
"quote": {
"sourceChain": "<string>",
"destinationChain": "<string>",
"amountIn": "<string>",
"amountOut": "<string>",
"amount": "<string>"
},
"sender": "<string>",
"recipient": "<string>"
}
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({
quote: {
sourceChain: '<string>',
destinationChain: '<string>',
amountIn: '<string>',
amountOut: '<string>',
amount: '<string>'
},
sender: '<string>',
recipient: '<string>'
})
};
fetch('https://api.soroswap.finance/bridge/build', 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.soroswap.finance/bridge/build",
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([
'quote' => [
'sourceChain' => '<string>',
'destinationChain' => '<string>',
'amountIn' => '<string>',
'amountOut' => '<string>',
'amount' => '<string>'
],
'sender' => '<string>',
'recipient' => '<string>'
]),
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.soroswap.finance/bridge/build"
payload := strings.NewReader("{\n \"quote\": {\n \"sourceChain\": \"<string>\",\n \"destinationChain\": \"<string>\",\n \"amountIn\": \"<string>\",\n \"amountOut\": \"<string>\",\n \"amount\": \"<string>\"\n },\n \"sender\": \"<string>\",\n \"recipient\": \"<string>\"\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.soroswap.finance/bridge/build")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"quote\": {\n \"sourceChain\": \"<string>\",\n \"destinationChain\": \"<string>\",\n \"amountIn\": \"<string>\",\n \"amountOut\": \"<string>\",\n \"amount\": \"<string>\"\n },\n \"sender\": \"<string>\",\n \"recipient\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.soroswap.finance/bridge/build")
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 \"quote\": {\n \"sourceChain\": \"<string>\",\n \"destinationChain\": \"<string>\",\n \"amountIn\": \"<string>\",\n \"amountOut\": \"<string>\",\n \"amount\": \"<string>\"\n },\n \"sender\": \"<string>\",\n \"recipient\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"quote": {
"asset": "USDC",
"sourceChain": "base",
"destinationChain": "stellar",
"tradeType": "EXACT_IN",
"speed": "standard",
"amount": "<string>",
"amountIn": "10000000",
"amountOut": "99998700",
"decimalsIn": 6,
"decimalsOut": 7,
"fees": [
{
"type": "cctp_protocol",
"amount": "1300",
"token": "USDC",
"decimals": 6,
"bps": 1.3,
"paidSeparately": true
}
],
"limits": {
"minAmountIn": "<string>",
"maxAmountIn": "<string>"
},
"recipient": {
"checked": true,
"ready": true,
"reason": "<string>"
},
"claimRequired": true,
"expiresAt": "2026-11-27T12:00:30.000Z",
"maxFee": "<string>",
"nativeFee": {
"amount": "531234",
"token": "XLM",
"decimals": 7
}
},
"steps": [
{
"id": "bridge",
"kind": "approval",
"chain": "base",
"status": "ready",
"description": "<string>",
"tx": {
"format": "stellar_xdr",
"xdr": "<string>"
}
}
]
}Bridge
Build bridge transactions
Takes the quote unchanged plus sender and recipient, re-quotes, and returns ordered unsigned steps (evm, stellar_xdr or solana_v0). A step with status rebuild_after_previous needs another build after the previous one lands. 409 Quote stale, 400 Recipient not ready, 428 CREATE_TRUSTLINE.
POST
/
bridge
/
build
Build bridge transactions
curl --request POST \
--url https://api.soroswap.finance/bridge/build \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"quote": {
"sourceChain": "<string>",
"destinationChain": "<string>",
"amountIn": "<string>",
"amountOut": "<string>",
"amount": "<string>"
},
"sender": "<string>",
"recipient": "<string>"
}
'import requests
url = "https://api.soroswap.finance/bridge/build"
payload = {
"quote": {
"sourceChain": "<string>",
"destinationChain": "<string>",
"amountIn": "<string>",
"amountOut": "<string>",
"amount": "<string>"
},
"sender": "<string>",
"recipient": "<string>"
}
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({
quote: {
sourceChain: '<string>',
destinationChain: '<string>',
amountIn: '<string>',
amountOut: '<string>',
amount: '<string>'
},
sender: '<string>',
recipient: '<string>'
})
};
fetch('https://api.soroswap.finance/bridge/build', 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.soroswap.finance/bridge/build",
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([
'quote' => [
'sourceChain' => '<string>',
'destinationChain' => '<string>',
'amountIn' => '<string>',
'amountOut' => '<string>',
'amount' => '<string>'
],
'sender' => '<string>',
'recipient' => '<string>'
]),
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.soroswap.finance/bridge/build"
payload := strings.NewReader("{\n \"quote\": {\n \"sourceChain\": \"<string>\",\n \"destinationChain\": \"<string>\",\n \"amountIn\": \"<string>\",\n \"amountOut\": \"<string>\",\n \"amount\": \"<string>\"\n },\n \"sender\": \"<string>\",\n \"recipient\": \"<string>\"\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.soroswap.finance/bridge/build")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"quote\": {\n \"sourceChain\": \"<string>\",\n \"destinationChain\": \"<string>\",\n \"amountIn\": \"<string>\",\n \"amountOut\": \"<string>\",\n \"amount\": \"<string>\"\n },\n \"sender\": \"<string>\",\n \"recipient\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.soroswap.finance/bridge/build")
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 \"quote\": {\n \"sourceChain\": \"<string>\",\n \"destinationChain\": \"<string>\",\n \"amountIn\": \"<string>\",\n \"amountOut\": \"<string>\",\n \"amount\": \"<string>\"\n },\n \"sender\": \"<string>\",\n \"recipient\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"quote": {
"asset": "USDC",
"sourceChain": "base",
"destinationChain": "stellar",
"tradeType": "EXACT_IN",
"speed": "standard",
"amount": "<string>",
"amountIn": "10000000",
"amountOut": "99998700",
"decimalsIn": 6,
"decimalsOut": 7,
"fees": [
{
"type": "cctp_protocol",
"amount": "1300",
"token": "USDC",
"decimals": 6,
"bps": 1.3,
"paidSeparately": true
}
],
"limits": {
"minAmountIn": "<string>",
"maxAmountIn": "<string>"
},
"recipient": {
"checked": true,
"ready": true,
"reason": "<string>"
},
"claimRequired": true,
"expiresAt": "2026-11-27T12:00:30.000Z",
"maxFee": "<string>",
"nativeFee": {
"amount": "531234",
"token": "XLM",
"decimals": 7
}
},
"steps": [
{
"id": "bridge",
"kind": "approval",
"chain": "base",
"status": "ready",
"description": "<string>",
"tx": {
"format": "stellar_xdr",
"xdr": "<string>"
}
}
]
}Authorizations
Query Parameters
Body
application/json