Get a quote
curl --request POST \
--url https://bridge.polymarket.com/quote \
--header 'Content-Type: application/json' \
--data '
{
"fromAmountBaseUnit": "10000000",
"fromChainId": "137",
"fromTokenAddress": "0x3c499c542cEF5E3811e1192ce70d8cC03d5c3359",
"recipientAddress": "0x17eC161f126e82A8ba337f4022d574DBEaFef575",
"toChainId": "137",
"toTokenAddress": "0xC011a7E12a19f7B1f670d46F03B03f3342E82DFB"
}
'import requests
url = "https://bridge.polymarket.com/quote"
payload = {
"fromAmountBaseUnit": "10000000",
"fromChainId": "137",
"fromTokenAddress": "0x3c499c542cEF5E3811e1192ce70d8cC03d5c3359",
"recipientAddress": "0x17eC161f126e82A8ba337f4022d574DBEaFef575",
"toChainId": "137",
"toTokenAddress": "0xC011a7E12a19f7B1f670d46F03B03f3342E82DFB"
}
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({
fromAmountBaseUnit: '10000000',
fromChainId: '137',
fromTokenAddress: '0x3c499c542cEF5E3811e1192ce70d8cC03d5c3359',
recipientAddress: '0x17eC161f126e82A8ba337f4022d574DBEaFef575',
toChainId: '137',
toTokenAddress: '0xC011a7E12a19f7B1f670d46F03B03f3342E82DFB'
})
};
fetch('https://bridge.polymarket.com/quote', 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://bridge.polymarket.com/quote",
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([
'fromAmountBaseUnit' => '10000000',
'fromChainId' => '137',
'fromTokenAddress' => '0x3c499c542cEF5E3811e1192ce70d8cC03d5c3359',
'recipientAddress' => '0x17eC161f126e82A8ba337f4022d574DBEaFef575',
'toChainId' => '137',
'toTokenAddress' => '0xC011a7E12a19f7B1f670d46F03B03f3342E82DFB'
]),
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://bridge.polymarket.com/quote"
payload := strings.NewReader("{\n \"fromAmountBaseUnit\": \"10000000\",\n \"fromChainId\": \"137\",\n \"fromTokenAddress\": \"0x3c499c542cEF5E3811e1192ce70d8cC03d5c3359\",\n \"recipientAddress\": \"0x17eC161f126e82A8ba337f4022d574DBEaFef575\",\n \"toChainId\": \"137\",\n \"toTokenAddress\": \"0xC011a7E12a19f7B1f670d46F03B03f3342E82DFB\"\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://bridge.polymarket.com/quote")
.header("Content-Type", "application/json")
.body("{\n \"fromAmountBaseUnit\": \"10000000\",\n \"fromChainId\": \"137\",\n \"fromTokenAddress\": \"0x3c499c542cEF5E3811e1192ce70d8cC03d5c3359\",\n \"recipientAddress\": \"0x17eC161f126e82A8ba337f4022d574DBEaFef575\",\n \"toChainId\": \"137\",\n \"toTokenAddress\": \"0xC011a7E12a19f7B1f670d46F03B03f3342E82DFB\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://bridge.polymarket.com/quote")
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 \"fromAmountBaseUnit\": \"10000000\",\n \"fromChainId\": \"137\",\n \"fromTokenAddress\": \"0x3c499c542cEF5E3811e1192ce70d8cC03d5c3359\",\n \"recipientAddress\": \"0x17eC161f126e82A8ba337f4022d574DBEaFef575\",\n \"toChainId\": \"137\",\n \"toTokenAddress\": \"0xC011a7E12a19f7B1f670d46F03B03f3342E82DFB\"\n}"
response = http.request(request)
puts response.read_body{
"estCheckoutTimeMs": 25000,
"estFeeBreakdown": {
"appFeeLabel": "Fun.xyz fee",
"appFeePercent": 0,
"appFeeUsd": 0,
"fillCostPercent": 0,
"fillCostUsd": 0,
"gasUsd": 0.003854,
"maxSlippage": 0,
"minReceived": 14.488305,
"swapImpact": 0,
"swapImpactUsd": 0,
"totalImpact": 0,
"totalImpactUsd": 0
},
"estInputUsd": 14.488305,
"estOutputUsd": 14.488305,
"estToTokenBaseUnit": "14491203",
"quoteId": "0x00c34ba467184b0146406d62b0e60aaa24ed52460bd456222b6155a0d9de0ad5"
}Get a quote
POST
/
quote
Get a quote
curl --request POST \
--url https://bridge.polymarket.com/quote \
--header 'Content-Type: application/json' \
--data '
{
"fromAmountBaseUnit": "10000000",
"fromChainId": "137",
"fromTokenAddress": "0x3c499c542cEF5E3811e1192ce70d8cC03d5c3359",
"recipientAddress": "0x17eC161f126e82A8ba337f4022d574DBEaFef575",
"toChainId": "137",
"toTokenAddress": "0xC011a7E12a19f7B1f670d46F03B03f3342E82DFB"
}
'import requests
url = "https://bridge.polymarket.com/quote"
payload = {
"fromAmountBaseUnit": "10000000",
"fromChainId": "137",
"fromTokenAddress": "0x3c499c542cEF5E3811e1192ce70d8cC03d5c3359",
"recipientAddress": "0x17eC161f126e82A8ba337f4022d574DBEaFef575",
"toChainId": "137",
"toTokenAddress": "0xC011a7E12a19f7B1f670d46F03B03f3342E82DFB"
}
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({
fromAmountBaseUnit: '10000000',
fromChainId: '137',
fromTokenAddress: '0x3c499c542cEF5E3811e1192ce70d8cC03d5c3359',
recipientAddress: '0x17eC161f126e82A8ba337f4022d574DBEaFef575',
toChainId: '137',
toTokenAddress: '0xC011a7E12a19f7B1f670d46F03B03f3342E82DFB'
})
};
fetch('https://bridge.polymarket.com/quote', 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://bridge.polymarket.com/quote",
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([
'fromAmountBaseUnit' => '10000000',
'fromChainId' => '137',
'fromTokenAddress' => '0x3c499c542cEF5E3811e1192ce70d8cC03d5c3359',
'recipientAddress' => '0x17eC161f126e82A8ba337f4022d574DBEaFef575',
'toChainId' => '137',
'toTokenAddress' => '0xC011a7E12a19f7B1f670d46F03B03f3342E82DFB'
]),
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://bridge.polymarket.com/quote"
payload := strings.NewReader("{\n \"fromAmountBaseUnit\": \"10000000\",\n \"fromChainId\": \"137\",\n \"fromTokenAddress\": \"0x3c499c542cEF5E3811e1192ce70d8cC03d5c3359\",\n \"recipientAddress\": \"0x17eC161f126e82A8ba337f4022d574DBEaFef575\",\n \"toChainId\": \"137\",\n \"toTokenAddress\": \"0xC011a7E12a19f7B1f670d46F03B03f3342E82DFB\"\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://bridge.polymarket.com/quote")
.header("Content-Type", "application/json")
.body("{\n \"fromAmountBaseUnit\": \"10000000\",\n \"fromChainId\": \"137\",\n \"fromTokenAddress\": \"0x3c499c542cEF5E3811e1192ce70d8cC03d5c3359\",\n \"recipientAddress\": \"0x17eC161f126e82A8ba337f4022d574DBEaFef575\",\n \"toChainId\": \"137\",\n \"toTokenAddress\": \"0xC011a7E12a19f7B1f670d46F03B03f3342E82DFB\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://bridge.polymarket.com/quote")
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 \"fromAmountBaseUnit\": \"10000000\",\n \"fromChainId\": \"137\",\n \"fromTokenAddress\": \"0x3c499c542cEF5E3811e1192ce70d8cC03d5c3359\",\n \"recipientAddress\": \"0x17eC161f126e82A8ba337f4022d574DBEaFef575\",\n \"toChainId\": \"137\",\n \"toTokenAddress\": \"0xC011a7E12a19f7B1f670d46F03B03f3342E82DFB\"\n}"
response = http.request(request)
puts response.read_body{
"estCheckoutTimeMs": 25000,
"estFeeBreakdown": {
"appFeeLabel": "Fun.xyz fee",
"appFeePercent": 0,
"appFeeUsd": 0,
"fillCostPercent": 0,
"fillCostUsd": 0,
"gasUsd": 0.003854,
"maxSlippage": 0,
"minReceived": 14.488305,
"swapImpact": 0,
"swapImpactUsd": 0,
"totalImpact": 0,
"totalImpactUsd": 0
},
"estInputUsd": 14.488305,
"estOutputUsd": 14.488305,
"estToTokenBaseUnit": "14491203",
"quoteId": "0x00c34ba467184b0146406d62b0e60aaa24ed52460bd456222b6155a0d9de0ad5"
}Body
application/json
Amount of tokens to send
Example:
"10000000"
Source Chain ID
Example:
"137"
Source token address
Example:
"0x3c499c542cEF5E3811e1192ce70d8cC03d5c3359"
Address of the recipient
Example:
"0x17eC161f126e82A8ba337f4022d574DBEaFef575"
Destination Chain ID
Example:
"137"
Destination token address
Example:
"0xC011a7E12a19f7B1f670d46F03B03f3342E82DFB"
Response
Quote retrieved successfully
Estimated time to complete the checkout in milliseconds
Example:
25000
Breakdown of the estimated fees
Show child attributes
Show child attributes
Estimated token amount received in USD
Example:
14.488305
Estimated token amount sent in USD
Example:
14.488305
Estimated token amount received
Example:
"14491203"
Unique quote id of the request
Example:
"0x00c34ba467184b0146406d62b0e60aaa24ed52460bd456222b6155a0d9de0ad5"
Was this page helpful?
⌘I