cURL
curl --request POST \
--url https://api.example.com/api/v2/quote/reverse \
--header 'Content-Type: application/json' \
--data '
{
"quoteID": "quote:966ee977-586b-4bca-abf1-e7def508a19c",
"dAppID": "<string>",
"intentExecutionTypes": [
"SELF_PUBLISH"
],
"quoteRequest": {
"sourceChainID": 123,
"destinationChainID": 123,
"sourceToken": "<string>",
"destinationToken": "<string>",
"sourceAmount": "<string>",
"funder": "<string>",
"recipient": "<string>",
"refundRecipient": "<string>"
},
"contracts": {
"sourcePortal": "0x1234567890abcdef1234567890abcdef12345678",
"destinationPortal": "0x567890abcdef1234567890abcdef1234567890ab",
"prover": "0xabcdef1234567890abcdef1234567890abcdef12"
}
}
'import requests
url = "https://api.example.com/api/v2/quote/reverse"
payload = {
"quoteID": "quote:966ee977-586b-4bca-abf1-e7def508a19c",
"dAppID": "<string>",
"intentExecutionTypes": ["SELF_PUBLISH"],
"quoteRequest": {
"sourceChainID": 123,
"destinationChainID": 123,
"sourceToken": "<string>",
"destinationToken": "<string>",
"sourceAmount": "<string>",
"funder": "<string>",
"recipient": "<string>",
"refundRecipient": "<string>"
},
"contracts": {
"sourcePortal": "0x1234567890abcdef1234567890abcdef12345678",
"destinationPortal": "0x567890abcdef1234567890abcdef1234567890ab",
"prover": "0xabcdef1234567890abcdef1234567890abcdef12"
}
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
quoteID: 'quote:966ee977-586b-4bca-abf1-e7def508a19c',
dAppID: '<string>',
intentExecutionTypes: ['SELF_PUBLISH'],
quoteRequest: {
sourceChainID: 123,
destinationChainID: 123,
sourceToken: '<string>',
destinationToken: '<string>',
sourceAmount: '<string>',
funder: '<string>',
recipient: '<string>',
refundRecipient: '<string>'
},
contracts: {
sourcePortal: '0x1234567890abcdef1234567890abcdef12345678',
destinationPortal: '0x567890abcdef1234567890abcdef1234567890ab',
prover: '0xabcdef1234567890abcdef1234567890abcdef12'
}
})
};
fetch('https://api.example.com/api/v2/quote/reverse', 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.example.com/api/v2/quote/reverse",
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([
'quoteID' => 'quote:966ee977-586b-4bca-abf1-e7def508a19c',
'dAppID' => '<string>',
'intentExecutionTypes' => [
'SELF_PUBLISH'
],
'quoteRequest' => [
'sourceChainID' => 123,
'destinationChainID' => 123,
'sourceToken' => '<string>',
'destinationToken' => '<string>',
'sourceAmount' => '<string>',
'funder' => '<string>',
'recipient' => '<string>',
'refundRecipient' => '<string>'
],
'contracts' => [
'sourcePortal' => '0x1234567890abcdef1234567890abcdef12345678',
'destinationPortal' => '0x567890abcdef1234567890abcdef1234567890ab',
'prover' => '0xabcdef1234567890abcdef1234567890abcdef12'
]
]),
CURLOPT_HTTPHEADER => [
"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.example.com/api/v2/quote/reverse"
payload := strings.NewReader("{\n \"quoteID\": \"quote:966ee977-586b-4bca-abf1-e7def508a19c\",\n \"dAppID\": \"<string>\",\n \"intentExecutionTypes\": [\n \"SELF_PUBLISH\"\n ],\n \"quoteRequest\": {\n \"sourceChainID\": 123,\n \"destinationChainID\": 123,\n \"sourceToken\": \"<string>\",\n \"destinationToken\": \"<string>\",\n \"sourceAmount\": \"<string>\",\n \"funder\": \"<string>\",\n \"recipient\": \"<string>\",\n \"refundRecipient\": \"<string>\"\n },\n \"contracts\": {\n \"sourcePortal\": \"0x1234567890abcdef1234567890abcdef12345678\",\n \"destinationPortal\": \"0x567890abcdef1234567890abcdef1234567890ab\",\n \"prover\": \"0xabcdef1234567890abcdef1234567890abcdef12\"\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
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.example.com/api/v2/quote/reverse")
.header("Content-Type", "application/json")
.body("{\n \"quoteID\": \"quote:966ee977-586b-4bca-abf1-e7def508a19c\",\n \"dAppID\": \"<string>\",\n \"intentExecutionTypes\": [\n \"SELF_PUBLISH\"\n ],\n \"quoteRequest\": {\n \"sourceChainID\": 123,\n \"destinationChainID\": 123,\n \"sourceToken\": \"<string>\",\n \"destinationToken\": \"<string>\",\n \"sourceAmount\": \"<string>\",\n \"funder\": \"<string>\",\n \"recipient\": \"<string>\",\n \"refundRecipient\": \"<string>\"\n },\n \"contracts\": {\n \"sourcePortal\": \"0x1234567890abcdef1234567890abcdef12345678\",\n \"destinationPortal\": \"0x567890abcdef1234567890abcdef1234567890ab\",\n \"prover\": \"0xabcdef1234567890abcdef1234567890abcdef12\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/api/v2/quote/reverse")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"quoteID\": \"quote:966ee977-586b-4bca-abf1-e7def508a19c\",\n \"dAppID\": \"<string>\",\n \"intentExecutionTypes\": [\n \"SELF_PUBLISH\"\n ],\n \"quoteRequest\": {\n \"sourceChainID\": 123,\n \"destinationChainID\": 123,\n \"sourceToken\": \"<string>\",\n \"destinationToken\": \"<string>\",\n \"sourceAmount\": \"<string>\",\n \"funder\": \"<string>\",\n \"recipient\": \"<string>\",\n \"refundRecipient\": \"<string>\"\n },\n \"contracts\": {\n \"sourcePortal\": \"0x1234567890abcdef1234567890abcdef12345678\",\n \"destinationPortal\": \"0x567890abcdef1234567890abcdef1234567890ab\",\n \"prover\": \"0xabcdef1234567890abcdef1234567890abcdef12\"\n }\n}"
response = http.request(request)
puts response.read_bodySolver Interface
Post apiv2quotereverse
POST
/
api
/
v2
/
quote
/
reverse
cURL
curl --request POST \
--url https://api.example.com/api/v2/quote/reverse \
--header 'Content-Type: application/json' \
--data '
{
"quoteID": "quote:966ee977-586b-4bca-abf1-e7def508a19c",
"dAppID": "<string>",
"intentExecutionTypes": [
"SELF_PUBLISH"
],
"quoteRequest": {
"sourceChainID": 123,
"destinationChainID": 123,
"sourceToken": "<string>",
"destinationToken": "<string>",
"sourceAmount": "<string>",
"funder": "<string>",
"recipient": "<string>",
"refundRecipient": "<string>"
},
"contracts": {
"sourcePortal": "0x1234567890abcdef1234567890abcdef12345678",
"destinationPortal": "0x567890abcdef1234567890abcdef1234567890ab",
"prover": "0xabcdef1234567890abcdef1234567890abcdef12"
}
}
'import requests
url = "https://api.example.com/api/v2/quote/reverse"
payload = {
"quoteID": "quote:966ee977-586b-4bca-abf1-e7def508a19c",
"dAppID": "<string>",
"intentExecutionTypes": ["SELF_PUBLISH"],
"quoteRequest": {
"sourceChainID": 123,
"destinationChainID": 123,
"sourceToken": "<string>",
"destinationToken": "<string>",
"sourceAmount": "<string>",
"funder": "<string>",
"recipient": "<string>",
"refundRecipient": "<string>"
},
"contracts": {
"sourcePortal": "0x1234567890abcdef1234567890abcdef12345678",
"destinationPortal": "0x567890abcdef1234567890abcdef1234567890ab",
"prover": "0xabcdef1234567890abcdef1234567890abcdef12"
}
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
quoteID: 'quote:966ee977-586b-4bca-abf1-e7def508a19c',
dAppID: '<string>',
intentExecutionTypes: ['SELF_PUBLISH'],
quoteRequest: {
sourceChainID: 123,
destinationChainID: 123,
sourceToken: '<string>',
destinationToken: '<string>',
sourceAmount: '<string>',
funder: '<string>',
recipient: '<string>',
refundRecipient: '<string>'
},
contracts: {
sourcePortal: '0x1234567890abcdef1234567890abcdef12345678',
destinationPortal: '0x567890abcdef1234567890abcdef1234567890ab',
prover: '0xabcdef1234567890abcdef1234567890abcdef12'
}
})
};
fetch('https://api.example.com/api/v2/quote/reverse', 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.example.com/api/v2/quote/reverse",
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([
'quoteID' => 'quote:966ee977-586b-4bca-abf1-e7def508a19c',
'dAppID' => '<string>',
'intentExecutionTypes' => [
'SELF_PUBLISH'
],
'quoteRequest' => [
'sourceChainID' => 123,
'destinationChainID' => 123,
'sourceToken' => '<string>',
'destinationToken' => '<string>',
'sourceAmount' => '<string>',
'funder' => '<string>',
'recipient' => '<string>',
'refundRecipient' => '<string>'
],
'contracts' => [
'sourcePortal' => '0x1234567890abcdef1234567890abcdef12345678',
'destinationPortal' => '0x567890abcdef1234567890abcdef1234567890ab',
'prover' => '0xabcdef1234567890abcdef1234567890abcdef12'
]
]),
CURLOPT_HTTPHEADER => [
"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.example.com/api/v2/quote/reverse"
payload := strings.NewReader("{\n \"quoteID\": \"quote:966ee977-586b-4bca-abf1-e7def508a19c\",\n \"dAppID\": \"<string>\",\n \"intentExecutionTypes\": [\n \"SELF_PUBLISH\"\n ],\n \"quoteRequest\": {\n \"sourceChainID\": 123,\n \"destinationChainID\": 123,\n \"sourceToken\": \"<string>\",\n \"destinationToken\": \"<string>\",\n \"sourceAmount\": \"<string>\",\n \"funder\": \"<string>\",\n \"recipient\": \"<string>\",\n \"refundRecipient\": \"<string>\"\n },\n \"contracts\": {\n \"sourcePortal\": \"0x1234567890abcdef1234567890abcdef12345678\",\n \"destinationPortal\": \"0x567890abcdef1234567890abcdef1234567890ab\",\n \"prover\": \"0xabcdef1234567890abcdef1234567890abcdef12\"\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
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.example.com/api/v2/quote/reverse")
.header("Content-Type", "application/json")
.body("{\n \"quoteID\": \"quote:966ee977-586b-4bca-abf1-e7def508a19c\",\n \"dAppID\": \"<string>\",\n \"intentExecutionTypes\": [\n \"SELF_PUBLISH\"\n ],\n \"quoteRequest\": {\n \"sourceChainID\": 123,\n \"destinationChainID\": 123,\n \"sourceToken\": \"<string>\",\n \"destinationToken\": \"<string>\",\n \"sourceAmount\": \"<string>\",\n \"funder\": \"<string>\",\n \"recipient\": \"<string>\",\n \"refundRecipient\": \"<string>\"\n },\n \"contracts\": {\n \"sourcePortal\": \"0x1234567890abcdef1234567890abcdef12345678\",\n \"destinationPortal\": \"0x567890abcdef1234567890abcdef1234567890ab\",\n \"prover\": \"0xabcdef1234567890abcdef1234567890abcdef12\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/api/v2/quote/reverse")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"quoteID\": \"quote:966ee977-586b-4bca-abf1-e7def508a19c\",\n \"dAppID\": \"<string>\",\n \"intentExecutionTypes\": [\n \"SELF_PUBLISH\"\n ],\n \"quoteRequest\": {\n \"sourceChainID\": 123,\n \"destinationChainID\": 123,\n \"sourceToken\": \"<string>\",\n \"destinationToken\": \"<string>\",\n \"sourceAmount\": \"<string>\",\n \"funder\": \"<string>\",\n \"recipient\": \"<string>\",\n \"refundRecipient\": \"<string>\"\n },\n \"contracts\": {\n \"sourcePortal\": \"0x1234567890abcdef1234567890abcdef12345678\",\n \"destinationPortal\": \"0x567890abcdef1234567890abcdef1234567890ab\",\n \"prover\": \"0xabcdef1234567890abcdef1234567890abcdef12\"\n }\n}"
response = http.request(request)
puts response.read_bodyBody
application/json
Unique identifier for the quote request
Example:
"quote:966ee977-586b-4bca-abf1-e7def508a19c"
Array of intent execution types to fetch quotes for
Available options:
SELF_PUBLISH, GASLESS Example:
["SELF_PUBLISH"]
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Optional gasless intent data containing permit signatures for token approvals and execution configuration
Show child attributes
Show child attributes
Response
201 - undefined
⌘I
