Public Quote for Bridge & Swap
curl --request GET \
--url https://api.rhino.fi/bridge/quote/bridge-swap/publicimport requests
url = "https://api.rhino.fi/bridge/quote/bridge-swap/public"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://api.rhino.fi/bridge/quote/bridge-swap/public', 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.rhino.fi/bridge/quote/bridge-swap/public",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.rhino.fi/bridge/quote/bridge-swap/public"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.rhino.fi/bridge/quote/bridge-swap/public")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.rhino.fi/bridge/quote/bridge-swap/public")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body{
"_tag": "bridge",
"chainIn": "<string>",
"chainOut": "<string>",
"payAmount": "<string>",
"payAmountUsd": 123,
"receiveAmount": "<string>",
"receiveAmountUsd": 123,
"fees": {
"fee": "<string>",
"feeUsd": 123,
"gasFee": "<string>",
"gasFeeUsd": 123,
"sourceGasFee": "<string>",
"sourceGasFeeUsd": 123,
"platformFee": "<string>",
"platformFeeUsd": 123,
"percentageFee": "<string>",
"percentageFeeUsd": 123,
"percentageFeeAmount": 123,
"percentageFeeThreshold": 123,
"sponsoredFees": {
"fee": "<string>",
"feeUsd": 123,
"gasFee": "<string>",
"gasFeeUsd": 123,
"sourceGasFee": "<string>",
"sourceGasFeeUsd": 123,
"platformFee": "<string>",
"platformFeeUsd": 123,
"percentageFee": "<string>",
"percentageFeeUsd": 123
}
},
"token": "<string>",
"promotion": {
"name": "<string>",
"maxLimitUsd": 123
},
"gasBoost": {
"amountNative": "<string>",
"amountNativeUsd": 123,
"amountNativeTokenCost": "<string>"
},
"speed": "fast",
"estimatedDuration": 123
}{
"_tag": "HttpApiDecodeError",
"issues": [
{
"_tag": "Pointer",
"path": [
"<string>"
],
"message": "<string>"
}
],
"message": "<string>"
}{
"_tag": "NoRouteFoundError",
"tokenIn": "<string>",
"tokenOut": "<string>",
"chainIn": "<string>",
"chainOut": "<string>"
}{
"_tag": "InvalidRequest",
"message": "<string>"
}quote
Public Quote for Bridge & Swap
Fetch public bridge and swap quote.
GET
/
quote
/
bridge-swap
/
public
Public Quote for Bridge & Swap
curl --request GET \
--url https://api.rhino.fi/bridge/quote/bridge-swap/publicimport requests
url = "https://api.rhino.fi/bridge/quote/bridge-swap/public"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://api.rhino.fi/bridge/quote/bridge-swap/public', 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.rhino.fi/bridge/quote/bridge-swap/public",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.rhino.fi/bridge/quote/bridge-swap/public"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.rhino.fi/bridge/quote/bridge-swap/public")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.rhino.fi/bridge/quote/bridge-swap/public")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body{
"_tag": "bridge",
"chainIn": "<string>",
"chainOut": "<string>",
"payAmount": "<string>",
"payAmountUsd": 123,
"receiveAmount": "<string>",
"receiveAmountUsd": 123,
"fees": {
"fee": "<string>",
"feeUsd": 123,
"gasFee": "<string>",
"gasFeeUsd": 123,
"sourceGasFee": "<string>",
"sourceGasFeeUsd": 123,
"platformFee": "<string>",
"platformFeeUsd": 123,
"percentageFee": "<string>",
"percentageFeeUsd": 123,
"percentageFeeAmount": 123,
"percentageFeeThreshold": 123,
"sponsoredFees": {
"fee": "<string>",
"feeUsd": 123,
"gasFee": "<string>",
"gasFeeUsd": 123,
"sourceGasFee": "<string>",
"sourceGasFeeUsd": 123,
"platformFee": "<string>",
"platformFeeUsd": 123,
"percentageFee": "<string>",
"percentageFeeUsd": 123
}
},
"token": "<string>",
"promotion": {
"name": "<string>",
"maxLimitUsd": 123
},
"gasBoost": {
"amountNative": "<string>",
"amountNativeUsd": 123,
"amountNativeTokenCost": "<string>"
},
"speed": "fast",
"estimatedDuration": 123
}{
"_tag": "HttpApiDecodeError",
"issues": [
{
"_tag": "Pointer",
"path": [
"<string>"
],
"message": "<string>"
}
],
"message": "<string>"
}{
"_tag": "NoRouteFoundError",
"tokenIn": "<string>",
"tokenOut": "<string>",
"chainIn": "<string>",
"chainOut": "<string>"
}{
"_tag": "InvalidRequest",
"message": "<string>"
}Query Parameters
Whether the amount should represent the sending or receiving amount, e.g. "pay". When "pay" is used, amount represents the value on the chainIn and the chainOut value will be calculated and provided in the quote. When "receive" is used, amount represents the value on the chainOut and the chainIn value will be calculated and provided in the quote.
Available options:
pay, receive Example:
"pay"
Response
Success
- Option 1
- Option 2
Provides information about whether the transaction should be completed "fast" (typically under 30 seconds), "standard" (typically under a minute) or "slow" (can be up to 20 minutes). For more information on our bridge processing speeds please read this article on the Rhino.fi Knowledge Base: https://learn.rhino.fi/articles/8257872655-bridge-speed.
Available options:
fast, standard, slow