Reference example
# Fixed reference example. Playground inputs do not update this sample.
curl --request POST \
--url https://api.aisa.one/apis/v1/polymarket/quote \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"fromAmountBaseUnit": "10000000",
"fromChainId": "137",
"fromTokenAddress": "0x3c499c542cEF5E3811e1192ce70d8cC03d5c3359",
"recipientAddress": "0x17eC161f126e82A8ba337f4022d574DBEaFef575",
"toChainId": "137",
"toTokenAddress": "0xC011a7E12a19f7B1f670d46F03B03f3342E82DFB"
}'curl --request POST \
--url https://api.aisa.one/apis/v1/polymarket/quote \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"fromAmountBaseUnit": "10000000",
"fromChainId": "137",
"fromTokenAddress": "0x3c499c542cEF5E3811e1192ce70d8cC03d5c3359",
"recipientAddress": "0x17eC161f126e82A8ba337f4022d574DBEaFef575",
"toChainId": "137",
"toTokenAddress": "0xC011a7E12a19f7B1f670d46F03B03f3342E82DFB"
}
'import requests
url = "https://api.aisa.one/apis/v1/polymarket/quote"
payload = {
"fromAmountBaseUnit": "10000000",
"fromChainId": "137",
"fromTokenAddress": "0x3c499c542cEF5E3811e1192ce70d8cC03d5c3359",
"recipientAddress": "0x17eC161f126e82A8ba337f4022d574DBEaFef575",
"toChainId": "137",
"toTokenAddress": "0xC011a7E12a19f7B1f670d46F03B03f3342E82DFB"
}
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({
fromAmountBaseUnit: '10000000',
fromChainId: '137',
fromTokenAddress: '0x3c499c542cEF5E3811e1192ce70d8cC03d5c3359',
recipientAddress: '0x17eC161f126e82A8ba337f4022d574DBEaFef575',
toChainId: '137',
toTokenAddress: '0xC011a7E12a19f7B1f670d46F03B03f3342E82DFB'
})
};
fetch('https://api.aisa.one/apis/v1/polymarket/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://api.aisa.one/apis/v1/polymarket/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 => [
"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.aisa.one/apis/v1/polymarket/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("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.aisa.one/apis/v1/polymarket/quote")
.header("Authorization", "Bearer <token>")
.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://api.aisa.one/apis/v1/polymarket/quote")
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 \"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"
}Bridge
Get a quote
Get a bridge quote for a deposit or withdrawal.
<!-- aisa-pricing:start -->
Published reference price: $0.012 USD per successful request. Account-specific pricing and final settlement may differ.
<!-- aisa-pricing:end -->
POST
https://api.aisa.one
/
apis
/
v1
/
polymarket
/
quote
Reference example
# Fixed reference example. Playground inputs do not update this sample.
curl --request POST \
--url https://api.aisa.one/apis/v1/polymarket/quote \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"fromAmountBaseUnit": "10000000",
"fromChainId": "137",
"fromTokenAddress": "0x3c499c542cEF5E3811e1192ce70d8cC03d5c3359",
"recipientAddress": "0x17eC161f126e82A8ba337f4022d574DBEaFef575",
"toChainId": "137",
"toTokenAddress": "0xC011a7E12a19f7B1f670d46F03B03f3342E82DFB"
}'curl --request POST \
--url https://api.aisa.one/apis/v1/polymarket/quote \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"fromAmountBaseUnit": "10000000",
"fromChainId": "137",
"fromTokenAddress": "0x3c499c542cEF5E3811e1192ce70d8cC03d5c3359",
"recipientAddress": "0x17eC161f126e82A8ba337f4022d574DBEaFef575",
"toChainId": "137",
"toTokenAddress": "0xC011a7E12a19f7B1f670d46F03B03f3342E82DFB"
}
'import requests
url = "https://api.aisa.one/apis/v1/polymarket/quote"
payload = {
"fromAmountBaseUnit": "10000000",
"fromChainId": "137",
"fromTokenAddress": "0x3c499c542cEF5E3811e1192ce70d8cC03d5c3359",
"recipientAddress": "0x17eC161f126e82A8ba337f4022d574DBEaFef575",
"toChainId": "137",
"toTokenAddress": "0xC011a7E12a19f7B1f670d46F03B03f3342E82DFB"
}
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({
fromAmountBaseUnit: '10000000',
fromChainId: '137',
fromTokenAddress: '0x3c499c542cEF5E3811e1192ce70d8cC03d5c3359',
recipientAddress: '0x17eC161f126e82A8ba337f4022d574DBEaFef575',
toChainId: '137',
toTokenAddress: '0xC011a7E12a19f7B1f670d46F03B03f3342E82DFB'
})
};
fetch('https://api.aisa.one/apis/v1/polymarket/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://api.aisa.one/apis/v1/polymarket/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 => [
"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.aisa.one/apis/v1/polymarket/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("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.aisa.one/apis/v1/polymarket/quote")
.header("Authorization", "Bearer <token>")
.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://api.aisa.one/apis/v1/polymarket/quote")
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 \"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"
}Request contract
- Method and path: POST /apis/v1/polymarket/quote
- Request URL template: https://api.aisa.one/apis/v1/polymarket/quote
- Runtime facts: a22ef60cc6dc19c564ea7cc9b385d87a61bdb3cb13e168918fa7d5ae825d794e
{
"operationId": "any_polymarket_bridge_apis_v1_polymarket_quote",
"method": "POST",
"path": "/apis/v1/polymarket/quote",
"servers": [
{
"url": "https://api.aisa.one"
}
],
"parameters": [],
"security": [
{
"bearerAuth": []
}
],
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"type": "object",
"required": [
"fromAmountBaseUnit",
"fromChainId",
"fromTokenAddress",
"recipientAddress",
"toChainId",
"toTokenAddress"
],
"properties": {
"fromAmountBaseUnit": {
"type": "string",
"description": "Amount of tokens to send",
"example": "10000000"
},
"fromChainId": {
"type": "string",
"description": "Source Chain ID",
"example": "137"
},
"fromTokenAddress": {
"type": "string",
"description": "Source token address",
"example": "0x3c499c542cEF5E3811e1192ce70d8cC03d5c3359"
},
"recipientAddress": {
"type": "string",
"description": "Address of the recipient",
"example": "0x17eC161f126e82A8ba337f4022d574DBEaFef575"
},
"toChainId": {
"type": "string",
"description": "Destination Chain ID",
"example": "137"
},
"toTokenAddress": {
"type": "string",
"description": "Destination token address",
"example": "0xC011a7E12a19f7B1f670d46F03B03f3342E82DFB"
}
}
},
"example": {
"fromAmountBaseUnit": "10000000",
"fromChainId": "137",
"fromTokenAddress": "0x3c499c542cEF5E3811e1192ce70d8cC03d5c3359",
"recipientAddress": "0x17eC161f126e82A8ba337f4022d574DBEaFef575",
"toChainId": "137",
"toTokenAddress": "0xC011a7E12a19f7B1f670d46F03B03f3342E82DFB"
}
}
}
},
"x-aisa-pricing": {
"cost_contract": "fixed_success",
"customer_pricing": "fixed_success",
"default_request_estimate_usd": 0.012,
"estimate_source": "profile_seed",
"evidence_source": "request_snapshot"
},
"components": {
"securitySchemes": {
"bearerAuth": {
"scheme": "bearer",
"type": "http"
}
}
}
}
Cost and request rules
Published reference price: $0.012 USD per successful request. Account-specific pricing and final settlement may differ. Published reference values are not an account-specific quote or a settled charge. For endpoints supporting X-AISA-Cost-Mode: quote, obtain a free quote for your exact request before execution; reconcile the settled cost with response metadata and Usage Logs. USD amounts use 1,000,000 integer micro-USD per dollar.- Default request reference estimate (USD): 0.012
- Cost contract: fixed_success
- Settlement evidence source: request_snapshot
Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
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"