Get cross-chain swap quotes
curl --request POST \
--url https://api.portalhq.io/api/v3/clients/me/integrations/0x/cross-chain/quotes \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"originChain": "<string>",
"destinationChain": "<string>",
"sellToken": "<string>",
"buyToken": "<string>",
"sellAmount": "<string>",
"originAddress": "<string>",
"destinationAddress": "<string>",
"slippageBps": 123,
"maxNumQuotes": 5,
"excludedBridges": "<string>",
"includedBridges": "<string>",
"excludedSwapSources": "<string>",
"feeBps": "<string>",
"feeRecipient": "<string>",
"feeToken": "<string>",
"zeroXApiKey": "<string>"
}
'import requests
url = "https://api.portalhq.io/api/v3/clients/me/integrations/0x/cross-chain/quotes"
payload = {
"originChain": "<string>",
"destinationChain": "<string>",
"sellToken": "<string>",
"buyToken": "<string>",
"sellAmount": "<string>",
"originAddress": "<string>",
"destinationAddress": "<string>",
"slippageBps": 123,
"maxNumQuotes": 5,
"excludedBridges": "<string>",
"includedBridges": "<string>",
"excludedSwapSources": "<string>",
"feeBps": "<string>",
"feeRecipient": "<string>",
"feeToken": "<string>",
"zeroXApiKey": "<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({
originChain: '<string>',
destinationChain: '<string>',
sellToken: '<string>',
buyToken: '<string>',
sellAmount: '<string>',
originAddress: '<string>',
destinationAddress: '<string>',
slippageBps: 123,
maxNumQuotes: 5,
excludedBridges: '<string>',
includedBridges: '<string>',
excludedSwapSources: '<string>',
feeBps: '<string>',
feeRecipient: '<string>',
feeToken: '<string>',
zeroXApiKey: '<string>'
})
};
fetch('https://api.portalhq.io/api/v3/clients/me/integrations/0x/cross-chain/quotes', 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.portalhq.io/api/v3/clients/me/integrations/0x/cross-chain/quotes",
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([
'originChain' => '<string>',
'destinationChain' => '<string>',
'sellToken' => '<string>',
'buyToken' => '<string>',
'sellAmount' => '<string>',
'originAddress' => '<string>',
'destinationAddress' => '<string>',
'slippageBps' => 123,
'maxNumQuotes' => 5,
'excludedBridges' => '<string>',
'includedBridges' => '<string>',
'excludedSwapSources' => '<string>',
'feeBps' => '<string>',
'feeRecipient' => '<string>',
'feeToken' => '<string>',
'zeroXApiKey' => '<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.portalhq.io/api/v3/clients/me/integrations/0x/cross-chain/quotes"
payload := strings.NewReader("{\n \"originChain\": \"<string>\",\n \"destinationChain\": \"<string>\",\n \"sellToken\": \"<string>\",\n \"buyToken\": \"<string>\",\n \"sellAmount\": \"<string>\",\n \"originAddress\": \"<string>\",\n \"destinationAddress\": \"<string>\",\n \"slippageBps\": 123,\n \"maxNumQuotes\": 5,\n \"excludedBridges\": \"<string>\",\n \"includedBridges\": \"<string>\",\n \"excludedSwapSources\": \"<string>\",\n \"feeBps\": \"<string>\",\n \"feeRecipient\": \"<string>\",\n \"feeToken\": \"<string>\",\n \"zeroXApiKey\": \"<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.portalhq.io/api/v3/clients/me/integrations/0x/cross-chain/quotes")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"originChain\": \"<string>\",\n \"destinationChain\": \"<string>\",\n \"sellToken\": \"<string>\",\n \"buyToken\": \"<string>\",\n \"sellAmount\": \"<string>\",\n \"originAddress\": \"<string>\",\n \"destinationAddress\": \"<string>\",\n \"slippageBps\": 123,\n \"maxNumQuotes\": 5,\n \"excludedBridges\": \"<string>\",\n \"includedBridges\": \"<string>\",\n \"excludedSwapSources\": \"<string>\",\n \"feeBps\": \"<string>\",\n \"feeRecipient\": \"<string>\",\n \"feeToken\": \"<string>\",\n \"zeroXApiKey\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.portalhq.io/api/v3/clients/me/integrations/0x/cross-chain/quotes")
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 \"originChain\": \"<string>\",\n \"destinationChain\": \"<string>\",\n \"sellToken\": \"<string>\",\n \"buyToken\": \"<string>\",\n \"sellAmount\": \"<string>\",\n \"originAddress\": \"<string>\",\n \"destinationAddress\": \"<string>\",\n \"slippageBps\": 123,\n \"maxNumQuotes\": 5,\n \"excludedBridges\": \"<string>\",\n \"includedBridges\": \"<string>\",\n \"excludedSwapSources\": \"<string>\",\n \"feeBps\": \"<string>\",\n \"feeRecipient\": \"<string>\",\n \"feeToken\": \"<string>\",\n \"zeroXApiKey\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"data": {
"rawResponse": {
"liquidityAvailable": true,
"allowanceTarget": "<string>",
"originChainId": "<string>",
"originChain": "<string>",
"destinationChainId": "<string>",
"destinationChain": "<string>",
"sellToken": "<string>",
"buyToken": "<string>",
"issues": {
"allowance": {
"actual": "<string>",
"spender": "<string>"
},
"balance": {
"token": "<string>",
"actual": "<string>",
"expected": "<string>"
},
"simulationIncomplete": true
},
"zid": "<string>",
"quotes": [
{
"sellAmount": "<string>",
"buyAmount": "<string>",
"minBuyAmount": "<string>",
"fees": {},
"gasCosts": {},
"steps": [
{}
],
"transaction": {
"from": "<string>",
"to": "<string>",
"data": "<string>",
"gas": "<string>",
"gasPrice": "<string>",
"value": "<string>"
},
"approvalTransaction": {
"from": "<string>",
"to": "<string>",
"data": "<string>",
"value": "<string>",
"gas": "<string>",
"gasPrice": "<string>"
},
"estimatedTimeSeconds": 123,
"issues": {},
"quoteId": "<string>"
}
]
}
}
}{
"error": "<string>"
}{
"error": "<string>"
}0x
Get cross-chain swap quotes
Retrieves quotes for a cross-chain swap across EVM chains. Returns multiple quotes with different bridge providers and routing options.
Experimental: This endpoint requires explicit enablement by the Portal and 0x teams before it can be used.
The sellToken and buyToken parameters accept contract addresses,
native token keywords (NATIVE, ETH, AVAX, SOL, etc.), or
supported token symbols (USDC, USDT).
Each quote includes a Portal-formatted transaction object ready to
sign and broadcast. If token approval is needed, an approvalTransaction
is also included — sign and submit it before the main transaction.
For more details on the underlying 0x cross-chain API, see the 0x Cross-Chain API docs.
POST
/
clients
/
me
/
integrations
/
0x
/
cross-chain
/
quotes
Get cross-chain swap quotes
curl --request POST \
--url https://api.portalhq.io/api/v3/clients/me/integrations/0x/cross-chain/quotes \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"originChain": "<string>",
"destinationChain": "<string>",
"sellToken": "<string>",
"buyToken": "<string>",
"sellAmount": "<string>",
"originAddress": "<string>",
"destinationAddress": "<string>",
"slippageBps": 123,
"maxNumQuotes": 5,
"excludedBridges": "<string>",
"includedBridges": "<string>",
"excludedSwapSources": "<string>",
"feeBps": "<string>",
"feeRecipient": "<string>",
"feeToken": "<string>",
"zeroXApiKey": "<string>"
}
'import requests
url = "https://api.portalhq.io/api/v3/clients/me/integrations/0x/cross-chain/quotes"
payload = {
"originChain": "<string>",
"destinationChain": "<string>",
"sellToken": "<string>",
"buyToken": "<string>",
"sellAmount": "<string>",
"originAddress": "<string>",
"destinationAddress": "<string>",
"slippageBps": 123,
"maxNumQuotes": 5,
"excludedBridges": "<string>",
"includedBridges": "<string>",
"excludedSwapSources": "<string>",
"feeBps": "<string>",
"feeRecipient": "<string>",
"feeToken": "<string>",
"zeroXApiKey": "<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({
originChain: '<string>',
destinationChain: '<string>',
sellToken: '<string>',
buyToken: '<string>',
sellAmount: '<string>',
originAddress: '<string>',
destinationAddress: '<string>',
slippageBps: 123,
maxNumQuotes: 5,
excludedBridges: '<string>',
includedBridges: '<string>',
excludedSwapSources: '<string>',
feeBps: '<string>',
feeRecipient: '<string>',
feeToken: '<string>',
zeroXApiKey: '<string>'
})
};
fetch('https://api.portalhq.io/api/v3/clients/me/integrations/0x/cross-chain/quotes', 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.portalhq.io/api/v3/clients/me/integrations/0x/cross-chain/quotes",
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([
'originChain' => '<string>',
'destinationChain' => '<string>',
'sellToken' => '<string>',
'buyToken' => '<string>',
'sellAmount' => '<string>',
'originAddress' => '<string>',
'destinationAddress' => '<string>',
'slippageBps' => 123,
'maxNumQuotes' => 5,
'excludedBridges' => '<string>',
'includedBridges' => '<string>',
'excludedSwapSources' => '<string>',
'feeBps' => '<string>',
'feeRecipient' => '<string>',
'feeToken' => '<string>',
'zeroXApiKey' => '<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.portalhq.io/api/v3/clients/me/integrations/0x/cross-chain/quotes"
payload := strings.NewReader("{\n \"originChain\": \"<string>\",\n \"destinationChain\": \"<string>\",\n \"sellToken\": \"<string>\",\n \"buyToken\": \"<string>\",\n \"sellAmount\": \"<string>\",\n \"originAddress\": \"<string>\",\n \"destinationAddress\": \"<string>\",\n \"slippageBps\": 123,\n \"maxNumQuotes\": 5,\n \"excludedBridges\": \"<string>\",\n \"includedBridges\": \"<string>\",\n \"excludedSwapSources\": \"<string>\",\n \"feeBps\": \"<string>\",\n \"feeRecipient\": \"<string>\",\n \"feeToken\": \"<string>\",\n \"zeroXApiKey\": \"<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.portalhq.io/api/v3/clients/me/integrations/0x/cross-chain/quotes")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"originChain\": \"<string>\",\n \"destinationChain\": \"<string>\",\n \"sellToken\": \"<string>\",\n \"buyToken\": \"<string>\",\n \"sellAmount\": \"<string>\",\n \"originAddress\": \"<string>\",\n \"destinationAddress\": \"<string>\",\n \"slippageBps\": 123,\n \"maxNumQuotes\": 5,\n \"excludedBridges\": \"<string>\",\n \"includedBridges\": \"<string>\",\n \"excludedSwapSources\": \"<string>\",\n \"feeBps\": \"<string>\",\n \"feeRecipient\": \"<string>\",\n \"feeToken\": \"<string>\",\n \"zeroXApiKey\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.portalhq.io/api/v3/clients/me/integrations/0x/cross-chain/quotes")
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 \"originChain\": \"<string>\",\n \"destinationChain\": \"<string>\",\n \"sellToken\": \"<string>\",\n \"buyToken\": \"<string>\",\n \"sellAmount\": \"<string>\",\n \"originAddress\": \"<string>\",\n \"destinationAddress\": \"<string>\",\n \"slippageBps\": 123,\n \"maxNumQuotes\": 5,\n \"excludedBridges\": \"<string>\",\n \"includedBridges\": \"<string>\",\n \"excludedSwapSources\": \"<string>\",\n \"feeBps\": \"<string>\",\n \"feeRecipient\": \"<string>\",\n \"feeToken\": \"<string>\",\n \"zeroXApiKey\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"data": {
"rawResponse": {
"liquidityAvailable": true,
"allowanceTarget": "<string>",
"originChainId": "<string>",
"originChain": "<string>",
"destinationChainId": "<string>",
"destinationChain": "<string>",
"sellToken": "<string>",
"buyToken": "<string>",
"issues": {
"allowance": {
"actual": "<string>",
"spender": "<string>"
},
"balance": {
"token": "<string>",
"actual": "<string>",
"expected": "<string>"
},
"simulationIncomplete": true
},
"zid": "<string>",
"quotes": [
{
"sellAmount": "<string>",
"buyAmount": "<string>",
"minBuyAmount": "<string>",
"fees": {},
"gasCosts": {},
"steps": [
{}
],
"transaction": {
"from": "<string>",
"to": "<string>",
"data": "<string>",
"gas": "<string>",
"gasPrice": "<string>",
"value": "<string>"
},
"approvalTransaction": {
"from": "<string>",
"to": "<string>",
"data": "<string>",
"value": "<string>",
"gas": "<string>",
"gasPrice": "<string>"
},
"estimatedTimeSeconds": 123,
"issues": {},
"quoteId": "<string>"
}
]
}
}
}{
"error": "<string>"
}{
"error": "<string>"
}Authorizations
Body
application/json
Was this page helpful?