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.
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"
}请求规范
- 方法与路径: POST /apis/v1/polymarket/quote
- 可用状态: enabled
- 请求 URL 模板:
https://api.aisa.one/apis/v1/polymarket/quote
{
"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": {
"content": {
"application/json": {
"example": {
"fromAmountBaseUnit": "10000000",
"fromChainId": "137",
"fromTokenAddress": "0x3c499c542cEF5E3811e1192ce70d8cC03d5c3359",
"recipientAddress": "0x17eC161f126e82A8ba337f4022d574DBEaFef575",
"toChainId": "137",
"toTokenAddress": "0xC011a7E12a19f7B1f670d46F03B03f3342E82DFB"
},
"schema": {
"properties": {
"fromAmountBaseUnit": {
"description": "Amount of tokens to send",
"example": "10000000",
"type": "string"
},
"fromChainId": {
"description": "Source Chain ID",
"example": "137",
"type": "string"
},
"fromTokenAddress": {
"description": "Source token address",
"example": "0x3c499c542cEF5E3811e1192ce70d8cC03d5c3359",
"type": "string"
},
"recipientAddress": {
"description": "Address of the recipient",
"example": "0x17eC161f126e82A8ba337f4022d574DBEaFef575",
"type": "string"
},
"toChainId": {
"description": "Destination Chain ID",
"example": "137",
"type": "string"
},
"toTokenAddress": {
"description": "Destination token address",
"example": "0xC011a7E12a19f7B1f670d46F03B03f3342E82DFB",
"type": "string"
}
},
"required": [
"fromAmountBaseUnit",
"fromChainId",
"fromTokenAddress",
"recipientAddress",
"toChainId",
"toTokenAddress"
],
"type": "object"
}
}
},
"required": true
},
"x-aisa-status": "enabled",
"components": {
"securitySchemes": {
"bearerAuth": {
"scheme": "bearer",
"type": "http"
}
}
}
}
费用与请求规则
公开参考价格:每次成功请求 $0.012 USD。 账户适用价格可能不同;支持报价的接口可按实际请求获取报价。授权
请求体
application/json
响应
Quote retrieved successfully